You are not logged in.

#1 2006-06-09 15:36:21

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

How make, that not be need write "startx" to run D

~$ startx


Goodbye!

Offline

#2 2006-06-09 15:41:31

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: How make, that not be need write "startx" to run D

Here you go: wiki linky


I made it long
as I lacked the time to make it short...

Offline

#3 2006-06-09 16:35:27

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How make, that not be need write "startx" to run D

Thanks,
I use KDE, that of this must be in "/etc/rc.conf":
# This would load KDM on startup
DAEMONS=(syslogd klogd !pcmcia network netfs crond kdm)

# This would load GDM on startup
DAEMONS=(syslogd klogd !pcmcia network netfs crond gdm)

# This would load XDM on startup
DAEMONS=(syslogd klogd !pcmcia network netfs crond xdm)


Goodbye!

Offline

#4 2006-06-09 17:20:02

o2bfishn
Member
Registered: 2005-12-22
Posts: 53

Re: How make, that not be need write "startx" to run D

or you can edit your /etc/inittab file like this

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)    Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty 38400 vc/6 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

x:5:respawn:/opt/kde/bin/kdm -nodaemon

# End of file

notice the id:5:initdefault: and x:5:respawn:/opt/kde/bin/kdm -nodaemon lines. this will launch kdm when you boot up too.

im not sure which way is better or faster, but i do it this way.

Offline

#5 2006-06-09 17:28:03

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How make, that not be need write "startx" to run D

Thanks, thanks, thanks!


Goodbye!

Offline

#6 2006-06-09 17:51:43

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: How make, that not be need write "startx" to run D

o2bfishn wrote:

im not sure which way is better or faster, but i do it this way.

At least with GDM there are shown errors at shutdown if the inittab method isn't used (GDM can't be killed by the initscripts at shutdown since AFAIK GDM kills itself when starting the shutdown)

Offline

#7 2006-06-10 08:11:08

appolito
Member
From: Kutna Hora, Czech Republic
Registered: 2005-08-17
Posts: 30

Re: How make, that not be need write "startx" to run D

I don't need any login manager. I have written this piece of code at the end of ~/.zshrc (~/.bashrc might also work when using bash) and if I log into first terminal console, X starts automatically.

# Start X if not already started and you are in first console
if [ "`tty`" = "/dev/vc/1" ]; then
    startx
fi

Maybe somebody finds this useful too.

Offline

#8 2006-06-10 11:18:17

palandir
Member
Registered: 2006-05-14
Posts: 73

Re: How make, that not be need write "startx" to run D

You could also check if $DISPLAY is set, and if it's not, startx. This would work in all consoles. Another enhancement would be:

if [ -z "$DISPLAY" ]; then
    n=5
    echo "Starting X11 in $n seconds..."
    sleep $n
    startx
fi

So you still have some seconds to decide whether you want to start X or not. wink
I used it myself some time ago. I prefer that to using a graphical login manager.

Offline

#9 2006-06-10 16:26:20

alikas
Member
From: Lithuania, Vilnius
Registered: 2006-05-24
Posts: 319
Website

Re: How make, that not be need write "startx" to run D

Thanks, thanks.


Goodbye!

Offline

Board footer

Powered by FluxBB