Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi, I just built a CentOS box with everything installed. I thought I could just startx and connect... My 1st attempt:
[root@centos1 bin]# /usr/X11R6/bin/startx
Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
Please consult the The X.Org Foundation support
at http://wiki.X.Org for help.
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
giving up.
xinit: unable to connect to X server
xinit: No such process (errno 3): Server error.
[root@centos1 bin]# /usr/X11R6/bin/startx -- :1
\
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-42.ELsmp i686 [ELF]
Current Operating System: Linux centos1.mikey.com 2.6.9-42.ELsmp #1 SMP Sat Aug 12 09:39:11 CDT 2006 i686
Build Date: 22 August 2006
Build Host: build-i386
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-42.ELsmp (buildcentos@build-i386) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)) #1 SMP Sat Aug 12 09:39:11 CDT 2006
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.1.log", Time: Sun Dec 24 11:53:42 2006
(==) Using config file: "/etc/X11/xorg.conf"
SESSION_MANAGER=local/centos1.mikey.com:/tmp/.ICE-unix/6989
AUDIT: Sun Dec 24 11:53:45 2006: 6943 X: client 6 rejected from local host
looking for type: got text/plain
looking for type: got application/x-gnome-app-info
looking for type: got text/plain
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:90: GtkDeprecationWarning: gtk.mainloop is deprecated, use gtk.main instead
self.warn(message, DeprecationWarning)
So I'm not even sure at this point if it is running or not, but I then go to Cygwin bash shell on my Windows PC to connect via X:
$ ssh -Y -l mikey 192.168.25.1
mikey@192.168.25.1's password:
Last login: Sun Dec 24 11:14:07 2006 from xp1.mikey.com
[mikey@centos1 ~]$ xterm&
[1] 7125
[mikey@centos1 ~]$ xterm Xt error: Can't open display:
What am I missing? Any advice would be greatly appreciated. Thanks.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
Ok what happens when the system boots up. Does it goto a gui login manager or to a console session?
Has X worked before?
What video card do you have?
Post contents to /etc/X11/xorg.conf
If the file /tmp/.X0-lock exist delete it and just type startx.
When I boot up, it goes to the CentOS GUI and upon logon I get the nice looking desktop that looks like Windows. So I guess X server is running, and I just can't get to it remotely.
X has never worked, but I'm sure I'm doing something wrong on the Windows machine.
Video card is a low-end nVidia: GeForce 7300LE 256MB TurboCache. On the CentOS box when I go to display settings it thinks my video card is the VESA driver (generic) and it's working fine.
# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697
Rep:
Ok X is working. Now what are you using to connect to from the Windows machine?
From a reread looks like you are using cgywin which I nevered used. But here is a thought. Are you trying to redisplay display:0?
Is there a link to site you are using to set this up? If so post link.
Enable XDMCP in Login Screen Setup, Check Firewall Settings
To enable XDMCP:
Applications --> System Settings --> Login Screen
Click on XDMCP tab and select "Enable XDMCP"
You should now be able to login from a remote computer using cygwin.
If you still cannot log into XWindows remotely, you might also want to check if you have the firewall enabled on your Linux system (in CentOS, Fedora Core and RedHat, the default setting on installation is "Firewall Enabled"), that can block access to the ports necessary for XWindows.
Applications --> System Setting --> Security Level
and try disabling the firewall. If that fixes it, and you cannot live without a firewall, you will have to re-enable the firewall and make a custom exception for xWindows. Do a search for how to do that...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.