LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-26-2008, 12:13 AM   #1
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Rep: Reputation: 38
Angry x works setting inittab in 4 but not three


This is rather frustrating

Recently I changed my inittab to runlevel 4 for convience. Yesterday I changed it back to 3 and rebooted. I got the following error and could not startx

Quote:
Fatal server error:
Unrecognized option: no listen

giving up.
xinit: No such file or directory (error2): unable to connect to x server
xinit: No such process (error3): server error.
I changed back to runlevel 4 and x started with no problem.

Any clues?
 
Old 11-26-2008, 12:23 AM   #2
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Not to sure if this may help but this guy had a somewhat similar situation. He found a workaround but no explanation as to why it happened.

Code:
Well -- seems nobody knows any better than I... {:-/) Got no suggestions.

I have, however, found the solution, if not the explanation [which I'd
still really like!]. The system runs by default at runlevel 3, and I
was doing (in the period when it worked) 'xinit' to start an X environment
from my account. This is what was failing as above. (For users -- root
could still start the X server.)

For grins I finally did a 'telinit 5' (remotely)... and saw the graphic
login screen immediately pop up on the console! From there I could log
in as a user and get my normal X environment.

I then did 'telinit 3' again, and now my 'xinit' works properly just as
it did before!

My (wild) guess -- trying to parse the documentation on "PAM and Device
Ownership" -- is that somehow the "console user" was locked off somewhere
that it shouldn't have been, so I was never getting the console privileges
I should have. No real idea, but hopefully if it happens again, the same
cure will work...
Source:

http://forum.soft32.com/linux/Server...ict354528.html
 
Old 11-26-2008, 08:45 PM   #3
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,443

Rep: Reputation: 73
try running xwmconfig to reset what your ~/.xinitrc is. Did your permissions get changed on any of your X server files?
 
Old 11-26-2008, 10:03 PM   #4
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
Thanks, but I think that is a stab in the dark.

I don't think slackware uses pam.
Since I never access my box via remote, I disabled ssh and never used telnet before.

I googled around for a while but still have not found a solution. I guess there could be a great variety of reasons.

What if I deleted xorg.conf would it build a new one?
I guess I could try xorgconfig and see what possible changes might be done.

I tried reinstalling the nvidia driver but it did not good.

I could not find the xorg log anywhare on my system to find greater details as to what is causing the problem.
 
Old 11-26-2008, 10:17 PM   #5
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by okos View Post
Thanks, but I think that is a stab in the dark.

I don't think slackware uses pam.
Since I never access my box via remote, I disabled ssh and never used telnet before.

I googled around for a while but still have not found a solution. I guess there could be a great variety of reasons.

What if I deleted xorg.conf would it build a new one?
I guess I could try xorgconfig and see what possible changes might be done.

I tried reinstalling the nvidia driver but it did not good.

I could not find the xorg log anywhare on my system to find greater details as to what is causing the problem.
Yeah, I know it doesn't use PAM unless you have DLG installed.

Don't delete your xorg.conf, just back it up and run xorgconfig again and just use the "vesa" or "nv" driver. After you run xorgconfig, then compare it to your backed up one to see what the culprit might be, granted it works.

I have no clue but you maybe on the right track to figure it out.
 
Old 11-26-2008, 10:47 PM   #6
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by SqdnGuns View Post
just use the "vesa" or "nv" driver. After you run xorgconfig, then compare it to your backed up one to see what the culprit might be, granted it works.
I am not sure how you select a different driver.

I restored the xorg.conf that I backed up some time ago and still no good. I also tried a second kernel on my system to no avail.

 
Old 11-26-2008, 11:18 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
When init 3 is the default, Slackware will do nothing after running /etc/rc.d/rc.M. The user logs in and in the stock Slackware, nothing happens. The user then types startx to start X. startx is a shell script located in /usr/bin. The startx script looks for certain files when starting X. If the user has a .xinitrc file in $HOME, then that file gets used for customization. If not then the default system xinitrc located in /etc/X11/xinit is used. The /etc/X11/xinit/xinitrc file is a soft link to one of the xinit files located in the same directory.

When init 4 is the default, Slackware runs rc.M but then init runs rc.4, which is defined in /etc/inittab.

That the system runs X fine in init 4 but not in init 3 indicates a problem with either $HOME/.xinitrc or /etc/X11/xinit/xinitrc. Running xwmconfig as root will properly link /etc/X11/xinit/xinitrc to the desired xinit file. Running xwmconfig as non-root creates a new $HOME/.xinitrc. Consider trying both operations.
 
Old 11-26-2008, 11:23 PM   #8
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64® Current & Arch
Posts: 1,092

Rep: Reputation: 174Reputation: 174
Quote:
Originally Posted by Woodsman View Post
When init 3 is the default, Slackware will do nothing after running /etc/rc.d/rc.M. The user logs in and in the stock Slackware, nothing happens. The user then types startx to start X. startx is a shell script located in /usr/bin. The startx script looks for certain files when starting X. If the user has a .xinitrc file in $HOME, then that file gets used for customization. If not then the default system xinitrc located in /etc/X11/xinit is used. The /etc/X11/xinit/xinitrc file is a soft link to one of the xinit files located in the same directory.

When init 4 is the default, Slackware runs rc.M but then init runs rc.4, which is defined in /etc/inittab.

