LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 12-25-2008, 05:11 AM   #1
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0
Problem with remote desktop via x ssh


[Log in to get rid of this advertisement]
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.
mr_aliagha is offline     Reply With Quote
Old 12-25-2008, 10:37 PM   #2
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 12,875
Thanked: 232
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.
jschiwal is offline     Reply With Quote
Old 12-26-2008, 03:49 AM   #3
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0

Original Poster
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.
mr_aliagha is offline     Reply With Quote
Old 12-26-2008, 04:53 AM   #4
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,373
Thanked: 141
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
tredegar is offline     Reply With Quote
Old 12-26-2008, 05:47 AM   #5
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0

Original Poster
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.
mr_aliagha is offline     Reply With Quote
Old 12-26-2008, 05:56 AM   #6
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,373
Thanked: 141
Quote:
what is the difference between -X and -Y?!
As I said, please see man ssh
tredegar is offline     Reply With Quote
Old 12-26-2008, 11:38 AM   #7
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0

Original Poster
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.
mr_aliagha is offline     Reply With Quote
Old 12-26-2008, 01:06 PM   #8
tredegar
Senior Member
 
Registered: May 2003
Location: London, UK
Distribution: Kubuntu6.06.1LTS (still excellent!). Kubuntu 8.04.1
Posts: 4,373
Thanked: 141
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
tredegar is offline     Reply With Quote
Old 12-26-2008, 01:20 PM   #9
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 12,875
Thanked: 232
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 02:02 PM..
jschiwal is offline     Reply With Quote
Old 12-26-2008, 04:29 PM   #10
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0

Original Poster
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.
mr_aliagha is offline     Reply With Quote
Old 12-26-2008, 05:41 PM   #11
jschiwal
Moderator
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 12,875
Thanked: 232
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.
jschiwal is offline     Reply With Quote
Old 12-27-2008, 06:19 PM   #12
mr_aliagha
LQ Newbie
 
Registered: Dec 2008
Posts: 8
Thanked: 0

Original Poster
"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.
mr_aliagha is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 02:39 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration