Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > General Help
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

General Help
All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu.

 
Thread Tools Display Modes
Old December 26th, 2006   #1
Hiroshima
A Carafe of Ubuntu
 
Hiroshima's Avatar
 
Join Date: Apr 2006
Beans: 112
xmodmap at startup

Looking over the posts that come up with an xmodmap search, I see other people are wanting to do similar things that I want to do.

I want
Code:
xmodmap -e "keycode 51 = bracketright braceright kana_MU kana_closingbracket"
to run at startup.

If I understand right, I should just make a ~/.xmodmaprc file (I assume I should use gedit for this), and put the above code line in the file.

That didn't seem to do anything, so I listed
Quote:
xmodmaprc
in the Systems>Prefernces>Sessions>Startup Programs list, but it still doesn't seem to work.

I must be missing something. Any ideas?

Thank you, Hiroshima
Hiroshima is offline   Reply With Quote
Old December 26th, 2006   #2
bulldog
Ubuntu addict and loving it
 
bulldog's Avatar
 
Join Date: Jun 2006
Location: The Netherlands
My beans are hidden!
Ubuntu 9.10 Karmic Koala
Re: xmodmap at startup

Did a little forum searching, and here's what I found:

Create a new text document. Paste this in and save it to your home directory:

Code:
xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server"  (or what ever you want of course)

Then right-click the file, and click the "Executable" check boxes.

Now you'll need to move the file into /usr/bin - the easiest way to do that will be through Terminal (as you need permissions to write to the directory):

Code:

sudo mv filename /usr/bin


Then go to your System menu > Preferences > Sessions > Startup programs and add your file to the list.
__________________
Resistance is futile.....you will be assimilated!

Registered Linux User 418427.
#Ubuntu User 3226#

Last edited by bulldog; December 26th, 2006 at 09:51 AM..
bulldog is offline   Reply With Quote
Old December 26th, 2006   #3
HadroLepton
5 Cups of Ubuntu
 
Join Date: May 2005
Location: germany
Beans: 40
Re: xmodmap at startup

you don't need to put that file in /usr/bin. in fact i advise against that because you will just unnecessarily clutter your system. linux has a strong multi user tradition and therefore allows almost anything to be customized by users, no need for root or sudo.

now to the xmodmap problem:
for this command
Code:
xmodmap -e "keycode 51 = bracketright braceright kana_MU kana_closingbracket"
you should write
Code:
keycode 51 = bracketright braceright kana_MU kana_closingbracket
read here for more: http://web.mit.edu/answers/xwindows/...s_xmodmap.html

put those lines in a file named .xmodmaprc in your home and it should be read everytime you login.
HadroLepton is offline   Reply With Quote
Old December 26th, 2006   #4
Hiroshima
A Carafe of Ubuntu
 
Hiroshima's Avatar
 
Join Date: Apr 2006
Beans: 112
Re: xmodmap at startup

Thank you bulldog and HadroLepton. I try when I get home, and then let you know how it works!

Thanks,

Hiroshima
Hiroshima is offline   Reply With Quote
Old December 27th, 2006   #5
Hiroshima
A Carafe of Ubuntu
 
Hiroshima's Avatar
 
Join Date: Apr 2006
Beans: 112
Re: xmodmap at startup

Quote:
Originally Posted by HadroLepton View Post
now to the xmodmap problem:
for this command
Code:
xmodmap -e "keycode 51 = bracketright braceright kana_MU kana_closingbracket"
you should write
Code:
keycode 51 = bracketright braceright kana_MU kana_closingbracket
put those lines in a file named .xmodmaprc in your home and it should be read everytime you login.
Brilliant!

Works like a charm!

Thank you.

Hiroshima
Hiroshima is offline   Reply With Quote
Old January 6th, 2007   #6
wasert
Spilled the Beans
 
Join Date: Nov 2005
Beans: 14
Re: xmodmap at startup

hi

I tried the same procedure, but my .xmodmaprc file is not being read.

When I type the following code, my keys are remapped correctly.

Code:
xmodmap -e "keycode 115 = dead_tilde"
xmodmap -e "keycode 109 = dead_acute"
Contents of my .xmodmaprc (located in my home directory):

keycode 109 = dead_acute
keycode 115 = dead_tilde

I am using Xubuntu Edgy. Could that be the problem?

Thanks in advance for your help
wasert is offline   Reply With Quote
Old January 29th, 2007   #7
RedSquirrel
Chocolate Ubuntu Mocha Blend
 
RedSquirrel's Avatar
 
Join Date: Dec 2006
Beans: 1,778
Re: xmodmap at startup

Quote:
Originally Posted by wasert View Post
hi

I tried the same procedure, but my .xmodmaprc file is not being read.

When I type the following code, my keys are remapped correctly.

Code:
xmodmap -e "keycode 115 = dead_tilde"
xmodmap -e "keycode 109 = dead_acute"
Contents of my .xmodmaprc (located in my home directory):

keycode 109 = dead_acute
keycode 115 = dead_tilde

I am using Xubuntu Edgy. Could that be the problem?

Thanks in advance for your help

I'm not sure if you're still looking for an answer to this, but all you have to do is rename your .xmodmaprc file to .Xmodmap and it will be loaded at startup.

If you look in /etc/gdm/Xsession, you will see this:

Code:
usermodmap="$HOME/.Xmodmap"
That's why the file should be named .Xmodmap instead of .xmodmaprc.
RedSquirrel is offline   Reply With Quote
Old January 25th, 2007   #8
Hiroshima
A Carafe of Ubuntu
 
Hiroshima's Avatar
 
Join Date: Apr 2006
Beans: 112
Re: xmodmap at startup

Sorry I didn't reply for so long... I didn't see the post. Since I was getting help with this, I can't offer any new advice, but I hope this reply gets your question bumped up a bit.

hiroshima
Hiroshima is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:12 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry