LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10.04, Debian Squeeze, Windoze 7
Posts: 512

Rep: Reputation: 35
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 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 35
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: Slackware 14.1 64-bit with multilib
Posts: 2,075

Rep: Reputation: 210Reputation: 210Reputation: 210
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: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 35
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: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 35
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: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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 10.04, Debian Squeeze, Windoze 7
Posts: 512

Original Poster
Rep: Reputation: 35
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: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration