LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2009, 06:57 AM   #1
drydo
LQ Newbie
 
Registered: May 2009
Posts: 27

Rep: Reputation: 16
Auto startx : Starting directly within LXDE


I've successfully configured a custom debian install running from a live USB key. I've installed LXDE as my desktop. My problem is that LXDE doesn't start automatically, when I power up it does its thing and stays in prompt mode until I type 'startx' to fire up LXDE.

What I need is for this installation to autostart 'startx' and jump directly into the desktop. Can anyone point me in the right direction?

I'm a complete newbie to Linux and have searching most of the morning but I haven't found anything conclusive.

All help is greatly appreciated - M
 
Old 08-06-2009, 07:06 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
You need to change the runlevel. The default right now takes you to command line. You need to change it to 5 which is full multi user with graphical interface but it may vary with distributions.
 
Old 08-06-2009, 07:12 AM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
What's up dude!

Running from pmagic 4.4, which also has lxde and autostart

seems pmagic autostarts lxde thru a script in /usr/bin
called "startlxde"

Code:
if [ -z "$XDG_CONFIG_HOME" ]; then
    export XDG_CONFIG_HOME="$HOME/.config"
fi

# Ensure the existance of pcmanfm config file
PCMANFM_CONF_DIR="$XDG_CONFIG_HOME/pcmanfm"
if [ ! -f "$PCMANFM_CONF_DIR/main.lxde" ]; then
    mkdir -p "$PCMANFM_CONF_DIR"
    cp /usr/share/lxde/pcmanfm/main.lxde "$PCMANFM_CONF_DIR/main.lxde"
fi

# Ensure the existance of openbox config file
OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
    mkdir -p "$OPENBOX_CONF_DIR"
    cp /usr/share/lxde/openbox/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
fi

# Enable GTK+2 integration for OpenOffice.org, if available.
export SAL_USE_VCLPLUGIN=gtk

# Start the LXDE session
exec /usr/bin/lxsession -s LXDE
see if that works

also, are you running debian persistent?
which deb are you running?
 
Old 08-06-2009, 09:51 AM   #4
drydo
LQ Newbie
 
Registered: May 2009
Posts: 27

Original Poster
Rep: Reputation: 16
@linus72 - hey. That file does exist the installation - I guess the real question is. How do I call that file from the bootup / initialisation script?

@linuxlover.chaitanya, I'm running in 5 and have tried all the various options.

To expound on my little project, I've created a live persistent debian install onto a USB (Lenny I believe). I started with the mininum install then added lxde and some other odds and sods using 'aptitude'. I'm guessing that this ground-up approach has prevent a script or feature from being added into the bootup sequence and I just to need know how to

I'm guessing that I'll create a script under /etc/rc5.d or /etc/rcS.d and reference the file that linus mentions. Is this going down the right track or am I completely way off.
 
Old 08-06-2009, 10:28 AM   #5
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
As you have done a minimal Debian install(the right way to do it,imho),you will need to install a display manager.
If you are looking to keep your install light try:

aptitude update
aptitude install xdm You can substitute gdm if you want something 'prettier'.

Restart X or reboot and you should be greeted by a graphical login screen.
Enter user name and password,hit enter and then Lxde should start.

Edit:After Googling it looks like you may not need to use xdm if you don't want to.
See the link i posted later in this thread.

Last edited by the trooper; 08-06-2009 at 11:03 AM.
 
Old 08-06-2009, 10:38 AM   #6
drydo
LQ Newbie
 
Registered: May 2009
Posts: 27

Original Poster
Rep: Reputation: 16
So just to get this clear in my head (sorry, I come from an Windows background) I need a display manager to act as the doorman / bouncer to LXDE in order for it to boot into LXDE when the machine is powered up?

And to muddy the waters a bit more, I don't want the user to enter a username and password - is that something that a display manager will enforce? Are there ways around this?

Sorry for the newbie questions
 
Old 08-06-2009, 10:50 AM   #7
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
Quote:
So just to get this clear in my head (sorry, I come from an Windows background) I need a display manager to act as the doorman / bouncer to LXDE in order for it to boot into LXDE when the machine is powered up?
Using xdm will mean when you boot the machine you will not have to manually start X anymore.

