Automated scripts to open applications based on what you're doing on login
- Replace
base_pathvariable inprofile_selector.pyfile with the path of the folder we store profiles. - add the applications you want to start in different profiles in the
profilesfolder in the corresponding named scripts.- You can also add new scripts.
- run
sh startup_profile_selector.sh
- Different linux distros use different methods to auto start apps/scripts on startup. Some methods to try:
- Option 1
- edit
startup_scripts_cron_filefile and change thestartup.shscript path to the one on your system - copy the
startup_scripts_cron_filefile to/etc/cron.d/folder
- edit
- Option 2 (If you use KDE)
- make startup_profile_selector.sh executable using
chmod +x startup_profile_selector.sh - Open 'system settings' > 'startup and shutdown' > 'Add' > 'Add login script' > add startup_profile_selector.sh
- make startup_profile_selector.sh executable using
- Option 3
- Do your own research
- Option 1
xdotoolis a desktop automation tool- Read here
- To open konsole(KDE terminal) and run a script:
konsole -e "python file.py"- Note: add a
input()at the end of the script to pause the script. Else it'll execute and close immediately.
- Note: add a
- To make a script execute & run it:
OR just use
chmod +x startup_scripts.sh ./startup_scripts.sh
sh startup_scripts.sh - Cron - schedule tasks on linux