LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-22-2008, 11:06 AM   #1
LennyBPoint
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
Question cannot start XServer with rc.local - not authorized


Hi!

I want to start the XServer immediately after booting.

My idea was to add this line in /etc/rc.local like:
su -l lennybpoint -c x4

(x4 is a link to /usr/bin/startxfce4
lennybpoint is the user I'm using normal to start x4)

But after booting, I get this message:

"X: user not authorized to run the Xserver, aborting."

Any ideas?

Greetings from Norway, LennyB.
 
Old 06-22-2008, 11:30 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
What distribution are you using? There should be a supported way of starting X on boot rather than having to play with the boot scripts manually. Slackware maybe?

In Slackware you would set the initial runlevel via this section of /etc/inittab:

Code:
# These are the default runlevels in Slackware:
#   0 = halt
#   1 = single user mode
#   2 = unused (but configured the same as runlevel 3)
#   3 = multiuser mode (default Slackware runlevel)
#   4 = X11 with KDM/GDM/XDM (session managers)
#   5 = unused (but configured the same as runlevel 3)
#   6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
Then to handle it starting as a specific user, you would do that in the login manager.
 
Old 06-23-2008, 03:14 AM   #3
LennyBPoint
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Hei!

I will try it out this evening.

I have debian sarge. Maybe it's the same.

I will tell my experience.

Ha det, Benjamin
 
Old 06-24-2008, 02:09 PM   #4
LennyBPoint
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I made some changing in /etc/inittab:

2 is my default.
Code:
# The default runlevel.
id:2:initdefault:

This Runlevel I have:

Code:
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
Here the part I changed

original:
(or similar ;->)
Code:
1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/usr/bin/startxfce4
First try:

Code:
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
1:23:respawn:/usr/bin/startxfce4
2:2345:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
#6:23:respawn:/usr/bin/startxfce4
-> xfce4 started as root :-(

Second try:
Code:
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
1:23:respawn:su -l lenny -c /usr/bin/x4
2:2345:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
#6:23:respawn:/usr/bin/startxfce4
-> same failure as at the beginning while trying to start X over /etc/rc.local

Any ideas? Ok,its not common to start X first and automatic with debian. But why it is forbidden?

Greetings, LennyB.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
xserver-xfree86: Xserver could not start on my ATI-radeon video card Shankarrajus Debian 2 07-17-2006 08:00 AM
setting-up an xserver connection with remote host through local firewall. qanopus Linux - Security 5 02-02-2006 11:11 AM
Cannot start Xserver hywaydave23 Red Hat 5 11-18-2005 11:33 AM
Start with no Xserver LinxNew Mandriva 1 05-08-2005 05:42 PM
xserver doesn't start Obscure Mandriva 3 09-08-2003 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:32 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