You are not logged in.

#1 2016-06-25 08:23:34

halogen
Member
Registered: 2014-06-12
Posts: 67

[solved] Making xmodmap persist across reboots (gnome)

I'm trying to disable the WLAN killswitch to prevent Gnome's faulty airplane mode from messing up my system (bug reported at https://bugzilla.gnome.org/show_bug.cgi?id=767696).

The following command works: xmodmap -e 'keycode 246 = NoSymbol'

but I cannot make it persist across reboots. I've tried so far:

- creating .Xmodmap in my home directory
- using .xinitrc to load xmodmap
- loading xmodmap via a .service file (e.g. https://github.com/lemenkov/systemd-use … ap.service)
- loading xmodmap via a .desktop file created in /home/user/.config/autostart/

Any help would be very appreciated.

Last edited by halogen (2016-06-25 13:05:57)

Offline

#2 2016-06-25 12:06:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,514
Website

Re: [solved] Making xmodmap persist across reboots (gnome)

What's in your ~/.xmodmap?

How do you start gnome?  If you don't use startx/xinit then xinitrc is irrelevant.

What is in the service file?  Is it a user service?

What is in the desktop file?  Do other desktop files in ~/.config/autostart work?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2016-06-25 12:59:39

halogen
Member
Registered: 2014-06-12
Posts: 67

Re: [solved] Making xmodmap persist across reboots (gnome)

Thanks for your reply.  I generate .xmodmap using:

xmodmap -e 'keycode 246 = NoSymbol'
xmodmap -pke >~/.Xmodmap

so the only difference with the default modmap is an empty "keycode 246 =" line.

The .service file I have used is the one I linked above (github) and while it is properly started it seems to fail with: unable to open display ':0'

Anyway, after reading your question about the autostart method, I tried creating a .desktop in /etc/xdg/autostart (instead of my home directory) with the following content:

[Desktop Entry]
Name=Disable wifi killswitch
Exec=sh -c "/usr/bin/xmodmap -e 'keycode 246 = NoSymbol'"
Terminal=false
Type=Application

And it worked. The gnome "airplane mode" popup doesn't appear anymore, although I noticed I still see its icon appearing and disappearing in the notification area if I keep pressing the hotkey (probably the notebook bios is responding to it.) But it seems it's now reacting in a saner way.

EDIT: nevermind, it's still behaving erratically. I guess the only way is to wait for the Gnome devs to fix it. Marking as SOLVED because at least xmodmap is now working.

Last edited by halogen (2016-06-25 13:05:46)

Offline

Board footer

Powered by FluxBB