Running xmodmap at start-up

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
hwalinga
Level 1
Level 1
Posts: 24
Joined: Wed Oct 11, 2017 6:52 pm

Running xmodmap at start-up

Post by hwalinga » Mon May 13, 2019 7:33 pm

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 ... ?

User avatar
catweazel
Level 19
Level 19
Posts: 9521
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Running xmodmap at start-up

Post by catweazel » Tue May 14, 2019 1:45 am

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.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

hwalinga
Level 1
Level 1
Posts: 24
Joined: Wed Oct 11, 2017 6:52 pm

Re: Running xmodmap at start-up

Post by hwalinga » Tue May 14, 2019 9:43 am

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.

hwalinga
Level 1
Level 1
Posts: 24
Joined: Wed Oct 11, 2017 6:52 pm

Re: Running xmodmap at start-up

Post by hwalinga » Thu May 16, 2019 8:44 am

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.

Post Reply

Return to “Installation & Boot”