|
/Linux/Awesome:
Autostarting Applications in Awesome
It would seem I have discovered a hole in the Linux OS: there is no generalized method for autostarting applications upon login. KDE and Gnome each have their own, and if you use one of the other window managers some have something built-in, others (awesome?) apparently do not.
This is my latest attempt to get a screen locker (xautolock / xtrlock) and a status bar clock going in my setup, borrowed from here[1]. In ~/.xinitrc I have put the following:
#!/bin/sh ~/bin/better-awesome-clock & xautolock -time 10 -locker xtrlock -corners 00+0 -cornerdelay 0 & exec /usr/bin/awesome
And I have modified /usr/share/xsessions/awesome.desktop as follows, such that the "Exec" line invokes .xinitrc rather then invoking awesome directly:
And finally, for the record, this is the contents of ~/bin/better-awesome-clock (borrowed from where I do not recall):[Desktop Entry] Encoding=UTF-8 Name=Awesome Comment=Awesome window manager Exec=/home/userid/.xinitrc Icon=awesome.xpm Type=Application
#!/bin/sh # while true do if [ -S ~/.awesome_ctl.0 ]; then while true do # See 'man date' to see the possible replacements for the % fields. echo "0 widget_tell mystatusbar clock text " " `date +\"%a, %b %d %I:%M %p\"`" echo "" # an empty line flushes data inside awesome sleep 1 done | awesome-client else sleep 1 fi done
[1] http://urukrama.wordpress.com/2008/07/10/first-steps-with-awesome-window-manager/
posted at: 13:10 | path: /Linux/Awesome | permanent link to this entry