That the system runs X fine in init 4 but not in init 3 indicates a problem with either $HOME/.xinitrc or /etc/X11/xinit/xinitrc. Running xwmconfig as root will properly link /etc/X11/xinit/xinitrc to the desired xinit file. Running xwmconfig as non-root creates a new $HOME/.xinitrc. Consider trying both operations.
I trust what you and shadowsnipes has to say on this. It all makes perfect when you spell it out like that. The technical writing has paid off.....
 
Old 11-27-2008, 12:35 AM   #9
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
Woodsman,
I greatly appreciate the help and the lesson on how things work.

I tried xwmconfig for both root and user with out success

Could the /etc/X11/xinit/xinitrc.kde file somehow got corrupted?

BTW I ran xwmconfig by opening up a console while in runtime 4, edited inittab and rebooted. Only to come up with the same error.

Could I copy the xinitrc.kde from the slack disks?
 
Old 11-27-2008, 10:45 AM   #10
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
In runtime 3 I changed to xfce and then fluxbox using xwmconfig. Still to no avail I get the same error. Therefore, I can deduce that xinitrc.kde is not corrupt.

The same thing happens for either root or user.

I am not sure what else to do.
 
Old 11-27-2008, 11:37 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I say take a look at '/usr/bin/startx' and post the first 30 lines at least.
 
Old 11-27-2008, 12:07 PM   #12
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
As H_TeXMeX_H mentioned, perhaps /usr/bin/startx is corrupt. In 12.1 that shell script is installed from the x/xinit-1.0.8-i486-1.tgz package. You might want to reinstall that package.

If you have a file named $HOME/.xsession-errors then look in that log file for errors or clues.

If you do not have such a file then watch the screen for error messages.

Another log to check is /var/log/Xorg.0.log. Typically X will start with warnings but not always start with errors. To search the file for errors (EE) and warnings (WW):

grep '(EE)' /var/log/Xorg.0.log
grep '(WW)' /var/log/Xorg.0.log
 
Old 11-27-2008, 02:18 PM   #13
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
"no listen" sounds like it might be the -nolisten parameter of the Xserver. It's possible that someone or some package was trying to tighten security a little by setting this parameter but hasn't quite gotten the syntax right.

I usually start X11 with a

startx -- -nolisten tcp

If you want to set nolisten to be a default for startx, one common way is to create a
~/.xserverrc file containing the parameter, or /etc/X11/xinit/xserverrc if its been done system wide. It could possibly be in other files though.

if you don't have any luck looking in those two files, try to see if you can find it with a
grep 'listen' ~/.x*
 
Old 11-27-2008, 03:30 PM   #14
okos
Member
 
Registered: May 2007
Location: California
Distribution: Slackware/Ubuntu
Posts: 609

Original Poster
Rep: Reputation: 38
Thumbs up

GazL,

That did the trick!
Thanks a bunch!
A while back, I followed some of the pointers in Slackware System Hardening by Jeffery Denton. Since I have been using runtime 4 for a while, I would not have noticed the problem upon rebooting. Luckily I copied the tutorial to word processing and highlighted all of the steps I had taken. I can therefore sequentially change back what I has previously incorporated into my system. Furthermore, here is an excerpt about closing ports in his tutorial:
Code:
/usr/X11R6/bin/startx:
    defautserverargs="-nolisten tcp"

    Closes TCP port 6000+n, where n is $DISPLAY (the default is 0).
    
    
/etc/X11/xdm/Xservers:
    :0 local /usr/X11R6/bin/X -nolisten tcp

    Closes TCP port 6000.
    
    /etc/X11/xdm/Xaccess:
    Make sure everything is commented.

    
/etc/rc.d/rc.4:
    exec /usr/X11R6/bin/xdm -nodaemon -udpPort 0

    Closes UDP port 177.
    
    
/etc/X11/fs/config:
    use-syslog = yes
    no-listen = tcp

I have two questions a little off topic,

1. Why does x require the above ports to be kept open. Specifically port 6000? Is it that x can be run as a server for multiple computers to access? What is the point of the x server?

2. SqdnGuns stated, "just use the "vesa" or "nv" driver". How do you switch video drivers?

This has been a most educational process. I greatly appreciate all of your help.
 
Old 11-27-2008, 03:44 PM   #15
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Quote:
Originally Posted by okos View Post
GazL,

That did the trick!
Thanks a bunch!

I have two questions a little off topic,

1. Why does x require the above ports to be kept open. Specifically port 6000? Is it that x can be run as a server for multiple computers to access? What is the point of the x server?

2. SqdnGuns stated, "just use the "vesa" or "nv" driver". How do you switch video drivers?

This has been a most educational process. I greatly appreciate all of your help.
Your welcome matey. Glad to help.


1 X is network aware. what that means is that I can run a X application on one server and have it display its windows on another X screen running on a different box entirely. You do this by setting the $DISPLAY variable before running the application. It works over tcp. Port 6000 sits there listening for these incoming connections, which is why specifying -nolisten tcp can help improve the security of your box a little bit.

2 the Xserver driver is set in /etc/X11/xorg.conf in the Device section.
 
  


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
Setting MTU breaks WAN communications, LAN works great Bviper Linux - Networking 3 06-11-2008 01:30 AM
Need help setting up DNS- dig almost works tbsmith Linux - Server 6 01-29-2008 08:03 PM
RedHat 8 inittab setting kadal27 Red Hat 2 04-18-2006 02:30 PM
Editing inittab & rc.4 works, but starts Gnome, not KDE Magnabrau Slackware 9 07-17-2004 05:53 PM
XP/Fedora machine w.DSL works w.xP. need help setting thru Fed dejani Fedora - Installation 0 05-05-2004 10:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:58 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
Open Source Consulting | Domain Registration