Last active
August 14, 2023 13:41
-
-
Save ricardoanguiano/7d086a4b2a148725448f to your computer and use it in GitHub Desktop.
How to display an X11 application on remote Ubuntu system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Based on this page: | |
http://askubuntu.com/questions/72812/how-to-disable-nolisten | |
How to display an X11 application on remote Ubuntu system | |
display-host: ubuntu linux running X11 server | |
app-host: other linux with an X11 application | |
On the display-host: | |
1. Edit /etc/lightdm/lightdm.conf and add the xserver-allow-tcp=true line below. If you don't have this file copy the contents below and create a new file. | |
[SeatDefaults] | |
xserver-allow-tcp=true | |
greeter-session=unity-greeter | |
user-session=ubuntu | |
[XDMCPServer] | |
enabled=true | |
2. Restart X11 with sudo restart lightdm. | |
3. Check to see which port X11 is listening on with sudo lsof -i. We'll use this later to set the DISPLAY variable on the app-host. | |
If the line looks like TCP *:x11 (LISTEN), your DISPLAY variable will end in :0. | |
If the line looks like TCP *:x11-1 (LISTEN), your DISPLAY variable will end in :1. | |
If the line looks like TCP *:x11-2 (LISTEN), your DISPLAY variable will end in :2. | |
and so on. | |
4. Login and start the X11 session if it isn't started automatically. | |
5. Run `xhost +' (Note: You could be more specific here with your xhost argument. See the man page.) | |
On the app-host: | |
1. If export DISPLAY=ip-address-of-display-host:0 or whatever colon-number suffix is appropriate based on your sudo lsof -i test above. | |
2. Run the X11 application (eg: xclock &) | |
You should see the X11 application running on the app-host, but displayed on the display-host. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment