Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1454
  • Last Modified:

Cannot get DISPLAY or xclock to work remotely from windows system

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
Atul_FGS
Asked:
Atul_FGS
  • 6
  • 3
  • 2
  • +1
3 Solutions
 
Atul_FGSAuthor Commented:
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
 
omarfaridCommented:
do you have X windows running on your windows pc ?
0
 
Atul_FGSAuthor Commented:
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
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
Atul_FGSAuthor Commented:
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
 
TintinCommented:
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
 
Ricardo ElenaManager, US OperationsCommented:
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
 
omarfaridCommented:
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
 
Atul_FGSAuthor Commented:
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
 
TintinCommented:
You need to use XDMCP for login screen.

See http://en.tldp.org/HOWTO/XDMCP-HOWTO/procedure.html for details.
0
 
Ricardo ElenaManager, US OperationsCommented:
0
 
Atul_FGSAuthor Commented:
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
 
Ricardo ElenaManager, US OperationsCommented:
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
 
Atul_FGSAuthor Commented:
Thanks all for the help.:-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now