automatically running commands...
Whenever I launch X, I would like my desktop environment (right now it's Gnome, last week it was KDE, next week it may be Blackbox...) to run
xgamma -gamma 2.4 automatically. (I have to go into the shell to do this everytime, and it's getting to be a drag.) I have to do this because my display is pretty dark at its default gamma. I have no prior experience running commands automatically, so please talk to me like a child. :) |
ok children.. :D today's lesson in Linux...
ummmm.. you could possibly add it to your startup scripts.. |
look at /etc/rc.d directory (if I am not mistaken) for rc.* entries(* is ranging from 0 to 6 and corresponds to run level) look at rc.5 (init 5) and add one-line script there (actually 2 lines, first would be #!/bin/bash or whatever shell you preffer, second line is the line you specified), another alternative edit your /etc/rc.local file to include aforementioned line don't do #!/bin/bash
just the command you want to execute. |
I think that all you need to do is to add the command line for the program to the .Xclients file in the home directory of the user who starts X.
|
I think we are missing the point, doesn't this command need to go in .xinitrc?
Baloo* |
Quote:
|
You could add it to the start of /etc/X11/xinit/Xclients
|
Forget what I said about .Xclients, that's not KDE. Like Baloo said, .xinitrc is a good place to have it started. You can also put a shell script to start the program in ~/.kde2/Autostart. Or add a shortcut in the panel by adding a "legacy" app to the panel menu.
|
What i used to do is just open up the .xinitrc file in your home directory (if your distro has such file) and type the code to execute the desktop, for example this is what i used to launch kde.
exec startkde for gnome it would be: exec /opt/gnome/path/to/gnome/executable |
Lots of replies: thanks!
I've put it in .xinitrc and it's working a treat! :cool: |
All times are GMT -5. The time now is 06:42 AM. |