How to make system boot up into window manager-less X session?
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.
How to make system boot up into window manager-less X session?
Hi
I am setting up a thin client boot (over NFS) with x2go thinclient. So far everything works, the client boots over PXE, mounts the NFS dir on the server. But the x2go thinclient system does not install properly. I end up with a CLI prompt, to log in. It does not start X, not does it start the x2go client in a window managerless X session.
X2go is, in case you don't know it yet, a cool Linux X terminal session system, very much like Nomachines NXserver. I like it very much, since my experience, especially with freenx has not been good.
Now I am missing some Linux knowhow here:
I know that after startup (the CLI part), the display manager is started (GDM or KDM), which starts the X server and shows the graphical login.
Now since X2go does not properly setup and there is no documentation about the thinclient part, I will set it up myself.
I need the system to boot up, startx and then immediately start an X program (x2goclient), without having to log in before.
I found that putting a .xsession file in to the users home dir causes that script to be run when you invoke startx.
But when I put startx in a script that runs as the last one in the runlevel (as in S05startx), it does not run at all.
What is the proper way to run X and a program on it directly, right at startup? Automatically?
Debian and Ubuntu system default to 2 as runlevel.
(I remember that RedHat has that 3 and 5 rule).
Yes, I am just trying to start naked X and then run a GUI program on it (the login manager from x2go, that lets you log into another remove server).
So on this machine (that is mounted on another system via NFS), nothing is happening, there will be never a local login. So the only purpose is to get that login manager running ASAP. Since the applications goes full screen and the remote desktop session too, there is no need to have a windows manager like metacity, compiz or kdm.
So all I want to do is automatically start X and start this GUI program.
Right now, the system stops at the CLI console login. I can then login as root and then execute "startx"
which looks up /root/.xsession and executes what is contained herein (i.e. x2goclient --fullscreen)
I don't want to have to login and execute this command, I want this to be automatically done in the init scripts.
Markus
Last edited by browny_amiga; 12-30-2010 at 01:57 PM.
Then simply edit your /etc/inittab and change to runlevel 4, and depending if you are running KDE as your default DE KDM will be the first thing you see asking for your username and password, or GDM, or XDM depending on your settings.
I don't want to run GDM or KDM. Maybe I have not expressed myself clear enough: I want X and running just one program on it. That it all it takes, no logins, no interaction of the user required. There must be people here that understand how X boots up, step by step, how it displays the display manager. I want my program to show instead of the display manager (the x2goclient GUI).
I don't want to run GDM or KDM. Maybe I have not expressed myself clear enough: I want X and running just one program on it. That it all it takes, no logins, no interaction of the user required. There must be people here that understand how X boots up, step by step, how it displays the display manager. I want my program to show instead of the display manager (the x2goclient GUI).
Unfortunately, the thing is still not starting by it self.
It works when I log in at root and execute xinit /usr/bin/x2goclient
but when I place the same thing into a startup script, put it directly into /etc/rc2.d and call it S04startx (which is the script that runs last in the startup), nothing happens at all.
I have to mention that the script is just a basic one liner, nothing fancy and no handling of start or stop parameters that the init startroutine probably sends it, but that should not matter, since the parameter is just ignored.
Not sure how *buntu handles the order of startup scripts,
but in other distros w/ a SysV init system the lower the
number the sooner it gets executed ... S04 would be very
early in init, possibly before networking, and that is
needed for X (and X apps) to function. I'd try going for
an S80 or higher if I were you ...
No, I made sure that it is executed last (as I said).
This is a thinclient and there is not much started at all, so S04 is the last entry in rc2.d (there are a few S01 S02 S03s)
But even lets say networking would not be running, that should not be a problem and X would start and then fail.
But it does not get executed, at all. Just like getting ignored. I don't understand why.
Do scripts in rc2.d have to have a special format that they are executed? Which user will run the scripts? It should be root, right?
It should indeed be root, and yes, they have a special format;
they commonly have a case statement that at least includes a
start & stop option w/ appropriate actions. And it need to be
set executable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.