LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-19-2007, 02:40 AM   #1
vmniza
LQ Newbie
 
Registered: Feb 2004
Posts: 19

Rep: Reputation: 1
"Can't open display" Error when running X applications remotely


I have been trying to run graphical applications remotely in my Fedora (GNOME Desktop)machine. I was able to do it sucessfully using ssh. But trying to do it by changing DISPLAY variable is not working.




I want to run a application say xcalc from a machine with IP 192.168.1.19 (so this is my X client). The display should be on my machine whose IP is 192.168.1.20 (this is my Xserver).

step 1: To enable 192.168.1.19 to write on my display, I issued the command xhost +192.168.1.19.

Step 2: in my x client(192.168.1.19), I change the DISPLAY variable by giving the command
DISPLAY=192.168.1.20:0.0

Step 3: I executed the command xcalc from 192.168.1.19.

I get the error : "Can't open display"

Can anyone help me please?? I don't want to do it with ssh..
 
Old 06-19-2007, 05:23 AM   #2
ozzis
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Rep: Reputation: 15
Quote:
Originally Posted by vmniza
I have been trying to run graphical applications remotely in my Fedora (GNOME Desktop)machine. I was able to do it sucessfully using ssh. But trying to do it by changing DISPLAY variable is not working.

I want to run a application say xcalc from a machine with IP 192.168.1.19 (so this is my X client). The display should be on my machine whose IP is 192.168.1.20 (this is my Xserver).

step 1: To enable 192.168.1.19 to write on my display, I issued the command xhost +192.168.1.19.

Step 2: in my x client(192.168.1.19), I change the DISPLAY variable by giving the command
DISPLAY=192.168.1.20:0.0

Step 3: I executed the command xcalc from 192.168.1.19.

I get the error : "Can't open display"

Can anyone help me please?? I don't want to do it with ssh..
Look into this command:

X -query 192.168.1.20

The way it's typed above it will bring up the whole X session(provided you do not have X running on the client) but I think if you maybe say something like:

X -query xcalc 192.168.1.20
or
Xcalc -query 192.168.1.20

You get the drift. Good luck!
 
Old 06-19-2007, 08:00 AM   #3
scada_man
LQ Newbie
 
Registered: Sep 2006
Location: Atlanta GA
Distribution: fedora
Posts: 1

Rep: Reputation: 0
Does xclock give you a similar result?
 
Old 06-19-2007, 09:05 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
Has 192.168.1.20 an opened tcp port 6000?
Code:
netstat -lapute
on 192.168.1.20 shows 6000 opened?

You can also, from .19 try to connect to .20:
Code:
telnet 192.168.1.20 6000
or better
Code:
nc -vv 192.168.1.20 6000
Next step is to check that you properly have the authorization cookie.
Code:
xauth list

Do you have specific needs to not tunnel it in ssh?

Last edited by nx5000; 06-19-2007 at 09:07 AM.
 
Old 06-20-2007, 02:25 AM   #5
ozzis
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Rep: Reputation: 15
I don't think anyone would ever want to move from ssh to telnet for whatever reason if ever!
 
Old 06-20-2007, 04:25 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
He didn't say he wants to use telnet.
I understand that he wants to ssh (without -X), so in a secure way.
But his Xwindow traffic has to go out of the ssh tunnel.

It's nearly the same as it's easy to inject characters in an X client, monitor keyboard strokes,..

Probably for educationnal purpose?
 
Old 10-31-2010, 08:41 AM   #7
discodan7700
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
xhost +

I know this post is back from 07, but just in case it helps someone else out there...

I ran into this same issue and fixed it with the following command on the host PC ( aka the PC you are connecting to ).

Code:
xhost +
which returns

Code:
access control disabled, clients can connect from any host
Note: this only works per session. So if you log out from the host or reboot it, then the command will need to be reapplied. If this is a problem, maybe configure your session to run the command on login?

One other note: this also works if you need to su to another user and launch a Gui app. Example, my daughter is logged in, I want to check my email on her PC without logging her out or switching users. I go to terminal...

Code:
xhost +
su me
password
thunderbird
hope this helps,

-dan-
 
Old 05-24-2011, 08:56 PM   #8
hahacc
Member
 
Registered: Oct 2010
Posts: 70

Rep: Reputation: 1
windows xming and linux gui

I wrote an article:
http://www.doxer.org/learn-linux/use...11-forwarding/
Hope that help.
 
1 members found this post helpful.
Old 06-17-2011, 05:22 AM   #9
evaluna
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
in my debian squeeze I solved installing xauth pkg
 
  


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
"Run Application" dialog box NOT running applications trident Linux - Desktop 5 03-12-2008 10:55 AM
"Can't open display" error when try to use a program remote heande Linux - Newbie 2 03-11-2005 10:13 AM
unable to open display "24.228.61.72:0.0" while installing oracle remotely cheeku Linux - Newbie 3 08-13-2004 04:08 PM
"Can't open display" error simanyay Linux - Software 5 03-22-2004 10:59 AM
running X remotely -> "cannot open display..." gene_gEnie Linux - Networking 1 10-05-2001 02:51 PM


All times are GMT -5. The time now is 05:15 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration