View previous topic :: View next topic |
Author |
Message |
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Fri Jun 13, 2003 6:11 pm Post subject: xinitrc not recognized |
|
|
just wondering why when i put ~/.xinitrc, anything inside it won't be recognized.
well...i was trying to execute a script that will set my mod4 keys.
so then in .xinitrc, i have :
"exec exec-keys", where exec-keys is the script.
is there any other way to run script at login time?
i'm using fluxbox + gnome. _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Fri Jun 13, 2003 6:47 pm Post subject: |
|
|
And do you have a program called exec?
I'm not sure what you are trying to do, execute a program called exec-keys, I suppose.
Try this:
1. chmod a+x exec-keys
2. change "exec exec-keys" to "exec-keys" if it is in you path, else "/full/path/to/exec-keys"
The try to start X again.
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Fri Jun 13, 2003 8:42 pm Post subject: |
|
|
ok. it didn't work.
the thing is i'm trying to get my keyboard keys to work, specifically "mod4" which is the windows key.
the way i do it, i 'd type :
xmodmap -e "clear mod4"
xmodmap -e "keycode 115 = Super_L"
xmodmap -e "keycode 116 = Super_R Multi_key"
xmodmap -e "add mod4 = Super_L Super_R"
i tried putting this is in a executable file called /bin/exec-keys , then put exec-keys in .xinitrc, but it didnt' work.
i tried just putting those 4 lines in .xinitrc, and it still didn't work.
did i do anything wrong here? _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Fri Jun 13, 2003 9:30 pm Post subject: |
|
|
lotusvale wrote: | ok. it didn't work.
the thing is i'm trying to get my keyboard keys to work, specifically "mod4" which is the windows key.
the way i do it, i 'd type :
xmodmap -e "clear mod4"
xmodmap -e "keycode 115 = Super_L"
xmodmap -e "keycode 116 = Super_R Multi_key"
xmodmap -e "add mod4 = Super_L Super_R"
i tried putting this is in a executable file called /bin/exec-keys , then put exec-keys in .xinitrc, but it didnt' work.
i tried just putting those 4 lines in .xinitrc, and it still didn't work.
did i do anything wrong here? |
Not much experience with xmodmap.
Did you make sure the file was executable? chmod 755 /bin/exec-keys ?
If you run the xmodmap commands from the command prompt, do they work then?
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Fri Jun 13, 2003 9:42 pm Post subject: |
|
|
oh yeah..the command works perfectly fine. and the file is executable...via chmod a+x.
the problem is, it won't get executed automatically when login. _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
ebrostig Bodhisattva
Joined: 20 Jul 2002 Posts: 3152 Location: Orlando, Fl
|
Posted: Fri Jun 13, 2003 11:04 pm Post subject: |
|
|
Could you post the complete .xinitrc?
Also, how do you login? Through XDM/GDM/KDM or by running startx?
Erik _________________ 'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.' |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Sat Jun 14, 2003 1:04 am Post subject: |
|
|
well....see the whole .xinitrc is just either
or
Code: | xmodmap -e "clear mod4"
xmodmap -e "keycode 115 = Super_L"
xmodmap -e "keycode 116 = Super_R Multi_key"
xmodmap -e "add mod4 = Super_L Super_R"
|
i'm using gnome login manager.
not by startx. so i believe if i can that global file, i can insert my little script in, and everything should be okay. _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
deathdruid Guru
Joined: 25 Jul 2002 Posts: 343 Location: Philadelphia, PA, USA
|
Posted: Sat Jun 14, 2003 1:22 am Post subject: |
|
|
lotusvale,
.xinitrc is only read when using startx. If using gdm/xdm/kdm, you need to use .xsession. I usually do this:
Code: | ln -s .xinitrc .xsession |
which works for both methods.
Hope this helps,
Rahul |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Sat Jun 14, 2003 1:56 am Post subject: |
|
|
k so i just modify .xsession right?
btw, where can i find .xsession?
EDIT
actually just created in ~/.xsession, but it doesn't override the global one. _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
deathdruid Guru
Joined: 25 Jul 2002 Posts: 343 Location: Philadelphia, PA, USA
|
Posted: Sat Jun 14, 2003 5:02 pm Post subject: |
|
|
When logging into gdm, choose xsession as the session to start. It might be set to gnome right now. |
|
Back to top |
|
|
samokk Tux's lil' helper
Joined: 13 Jun 2003 Posts: 116 Location: Paris, France
|
Posted: Sat Jun 14, 2003 7:32 pm Post subject: |
|
|
are you using {X, G, K}DM, or plain startx ?
coz, AFAIK, .xsession is to be used instead of .xinitrc for use with gdm and the like
sam |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Sat Jun 14, 2003 8:26 pm Post subject: |
|
|
samokk wrote: | are you using {X, G, K}DM, or plain startx ?
coz, AFAIK, .xsession is to be used instead of .xinitrc for use with gdm and the like
sam |
read my previous posts. i've mentioned that i'm using gdm login manager _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
JeroenV Guru
Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Sat Jun 14, 2003 10:21 pm Post subject: |
|
|
Ok, some light into chaos
if you use gdm, the session types you can choose from (Gnome, KDE, ...) are determined by the files listed in /etc/X11/Sessions/. In my case:
Code: |
bonzai Sessions # ls
Gnome Xsession enlightenment enlightenment.cn kde-3.1.2 kde-3.1.2.cn waimea
|
These files can be seen as "global xinitrc" scripts (executable), i.e. they are configured systemwide. However, you can execute the user's .xsession by calling it from within these scripts. My /etc/X11/Sessions/enlightenment looks like this:
Code: | #!/bin/sh
. ~/.xsession
/usr/bin/enlightenment |
Note: in my case deathdruid's method didn't work (i.e. .xsession was ignored (or was this just my enlightenment script?), so I just forced its execution). I'd say it's good practice in general to just symlink .xsession to .xinit anyway. If you look into above scripts, you can see what is executed while starting X, so you may conclude that you might also hack eg. .gnomerc or something like that.
The above script will execute each user's own .xsession, and finally enlightenment.
Using this you can fill your .xsession whith whatever you like. _________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Sun Jun 15, 2003 12:01 am Post subject: |
|
|
thx man..it works!
except i'm not sure what you meant in your script though.
it says " . ~/.xsession"
what does the first dot in this case do? _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
JeroenV Guru
Joined: 16 Jul 2002 Posts: 447 Location: Amsterdam / Hamburg
|
Posted: Sun Jun 15, 2003 7:49 am Post subject: |
|
|
In sh or bash ". <command>" executes command in the current shell environment (the one the main script), afaik it's the same as "source command".
So if you do this:
(script1):
Code: |
. script2
echo $BLAH
|
and (script2)
the output of script1 will be:
_________________ Cheers
Jeroen
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
May The Source be with you! |
|
Back to top |
|
|
samokk Tux's lil' helper
Joined: 13 Jun 2003 Posts: 116 Location: Paris, France
|
Posted: Sun Jun 15, 2003 8:57 am Post subject: |
|
|
lotusvale wrote: | thx man..it works!
except i'm not sure what you meant in your script though.
it says " . ~/.xsession"
what does the first dot in this case do? |
Hmm, ok, that's cool but... isn't there a cleaner method ?
aren't global xinit scripts supposed to source .xsession by default ?
Is that a bug or a feature ?
sam |
|
Back to top |
|
|
lotusvale Guru
Joined: 06 Mar 2003 Posts: 339 Location: Canada
|
Posted: Sun Jun 15, 2003 2:38 pm Post subject: |
|
|
JeroenV wrote: | In sh or bash ". <command>" executes command in the current shell environment (the one the main script), afaik it's the same as "source command".
So if you do this:
(script1):
Code: |
. script2
echo $BLAH
|
and (script2)
the output of script1 will be:
|
yea i knew that, but i just thought you just needed to do
"~/.xsession" instead of ". ~/.xsession".
anyway, thx _________________
-SuSe shot- | -G shot-
Shadowrider's Lair |
|
Back to top |
|
|
mlybarger Guru
Joined: 04 Sep 2002 Posts: 475
|
Posted: Wed Jul 02, 2003 11:01 pm Post subject: |
|
|
i gotta re-ask the question b/c this is kinda troublesome. isn't there a cleaner method than updating the files in etc? first off, these can get wiped out during an upgrade, and secondly, they're not guaranteed to start an application each time i log into x, only for the wm that i've edited the /etc start srcipt.
me personally, i'm looking to put numlockx into a startup script so it works when i login. i don't use startx, i use xdm (using kdm currently). |
|
Back to top |
|
|
|