Short tutorial on how to run commands after start on Lubuntu. This manual was tested on Lubuntu 18.04.
1. Create file under /home/myusername/.afterstart.sh
2. Write down commands you wish to run on start. For test begin with command you know will work, for example firefox
(this command will autolauch Firefox right after the start).
NOTE: Command aliases from .bashrc
, if you have any, don’t work. You need to use original command.
3. Make sure script you have created is executable: chmod +x /home/myusername/.afterstart.sh
4. Under path ~/.config/lxsession/Lubuntu/autostart
you will find commands which run after the start. Edit the file with command sudo nano ~/.config/lxsession/Lubuntu/autostart
NOTE: Do not use vi
as an editor, it may blow up your computer!
5. Add there /home/myusername/.afterstart.sh
6. Under Start > Preferences > Default application for LXSession
you should now see something like on the picture:
7. Reboot and see if it works.
Leave a Reply