Ubuntu – Awesome window manager on startup

awesome

I've installed Awesome window manager on Ubuntu 12-04

I have followed these instructions to set it up. It works correctly.

I am now trying to add some shell commands to be run at startup. [swapping mouse buttons round & stopping the display turning off when idle]. I have these commands stored in the .xsession file and I have .xinitrc sym linked to .xsession.

The commands in .xsession are not being executed. How can I make these commands run? Are they in the wrong place?

I thought awesome was an extension to Xwindows and so it would run ~/.xsession when it starts up. But it isn't doing.

andy@:~$ cat ~/.xsession
xmodmap -e "pointer = 3 2 1"

setterm -blank 0 -powersave off -powerdown 0
xset s off

Best Answer

The scripts in home folder results in race conditions with others if not taken care of...

I suggest to have these commands in some place say /usr/local/bin/awesome-personal script.

So create a file called /usr/local/bin/awesome-personal and the contents of it being:

#Assuming the awesome binary file is /usr/bin/awesome

xmodmap -e "pointer = 3 2 1"

setterm -blank 0 -powersave off -powerdown 0 <br />
xset s off

exec /usr/bin/awesome

Now copy the global xsession file /usr/share/xsessions/awesome.desktop (to save the original copy) by running the command:

cp /usr/share/xsessions/{awesome.desktop,awesome2.desktop}

Now start editing the /usr/share/xsessions/awesome2.desktop file and replace

Exec=/usr/bin/awesome

with:

Exec=/usr/local/bin/awesome-personal

Things should work now. On starting Ubuntu, you can select the personal awesome window manager by selecting the new entry awesome2 session. (You can select it from the lightdm where you enter the password while logging in ubuntu).

If it still doesn't work, comment back here...