OpenVZ Forum


Home » General » Support » *partially solved* startx - cannot open /dev/tty0
*partially solved* startx - cannot open /dev/tty0 [message #24027] Fri, 30 November 2007 11:44 Go to next message
paul_xedos is currently offline  paul_xedos
Messages: 13
Registered: November 2007
Junior Member
Hi,
I'm running RHEL4U4 in a VE and attempting to startx in order to allow developers in India to display their desktops over a slow link using NoMachine (similar to VNC). A pre-req for doing this is that X is running.

[root@vz1 ~]# startx 

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.9-34.0.1.ELsmp i686 [ELF]
Current Operating System: Linux vz1 2.6.9-023stab044.11-enterprise #1 SMP Sun Sep 30 14:02:45 MSD 2007 i686
Build Date: 11 July 2006
Build Host: hs20-bc1-1.build.redhat.com

        Before reporting problems, check http://wiki.X.Org
        to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.9-023stab044.11-enterprise (root@rhel4-32) (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 SMP Sun Sep 30 14:02:45 MSD 2007
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Nov 30 11:26:15 2007
(==) Using config file: "/etc/X11/xorg.conf"
[B]
Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)[/B]


My dev/tty directory was created as follows
MAKEDEV tty pty
mknod -m 666 /dev/tty0 c 5 1
[root@vz1 ~]# ls -l /dev/tty*
-rw-r--r--  1 root root 5,  2 Nov 30 11:21 /dev/tty
crw-rw-rw-  1 root root 5,  1 Nov 30 11:39 /dev/tty0
crw-rw-rw-  1 root root 5,  0 Nov 27 17:31 /dev/ttyp
crw-rw-rw-  1 root tty  3, 48 Nov 30 11:25 /dev/ttys0
crw-rw-rw-  1 root tty  3, 49 Nov 30 11:25 /dev/ttys1
   :                   :                 :         
crw-rw-rw-  1 root tty  3, 63 Nov 30 11:25 /dev/ttysf


I'm beginning to wonder whether the "cannot open /dev/tty0" is not actually the problem and really X is failing for some other reason

Thanks
Paul

[Updated on: Fri, 30 November 2007 18:13] by Moderator

Report message to a moderator

Re: startx - cannot open /dev/tty0 [message #24028 is a reply to message #24027] Fri, 30 November 2007 12:06 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
Hi Paul,

perhaps this thread could help you?
http://forum.openvz.org/index.php?t=msg&goto=4044

Please, post the results if you get any with this.

Thank you.

--
Konstantin.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: startx - cannot open /dev/tty0 [message #24034 is a reply to message #24028] Fri, 30 November 2007 12:52 Go to previous messageGo to next message
paul_xedos is currently offline  paul_xedos
Messages: 13
Registered: November 2007
Junior Member
Thanks very much for this, Konstantin. Unfortunately the vzctl command did not work as I still get the same error when runnnig startx-

Fatal server error:
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory)


If I find a solution I'll report back
Re: startx - cannot open /dev/tty0 [message #24047 is a reply to message #24034] Fri, 30 November 2007 13:28 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
It's very strange...
1) wasn't /dev/tty0 somehow deleted ? Might be after the VE reboot? udev?
2) i wonder why tty0 has numbers 5:1 ? Is it correct? My node has tty0:
crw--w---- 1 root 4, 0 Nov 30 16:26 tty0

It's also RHEL4.4 and tty0 was created by MAKEDEV.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: startx - cannot open /dev/tty0 [message #24054 is a reply to message #24047] Fri, 30 November 2007 15:43 Go to previous messageGo to next message
paul_xedos is currently offline  paul_xedos
Messages: 13
Registered: November 2007
Junior Member
My tty's were created as a result of running:-
MAKEDEV tty pty
the tty0 with the 5,1 major minor numbers were created as a result of mknod. I tried the commands suggested in your link
host# vzctl set VEID --devnodes /dev/tty:rw
host# vzctl set VEID --devnodes /dev/tty0:rw

which on start up of the VE creates
[root@vz1 /]# ls -l /dev/tty0
crw-r-----  1 root root 4, 0 Nov 30 15:27 /dev/tty0



Googling the error returned a posting from a Xen forum which said :-

"You can't just startx because it'll look for a graphics card (which it doesn't have)." The fact that no graphics modules are loaded makes me wonder whether starting X is achievable in a VE

[root@vz1 /]# lsmod
Module                  Size  Used by


Thanks
Paul

Re: startx - cannot open /dev/tty0 [message #24058 is a reply to message #24054] Fri, 30 November 2007 16:21 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
paul_xedos wrote on Fri, 30 November 2007 18:43

The fact that no graphics modules are loaded makes me wonder whether starting X is achievable in a VE


Well, i know exactly that VNC can be run inside a VE and it does not require the access to the graphic card.

Speaking about the modules inside a VE - yes, you can't load a module from inside a VE. But you can load them in HN and after that they will be accessible in VE.
May be it makes sense to run X server in HN to make sure all required modules are loaded?

At the same time i doubt that the problem is with modules as log says clearly that it can't FIND /dev/tty0...


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: startx - cannot open /dev/tty0 [message #24059 is a reply to message #24054] Fri, 30 November 2007 16:24 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
paul_xedos wrote on Fri, 30 November 2007 18:43

host# vzctl set VEID --devnodes /dev/tty:rw
host# vzctl set VEID --devnodes /dev/tty0:rw

BTW, if you don't use "--save" vzctl option the VE reboot will drop your settings...


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: startx - cannot open /dev/tty0 [message #24069 is a reply to message #24059] Fri, 30 November 2007 16:45 Go to previous message
paul_xedos is currently offline  paul_xedos
Messages: 13
Registered: November 2007
Junior Member
Konstantin,

Your help was very much appreciated but I have found out why I could not get NX running. My host node was running iptables which prevented authentication through to a nis server. Flushing the firewall allowed NX to authenticate and start up. Like VNC it too must start it's own X server as everything works. Unfortunately, the initial error was vague though, nothing about failure to authenticate, which led me down the route of thinking I needed to run an X server. The actual /dev/tty0 problem was not solved but fortunately in this case I have resolved my initial problem

Thanks very again for your help
Rgds
Paul
Previous Topic: Rough Copy Box
Next Topic: OpenVZ - Cent OS - Install Problem
Goto Forum:
  


Current Time: Wed Nov 29 22:23:57 GMT 2023

Total time taken to generate the page: 0.03722 seconds