LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 12-30-2010, 01:02 PM   #1
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
Cool 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?

Cheers

Markus
 
Old 12-30-2010, 01:33 PM   #2
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
Are you just trying to get it to load an X session on boot? If so, what run level are you booting into? 3 or 5?

cat /etc/inittab

That should show you what run level you are in... Sounds like you are in 3. 5 is normal X session boot.
 
Old 12-30-2010, 01:50 PM   #3
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
It is actually 2.

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.
 
Old 12-30-2010, 02:31 PM   #4
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,170

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
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.
 
Old 12-30-2010, 05:10 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <Linux-General> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-30-2010, 07:45 PM   #6
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
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).

Cheers

Markus
 
Old 12-30-2010, 08:44 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by browny_amiga View Post
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).

Cheers

Markus


Most basic version:
Code:
xinit /path/to/app

Cheers,
Tink
 
Old 01-03-2011, 11:22 AM   #8
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
Thanks guys, I am getting close to a solution.

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.


What am I doing wrong?

Markus
 
Old 01-03-2011, 03:42 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 ...



Cheers,
Tink
 
Old 01-03-2011, 06:44 PM   #10
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Original Poster
Rep: Reputation: 56
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?

Cheers

Markus
 
Old 01-04-2011, 10:44 AM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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.


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am using window xp ,installed on my system . Now i want to make it dual boot with ashu_9575 Linux - Newbie 4 05-04-2010 03:11 PM
problem with default window manager, stuck in KDE 4 somehow, session type option gone mandrak Mandriva 1 02-16-2008 02:28 PM
What's the best X-Window System window manager in your opinion? t3gah Linux - Software 9 12-16-2006 10:10 PM
How do I add another window manager to my GDM session list? RoaCh Of DisCor Linux - Software 0 07-08-2004 05:57 PM
default window manager session with xdm gusgorman Linux - General 10 07-01-2002 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration