LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-04-2011, 01:18 PM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Rep: Reputation: 23
How do I get xmodmap to work in LXDE?


As I have a Mac, I'd like to map the cauliflower keys to ctrl, as in GNOME. I created an .xmodmap file, and it was loaded, but the remapping did not work. The xmodmap file is:

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R

I got the keycodes from running xmodmap -pke.
So how do I get this to work?
 
Old 06-05-2011, 07:46 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Try adding this line to your ~/.xinitrc:

Code:
xmodmap ~/.xmodmap
(this assumes that your xmodmap file is called ".xmodmap", like you said in your post)
 
Old 06-05-2011, 11:01 AM   #3
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Original Poster
Rep: Reputation: 23
Thank you; I'll try that. I don't have a .xinitrc, (just did a fresh install of lubuntu on a new disk), but I'll create one.
 
Old 06-05-2011, 12:51 PM   #4
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Original Poster
Rep: Reputation: 23
Sorry - did not work. I think .xinitrc only makes sense when you don't use a display manager but login to the console and use startx.

Last edited by nokangaroo; 06-05-2011 at 02:13 PM.
 
Old 06-05-2011, 01:35 PM   #5
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
I thought that LXDE probably ignored it, but I thought it was worth a try.

I couldn't find anything about how to run a script on LXDE startup. Maybe someone else knows.
 
Old 06-05-2011, 02:16 PM   #6
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Original Poster
Rep: Reputation: 23
I just modified my .xmodmap to read

keycode 133 = 0xffe3
keycode 134 = 0xffe4

and the modified keycodes are correctly displayed by the xev command - both Apple keys show the keycodes of the corresponding ctrl keys - but the desktop is not responding. I had the same problem in xfce. I'll have a look at the xfce forums next.

P.S. I also created a file $HOME/.config/autostart/xmodmap.desktop (with lxshortcut) that runs the command xmodmap ~/.xmodmap. This may be useful to some people but my problem does not seem to be xmodmap related. xmodmap seems to be working correctly, but LXDE does not recognize the keys.

Updating X with the xswat repo and installing console-tools did not help either. Maybe this is a Lubuntu issue. I'll try Openbox in Debian.

Last edited by nokangaroo; 06-12-2011 at 03:05 PM.
 
Old 06-15-2011, 04:19 PM   #7
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Original Poster
Rep: Reputation: 23
Solved - but not with xmodmap. There is another solution that actually works, and I have posted it here:

http://www.linuxquestions.org/questi...penbox-885949/
 
  


Reply

Tags
keyboard, lxde, xmodmap


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xmodmap: Mapping ISO_Level3_Shift does not work huangho Linux - Desktop 1 01-15-2011 09:31 PM
Opensuse 11.2 lxde or PclinuxOs 2009.4 lxde damipereira Linux - Distributions 1 02-16-2010 02:51 AM
fedora 12 spin lxde installer won't work gatliffe Fedora - Installation 2 01-03-2010 01:21 PM
getting xmodmap to work for all users? harkonen Fedora 4 12-07-2007 01:11 AM
xmodmap does not work Takalah Linux - Hardware 4 11-28-2004 11:24 AM


All times are GMT -5. The time now is 08:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration