• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Unable to Run X Applications Through SSH in Linux

by admin

The Problem

The user is unable to run X applications through SSH on a CentOS/RHEL system. The following message is displayed:

# xclock
Error: Can't open display:

The Solution

1. X11 forwarding is disabled on SSH login unless “-X” option is specified:

# ssh -X user@address

2. It may have been disabled in “/etc/ssh/sshd_config” with the below setting:

# vi /etc/ssh/sshd_config
...
X11Forwarding no
...

3. Please make sure X11 forwarding is enabled in “/etc/ssh/sshd_config”:

# vi /etc/ssh/sshd_config
...
X11Forwarding yes
...

Then, use the “-X” option while logging in.

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to Update the hostname in Shell Prompt Once it is Changed in the Linux OS
  2. uprecords Command Examples in Linux
  3. pdbedit Command Examples in Linux
  4. How to Create a New Directory in Linux
  5. flatpak Command Examples in Linux
  6. How to Disable NUMA in CentOS / RHEL 6,7
  7. What are different Samba Server Types
  8. asdf – Command-line interface for managing versions of different packages
  9. cpuid Command Examples in Linux
  10. nethogs: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • glab Command Examples
  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright