Is it possible to launch an application on a remote pc using the terminal?
12,319
Solution 1
If found the answer I was looking for just in case someone comes across this in the future.
Here's how:
dan@micro:~$ ssh bigbox
dan@bigbox:~$ export DISPLAY=:0
dan@bigbox:~$ teamviewer
TeamViewer popped right up on my big PC. Perfect!
Solution 2
Use ssh
with -X
option:
ssh -X [user@]hostname teamviewer
See man ssh
for more info.
Related videos on Youtube
Author by
Dan
Updated on September 18, 2022Comments
-
Dan over 1 year
I found myself away from my computer needing to do some quick work that required my accessing my desktop remotely. I normally use teamviewer, but I don't have it load on boot. I can launch it from the terminal just by typing
teamviewer
while sitting at my computer. When I try it logged in through SSH, nothing actually loads.Is it possible to force an app to load on the ssh server?
-
davidbaumann over 9 yearsAs you're already connected by ssh, why do you need teamviewer? Maybe you want to do X forwarding. Or you set export DISPLAY.
-
Dan over 9 yearsSometimes I copy and paste things into sublime text or gedit, I found myself in the position the other day where I needed that, it wasn't saved and I wasn't home. Normally I would just do what I need with ssh, but this time I needed teamviewer. I was on a friend's windows machine. I could set teamviewer to launch on boot, but I don't want to. Is there no way to do what I'm looking for?
-
-
Dan over 9 yearsHey, that's pretty neat! But it works backwards... I just tried it on my laptop, ssh'd into my pc, and it opened teamviewer... on my laptop. I don't even have it installed on the laptop... that's neat. But I need to launch teamviewer ON the pc I'm connected to, not the computer I'm currently on. I find it odd that I can't find an answer to this.. Surely I can't be the only one that needs something to launch remotely that's not a service
-
Radu Rădeanu over 9 years@Dan Just use in the command the
[user@]hostname
of the of the pc you're connected to. You said that you can connect there through SSH. -
davidbaumann over 9 yearsSet it as solution, so it will appear on top.
-
Dan over 9 yearsI can't yet, I have to wait 16 more hours I think.
-
Andre Araujo over 6 yearsFor me didn't work: Invalid MIT-MAGIC-COOKIE-1 keyxprop: unable to open display ':0'