Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
hi guys, dont suppose anyone could point me in the direction of a HOWTO or guide or something that would explain how I could boot into an X session and run a program without having to login ? (in slack 8.1) I need this because I'm building a 'set top box' for my tele using a linux backend and I want the box to bootup and go straight into the software and not prompt for a login
PS. I do realise this is horribly unsecure
Last edited by phoeniXflame; 04-13-2003 at 03:35 PM.
Originally posted by david_ross In KDE:
System settings -> Login Screen
Set the system to automatically login a user at boot.
thx for quick reply, but I dont run KDE, I run fluxbox and its loaded via startx and .xinitrc in the home dir of the user I want to boot into
I actually dont really care which window manager it is as long as its NOT KDE or Gnome as I find both of them are far to bulky to just launch 1 program, waste of resources imo
Last edited by phoeniXflame; 04-13-2003 at 03:49 PM.
I think you need to configure xdm instead of using kdm or gdm. You need to have a user logged in to use linux, that's how it works: with users and file permissions.
yes I realise you have to have someone logged in, I r not a total newbie I was just thinking maybe it could be done from a bootup script whereby the script su's to the user and starts his X session, therefore bypassing the need for login (seeing as bootup scripts are ran as root)
I cannot think of any way that editing either the xinitrc or xsession will help, because they are only executed when a user starts a session, and I need to get the session started in the first place
EDIT: and yea sorry, that meant to say /bin/su not /bin/sh
I've added the script to /etc/rc.d/rc.M (which is the multiuser runlevel script for slack 8) so that it checks for and executes my rc.xbootup script, but I get the following errors ...
Code:
Starting XbootUP ...
/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: xauth: command not found
/usr/X11R6/bin/startx: xinit: command not found
/usr/X11R6/bin/startx: xauth: command not found
Last edited by phoeniXflame; 04-13-2003 at 04:57 PM.
Considering it says command not found it sounds like it is saying the command is not found. ie it ain't inn the path. This is perfectly understandable as the path isn't set until a user logs in. Try setting the path varibale before you issue the command to start X.
yea thx for that, I actually figured it out a min ago, I managed to solve the problem by adding an export command to the script to add the paths to the X binarys to the $PATH env. variable so, just for future reference if anyone else wants to do this ....
==============================================
1: create a new user and create an .xinitrc file in the home directory of that user containing the commands to launch your desired window manager and program(s)
2: create a script and place it in /sbin or whereever you want, the script should contain something similar to this ..
this will add the paths to the X binarys to your $PATH env. variable and execute the startx script under your user you created earlier.
3: edit your /etc/inittab file and change the default runlevel to the custom runlevel (which you are just about to create, which in my case was "id:7:initdefault" (or whichever runlevel you have next/free) then add the line "x:7:spawn:/location/to/your/script" after the default runlevel line (change the 7 to whatever runlevel u added in your initdefault)
4: reboot and pray btw this was all done on my laptop running slackware 8.1 so I dont know whether this will apply to or work with other distros
==============================================
Last edited by phoeniXflame; 04-14-2003 at 12:52 PM.
I don't think a graphical login can let you do it, unless you hack the commands it executes. Looking at the /etc/inittab, one can try something like I recommended in:
Since, there was no reply, I'm not sure if it works, but there should not be a problem. Only difference is that you will also want to 'startx' automatically(at the end of that script, or something similar).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.