Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
12-15-2011, 12:30 PM
#1
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Rep:
impossibility of loading xmodmap on startup X .initrc?
I simply cannot make the .initrc file or other attempts load my .xmodmap preferences.
My laptop is a new squeeze installation.
I followed this site:
http://fluxbox-wiki.org/index.php?title=.xinitrc
I added:
As I do in my xterm after login and startx command for fluxbox start.
In xterm after I start fluxbox it always works.
Why is this not working?
What (dot)file should I use for my startup preferences/commands?
Thankyou.
12-15-2011, 02:36 PM
#2
LQ 5k Club
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
Quote:
Originally Posted by
Foxbat1155
I simply cannot make the .initrc file or other attempts load my .xmodmap preferences.
Is that a typo, or did you actually put the line in in ".initrc" instead of ".xinitrc"? If so, that's the problem.
Quote:
Originally Posted by
Foxbat1155
I added:
As I do in my xterm after login and startx command for fluxbox start.
In xterm after I start fluxbox it always works.
I don't understand it the way you wrote it. Could you exaplin more clearly?
12-15-2011, 05:03 PM
#3
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
It should be .Xmodmap rather than .xmodmap, no ?
edit:
yes, in my .xinitrc, it tests for .Xmodmap :
Code:
$ grep -i xmodmap ~/.xinitrc
test -r /etc/X11/xinit/.Xmodmap && xmodmap /etc/X11/xinit/.Xmodmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
Last edited by Cedrik; 12-15-2011 at 05:06 PM .
12-15-2011, 06:50 PM
#4
LQ 5k Club
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
Quote:
Originally Posted by
Cedrik
It should be .Xmodmap rather than .xmodmap, no ?
Why does it matter when the OP is specifying it by name?
12-15-2011, 07:07 PM
#5
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
It matters if you use stock xinitrc file...
1 members found this post helpful.
12-15-2011, 07:35 PM
#6
LQ 5k Club
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
The OP said that he entered the line "As I do in my xterm after login and startx command for fluxbox start", whatever that means. I would assume that he means .xinitrc, but I would wait for a reply first.
1 members found this post helpful.
12-16-2011, 02:55 AM
#7
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
xinitrc
Indeed, I miss typed.
I have been always using .xinitrc and not initrc.
Also I have written the preferences in a .xmodmap file.
I have seen that alot of user write as .Xmodmap but I reckon this is irrelevant or is it not?
It works when I enter the command
in my xterm.
12-16-2011, 03:05 AM
#8
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
solved
Sirs this problem has just been solved, a friend of mine has provided me his .xsession file and these lines seem to solve it:
Code:
#/usr/bin/setxkbmap pt && /usr/bin/xmodmap ~/.xmodmap
/usr/bin/xmodmap ~/.xmodmap
Thankyou.
12-16-2011, 03:14 AM
#9
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
results
I would like to point out that what, more rigorously, I did was:
created the .xmodmap with my personal preferences.
created the .xsession file and included the line I inserted in my previous reply.
For future reference, these are the .xsession and .xmodmap files:
.xsession:
Code:
#!/bin/sh
#/usr/bin/xpad &
#/usr/bin/gkrellm -w &
/usr/bin/conky &
/usr/bin/xscreensaver &
/usr/bin/xrandr --output LVDS1 --auto --output VGA1 --auto &
#/usr/bin/setxkbmap pt && /usr/bin/xmodmap ~/.xmodmap
/usr/bin/xmodmap ~/.xmodmap
exec fluxbox
.xmodmap:
Code:
!
! Swap Caps_Lock and Control_L
!
!remove Lock = Caps_Lock
!remove Control = Control_L
!!keysym Control_L = Caps_Lock
!keysym Caps_Lock = Control_L
!add Lock = Caps_Lock
!!add Control = Control_L
!keycode 66 = Control
!keycode 176 = XF86AudioRaiseVolume
!keycode 174 = XF86AudioLowerVolume
!keycode 122 = XF86AudioLowerVolume
!keycode 123 = XF86AudioRaiseVolume
remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
Thankyou.
12-16-2011, 07:03 AM
#10
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
unsolved on squeeze HP Compaq nc6320
Although I have solved this issue on my desktop pc, I have not been able to solve this xmodmap problem on my laptop HP Compaq nc6320 with squeeze fluxbox.
Therefore I ask if anyone can help me run xmodmap with my .xmodmap file automatically everytime I start.
My xmodmap .xmodmap works perfectly every time I use it after starting fluxbox when I execute this in xterm.
How can I make this command be executed automatically?
My .xsession already has
Thankyou.
12-16-2011, 07:34 AM
#11
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
It is your religion or something that force you to use .xmodmap instead of .Xmodmap ?
I mean for example in my system, the xinitrc search for .Xmodmap, not .xmodmap by default
Ok you could modify each xinitrc for various wm, and modify them again after wm upgrade but...
See it for yourself:
Code:
grep .xmodmap /etc/X11/xinit/*
grep .Xmodmap /etc/X11/xinit/*
Edit:
Sorry, after some reading I think it is not the same xinit scripts in ubuntu
I don't know if it is relevant but some advise to
Code:
ln -s ~/.xinitrc ~/.xsession
If you plan to use gdm instead of startx
(startx will read .xinitrc and gdm will read .xsession)
Last edited by Cedrik; 12-16-2011 at 07:48 AM .
12-16-2011, 07:56 AM
#12
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
no output
Quote:
Originally Posted by
Cedrik
It is your religion or something that force you to use .xmodmap instead of .Xmodmap ?
I mean for example in my system, the xinitrc search for .Xmodmap, not .xmodmap by default
Ok you could modify each xinitrc for various wm, and modify them again after wm upgrade but...
See it for yourself:
Code:
grep .xmodmap /etc/X11/xinit/*
grep .Xmodmap /etc/X11/xinit/*
Edit:
Sorry, after some reading I think it is not the same xinit scripts in ubuntu
I don't know if it is relevant but some advise to
Code:
ln -s ~/.xinitrc ~/.xsession
If you plan to use gdm instead of startx
(startx will read .xinitrc and gdm will read .xsession)
there was no output to both greps. I do not plan to use gdm
12-16-2011, 08:08 AM
#13
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
Did you try to link your .xsession to .xinitrc just for testing ?
(startx will read .xinitrc and gdm will read .xsession)
Code:
ls -s ~/.xsession ~/.xinitrc
1 members found this post helpful.
12-23-2011, 06:38 PM
#14
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
Quote:
Originally Posted by
Cedrik
Did you try to link your .xsession to .xinitrc just for testing ?
(startx will read .xinitrc and gdm will read .xsession)
Code:
ls -s ~/.xsession ~/.xinitrc
Sir Cedrik,
I have gotten around the time to test your solution but this did not work.
02-15-2012, 10:05 PM
#15
Member
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 107
Original Poster
Rep:
solution
I would like to point out that I have found a solution in an emacs site for this problem
Instead of using xmodmap I am now using this:
Code:
setxkbmap -option ctrl:nocaps
on my fluxbox startup file and it works perfectly =)
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 11:23 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News