Author Topic: Is anyone able to run startx though SSH?  (Read 3534 times)

Offline Jaycoke

  • Full Member
  • ***
  • Posts: 144
    • PCLinuxOS Group on identi.ca Join today!
Is anyone able to run startx though SSH?
« on: June 06, 2010, 08:41:23 PM »
Hey all,
I was reading this
http://www.tuxradar.com/content/how-linux-works-ultimate-guide
Recently and I was trying to get this to work.
Quote
Step by step: Tunnel X through SSH
Change the config

Change the config: Make sure you have AllowX11Forwarding and ForwardX11 enabled in both computers' /etc/ssh/ssh_config files.
Make the connection

Make the connection: Type ssh -X username@ipaddress to connect to the remote machine. Ideally, this machine shouldn't have an X session running.
Pull windows

Pull windows: Type startx -- :1 to launch a graphical session that will be pulled through the SSH session, or try xclock & if there's one already running.


I can get the ssh login part done, but when I try
Code: [Select]
$ startx -- :1
xauth:  creating new authority file /home/jaycoke/.serverauth.27949

Authentication failed - cannot start X server.
Perhaps you do not have console ownership?giving up.
xinit:  No such file or directory (errno 2):  unable to connect to X server
xinit:  No such process (errno 3):  Server error.

I have tried to add my user to 'root' group, (on both machines) but still desn't work as user. However  running startx -- :1 as root gets me this...

Code: [Select]
# startx -- :1
xauth:  creating new authority file /root/.serverauth.28472


X.Org X Server 1.6.5
Release Date: 2009-10-11
X Protocol Version 11, Revision 0
Build Operating System: Linux_2.6.32.4-pclos2 PCLinuxOS
Current Operating System: Linux localhost.localdomain 2.6.32.11-pclos2.bfs #1 SMP PREEMPT Wed Apr 7 13:33:19 CDT 2010 i686
Build Date: 22 January 2010  05:01:40AM
 
        Before reporting problems, check http://pclinuxos.com
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Sun Jun  6 21:31:07 2010
(==) Using config file: "/etc/X11/xorg.conf"

But when I try to go to display 1 ("Ctrl+Alt+F8") All I see is a blank TTY

i have done some searching both on our forums and Google with no clear answers.
This is a good discussion, but no mention of running startx through ssh.
http://www.pclinuxos.com/forum/index.php/topic,59617.msg479946.html#msg479946

BTW If I run startx --  :1 locally (not through ssh) it works fine, and the display starts up as expected.

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Is anyone able to run startx though SSH?
« Reply #1 on: June 19, 2010, 12:06:45 AM »
Quote
Pull windows: Type startx -- :1 to launch a graphical session that will be pulled through the SSH session, or try xclock & if there's one already running.

I haven't tried this yet, but I'm curious. Did you try xclock &? I'll bet there's an X session already running on the target.
Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline moniac

  • Full Member
  • ***
  • Posts: 198
Re: Is anyone able to run startx though SSH?
« Reply #2 on: June 19, 2010, 09:55:32 AM »
This is what I have been doing. I ssh into the server and run what ever program I want from the command line such as konqueror. mcc or systemsettings etc. If I want to do remote assistance I use nomachine's NX free or Grdc over NeoRouter free. 

Offline trustytrev

  • Sr. Member
  • ****
  • Posts: 472
Re: Is anyone able to run startx though SSH?
« Reply #3 on: June 25, 2010, 08:23:15 AM »
Hello,
      Try ssh into the remote server/computer then  vncviewer from the command line.Then 127.0.0.1:0 when in vnc for the currently used desktop or 127.0.0.1:123 etc for any other.
trustytrev. :)
If there's a harder way to do something I'll probably find it.