LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2007, 09:12 PM   #1
Towlies
LQ Newbie
 
Registered: May 2007
Posts: 5

Rep: Reputation: 0
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..
 
Old 05-16-2007, 01:19 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.
 
Old 05-16-2007, 01:52 AM   #3
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
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.
 
Old 05-16-2007, 06:24 PM   #4
Towlies
LQ Newbie
 
Registered: May 2007
Posts: 5

Original Poster
Rep: Reputation: 0
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]
 
Old 05-16-2007, 06:44 PM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

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

ssh -X user@host
 
Old 05-16-2007, 08:30 PM   #6
Towlies
LQ Newbie
 
Registered: May 2007
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 05-16-2007, 09:34 PM   #7
bouchecl
Member
 
Registered: Nov 2005
Location: Quebec
Distribution: Fedora Core / Ubuntu
Posts: 37

Rep: Reputation: 15
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.
 
Old 05-16-2007, 10:05 PM   #8
Towlies
LQ Newbie
 
Registered: May 2007
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 05-17-2007, 12:57 AM   #9
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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?
 
Old 05-17-2007, 08:29 AM   #10
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
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.
 
Old 05-17-2007, 06:23 PM   #11
Towlies
LQ Newbie
 
Registered: May 2007
Posts: 5

Original Poster
Rep: Reputation: 0
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GUI SSH login rajaniyer123 Linux - General 7 03-05-2007 02:39 PM
gui and ssh kpachopoulos Linux - General 1 09-08-2005 02:30 PM
ssh + gui? SamerAdra Linux - Newbie 5 10-27-2004 11:59 PM
gui ssh client bitessy Linux - Software 5 02-06-2004 07:20 PM
Ssh Gui DavidPhillips Linux - General 2 11-11-2001 06:53 AM


All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration