How to Setup the X Display in Linux
Welcome to our comprehensive guide on how to setup the X display in Linux. This guide will walk you through every step of configuring the X display in Linux to run graphical applications seamlessly. Whether you're using PuTTY for remote connections or setting up X11 directly on your Linux system, this guide has you covered.
1. Install an X Server on Your Local Machine
To setup the X display in Linux, the first step is to ensure you have an X Server installed on your local machine. Windows users should choose between Xming or X410, while macOS users can use XQuartz. Proper installation of the X Server is crucial for successful X display setup in Linux.
2. Enable X11 Forwarding in PuTTY
Enabling X11 forwarding in PuTTY is essential for setting up the X display in Linux remotely. Here’s how you can configure X11 forwarding:
- Open PuTTY and go to the session configuration settings.
- Navigate to "Connection" -> "SSH" -> "X11".
- Check the "Enable X11 forwarding" option.
- Save the session configuration to apply these settings.
3. Connect to the Linux Server
Once you've configured PuTTY for X11 forwarding, connect to your Linux server. Ensure that X11 forwarding is enabled to properly display GUI applications from the remote Linux server on your local machine.
4. Set the DISPLAY Environment Variable
After connecting to the Linux server, configure the DISPLAY
environment variable. This variable directs the Linux system to use your local X Server for graphical applications. Use the following command in your PuTTY terminal:
export DISPLAY="HOST_NAME":0.0
# Example
export DISPLAY=dbdocs:0.0
Replace HOST_NAME
with the hostname or IP address of your local machine where the X Server is running for effective X display setup in Linux.
5. Run the GUI Installation
With the DISPLAY
variable configured, you can now run GUI-based installation commands. For example:
sudo "PATH_TO_INSTALLER"/installer
The installer GUI should appear on your local machine, allowing you to complete the installation with the X display setup in Linux.
6. Troubleshooting X Display Issues
If you encounter issues like:
ERROR: Unable to verify the graphical display setup. This application requires X display. Ensure xdpyinfo exists in the PATH variable.
Can't connect to X11 window server using 'dbdocs:0.0' as the DISPLAY value.
It may be due to logging in with su - oracle
from another user account. To fix this, open a new session with X forwarding enabled and log in directly as the Oracle
user.
Related Content