View previous topic :: View next topic |
Author |
Message |
sigfriedmcwild n00b
Joined: 06 Sep 2003 Posts: 18
|
Posted: Fri Aug 19, 2005 12:33 pm Post subject: How to run a program everytime X logs in |
|
|
I need to run a program every time I log in into an X session.
I tried putting it into a ~/.xsessionrc or a ~/.xinitrc file but it doesn't run.
I'm using kdm as my display manager. |
|
Back to top |
|
|
evster Guru
Joined: 12 Jul 2005 Posts: 367 Location: Waterloo, Ontario, Canada
|
Posted: Fri Aug 19, 2005 1:12 pm Post subject: |
|
|
What window manager are you using? Most wm's have their own way of starting things when they start up, so if you only use one wm this may be the way to go. |
|
Back to top |
|
|
Ariem Apprentice
Joined: 13 Jun 2005 Posts: 296 Location: reykjavik
|
Posted: Fri Aug 19, 2005 1:17 pm Post subject: |
|
|
I'm not quite sure on this one, but if you place what you want to start in Code: | /etc/X11/Sessions/<your_session> | you might get it.
As evster said, depending on which WM you use, you can make it by other ways.
HTH |
|
Back to top |
|
|
Corax Apprentice
Joined: 14 Apr 2004 Posts: 222 Location: Berlin, Germany
|
Posted: Fri Aug 19, 2005 1:33 pm Post subject: |
|
|
On most configurations, an entry in ~/.xinitrc will do it as well.
According to the standards from freedesktop.org, there should be a folder ~/Desktop/Autostart, that handles such things... You only need a window manager, that supports it. _________________ There's no such priest //
that can pray me to heaven.
-- Nightwish, "Bare grace misery" |
|
Back to top |
|
|
sigfriedmcwild n00b
Joined: 06 Sep 2003 Posts: 18
|
Posted: Fri Aug 19, 2005 2:30 pm Post subject: |
|
|
thx for the help, but none of the options above produces any results.
I normally use kde but I need some things (mouse configuration done xmodmap) to be carried out no matter who logs in in which window manager |
|
Back to top |
|
|
Corax Apprentice
Joined: 14 Apr 2004 Posts: 222 Location: Berlin, Germany
|
Posted: Fri Aug 19, 2005 3:14 pm Post subject: |
|
|
Are you aware of the fact, that ~/.xinitrc is a shell script and should be opened by a shebang (#! /bin/sh)? And that it needs executable rights? _________________ There's no such priest //
that can pray me to heaven.
-- Nightwish, "Bare grace misery" |
|
Back to top |
|
|
sigfriedmcwild n00b
Joined: 06 Sep 2003 Posts: 18
|
Posted: Fri Aug 19, 2005 3:21 pm Post subject: |
|
|
yes
In fact at the moment I'm running ~/.xinitrc manually everytime I log in
My .xinitrc script
Code: |
#!/bin/bash
xmodmap /etc/X11/Xmodmap # I've created this file with the settings I need
imwheel -k -b "67"
|
|
|
Back to top |
|
|
Jeremy_Z l33t
Joined: 05 Apr 2004 Posts: 671 Location: Shanghai
|
Posted: Fri Aug 19, 2005 3:23 pm Post subject: |
|
|
sigfriedmcwild wrote: | thx for the help, but none of the options above produces any results.
I normally use kde but I need some things (mouse configuration done xmodmap) to be carried out no matter who logs in in which window manager |
Try /etc/xprofile
I have it to do :
Code: | export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
|
And this get executed when X starts (like XDM/GDM/KDM/startx and not the WM) so it is fairly generic. _________________ "Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals |
|
Back to top |
|
|
evster Guru
Joined: 12 Jul 2005 Posts: 367 Location: Waterloo, Ontario, Canada
|
Posted: Fri Aug 19, 2005 4:01 pm Post subject: |
|
|
I notice a lot of people are having trouble when trying to run commands in ~/.xinitrc maybe someone could look into why this seems to be not working. I have always used fluxbox and so I just launch apps from ~/.fluxbox/startup but I will try the other files out to see if I can launch things from there. |
|
Back to top |
|
|
dwblas Guru
Joined: 14 Jul 2003 Posts: 525 Location: Southern California (No jokes please)
|
Posted: Fri Aug 19, 2005 4:18 pm Post subject: |
|
|
I've been using ~/.xinitrc for years with no problems. If imwheel is an executable, you have to run it in the background, i.e. put an & at the end, otherwise the script will never start the windowmanager. I suspect that .xinitrc is not the script that you want to use because there isn't any command in it to start the window manager. KDE has something like startkde as the script for startup, so that is probably where you want to put your additions. |
|
Back to top |
|
|
seventhguardian Apprentice
Joined: 10 May 2004 Posts: 261 Location: Portugal
|
Posted: Fri Sep 02, 2005 12:41 pm Post subject: |
|
|
And the answer is:
This way it's a user file (and not a system default). It's great for starting aim clients (like gaim) on every xsession. |
|
Back to top |
|
|
|