Ubuntu: Cannot open GUI applications through remote SSH using my phone



Question:

Right now I'm sending this command through SSH from phone to my Ubuntu laptop.

echo SSHPASSWORD|sudo -S bash -c "export DISPLAY=:0"&&" + transmission-gtk  

Non-graphical commands work fine. Printing out $DISPLAY didnt show anything on my phone, while it's 0 if I display it on my laptop. I've searched everywhere

This is what I get back.

09-14 00:15:53.295 6201-6201/david.sshapplication I/System.out: RESPONSE[sudo] password for david: Unable to init server: Could not connect: Connection refused  09-14 00:15:53.295 6201-6201/david.sshapplication I/System.out: (transmission-gtk:27487): Gtk-[1;33mWARNING[0m **: cannot open display:   

I however, cannot use ssh -X or something like that sadly. Just to make sure we're all on the same page I want to open the transmission program on my laptop, so I can just open it up from my bed without having to get up.

This is what I tried next:

echo SUDOPASS|sudo -S bash -s ts.sh  

It appears to have run the script, but it doesnt actually open the app, the script set out to open. It opens if I run the script on my laptop.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »