473,505 Members | 16,940 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to start a program in the gui of remote machine over ssh

6 New Member
Hi there,

I work in an IT support department and I'm a trainee - i started end of October 2008.
Last week the office was quiet and I found an interesting ssh feature: remotely running a program on remote gui desktop. problem is i couldnt do it even if i had my key on the remote pc. i only managed to put xeyes on my desktop and turn my managers pc into a coo coo clock (every 15mins the cd tray would open and close).

How would it be done?
we both use ubuntu 8.04 and know each others pass and have our authorised keys.

many thanks
Malcs
Apr 19 '09 #1
5 4619
Nepomuk
3,112 Recognized Expert Specialist
So what you're saying is that it worked fine with two computers, but a different one wouldn't start whatever you asked it to start?
And just to clarify: What you are doing is that from Computer A you log in to Computer B and start a program that will run on a GUI (or more accurately: on an X-Server) in Computer B, right?
If I am right, are there any differences between the computers it works with and that one that it doesn't work on that you could tell us about? Anything, that might stop you from doing what you are trying to do?

Greetings,
Nepomuk


Note to others who don't know: As ssh requires a user account on any PC you do this to, so it is not considered illegal and may therefore be discussed here.
Apr 19 '09 #2
malcsman
6 New Member
erm.. A = my computer; B = manager/other/remote pc.

ssh from A to B and run "xeyes": result = xeyes running on A;
ssh from A to B and run "eject -T /dev/dvdrom1; eject -T /dev/dvdrom1": result = dvdrom1 opens/closes on B.

it works with a command line program, but fails with a gui program. we both ssh each other without giving the password, almost everyday to send wall msgs to each other if jabber doesnt get the msg thru..

hope i answered your questions.
Apr 19 '09 #3
Nepomuk
3,112 Recognized Expert Specialist
For the first scenario, you'll have to use ssh -X [user@]host, which enables X forwarding (if you don't understand the latter, don't worry). Does that answer your question?

Greetings,
Nepomuk
Apr 19 '09 #4
malcsman
6 New Member
ye.
what if i add -f. does that change the behaviour?
and then if i CTRL-z and restart the job with bg %.... will the remote program be paused and un-paused or stopped and started?

SMiLE
Apr 19 '09 #5
Nepomuk
3,112 Recognized Expert Specialist
@malcsman
It works as you would expect: ssh goes to the background and runs the command with a GUI.
@malcsman
Quite honestly, I don't know for sure. But how about you testing it and then posting your results here?

Greetings,
Nepomuk
Apr 19 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1610
by: sandiyan | last post by:
Hi, I am trying to use java to do the following: Remote machine(Windows): Has a drive mapped(m:\) to a network share. Invoking a BAT file(test.BAT) from this drive will install an application...
7
717
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
3
8140
by: Nidhee Pathak via .NET 247 | last post by:
Hi, I am trying to run an exe present on the remote machine using the ManagementClass object. I connect to the remote machine using ObjectManagementScope class, but i am not being able to run the...
3
2746
by: John Grandy | last post by:
I need to start an executable (such as a batch file) on a remote machine. System.Diagnostics.Process.Start() will not start a new process on a remote machine ...
0
1201
by: lawrencelee | last post by:
Hi, al I want to debug a dll which will run in a remote machine. I set up the remote debuging setting properly. And set the "Remote Command" as the program name which will load the dll. Then I...
2
5866
by: Vadim Rapp | last post by:
Hello, I have the following code: ========== Dim RemoteService As System.ServiceProcess.ServiceController RemoteService = New System.ServiceProcess.ServiceController("service1",...
7
10115
by: Ctal | last post by:
What is the best way to have my windows app run a .bat file on a remote server? The .bat will need to run as an admin on the remote machine. Additonally I need for my windows app to wait for the...
3
9447
by: Billy Bob | last post by:
Hello In C# how can i start a remote process such as someapp.exe on a remote PC? I know the remote PC's name, but how do I start the app on that PC? Thanks ..
1
5630
by: remya1000 | last post by:
from my system i need to open a calculator in remote machine. and i'm using Vb.net and WMI. i need to pop up the calculator in remote machine, while i run one program in my system. while running in...
2
2946
by: vimalsantoki | last post by:
Any one please help me in c#. I want to start a GUI process in remote machine using c#.net. I have develop one windows application for LAN in which I provide a facility of remote process start...
0
7218
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7307
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7021
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1532
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.