Solved

Cannot get DISPLAY or xclock to work remotely from windows system

Posted on 2008-10-16
13
1,416 Views
Last Modified: 2013-12-27
Hi I am using redhat 2.6, I need to start the gui from putty (on other windows machine=10.253.17.180).

redhat server IP=10.253.17.175
windows machine IP(putty installed)=10.253.17.180,putty setting=enable x11 forwarding checked.

on redhat server I have run xhost +
then
*****************************

[root@localhost log]# 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.


[root@localhost log]# uname -a
Linux localhost.localdomain 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux
************************************************************

FROM WINDOWS MACHINE THROUGH PUTTY I RAN

*******************************************
[root@localhost ~]# export DISPLAY=10.253.17.180:0.0
[root@localhost ~]# echo $DISPLAY
10.253.17.180:0.0
[root@localhost ~]# /usr/X11R6/bin/xclock
Error: Can't open display: 10.253.17.180:0.0
[root@localhost ~]#
****************************************************
PLEASE HELP ME TO RESOLVE Error: Can't open display: 10.253.17.180:0.0 .
0
Comment
Question by:Atul_FGS
  • 6
  • 3
  • 2
  • +1
13 Comments
 

Author Comment

by:Atul_FGS
ID: 22730735
Also my host files value is

**************************************************
[root@localhost ~]# cd /etc
[root@localhost etc]# ls -ltr host*
-rw-r--r--  1 root root 347 Jan 13  2000 hosts.deny
-rw-r--r--  1 root root 161 Jan 13  2000 hosts.allow
-rw-r--r--  1 root root  17 Jul 23  2000 host.conf
-rw-r--r--  1 root root   5 Nov  1  2004 hosts.canna
-rw-r--r--  1 root root 146 Oct 10 15:00 hosts
[root@localhost etc]# cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
[root@localhost etc]# cat hosts.allow
#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#

[root@localhost etc]# cat hosts.deny
#
# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!
**************************************************************
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 75 total points
ID: 22730996
do you have X windows running on your windows pc ?
0
 

Author Comment

by:Atul_FGS
ID: 22731090
Also found this,buT DO NOT KNOW HOW TO START X WITHOUT NOLISTEN,PLZ HELP


[root@localhost etc]# ps axl|grep -w X
4     0  4363  4279  15   0 20452 16336 -     S    ?          0:01 /usr/X11R6/bin/X :0 -audit 0 -auth /var/gdm/:0.Xauth -nolisten tcp vt7
4     0  6527  6431  16   0  3704  696 pipe_w S+   pts/5      0:00 grep -w X
[root@localhost etc]#

Open in new window

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:Atul_FGS
ID: 22731115
hI omarfarid
---do you have X windows running on your windows pc ?
How to check this?
I am using putty on windows not sure if x windows is there on windows.
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 75 total points
ID: 22735382
putty is just a telnet/ssh client.  In order to display X applications, you need to run a X server on your Windows PC.  There's plenty to choose from, but a good free one is Cygwin/X.

See http://x.cygwin.com/
0
 
LVL 3

Accepted Solution

by:
Ricardo Elena earned 100 total points
ID: 22736874
Other way is to use
Putty and Xming
Xming is an X Window Server for Microsoft OS, you can find it here http://sourceforge.net/project/showfiles.php?group_id=156984&package_id=175377
install it, and when you run these app, and "X" icon will appear in you system tray neer the windows clock
then connect with putty and enable X Forwarding in your connection
done that you'll be able to run x applications from putty and see them on your windows desktop.
Some times you migth need to use these command "export DISPLAY=[your IP]:0.0"
0
 
LVL 40

Expert Comment

by:omarfarid
ID: 22737177
As Tintin commented, putty is a command line ssh client. You need to install X Windows on your PC. You could use free X windows like cygwin/X or use commercial one like X-Win32 or Exceed.

0
 

Author Comment

by:Atul_FGS
ID: 22738082
Issue resolved thanx I am able to see xclock.
I installed Xming  and configured it from the below link

http://ubuntuforums.org/archive/index.php/t-225898.html

just one last question how to I get complete gui interface for linux server,i.e logon screen.

also can I open KBOUNCE remotely from windows machive in same fashion,if yes than how?




0
 
LVL 48

Expert Comment

by:Tintin
ID: 22738099
You need to use XDMCP for login screen.

See http://en.tldp.org/HOWTO/XDMCP-HOWTO/procedure.html for details.
0
 
LVL 3

Expert Comment

by:Ricardo Elena
ID: 22738279
0
 

Author Comment

by:Atul_FGS
ID: 22738828
Hi Ricardoelena,


I have made all changes as per http://www.starnet.com/KB/connection/new_host.asp
except the last one "The system needs to run in init level 5 (/etc/inittab)."
please let me know hoe to changes this.
attached my (/etc/inittab).
[root@localhost ~]# vi /etc/inittab
#
# inittab       This file describes how the INIT process should set up
#               the system in a certain run-level.
#
# Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#               Modified for RHS Linux by Marc Ewing and Donnie Barnes
#
 
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:
 
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
 
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
 
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
 
# When our UPS tells us power has failed, assume we have a few minutes
# of power left.  Schedule a shutdown for 2 minutes from now.
# This does, of course, assume you have powerd installed and your
# UPS connected and working correctly.
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
 
# If power was restored before the shutdown kicked in, cancel it.
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
 
 
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
 
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
~
~
~
~

Open in new window

0
 
LVL 3

Expert Comment

by:Ricardo Elena
ID: 22738857
its done allready in line 19 you setup the init level you want "id:[init level]:initdefault:"
the way you have it is for init level 5 "id:5:initdefault:"
0
 

Author Closing Comment

by:Atul_FGS
ID: 31506716
Thanks all for the help.:-)
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question