Hacker News new | past | comments | ask | show | jobs | submit login

Last time I was using Ubuntu+Unity as my main desktop (11.xx), I used `xmodmap` to swap my keys, and found that every so often it'd be reverted. Have you experienced similar problems with this technique?



IIRC I didn't finding any easy way of making xmodmap settings persist over reboot, so I just took had a script that runs "xmodmap ~/.Xmodmap" run at startup.

(Of course then I switched to xfce on my laptop, which seems to run its own xmodmap command after its run startup scripts or something which overrides them, which is kinda annoying, haven't found a nice way to get around that).


I do expect a reboot to require somehow reloading my settings via xmodmap. More troubling is during an X session with Unity, my settings would be reverted, and I'd have to reload with xmodmap. Other desktop environments didn't have this issue. I really should have done my part and written a bug report.


Try putting your `xmodmap' command in `~/.xinitrc'. It gets read whenever the X server starts (`startx').


Thanks, but Xfce's startup applications list (which is just a frontend for ~/.config/autostart) is already executed after the X server starts, and after .xinitrc.

(Apologies if me saying 'runs at startup' was misleading -- obviously if I had tried to do it from a script that ran on boot, before X starts (rather than on session start) it could never have worked in the first place!).

Edit: now I've started thinking about it again, I've changed the autostart script to call another which sleeps for 10s before xmodmap, which seems to have fixed the problem.


I put it in my startup script, it runs every login.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: