• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: start X11 on bootup  (Read 2653 times)
081569
Newbie
*

Karma: 0
Posts: 4


View Profile
« on: March 26, 2010, 01:13:50 PM »

Hello Folks,

have a sheevaplug running with delock USB2VGA adapter(kernel2.6.33) and X11 on it. Works really good for my use, but want to start X11 automatically when the plug boots up. where can this be done? runlevel seems to be 2 but havent got it to work yet to start it automatically.

any suggestions???


P.S have a rt.jar on my system which is quite big, and i need some space on the plug, can i delete this?

thx in advance
G.
Logged

fragfutter
Sr. Member
****

Karma: 12
Posts: 280


View Profile
« Reply #1 on: March 26, 2010, 03:55:47 PM »

depends on the init system and the linux distribution.

Either add gdm to runlevel 2
Code:
update-rc.d gdm enable 2

or change default runlevel to 3 (or is it 5?)
Code:
root@host# grep /etc/inittab -e initdefault
id:2:initdefault:
Logged

081569
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #2 on: March 27, 2010, 12:16:47 AM »

dist: ubuntu 9.04/factrory default

Logged

Tempel
Newbie
*

Karma: 0
Posts: 11


View Profile WWW
« Reply #3 on: March 27, 2010, 10:08:32 PM »

On my desktop, I don't bother starting X until logged in.  If you're using a login manager like gdm, you'll have to do it like how fragfutter has suggested, but if you're skipping that, just add this to your ~/.profile

Code:
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  startx
  logout
fi

This says that, if you're on terminal 1, start X; once X finishes, log out.  Since you start on terminal 1 by default, this'll make X start unless you switch to another terminal to prevent it.  Of course, you'll need a properly set-up ~/.xinitrc.  Also, this will only work for your login; logins by root or other users will need to be set up the same way to get the automatic X.
Logged

081569
Newbie
*

Karma: 0
Posts: 4


View Profile
« Reply #4 on: March 29, 2010, 02:33:05 PM »

thx for the info, i am not using gdm.

i want the plug to boot up as root autologin as root and startx as root, is this possible??

thx in advance!
Logged

Tempel
Newbie
*

Karma: 0
Posts: 11


View Profile WWW
« Reply #5 on: March 29, 2010, 02:49:03 PM »

That's really not a good idea.  How familiar are you with Linux in general?  You should run everything as an unprivileged user (ie: not root) as much as possible.  This is extra true for running X.

But if you're certain you know what you're doing, you can take that code I posted earlier and add it to the end of /root/.profile (the /root directory is essentially the home directory for the root user).  However, I don't know how you can force an automatic login; you may have to look into a login manager for that.  I know gdm can do it.
Logged

Pages: [1]
Print
Jump to: