LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-04-2017, 06:42 PM   #1
BrianOBrien
LQ Newbie
 
Registered: Feb 2017
Posts: 9

Rep: Reputation: Disabled
Running headless with a desktop.


I'm running Red Hat Enterprise Linux Server release 6.8 (Santiago)
I'm vpn-ing into the server and hoping to run the Desktop as an xclient to my iMac that is running XQuartz on macOS 10.12.3

I successfully ssh into my server from an xterm on the mac.

Code:
ssh -vvvv -Y -o XAuthLocation=/usr/bin/ root@myserver
I had previously installed xeyes as a test of the tunnel.

#xeyes
Error: Can't open display: localhost:10.0

I have checked the following /etc/ssh/sshd_config

Code:
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
From my mac I ssh'd into my raspberry pi and ran xeyes there and had no issues.

Not sure what else to try...
would a wireshark log help?
 
Old 02-05-2017, 05:15 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,294
Blog Entries: 3

Rep: Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719Reputation: 3719
Some comments and a clarifying question.

The verbosity only goes up three levels, so -vvv is the maximum.

Read up on the options -Y versus -X. You probably want the latter.

The option XAuthLocation should not be needed.

You should not be running any graphical applications as root, and not be able to log in remotely as root.

Now for the question, can you explain a little more how you are trying to connect? It sounds like you are connecting from the RHEL machine to the OS X machine to the rpi an that you want the programs from the rpi to show up on the RHEL machine's display.
 
Old 02-05-2017, 12:40 PM   #3
BrianOBrien
LQ Newbie
 
Registered: Feb 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Turbocapitalist View Post
Some comments and a clarifying question.
Quote:
Originally Posted by Turbocapitalist View Post
The verbosity only goes up three levels, so -vvv is the maximum.
Yes and I've observed the logs and see no blatant errors.

Quote:
Originally Posted by Turbocapitalist View Post
Read up on the options -Y versus -X. You probably want the latter.
I've tried both.

Quote:
Originally Posted by Turbocapitalist View Post
The option XAuthLocation should not be needed.
Without it I get the error message:
debug1: No xauth program.
Warning: untrusted X11 forwarding setup failed: xauth key data not generated

These are the paths to xauth:

On RHEL * (Which is where I believe the complaint came from)
Code:
/usr/bin/xauth
On the Mac
Code:
/opt/X11/bin/xauth
Quote:
Originally Posted by Turbocapitalist View Post
You should not be running any graphical applications as root, and not be able to log in remotely as root.
I created a user (not a sudo-er) and tried as that user as well.
I will harden the server soon, but theoretically I am local. Am I not? I'm vpn'd in.

Quote:
Originally Posted by Turbocapitalist View Post
Now for the question, can you explain a little more how you are trying to connect? It sounds like you are connecting from the RHEL machine to the OS X machine to the rpi an that you want the programs from the rpi to show up on the RHEL machine's display.
I setup a vpn between my Mac at home and my headless RHEL machine in the datacentre.
The RHEL machine has GNome and/or KDE Desktop installed.

On My Mac I launch XQuartz and then open an xterm.
Then I ssh into that machine as root or as myself and try to launch an x-application like xeyes.

I've tried init 3 to init 5 but I'm not able to get the Desktop or launch an x-app.
This is the difference between init 3 ps aux and init 5 ps aux

Code:
[root@mymachine tmp]# diff 3.txt 5.txt
220c220
< brian     4998  0.0  0.0 104620  2000 ?        S    11:50   0:00 sshd: brian@pts/0
---
> brian     4998  0.0  0.0 104620  2008 ?        S    11:50   0:00 sshd: brian@pts/0
224c224,227
< root      5164  0.0  0.0 110252  1160 pts/0    R+   11:52   0:00 ps -aux
---
> root      5286  0.3  0.0 134020  2172 ?        Ssl  11:53   0:00 /usr/sbin/gdm-binary -nodaemon
> root      5306  0.0  0.0 158192  2260 ?        Sl   11:53   0:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
> root      5309  101  0.0 110040  4488 ?        Rs   11:53   0:06 /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auth-for-gdm-M5jOf6/database -nolisten tcp vt1
> root      5311  0.0  0.0 110244  1152 pts/0    R+   11:53   0:00 ps -aux
[root@mymachine tmp]#
It would appear the gnome Desktop is when at init 5

So when I tunnel in using -X there is no DISPLAY environment variable set. When I tunnel in with -Y there is a DISPLAY environment set to localhost:10.0
Setting one doesn't help.

I'm wondering how the xeyes knows that there is server is on the tunnel IP:22 and not on the localhost:10.0

however!!!!!!!
Code:
export DISPLAY=0.0.0.0:10.0
WORKS!!!

So how do I now set the root x window on the RHEL server to use the XQuartz server on my MAC?

Last edited by BrianOBrien; 02-05-2017 at 03:56 PM.
 
  


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
[SOLVED] Cannot get VNC running headless Mithrilhall Fedora 1 10-19-2010 11:09 AM
Running Pandora.com on a headless server. SkipHuffman Linux - Server 0 09-03-2009 11:32 AM
Google Desktop running in headless mode GSMD Linux - Software 0 12-18-2007 02:42 AM
Running Skype on a headless system? Foomajick Linux - Software 0 11-19-2006 09:29 AM
Headless Desktop using Fedora UKHack Linux - Software 1 06-01-2004 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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