Execute the command when login

Matthias Apitz matthias.apitz at oclc.org
Wed Jul 2 08:00:20 UTC 2008


El día Wednesday, July 02, 2008 a las 03:11:45PM +0800, ronggui escribió:

> I would like to execute "xmodmap ~/.xmodmaprc" whenever login or start
> the Xorg. I try to put the command to ~/.login_conf or ~/.xinit, but
> it doesn't take effects.
> 
> What should I do? Thanks.

You could launch it from ~/.xinitrc for example as:

xmodmap.sh
exec startkde

and in xmodmap.sh you must take care that you set the $DISPLAY
accordingly, for example as 'setenv DISPLAY :0.0' and make sure that
you let first come up the Xorg and the desktop too, before launching
the xmodmap commands;

if you use KDE as desktop, like I do, it is more simple to just put your
script into the ~/.kde/Autostart/ directory;

	matthias

-- 
Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
«...una sola vez, que es cuanto basta si se trata de verdades definitivas.»
«...only once, which is enough if it has todo with definite truth.»
José Saramago, Historia del Cerca de Lisboa


More information about the freebsd-questions mailing list