SlackwareThis Forum is for the discussion of Slackware 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 have been using Openbox in my Slack --current install for a few weeks now. I like it, but would also like some apps to autostart when I fire up X. When I decided I wanted this I realized I'd totally forgotten how to make it happen!
So I went searching here and saw a few threads re: using a file (variously /etc/xprofile and ~/.xprofile) to store these commands. So I created /etc/xprofile with the lines
conky &
xscreensaver &
xclock &
and set it executable. It didn't work. I tried creating a symlink called '.xprofile' in my home directory to this /etc/xprofile. That didn't work. I chmod -x 'd /etc/xprofile, thinking it might be a permissions thing. That didn't work.
I'm sure it's something simple (I am something simple!), but I am currently stumped. All these commands are in /usr/bin, so I don't think adding the complete path is the answer, though it's easy enough to try ...
Just checking... but you do know that /etc/xprofile and ~/.xprofile are only used in runlevel 4?
Eric
Uh, well, no. I do now (he said sheepishly).
So this isn't an option for folks who like to handstart X then? E.g. it is a thing to utilize if you go straight to KDM (or whatever) and do not collect $200?
I am studying Woodsman's link. So much good stuff there!
So on the strength of the 'better startx' page at humanreadable, I altered /usr/bin/startx so it sources .xprofile and presto! it works! Now I can tweak to my heart's content.
Thanks to all for the responses. I am at home recovering from surgery, and it is fun to get back to playing ...
I altered /usr/bin/startx so it sources .xprofile and presto! it works!
Well, it sort of works. I noticed neither xscreensaver nor xclock was starting up. I captured stderr from startx and found this:
xscreensaver: 06:40:23: warning: $DISPLAY is not set: defaulting to ":0.0".
xscreensaver: 06:40:23: Can't open display: :0.0
xscreensaver: 06:40:23: initial effective uid/gid was chexmix/shadow (1000/43)
xscreensaver: 06:40:23: running as chexmix/users (1000/100)
xscreensaver: 06:40:23: Errors at startup are usually authorization problems.
But you're not logging in as root (good!) so something
else must be wrong. Did you read the manual and the FAQ?
Conky: can't open display:
Error: Can't open display:
xauth: creating new authority file /home/chexmix/.serverauth.3212
... which makes sense - it seems xscreensaver is trying to start up TOO SOON, e.g. before there is a display for it to start on. Am going to play with the placement of the lines in /usr/bin/startx where .xprofile gets sourced and see if that helps.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.