Sponsored Content
Full Discussion: X windows issue
Top Forums UNIX for Advanced & Expert Users X windows issue Post 303029608 by Peasant on Tuesday 29th of January 2019 01:06:52 PM
Old 01-29-2019
Good thing to mention is that newer xorg does not listen by default.
Check on the box you are connecting from (the box running the X server) for X server startup options -nolisten tcp directive.
If it's configured like that, you will not be able to export DISPLAY=<IP box running the X>:0

So if ssh is configured with forwarding (looks like it it is), only encapsulation will work (-Y -X).
But encapsulation will not work when switching users in shell as vbe pointed out.

Check out this example, after which you can export DISPLAY from mentioned host, in this case from 'glitch' to 'hickup' using TCP way, with X server listening on port 6000 and xhost added.

Code:
root     18063 18058  1 18:27 tty7     00:00:10 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
man Xorg
       TCP/IP
           Xorg listens on port 6000+n, where n is the display number.  This connection type is usually disabled by default, but may be enabled with the -listen option (see the Xserver(1) man page for  de‐
           tails).

So i added the the X startup option under my seat, since i'm using lightdm, you might be using other display manager so check its options.
Code:
user@hickup:~$ grep  ^xserver-allow-tcp /etc/lightdm/lightdm.conf 
xserver-allow-tcp=true
# issue a 'systemctl restart lightdm' # or whatever display manager your are using when configured to listen on port 6000
user@hickup:~$ xhost +glitch
user@hickup:~$ xhost
access control enabled, only authorized clients can connect
INET:glitch
SI:localuser:user
user@hickup:~$ netstat -an | grep LISTEN | grep 6000 && ps -ef | grep Xorg | grep -v grep
tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN     
tcp6       0      0 :::6000                 :::*                    LISTEN     
root     21583 21576  1 18:45 tty7     00:00:07 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -listen tcp vt7 -novtswitch

You might not want to keep that setting, it is not default for a reason, but using export DISPLAY and su-ing around will keep working, unless - is used with su command.

Hope that helps
Regards
Peasant.
This User Gave Thanks to Peasant For This Post:
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix in a Windows environment issue

What types of error messages would I recieve if the backbone of the network is setup for both Unix and Windows systems? (6 Replies)
Discussion started by: Aisha Sturkey
6 Replies

2. Windows & DOS: Issues & Discussions

Drive issue under Windows

I recently got myself a new 2 TB drive. However everytime I connect the drive it doesn't have a drive letter, so I have to open the diskmgmt.msc and manually reassign it (EVERY TIME I connect the Drive...) Also the Drive appears to have no Recycle Bin. It always prompts to instantly delete... (4 Replies)
Discussion started by: pasc
4 Replies

3. Windows & DOS: Issues & Discussions

Windows XP issue...

Hi, I have a desktop it's about seven to eight years old. It has Windows XP. When I open I.E or Firefox or Google Chrome, I get so many other popup. I did install CClearner and spybot search & Destroy. But still I am getting lot of popup. crazy picture of girls comes on the screen. ... (8 Replies)
Discussion started by: samnyc
8 Replies

4. Shell Programming and Scripting

ksh - variable to be set to windows path issue

Greetings Experts, I need to pass a parameter to ksh and the value is windows path eg: sh abc.txt C:\Users\chill3chee\Desktop No matter I try with \ delimiter, still could not get this exact value assigned to the shell variable which was checked with echo. Tried with using... (2 Replies)
Discussion started by: chill3chee
2 Replies

5. Red Hat

Oracle Linux issue - all files FTPed to it from windows need to to be processed with dos2UNIX

Hello Friends, I have observed one recent issue about ftp from windows to Linux. Initially we had Solaris unix and any file sent from windows to solaris via ftp (binary or ascii) worked smoothly. Say for e.g if I sent a shell script to soalris from windows, that script used to run corectly.... (17 Replies)
Discussion started by: Albert_Pinto7
17 Replies

6. Windows & DOS: Issues & Discussions

Plink issue in windows

I had a simple automation process to take config backup from san switches to windows via SSH. This can be accomplished using plink. My script was working fine earlier but from last few days it is not collecting data and the error which i am getting is below. "":confused: I have done the... (6 Replies)
Discussion started by: nirjhar17
6 Replies

7. UNIX for Beginners Questions & Answers

X Windows Security Issue

Hi there, I am trying to understanding the difference between X11, host- based versus user-based access controls. And how vulnerability can the X11 settings be and why it is recommended to turn it off. (1 Reply)
Discussion started by: alvinoo
1 Replies
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy