![]() |
Execute an application automatically after startx
Hi!
I'm using Debian with an xfce4 X windows and a "start X manager" gdm.... sorry for my english, I hope you understand what i want to mean. Well, after a few days I solve my first problem: How to auto-login a user at start xwindows. Now, I want to automatically execute an application alter all xfce is set up. What's the very last script that is executed on start? Maybe thats the best place to set my "script". Thanks! |
The classic approach would be to but this into .xinitrc.
But modern Desktops use something else: in your home directory there should be a folder "Desktop" and "Desktop/Autostart" All scripts/symlinks in Desktop/Autostart should be automatcly executed when you log into Xfce / Gnome / Kde |
My desktop doesn't have the folder "Desktop", so the folder "Autostart".......
Well, I tried to make my xinitrc: ~HOME/.xinitrc, There inside I just type: Code:
firefoxThanks! |
Yep, you should have written
Code:
firefox &I think this is not obvious for most people, so the new aproach with the Desktop/Autostart dir is better. |
What about .xsession? I was trying to do this a little while ago using wdm (not gdm) to set some environmental variables and found that it didn't work when I put them in .xinitrc, but it did work in .xsession. Hmm I dunno. Maybe I forgot to put #!/usr/bin/bash in the xinitrc one and not the xsession one, who knows. :Pengy:
|
Quote:
As far as opening programs automatically when X is started, putting "exec some_app &" into .xinitrc will work, but for WM's like GNOME and XFCE that have "sessions", it's generally better to add those apps you want autostarted to your desktop environments session so that it is started that way. In GNOME, in the menu, go to sessions, and then then add the app there, in XFCE, just open it in XFCE, then log out and check the box to save the session. It will then automatically open the next time you start it. |
I think you can do this:
# cd /etc/X11/Xsession.d # echo yourapp > 95yourapp_start Then the application will automatically run after you login from gdm. Could it work? |
| All times are GMT -5. The time now is 12:26 PM. |