LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-03-2008, 12:57 PM   #1
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
vista/ubuntu gedit across a ssh fails


On Vista Machine cmd prompt
Putty/SSH into linux box


root@james-desktop:/home/james# gedit
cannot open display:
Run 'gedit --help' to see a full list of available command line options.
root@james-desktop:/home/james# DISPLAY=:0.0 gedit
root@james-desktop:/home/james# DISPLAY=:0.0 gedit &
[2] 6846
root@james-desktop:/home/james#
So from above: Gedit cant open DISPLAY and fails
Setting DISPLAY to :0.0 and executing gedit gives no failure msg but doesn't open GEDIT on the Vista Screen
Adding a trailing Ampersand gives [2] 6846 and still fails to open Gedit on the vista screen

Any help will be appreciated
 
Old 08-03-2008, 01:09 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Do you have X11Forwarding enabled ?
 
Old 08-03-2008, 01:17 PM   #3
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
What command would I need to execute to discover if I have X11 forwarding?
And can I execute the command from a Vista laptop across a putty ssh or do I need to travel to the linux box to execute?
Thank you for your rapid response
 
Old 08-03-2008, 01:19 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Wait, hold on....

If you want gedit to appear on your Vista system, you need to be running an X11 server on Vista.

[ stuff below applies only if you want to run gedit to a local x server ]

In your sshd_config file (probably in /etc/ssh) on the ssh server, there are configuration options for X11Forwarding:

X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

You want X11Forwarding yes. Edit the file as root, add the option, and then restart the ssh server.

/etc/init.d/sshd restart

It is a good idea to have a couple of ssh connections to the server, so that if you make a mistake in the sshd_config file, you aren't locked out of the server.

Last edited by Mr. C.; 08-03-2008 at 01:24 PM.
 
Old 08-03-2008, 01:24 PM   #5
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Do you have an X server running on the Vista machine? 'Cos you'll need one if you want to run graphical programs like gedit over ssh.
You could of course just use a non-graphical interface editor. If you're only used to GUI editors then pico is possibly the easiest non-graphical interface text editor to pick up and use. Certainly easier than vi or emacs, though not as powerful as either.
 
Old 08-03-2008, 01:36 PM   #6
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Here is the content of /etc/ssh/ssh_config
I am unfamiliar with X Syntax but I see # symbols to the right of all entries. Some apps use that as a comment. Second line comes close to your X11forwarding yes
Do I need to edit that line to delete the # and change the No to Yes? if so what other changes do I need to make?

Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa

Thanks for the help
 
Old 08-03-2008, 01:39 PM   #7
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
What do I need to do to get an Xserver running on the Vista machine?
 
Old 08-03-2008, 01:44 PM   #8
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by john test View Post
What do I need to do to get an Xserver running on the Vista machine?
Don't know exactly as I've never done it. Maybe http://www.straightrunning.com/XmingNotes/
 
Old 08-03-2008, 01:45 PM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Well, you could use Cygwin and install/configure its X11 server.

See the list of available X servers for Windows:

http://en.wikipedia.org/wiki/X_Windo...mplementations

I've used each of the X servers from Cygwin, XWin32, and Exceed.

Last edited by Mr. C.; 08-03-2008 at 01:47 PM.
 
Old 08-03-2008, 02:17 PM   #10
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Not sure just what to download to get cygwin. Hit a mirror site but the file names did not see to make much sense. Can you help?
 
Old 08-03-2008, 02:20 PM   #11
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You use the setup.exe program, and select the packages you want.

http://www.cygwin.com/

The big Installing and Updating Cygwin area indicates how.

You might find xming a simpler option.
 
Old 08-03-2008, 02:58 PM   #12
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
Installed Cygwin on my Vista Laptop
I have two windows open 1 Putty 2 cygwin
Cygwin window can't find Gedit
putty can't open display
at the SSH windows

root@james-desktop:/etc/ssh# DISPLAY=:0.0 gedit &
[4] 6907
[3] Done DISPLAY=:0.0 gedit
root@james-desktop:/etc/ssh#
 
Old 08-03-2008, 03:04 PM   #13
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
With putty, you need to connect to your Linux box with SSH, and hae X11 forwarding enabled on both the client and server.

See: http://tldp.org/HOWTO/XDMCP-HOWTO/ssh.html
 
Old 08-03-2008, 03:20 PM   #14
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
In Post #6 above there is a copy of ssh_config
Do I delete the # symbol and change NO to Yes in line 2 and delete the # symbol in line 3?
 
Old 08-03-2008, 03:28 PM   #15
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527

Original Poster
Blog Entries: 1

Rep: Reputation: 35
found a note to run start x did that and it appeared to install here is the result

root@james-desktop:/etc/ssh# startx
xauth: creating new authority file /root/.serverauth.6917
xauth: creating new authority file /root/.Xauthority
xauth: creating new authority file /root/.Xauthority

X: warning; process set to priority -1 instead of requested priority 0

Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.

root@james-desktop:/etc/ssh#
Will do more Reading :-)
 
  


Reply



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
How can I remove vista from a ubuntu / vista dual boot! TheOneSYM Linux - Newbie 10 04-01-2010 01:21 PM
error msg when using gedit in ssh taj SUSE / openSUSE 3 06-01-2008 04:04 PM
Vista and ubuntu duel boot how to links for ubuntu inspiron_Droid Ubuntu 1 04-16-2008 01:53 PM
Installing GEdit function browser plugin in Ubuntu skails22 Linux - Newbie 3 07-24-2007 05:51 PM
Bridged networking on Guest VISTA fails 1kyle General 1 02-25-2007 06:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:55 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
Open Source Consulting | Domain Registration