LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running GUI in SSH (https://www.linuxquestions.org/questions/linux-newbie-8/running-gui-in-ssh-554198/)

Towlies 05-15-2007 08:12 PM

Running GUI in SSH
 
I have root SSH to a server running Debian distro and I currently have a SSH to it. Now I learned about the program wine and the possibilities of wine....Right now I am pretty new to SSH and can run basic programs..

I was wondering what is the easiest way to start up a GUI and get remote connection to be able to run GUI programs.

Thanks..

macemoneta 05-16-2007 12:19 AM

First, if you have root ssh to a system, you have a very broken configuration. Fix that problem. You should not be able to log into a system remotely as root.

Second, there's no need to "start a GUI" to run GUI applications remotely. Simply 'ssh -X' to forward X applications, and run your application. The GUI will be displayed on your local machine.

Zmyrgel 05-16-2007 12:52 AM

VNC server tunneled through SSH :)

Probably not the easiest way though but I think that would be the best option.

TightVNC and OpenSSH should be only programs you need, just google for some tutorial.

Towlies 05-16-2007 05:24 PM

I mean I just have root... I don't use it as my primary account...Just root is needed.

What I use to connect to it is putty that is basically all I know about remote shell.

I try command "ssh -X" and it says

Code:

usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
          [-D [bind_address:]port] [-e escape_char] [-F configfile]
          [-i identity_file] [-L [bind_address:]port:host:hostport]
          [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
          [-R [bind_address:]port:host:hostport] [-S ctl_path]
          [-w tunnel:tunnel] [user@]hostname [command]


macemoneta 05-16-2007 05:44 PM

You left off the user and host. The complete syntax is:

ssh -X user@host

Towlies 05-16-2007 07:30 PM

OK so now I got this working and it logs in just like it usually does....How do I get a GUI program to run in this.

bouchecl 05-16-2007 08:34 PM

Quote:

Originally Posted by Towlies
OK so now I got this working and it logs in just like it usually does....How do I get a GUI program to run in this.

Just type the command to the program in question. Let's say you want to edit the file foo.bar in your home directory, you would type:

Code:

gedit foo.bar[ENTER]
Wait a few seconds, and the Gnome editor should open on your remote workstation with the text of the file foo.bar.

As for the matter of root access on an ssh connection, that's not the way it should be done. Remote access should be given parimoniously and only regular users should have access. Access to the remote prompt should be firewalled so you can only login from specific ranges of addresses such as your private LAN. Once your trusted user is in, then he/she can use either 'su -' or 'sudo' to do whatever black magic they need to do on your system. This is not Windows.. in *nix, the system is designed to be run as a normal user as a matter of course.

Towlies 05-16-2007 09:05 PM

Thank You so much for the help but I am still getting a problem...

Quote:

cannot open display: (null)
Run 'gedit --help' to see a full list of available command line options.

macemoneta 05-16-2007 11:57 PM

When using ssh -X, the display variable should be set automatically by the system. What are your source (local) and destination (remote) operating systems and versions?

Hangdog42 05-17-2007 07:29 AM

Quote:

What I use to connect to it is putty that is basically all I know about remote shell.
I take your use of putty to mean that you're running on a Windows client. If that is true, you need to install an X server on Windows. Cygwin is a nice option. Otherwise, tunneling VNC through an SSH tunnel works well and there are a couple of good VNC clients for Windows out there.

Towlies 05-17-2007 05:23 PM

Well running the VNC sounds good...I got a RealVNC viewer I just need to figure out how to setup a VNC server.

How would I do that exactly...


All times are GMT -5. The time now is 04:08 PM.