How to run script automatically in dom0?

What is the appropriate way to automatically execute a script in dom0 when starting up? I have a very simple bash script (single command: setxkpmap -option "ctrl:swapcaps") that I would like to run automatically every time I start, rather than me manually running it.

Q menu, cog wheel, System Settings, Session and Startup, Application Autostart tab and add application.

4 Likes

Brilliant. Thank you

Late to the party (after @KitsuneNoBaka 's very valid solution): as an old-timer, I prefer using cron to achieve this type of startup:

  1. in dom0, run “crontab -e”
  2. add a line:
    @reboot setxkpmap -option "ctrl:swapcaps"
  3. save
  4. (…)
  5. profit!

Note: you may have to specify /path/to/setxkpmap if it is not in /usr/bin

1 Like

I appreciate the old-school alternative, too, thanks

1 Like