DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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".
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:
firefox
The firefox did execute perfectly but the Xwindows hang. Probably, surely, my "script" has something missing. Can somebody help me with an easy example of .xinitrc?
.xinitrc is executed, so you should "fork" programms you wan to run....
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.
Originally posted by R00ts 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.
Do you use a graphical login manager, or startx? .xinitrc is only used when you type startx.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.