[Solved] Running Programs with SSH

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[Solved] Running Programs with SSH

Postby WhatUsernameIsFree? on Sat May 26, 2012 8:26 am

Hi all

I'm wondering if it's possible to run a program via SSH. If I have my Desktop and I want to use my Netbook to make the desktop open a video in VLC for example? I know I don't want the -X function, as that'll make the picture appear on my Netbook. I want everything to open on the Desktop.

Thanks
Last edited by WhatUsernameIsFree? on Sun May 27, 2012 10:27 am, edited 1 time in total.
WhatUsernameIsFree?
Level 4
Level 4
 
Posts: 210
Joined: Wed Oct 19, 2011 1:32 pm

Linux Mint is funded by ads and donations.
 

Re: Running Programs with SSH

Postby stratus_ss on Sat May 26, 2012 6:43 pm

so it would look something like this:

Code: Select all
Netbook $ ssh user@Desktop
Desktop $ export DISPLAY=:0.0
Desktop $ vlc file.avi


Its just a matter of making sure the display is set to the Desktop display instead of the Netbook's
stratus_ss
Level 4
Level 4
 
Posts: 224
Joined: Fri May 25, 2012 5:22 pm

Re: Running Programs with SSH

Postby WhatUsernameIsFree? on Sun May 27, 2012 9:03 am

Exactly what I wanted. Thanks :)
WhatUsernameIsFree?
Level 4
Level 4
 
Posts: 210
Joined: Wed Oct 19, 2011 1:32 pm

Re: [Solved] Running Programs with SSH

Postby oobetimer on Sun May 27, 2012 3:32 pm

ssh -X user@adress

An example nautilus: nautilus

When you close an application from button, Ctrl c brings you back to command line. You can also make your own launcher bar .. :wink:

#!/usr/bin/wish

button .btn1 -text "Nautilus" -command {exec nautilus}
button .btn2 -text "Terminal" -command {exec gnome-terminal}
button .btn3 -text "Synaptic" -command {exec synaptic}
button .btn4 -text "Gedit" -command {exec pluma}
button .btn5 -text "Totem" -command {exec totem}
button .btn6 -text "gFTP" -command {exec gftp}
button .btn7 -text "bareFTP" -command {exec bareftp}
button .btn8 -text "Writer" -command {exec libreoffice -writer}
button .btn9 -text "K3b" -command {exec k3b}

grid .btn1 .btn2 .btn3 .btn4 .btn5 .btn6 .btn7 .btn8 .btn9


Save as launcher.sh and make it executable (chmod +x launcher.sh)
Attachments
launcher.png
launcher.png (9.65 KiB) Viewed 358 times
User avatar
oobetimer
Level 7
Level 7
 
Posts: 1890
Joined: Tue Jun 01, 2010 12:53 pm
Location: Finland / above the Arctic Circle

Re: [Solved] Running Programs with SSH

Postby WhatUsernameIsFree? on Tue May 29, 2012 3:30 pm

Wouldn't the below run the programs on my laptop screen? I understand that the -X is for X forwarding? Also, where would I place the launcher.sh file?

oobetimer wrote:ssh -X user@adress

An example nautilus: nautilus

When you close an application from button, Ctrl c brings you back to command line. You can also make your own launcher bar .. :wink:

#!/usr/bin/wish

button .btn1 -text "Nautilus" -command {exec nautilus}
button .btn2 -text "Terminal" -command {exec gnome-terminal}
button .btn3 -text "Synaptic" -command {exec synaptic}
button .btn4 -text "Gedit" -command {exec pluma}
button .btn5 -text "Totem" -command {exec totem}
button .btn6 -text "gFTP" -command {exec gftp}
button .btn7 -text "bareFTP" -command {exec bareftp}
button .btn8 -text "Writer" -command {exec libreoffice -writer}
button .btn9 -text "K3b" -command {exec k3b}

grid .btn1 .btn2 .btn3 .btn4 .btn5 .btn6 .btn7 .btn8 .btn9


Save as launcher.sh and make it executable (chmod +x launcher.sh)
WhatUsernameIsFree?
Level 4
Level 4
 
Posts: 210
Joined: Wed Oct 19, 2011 1:32 pm


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 3 guests