LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Auto startx : Starting directly within LXDE (https://www.linuxquestions.org/questions/linux-newbie-8/auto-startx-starting-directly-within-lxde-745537/)

drydo 08-06-2009 05:57 AM

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

linuxlover.chaitanya 08-06-2009 06:06 AM

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.

linus72 08-06-2009 06:12 AM

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?

drydo 08-06-2009 08:51 AM

@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.

the trooper 08-06-2009 09:28 AM

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.

drydo 08-06-2009 09:38 AM

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 :o

the trooper 08-06-2009 09:50 AM

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.

linus72 08-06-2009 09:54 AM

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

the trooper 08-06-2009 10:01 AM

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.

linus72 08-06-2009 10:02 AM

that's awesome
now i know how webconverger has been doing that
thanks Trooper!

linus72 08-06-2009 10:10 AM

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

the trooper 08-06-2009 10:13 AM

Quote:

Originally Posted by linus72 (Post 3633696)
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.:D

linus72 08-06-2009 10:38 AM

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?

the trooper 08-06-2009 10:42 AM

Quote:

Originally Posted by linus72 (Post 3633733)
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.

drydo 08-10-2009 10:09 AM

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!


All times are GMT -5. The time now is 05:12 PM.