Setting keyboard shortcuts to launch program on startup/login in linux across WMs

Posted on

Problem :

What I want to achieve is having access to a couple of keyboard shortcuts (for an instance to launch the terminal), bound to my user.


This is because we have a setup with a lot of different machines, which don’t have a consistent set of window-managers installed, running on various linux distributions, and are exchanged for new ones from time to time. But all have a basic set of programs, and the users home folder and user-profiles (.bash-rc, .bash-profile, .profile, and so on) that are loaded on login.

That is, I want to have a consistent workflow across the different machines where I can get to the terminal and browsers with a couple of common shortcuts so that I effectively can disregard what window-manager or distribution is set up on the particular machine I happen to be working on.


Is it possible to launch a script on login that modifies keyboard shortcuts without having sudo-privileges, and if so how?

What my resarch has turned up so far

All my google-fu can find on the issue is that you can make aliases that are set on login (which would set shortcuts in the shell and not the WM as I desire), and that you can use third-party programs to set keyboard shortcuts.

As I understand it, .profile would be a good place to specify the shortcuts if I at startup/login want them to override the ones set locally, but that might be wrong as my research didn’t turn up too much on the topic.

Also I do not care for reassigning shortcuts that might be overwritten by this.

Solution :

actkbd – A keyboard shortcut daemon.

It seems to have been abandoned in 2009 and is Linux only, but otherwise it addresses your needs.

More details about its use can be found here:

In Linux, remap keys from second keyboard to unicode characters and shortcuts

Leave a Reply

Your email address will not be published. Required fields are marked *