LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-25-2008, 04:11 AM   #1
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Rep: Reputation: 0
Problem with remote desktop via x ssh


Hi,
I want to have a remote desktop client software that be a os independent and can run on every client machine , so i used SSH -x with JAVA programming , but i have a problem with x ssh , not JAVA, here is my problem:
i tried command like "ssh -x server(for example)" and tried to run xclock or xeyes or every even gnome-session , but these applications are just ran on server node and on client node nothing happened!!
i tried that command on wire and also wireless network , i got same result , but when i tried "ssh -x -C" command on wireless network (for compression) the problem solved and i saw remote X applications successfully , but on wire network problem still exist , did anyone know what is the problem? and what should i do for solving that?!
p.sISPLAY variable is set to ":0.0" also x11 forwarding and agent is set to yes.
cheers.
 
Old 12-25-2008, 09:37 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Look at TightVNC. The remote desktop KDE programs will also work with windows remote desktop.

Another thing to look at is Cygwin/X. That will allow you to log into a remote X session from windows to Linux, or to run a single program remotely and have is show up in a window on Linux. This would allow you to run multiple programs on different Linux machines.
 
Old 12-26-2008, 02:49 AM   #3
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Original Poster
Rep: Reputation: 0
The problem isnt because of Java codes or etc...
i want to have a secure remote desktop with ssh , and i just test it on two linux os , client is Fedora 10 and server is centos 4.7! so i didnt try that on windows machine yet , but technically if i use JAVA for that i shouldnt have problem cause of its OS independent , anyway here is the problem:
I want to x-ssh to linux server with linux client at this moment , why i have that problem?!and what should i do ?!
also i havent any problem with ssh on those systems and ssh work fine. i think maybe this problem is because of DISPLAY variable, and it didnt set well so i cant see x windows on that.
 
Old 12-26-2008, 03:53 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
i tried command like "ssh -x server(for example)" ....[SNIP] ...nothing happened!!
You need :
Code:
ssh -X name@server
or
Code:
ssh -Y name@server
Note that those are CAPITAL "X" and CAPITAL "Y"

Lowercase "x" disables X11 forwarding

See man ssh
 
Old 12-26-2008, 04:47 AM   #5
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Original Poster
Rep: Reputation: 0
Yeah i know that or i can use "ssh -X -l user server"
use that without specifying user need to have same username on both system.
what is the difference between -X and -Y?!
cheers.
 
Old 12-26-2008, 04:56 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
what is the difference between -X and -Y?!
As I said, please see man ssh
 
Old 12-26-2008, 10:38 AM   #7
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Original Poster
Rep: Reputation: 0
So strange ,
I tried "ssh -Y" and it hasnt any problem and i can launch and see all of X windows on server without any problem!
i checked the man page and it says "Y" enable the trusted X11 forwarding.
Do you know why i have problem with "ssh -X" option?! i found out "ssh -Y" didnt neet to set DISPLAY variable , and it works without that.
 
Old 12-26-2008, 12:06 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
Do you know why i have problem with "ssh -X" option?! i found out "ssh -Y" didnt neet to set DISPLAY variable , and it works without that.
Your problem seems to be solved.

You do not seem to be able to find the following keys on your keyboard: T H A N K S

I am not, and never will be, a "human search engine".

There are plenty of computers on the internet to help you do that for yourself. Please try using one of them
 
Old 12-26-2008, 12:20 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I don't understand why you need to use Java. Anyway, if your ssh client has a -v option, then try logging in using the "-v -X" options. The client or server display is regarded as untrusted, and the -Y option will connect anyway, bypassing the X SECURITY controls. The -v option may provide further details. Also check the logs.

The latest issue of Linux Pro Magazine has an article on using the xrdp server. If you want to connect to a terminal session from a windows machine using windows remote desktop client that may be a good option.

Installing an X server on a windows machine is another option. Using Cygwin/X you can log in using an openssh client, the same as you would in Linux. There is an other project that supplies an X server on Windows, but I don't think it gives you a local bash shell, and programs.

Last edited by jschiwal; 12-26-2008 at 01:02 PM.
 
Old 12-26-2008, 03:29 PM   #10
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Original Poster
Rep: Reputation: 0
The reason that i want to do that with java is cause of it's a part of application that i working on it , i wrote other parts with JAVA ,so since JAVA is OS independent i decide to write this part with JAVA too , but if u know OS independent client and server tool for secure remote desktop let me know.
Anyway , i tried "ssh -X -v" and i didnt get any error , tried xeyes , a xeyes ran on server desktop but i didnt see that on client desktop and on client side terminal i didnt see any error.
 
Old 12-26-2008, 04:41 PM   #11
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
xeyes ran on the remote server's desktop? What happens if you are logged out at the server.

There can be a problem if you try to run firefox remotely. You need to use the '-no-remote' option (to have it run remotely!) and display on the client. I have a desktop with SuSE and a laptop with Fedora Core. If I enter "ssh -X hpmedia firefox" from my Fedora laptop, I will see the Fedora Core home page instead of the SuSE home page.

I wonder if JAVA may be doing something similar.

If I run xeyes, it will be displayed on my laptop. Running konqueror may be a better test. You can verify that it is running on the computer you think it is.

Double check that the $DISPLAY variable is 'localhost:10.0' or 'localhost:11.0'. I can run "DISPLAY=':0.0' xeyes" on the laptop after ssh'ing in and it will run on the ssh server (desktop). If I wouldn't be logged into desktop, then there wouldn't be a ":0.0" or I wouldn't own the screen, so there would be an error instead.
 
Old 12-27-2008, 05:19 PM   #12
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 25

Original Poster
Rep: Reputation: 0
"localhost:10.0" works for me , thanks for that , anyway , is there any possible way to have remote desktop on anpther window (for example a new window will be open and i can see remote desktop there)?! cause of when i tried gnome or kde remotely (gnome-session/startkde) , i cant see remote desktop properly , i mean it has some conflict with client desktop , also is there any way that for example if somebody is on server node and trying to change mouse cursor position , i can see that in client node too!? some thing like remote desktop applications.
 
  


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
windows remote desktop over ssh kpachopoulos General 1 12-06-2007 08:51 AM
remote desktop+ssh binary_dreamer Debian 10 02-06-2007 05:08 AM
'Remote Desktop' with SSH and VNC kaon Slackware 11 09-21-2004 01:15 PM
Remote Desktop using SSH tunnel..... help! redhatbeatswin Linux - Newbie 5 08-14-2004 11:51 AM
ssh forwarding+remote desktop Metroid Linux - Networking 2 06-23-2004 03:14 PM


All times are GMT -5. The time now is 11:54 AM.

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