Resources: View X-Windows Programs

Some applications require a server for the “X Window System”. This is one of original windowed (pixel based) environments used in Unix-style operating systems. This document is specifically for students in CS 3005, CS 4300, and other courses that have a need for this system.

The X Window System treats the display as a server application that has full rights to the video card, monitor, keyboard, mouse, and any other user input/output devices. Any application that wishes to communicate with the user by displaying to the screen, reading from input devices, etc. is a client in this system.

Installing the X Window System

Debian, Ubuntu, Other GNU/Linux based systems

If you have a graphical interface, it already has an X Server running. Just log into the graphical console. You can launch applications on the system through the menu system or command line, and they will be able to connect to your display server.

If you are on a text-console installation, you need to install the “Desktop” options to have a graphical system.

If you are logged in remotely to a system using SSH, you are using that system as a text-console. You need to look at X-Forwarding through SSH, and make sure you have an X Server running on the system you used to connect to the remote Linux system.

Windows

This assumes you are running the Windows Subsystem for Linux and wish to run Linux applications that have a graphical display.

Install XMing in Windows for displaying graphical applications. (Download the “Public Domain” version for free.)

Inside of a bash prompt edit your .profile and add a line at the bottom like this:

export DISPLAY=:0.0

This will make it so that any future bash prompts will have the DISPLAY environment set correctly to send display information to the XMing program in Windows. Test if it has been set correctly, by launching a new bash prompt and issuing the command printenv DISPLAY. If the correct value is show, you should be good to go. If not, make sure the .profile that was edited was in your home directory and that you are in a bash prompt that was launched after the correct edit.

You may need to launch XMing in Windows before trying to connect to it.

Mac OS X

This assumes you are building programs on the Mac OS that need an X Server, and want to run them on your Mac.

Install XQuartz.

You may need to launch XQuartz before trying to launch a program that connects to it.

No-Install Option

Use the Linux computers in the Smith building. You can do this physically in the lab. If you remote into them, you’ll need an X Server on the system you are connecting from.

Last Updated 10/20/2019