Quote:
And to muddy the waters a bit more, I don't want the user to enter a username and password - is that something that a display manager will enforce? Are there ways around this?
Personally i like to use user names and passwords,afaik this is the 'default' with x/gdm.
It may be possible to configure things to skip this,but it's not something i've tried.
See what Google comes up with.
Any particular reason you don't want to use a username and password?.

Quote:
Sorry for the newbie questions
No worries.Your questions seem quite reasonable to me.
 
Old 08-06-2009, 10:54 AM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Couple things
Using Debian "Live" you will run as "user" and you can run as root too

don't know if you can do that running a installed to usb lenny
you installed to usb with debian live or as a reg hd install?

GRML, and HAG are debian unstable based and you can run as root too
in grml, there are no users.

Tinycore, PartedMagic, and most puppies no user no password either...

EDIT
Sidux (beautiful debian unstable), you also run with no user/password
when running persist/fromiso

Last edited by linus72; 08-06-2009 at 10:59 AM.
 
Old 08-06-2009, 11:01 AM   #9
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
Quote:
don't know if you can do that running a installed to usb lenny
you installed to usb with debian live or as a reg hd install?
That's a good point Linus.
Just had a quick Google and came up with this:

http://blogs.koolwal.net/2009/03/15/...m-gdm-kdm-etc/

This was written by a regular on the Debian forum,might be just what you are looking for.
 
Old 08-06-2009, 11:02 AM   #10
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
that's awesome
now i know how webconverger has been doing that
thanks Trooper!
 
Old 08-06-2009, 11:10 AM   #11
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Oh
something else cool

debian live has a lxde edition
http://cdimage.debian.org/cdimage/re.../i386/usb-hdd/

two more cool things
the source is also available
http://cdimage.debian.org/cdimage/re...ve/source/tar/


coolest thing?
I figured out you don't have to dd the .img to usb

Just open Gparted, goto your usb
and add the label "DEBIAN_LIVE" to usb, either fat32 or ext2/3

also, if you want persistence, make the usb two partitions
sdb1 fat32 or ext2 debian
sdb2 ext2 labeled "live-rw"

at boot use the bootcode "nopersist"
at desktop, after hooking up the net, adding, removing what you want
open a terminal and as root enter
"live-snapshot -d /dev/sdxx"
where sdxx is sdb1, sdf1, etc

then, reboot and have bootcode "persist"
and from then on it'll run persistent
but the squashfs is read-only
so if you mess something up
just delete the stuff out of live-rw and start over
 
Old 08-06-2009, 11:13 AM   #12
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
Quote:
Originally Posted by linus72 View Post
that's awesome
now i know how webconverger has been doing that
thanks Trooper!
No worries!.
I think we've all learned something here.
I'm going to save that how-to for future reference.

Just goes to show that Google is far smarter than me.
 
Old 08-06-2009, 11:38 AM   #13
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
hey
how do you extract a .img?
or how to mount it?

I don't wanna dd my usb anymore but can't get at the .img?
 
Old 08-06-2009, 11:42 AM   #14
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
Quote:
Originally Posted by linus72 View Post
hey
how do you extract a .img?
or how to mount it?

I don't wanna dd my usb anymore but can't get at the .img?
I think this could be seen as 'crashing' the thread.
Probably best to start a new thread on the subject.
 
Old 08-10-2009, 11:09 AM   #15
drydo
LQ Newbie
 
Registered: May 2009
Posts: 27

Original Poster
Rep: Reputation: 16
Hi gents,

Interesting threadjack and certainly some pretty advanced things there

Anyhoo, I wanted to say that the link 'The Trooper' provided was spot-on and allowed me to achieve that I needed. Thank you both for you time and effort - it is extremely appreciated!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How - auto startx, and restart computer Optiker Ubuntu 21 11-30-2006 10:56 AM
Startx auto start of programs (With Fluxbox) jimdaworm Slackware 4 12-03-2003 06:55 PM
startx not starting for last 2 days budhakaushika Linux - General 7 11-10-2003 03:28 AM
Auto run STARTX Neb Linux - Newbie 3 08-12-2003 04:14 PM
starting on startx chrismiceli Linux - General 2 08-06-2003 08:00 PM


All times are GMT -5. The time now is 06:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration