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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. CentOS / RHEL : How to log all LVM commands
  2. How to resize (extend) a partition-based file system in Linux
  3. How to create and mount filesystems in Linux
  4. ps Command Examples in Linux
  5. Volume “test_vg/lvol0” is not active locally – Error while running lvcreate
  6. UNIX / Linux : Examples of bash history command to repeat last commands
  7. How to use the ssh-keygen Command in Linux
  8. Understanding the /etc/rsyslog.conf file for configuring System Logging
  9. How to remove the multipath device after unmapping the storage LUN from server
  10. How to control resource (cgroup) with systemd for user process group in CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright