LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 12-15-2011, 12:30 PM   #1
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Rep: Reputation: 1
Post 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:

Code:
 xmodmap ~/.xmodmap
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.
 
Old 12-15-2011, 02:36 PM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Foxbat1155 View Post
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 View Post
I added:

Code:
 xmodmap ~/.xmodmap
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?
 
Old 12-15-2011, 05:03 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 12-15-2011, 06:50 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by Cedrik View Post
It should be .Xmodmap rather than .xmodmap, no ?
Why does it matter when the OP is specifying it by name?
 
Old 12-15-2011, 07:07 PM   #5
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
It matters if you use stock xinitrc file...
 
1 members found this post helpful.
Old 12-15-2011, 07:35 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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.
Old 12-16-2011, 02:55 AM   #7
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile 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
Code:
xmodmap .xmodmap
in my xterm.
 
Old 12-16-2011, 03:05 AM   #8
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile 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.
 
Old 12-16-2011, 03:14 AM   #9
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile 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.
 
Old 12-16-2011, 07:03 AM   #10
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile 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
Code:
xmodmap ~/.xmodmap
Thankyou.
 
Old 12-16-2011, 07:34 AM   #11
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 12-16-2011, 07:56 AM   #12
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
no output

Quote:
Originally Posted by Cedrik View Post
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
 
Old 12-16-2011, 08:08 AM   #13
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
Old 12-23-2011, 06:38 PM   #14
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile

Quote:
Originally Posted by Cedrik View Post
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.
 
Old 02-15-2012, 10:05 PM   #15
Foxbat1155
Member
 
Registered: Oct 2011
Location: Portugal.
Distribution: Debian squeeze - Fluxbox.
Posts: 109

Original Poster
Rep: Reputation: 1
Smile 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 =)
 
  


Reply

Tags
init, xmodmap



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
New modules to initrc file kromberg Fedora 4 03-28-2008 09:08 AM
The impossibility of changing keybords? raid517 Linux - Software 3 05-05-2006 11:42 AM
Load xmodmap at startup short101 Debian 2 08-27-2004 08:09 AM
loading .Xmodmap lrt2003 Linux - Newbie 2 06-13-2004 08:19 AM
Loading startup applications? Goonie Linux - General 1 06-28-2003 09:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration