LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 12-01-2012, 12:52 PM   #1
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Ho do I get xfce to run at boot


I installed Xorg, X11 & am able to use startx to get to x
I have installed xfce4, xfwm & also can get to xfec-session.

Now I would like to have xfce4 start on boot.
I have however gotten xfce to start on boot on a prior archlinux install, but cannot get it to start on boot in my lfs install.

I've compared inittab on my Debian install to lfs nothing different between the 2.
I cannot find any documentation other than archlinux & gentoo documentation which refers to making entries to xinitrc to start desktop at boot but I think the config files are different.

After posting I see that gdm has a blfs bootscript going to chek it out.

Last edited by EDDY1; 12-01-2012 at 01:05 PM.
 
Old 12-01-2012, 02:01 PM   #2
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Rep: Reputation: 167Reputation: 167
Add:
id:5:initdefault:

somwhere at the front of inittab

And:

x:5:respawn:/usr/bin/slim >& /dev/null

Somwhere at the end and change "/usr/bin/slim" to whatever login manager you are using or you can probably use "startx" or "startxfce4"
 
1 members found this post helpful.
Old 12-01-2012, 02:41 PM   #3
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Thank you that worked
x:5:respawn:startxfce4 >& /dev/null
 
Old 12-03-2012, 10:55 AM   #4
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Rep: Reputation: 167Reputation: 167
If you don't want to run a login manager you can try what I do for my rescue partition:

Use
Code:
id:3:initdefault:
in inittab as the default runlevel.

Copy this:
Code:
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
	exec startx
fi
into ~./profile

Put this ( if you use xfce4, change as needed ):
Code:
exec dbus-launch --exit-with-session xfce4-session
as the last line of ~/.xinitrc.

Then if you login on tty1 as normal ( login/password ) your X session will be started or you can login on another tty to start a shell session.

This is a good way of starting an X session without having to install a login manager, ( I use this to login to my rescue/backup/restore partition ).
 
1 members found this post helpful.
Old 12-03-2012, 02:53 PM   #5
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
I am able to login to xfce, but the only problems I'm experiencing are:
Only root login & login is password-less.
I would like to login to my user account, which isn't in xfce login screen.
Also if I login to root I want to put password.

Last edited by EDDY1; 12-03-2012 at 02:55 PM.
 
Old 12-03-2012, 03:50 PM   #6
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 832

Rep: Reputation: 167Reputation: 167
In inittab
Code:
id:5:initdefault:
...
...
x:5:respawn:/etc/defaultuser >& /dev/null
Create file /etc/defaultuser containing:
Code:
#!/bin/bash

USERNAME=keithhedger

su $USERNAME -c  startx
Make executable
Code:
sudo chmod +x /etc/defaultuser
Change keithhedger to whatever user you want to auto login.
Reboot - Voila!
 
1 members found this post helpful.
Old 12-04-2012, 01:42 AM   #7
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Thank you. That helped now I can just use su or sudo after login instead of always being in root.
 
Old 05-21-2013, 10:54 AM   #8
ssanthshtech
Member
 
Registered: Jan 2013
Location: bangalore,india
Distribution: Ubuntu 12.4
Posts: 35

Rep: Reputation: Disabled
xinit with my application not geting on boot

followed same as above but iam using xinit. want to display window launcher on boot time using xinit with user account and having only one tty (tty1).

if [ -z "$DISPLAY" ] && [ $(tty) = /dev/tty1 ]; then

su -c "xinit ./myapp" <username>

fi

now my app wants to display at boot time without asking password in user account
 
Old 05-21-2013, 12:22 PM   #9
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
Is this a LFS system?
post #2 & #6 is what got it going
 
Old 05-21-2013, 11:40 PM   #10
ssanthshtech
Member
 
Registered: Jan 2013
Location: bangalore,india
Distribution: Ubuntu 12.4
Posts: 35

Rep: Reputation: Disabled
this my inittab

# Begin /etc/inittab

id:3:initdefault:

si::sysinit:/etc/rc.d/init.d/rc sysinit

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

ca:12345:ctrlaltdel:/bin/echo "Sorry, can't do that."

#su:S016nce:/sbin/sulogin

#1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
1:2345:respawn:/sbin/agetty -n -l /usr/sbin/autologin tty1 9600
#2:2345:respawn:/sbin/agetty tty2 9600
#3:2345:respawn:/sbin/agetty tty3 9600
#4:2345:respawn:/sbin/agetty tty4 9600
#5:2345:respawn:/sbin/agetty tty5 9600
#6:2345:respawn:/sbin/agetty tty6 9600
#c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

# End /etc/inittab


using only one terminal
 
Old 05-22-2013, 02:12 AM   #11
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
You should have 6 terminals try id:5
 
Old 05-22-2013, 02:46 AM   #12
ssanthshtech
Member
 
Registered: Jan 2013
Location: bangalore,india
Distribution: Ubuntu 12.4
Posts: 35

Rep: Reputation: Disabled
i Commented all other terminals

ok i tried like that also

# Begin /etc/inittab

#id:3:initdefault:

id:5:initdefault:

si::sysinit:/etc/rc.d/init.d/rc sysinit

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

#su:S016nce:/sbin/sulogin

#1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
1:2345:respawn:/sbin/agetty -n -l /usr/sbin/autologin tty1 9600
#2:2345:respawn:/sbin/agetty tty2 9600
#3:2345:respawn:/sbin/agetty tty3 9600
#4:2345:respawn:/sbin/agetty tty4 9600
#5:2345:respawn:/sbin/agetty tty5 9600
#6:2345:respawn:/sbin/agetty tty6 9600
#c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

x:5:respawn:/etc/defaultuser >& /dev/null

# End /etc/inittab



created a file /etc/defaultuser
#!/bin/bash

USERNAME=user

su $USERNAME -c xinit

sudo chmod +x /etc/defaultuser

i have a autologin.c file

int main()
{
execlp( "login", "login", "-f", "user", 0);
}

compiled using gcc autologin.c -o autologin

and saved it to /usr/sbin/autologin

Now my system booting as user and it cant display xinit at startup(boot).
 
Old 05-24-2013, 02:57 AM   #13
ssanthshtech
Member
 
Registered: Jan 2013
Location: bangalore,india
Distribution: Ubuntu 12.4
Posts: 35

Rep: Reputation: Disabled
Suggest something

Any Suggestions wr iam wrong
 
Old 05-24-2013, 10:01 AM   #14
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,085

Original Poster
Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
What are you trying to accomplish getting rid of autologin, or have the 6 terminals available.
For 6 terminals uncomment the 1's that you commmented out.
As far as autologin you've put a script in for autologin, not sure if it should be removed or changed, someone here can help you, if that is what you desire.
 
  


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
Run Compiz on Xfce r3cursive Slackware 8 03-15-2009 10:22 PM
Xfce Samba from Run (smb://) Waqas Ahsan Linux - Software 1 09-28-2006 03:44 PM
Is it possible to run the XFCE window system in Debian? MurX Debian 1 02-26-2006 06:16 PM
howto run KDE screensaver in xfce dnial Linux - General 2 05-04-2005 09:29 AM
XFce accidentally run in KDE STOPME Slackware 4 08-19-2004 06:19 PM


All times are GMT -5. The time now is 09:00 PM.

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