humpty promotes - Linux - Lubuntu

Lubuntu linux Tips
How to autostart X apps

LXDE 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

>cd ~/.config/autostart
>leafpad MyStarts.desktop

and add these lines;

[Desktop Entry]
Comment=my commands after X startup

2. Create a script inside your home directory, and put in any commands you wish to execute;

>cd ~
>leafpad .xstartup

e.g, run a mouse script;


touch $HOME/_MSG_mystarts_done

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 was run (ls -l).

Now, everytime X is started, will be run !


Notes :
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

Leading Cloud Surveillance, Recording and Storage service; IP camera live viewing

Leading Enterprise Cloud IT Service; cloud file server, FTP Hosting, Online Storage, Backup and Sharing

Powered by, a division of DriveHQ, the leading Cloud IT and Cloud Surveillance Service provider since 2003.