Page 1 of 1

Running xmodmap at start-up

Posted: Mon May 13, 2019 7:33 pm
by hwalinga
Whenever I run xmodmap manually it works fine. However I can't get it to work automatically at start-up.

I made a ~/.Xmodmap file and tried creating a ~/.xinitrc and a ~/.xprofile with the following contents

Code: Select all

#!/bin/bash
[[ -f /home/hielke/.Xmodmap  ]] && /usr/bin/xmodmap /home/hielke/.Xmodmap
Did not work.

Next I tried creating a .config/autostart/keys.desktop file with the contents

Code: Select all

[Desktop Entry]
Name=xmodmap
Comment=Apply Xmodmap
Exec=/home/hielke/.keys
Icon=system-run
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true
Did also not work.

Any more suggestions for me to try? Or is this the systemd madness everybody is talking about, and if I want proper control over my system I better look for a systemd free alternative ... ?

Re: Running xmodmap at start-up

Posted: Tue May 14, 2019 1:45 am
by catweazel
hwalinga wrote:
Mon May 13, 2019 7:33 pm
Any more suggestions for me to try?
Add the command to the end of .profile for a user-specific scope. If you want global scope, you can add a systemd service: viewtopic.php?t=275464
hwalinga wrote: Or is this the systemd madness everybody is talking about, and if I want proper control over my system I better look for a systemd free alternative ... ?
The only madness is that presented by rabid systemd opponents who know they're gibbering but don't know why.

Re: Running xmodmap at start-up

Posted: Tue May 14, 2019 9:43 am
by hwalinga
Thanks for your help, but both the .profile and the systemd service did not work for me.

Code: Select all

[Unit]
After=display-manager.service

[Service]
ExecStart=/home/hielke/.keys.sh

[Install]
WantedBy=default.target
My memory might not be that good, but I thought this was a lot easier to do before my system was using systemd.

Re: Running xmodmap at start-up

Posted: Thu May 16, 2019 8:44 am
by hwalinga
Add the command to the end of .profile for a user-specific scope. If you want global scope, you can add a systemd service: viewtopic.php?t=275464
Unfortunately it did not work.