||How to autostart X
provides an easy way to auto run an
x-windows program. You will need to do this if the app requires
that x-windows be already up and running before the app starts.
(many other start-up places do
not wait for X to startup, so the app will fail).
To execute something everytime you login, just after x-window starts;
1. Create a shortcut called MyStarts.Desktop inside /home/<user>/.config/autostart
and add these lines;
Comment=my commands after X startup
2. Create a mystarts.sh script inside your home directory, and put in any commands you wish to execute;
e.g, run a mouse script;
Note that "touch $HOME/_MSG_mystarts_done" will create an empty msg file each time. You can look at it's time stamp to check when mystarts.sh was run (ls -l).
Now, everytime X is started, mystarts.sh will be run !
In Lubuntu 12.04, ~/.config/autostart will run after lxsession ( /home/<user>/.config/lxsession/Lubuntu/desktop.conf ), this means it will override the affects of lxsession.
However, this might not be true for your linux distro.
|More Lubuntu Tips|