You are not logged in.
I've noticed that when I use the daemon and inittab methods of loading KDM automatically, my .xinitrc script isn't being executed at logon.
I'm trying to automate the hotkeys on my notebook, but the ~/.Xmodmap file will only load if I run xmodmap manually. For some reason the .xinitrc isn't being called.
thayer williams ~ cinderwick.ca
Offline
Did you give .xprofile a try?
Offline
are you sure it doesn't run from /etc/rc.local
also kde has autostart support .. it should be in the control(config?) center somewhere ; either way ( i assume it's the same format as gnome/xfce[~/.config/autostart]) you can add a desktop enty to ~/.kde/Autostart
example of desktop file
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=/usr/share/pixmaps/apple-red.png
Name[en_GB]=App
Exec=/usr/bin/app
Name=App
Icon=/usr/share/pixmaps/apple-red.png
Offline
Thanks for the tips regarding KDE's autostart. I may end up using those, however I would rather use the standard configs that are meant for these kind of things.
Is it not being executed simply because I'm not launching KDE from a console with startx?
thayer williams ~ cinderwick.ca
Offline
The Autostart suggestion worked, however it has the obvious limitation that it will only work if I'm running KDE. But at least I have something until I find a better solution.
I haven't tried the /etc/rc.local suggestion yet, however I don't see that as working either, since it is executed after the boot process but before anyone logs in, correct? This would mean X wouldn't be loaded yet and a specific user's path wouldn't be defined. rc.local does work however for the setkeycodes scripts I have running.
thayer williams ~ cinderwick.ca
Offline
As dawei already said $HOME/.xprofile it's DE neutral and will be sourced before any DE is started by the login manager.
This is my .xprofile:
export LANG=mk_MK.UTF-8
export PATH=$PATH:$HOME/bin
export GTK_IM_MODULE=xim
eval `ssh-agent`
ssh-add
setxkbmap gb,mk -option grp:switch -option grp:menu_toggle \
-option compose:rwin -option grp_led:scroll
xmodmap -e "pointer = 1 2 3 6 7 4 5"
gensig -a /usr/share/gensig/taglines
and my .xinitrc is:
#!/bin/sh
source $HOME/.xprofile
exec startkde
Offline
damjan & dawei: The problem is that .xinitrc isn't being executed when I log in, so it does me little good to have a shell script loaded from .xprofile if .xprofile isn't being loaded in the first place.
The KDE Autostart does work if I call the xmodmap script from there, but I'd rather figure out why .xinitrc isn't being called.
Last edited by thayer.w (2007-06-01 19:20:06)
thayer williams ~ cinderwick.ca
Offline
added
/usr/bin/xmodmap ~/.Xmodmap
xbindkeys
to ~/.bashrc
simply works (I have @kdm added to DAEMONS=(..) of rc.conf if this will help)
no problems
Last edited by broch (2007-06-02 02:28:37)
Offline
Thanks, broch... I thought .bashrc was only executed when the terminal was opened, but I'll give that a shot too!
thayer williams ~ cinderwick.ca
Offline
Okay, this is driving me nuts! I stand corrected on a couple of things:
.bashrc and .xprofile DO get executed when I log into KDE.
However, for whatever my xmodmap settings are not working when placed into these scripts. If I copy/paste the line from the scripts into a console, the key mappings word as intended:
xmodmap ~/.Xmodmap
I've also tried using an absolute path for xmodmap and an absolute path for the .Xmodmap file... neither run automatically. Is it possible that something else is loading x mappings after my own script is executed, thus overwriting my settings? I do not have keyboard layouts enabled in kcontrol.
thayer williams ~ cinderwick.ca
Offline
...
Is it possible that something else is loading x mappings after my own script is executed, thus overwriting my settings? ....
I think you can test it with something like that:
1. make those 2 lines in your .profile (or in whatever your *rc file)
xmodmap ~/.Xmodmap 2>XmodErrors.log #check if executed
xmodmap -pke >~/XmodKeys1.log #to check the keys
2. Execute after login:
xmodmap -pke >~/XmodKeys2.log
3. Compare XmodKeys1.log and XmodKeys2.log
If they are different then look for the culprit...
Then..., also have a look at files in the /etc/X11/xinit folder. e.g xintrc contains:
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
Btw, my vote goes against kdm daemon. I use inittab, compiled autologin, dissabled root, auto su, sometimes kdm and gdm in parallel with various DM also parallel. Surprisingly the speed improves
Offline
Hi!
I've got the similar problem: kdm doesn't execute even /etc/profile script, so than LANG and PATH variables remain unset.
My solution is: edit the /opt/kde/share/config/kdm/Xstartup file, add there something like
. /etc/profile
in my case, or
. ~/.xinitrc
in yours.
HTH.
Offline