LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 11-15-2007, 04:55 AM   #1
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Rep: Reputation: 17
xinit works startx doesn't


After installing Xorg on gentoo I cannot start X via the usual startx command. It doesn't return any error message... just hangs. Control C returns the usual prompt.

Giving the xinit command nvidia logo and wmaker start smoothly.

xdm too just doesn't switch on the window manager called in the ~/.xsession filebut keeps asking the authenticaton username and password.

What could have happened?

Thanks,
Pier

PS
 
Old 11-15-2007, 09:12 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You could try to run it in "debug mode"

sh -x /usr/bin/startx

And see where it gets stuck.

sh -x /usr/bin/startx &> /tmp/startx.log to redirect to a file
 
Old 11-16-2007, 05:24 AM   #3
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
Hi,
well it looks like I have been impatience in waiting for X to come up after giving the startx command. As a matter of fact it takes as long as almost ten seconds to start up the window manager with startx whereas the xinit command works as quickly as always.

Debug output file startx.log is actually empty.

Regards,
Pier
 
Old 11-16-2007, 05:46 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by Pier View Post
Hi,
well it looks like I have been impatience in waiting for X to come up after giving the startx command. As a matter of fact it takes as long as almost ten seconds to start up the window manager with startx whereas the xinit command works as quickly as always.
Ah ok
Quote:
Debug output file startx.log is actually empty.

Regards,
Pier
Can't be empty!??
You did exactly the command I posted I guess?
Strange ????
 
Old 11-16-2007, 09:27 AM   #5
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by nx5000 View Post
Ah ok

Can't be empty!??
You did exactly the command I posted I guess?
Strange ????
Ahem!!! sorry ...my fault.

I tried again the command at home with the ampersand symbol just near the "greater" symbol and the log file was no longer empty (I was typing in & > rather then &>).
I'll paste bin the output from pc at work on Monday.

Thanks a lot,
Pier
 
Old 11-16-2007, 12:51 PM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Good
&> means redirect both stdout and stderr to the file
& > would mean put in the background (&) and redirect stdout to the file

Well, you would need the timing in front of each line, that's the problem...
Or.. use your eyes

You can then use /var/log/messages, which will stamp with the time.

Prepare one console with this command AS ROOT (he's allowed to read the file)
Code:
sudo tail -f /var/log/messages
On another console, start logging:

Code:
sh -x /usr/bin/startx 1>&2 | logger
You will probably have a good timing measure now on the first console

edit:
not sure this will work actually

Last edited by nx5000; 11-16-2007 at 02:50 PM.
 
1 members found this post helpful.
Old 11-20-2007, 04:04 AM   #7
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
I past-bin-ed the output of the:
sh -x startx &> startx.log command here:

http://pastebin.com/m1ac99ae
 
Old 11-20-2007, 07:27 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
First, I have no clue about nvidia and ati stuffs and closed source stuffs in general.
Now looking at your output, the problem that we have is as expected we don't have the timing, so I don't know where is the delay!? From the tail -f console you could see where it hangs. Do that.

Do you run startx as root? Not good! Dangerous and useless. You've probably seen this posted everywhere, I'm lazy today I won't explain the risks, just an advice. It's not because oldflashioned linux beared people are annoying, it's simply that it's dangerous and useless. Argg I said I shouldn't explain why and am falling in the trap again
"Friends don't let friends run as root"

Things to look:
1)
Try as non root, could be your problem (although unlikely). If it doesn't work as non root, then it's another problem.
2)
Quote:
#
++ hostname -f
#
hostname: Host name lookup failure
Humm not good.
Try this on a command line and if it doesn't work, fix it.
3) I have no clue what's this wmnd is, looks like it uses the network. Could create a delay problem if it doesn't connect or like in 2) doesn't detect the DNS name (if it tries to access your DNS and asks for what's the name of 127.0.0.1, nobody appart from you will answer)

Quote:
#
wmnd [linux_proc]: detected sit0
#
wmnd [linux_proc]: detected eth0
#
wmnd [testing_dummy]: detected off
#
4) I guess here you hit ctrl-alt-backspace:
Quote:
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
#
after 135 requests (132 known processed) with 1 events remaining.
#
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"
#
after 135 requests (132 known processed) with 1 events remaining.
Sorry I don't have so much time at the moment, but these are some ideas that should be looked at.
 
Old 11-21-2007, 05:12 AM   #9
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
This is the log file when x is run as user:

http://pastebin.com/m2108a58e

I never run linux as root unless sudo-ing but now I am trying to setting all things up and running before adding users.

Host name returns:

pier@labtecn ~ $ hostname
labtecn
pier@labtecn ~ $

Wmnd is a windowmaker applet.
 
Old 11-21-2007, 06:13 AM   #10
Pier
Member
 
Registered: Oct 2005
Location: Italy
Distribution: Gentoo
Posts: 83

Original Poster
Rep: Reputation: 17
Well, it looks like you hit the point in

hostname -f

It was that that was hanging the whole lot resulting in a lookup failure.

Putting the hostname in the /etc/hosts file did the trick:

/etc/hosts

127.0.0.1 localhost


changed to


127.0.0.1 localhost labtecn


Thanks a lot,
Pier
 
Old 07-11-2015, 09:53 AM   #11
scottro11
Member
 
Registered: Jun 2009
Location: NYC
Posts: 262

Rep: Reputation: 59
Still useful information

I've been searching to the answer to this problem for a long time. Even though this is an eight year old thread, using the solution of creating a startx log, then watching it in a terminal, finally enabled me to figure out why this happens. So, if nx5000 ever comes across this again, let me say thanks. Basically, it seems that if host -f takes awhile to resolve, that will be the problem.
 
  


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
(nvidia) First startx = blank screen, second startx = works ?!? BuckRogers01 Linux - Hardware 2 04-07-2006 06:26 PM
Bug / Xwindows / startx : xinit works but startx crash www.rzr.free.fr Linux - Software 4 10-17-2004 09:06 AM
startx does nothing, yet X still works dtheorem Linux From Scratch 2 08-23-2004 03:28 AM
startx only works as root rbrasil Debian 3 12-10-2003 08:45 PM
Gnome works but not with startx command lil_critter99 Linux - Software 1 12-14-2001 06:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

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