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.
Originally posted by gbonvehi I used this formula sometime ago to log into X sucessfuly from rc.local (it's very similar to yours):
Code:
su - gbonvehi -c 'source /etc/profile; source /home/gbonvehi/.bash_profile; startx&'
Without using the && the command don't have tu be successfull, but it's actually the same because if you can't import /etc/profile you won't get the PATH vars to execute X11.
awesome!!! but one question: how'd you get a ~/.bash_profile and what does it look like?? none of the accounts on my slackware box seem to have one...
BTW (everyone), i've just seen the first issues related to the method i'm trying on my previous post: after getting logged-into X, when i open a terminal it's no longer postitioned in my home folder, it's at "/" and i need to "cd" to get myself positioned back into my home folder... also, i noticed someting like a "/dev/console : operation not permitted" or someting error on startup right when the auto-login command in rc.local is run...
i'm thinking the first issue might be fixed by using a ~/.bash_profile as suggested by gbonvehi, though...
as for the second issue, i'm not even sure if it matters... maybe i should just redirect the errors to dev null like "source /etc/profile 2> /dev/null" or something??
The second issue (from what i've seen in XDM) can be fixed by chowning /dev/console to the user that's running it.
About bash_profile, it isn't really necesary, i've just a few configs for my user (alias for ls to display with -l by default, a nicer command prompt and a PATH that adds ~/bin in it) but it's not a must.
Try adding something like:
Code:
# This may be not too secure, I really don't know
chown gbonvehi /dev/console
su - gbonvehi -c 'source /etc/profile; source /home/gbonvehi/.bash_profile; cd /home/gbonvehi; startx&'
I noticed that when starting X from command line the default path in a X terminal is the directory where you run startx.
Distribution: Slackware, SuSE, Vector, from scratch
Posts: 9
Rep:
I'm sorry, but is there any reason you can't just add a 4 to your boot parameters? that's how I usually do it, and I didn't have any trouble with any Slack yet.
in GRUB, just add a space and a 4 to the end of the kernel line, and in LILO, just add append = " 4" (I think)
Originally posted by benvanderjagt I'm sorry, but is there any reason you can't just add a 4 to your boot parameters? that's how I usually do it, and I didn't have any trouble with any Slack yet.
in GRUB, just add a space and a 4 to the end of the kernel line, and in LILO, just add append = " 4" (I think)
that wouldn't auto-login a user, which is what we are talking about... ;-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.