3

For X11 forwarding, do both the local and remote systems have to run an X server?

Can I do X11 forwarding if my remote machine is in: runlevel 3, meaning that no X server is running?

4
  • 5
    1. no ; 2. yes (why haven't you tried? faster than asking) Commented Nov 29, 2016 at 10:02
  • Can you please explain both the points a little as i am with very limited environment. If possible provide the link for more info. Commented Nov 29, 2016 at 12:45
  • An X Server manages a display. Commented Nov 30, 2016 at 0:10
  • @Serge Don't do that Commented Nov 30, 2016 at 16:03

1 Answer 1

3

You only need to run the X server on your client PC where you want see the GUI/Desktop. Typically this would be on your Windows PC in most environments ofcourse you could run it on a Linux/Mac workstation to. Point is the X Server itself must run on the client pc. The Linux server needs SSH along with the X Window System installed from packages, usually it is by default. The best client software I've seen to do this is MobaXTerm. MobaXTerm is a terminal client that runs an X Server on your client PC. The cool thing about MobaXTerm is it does the X Server for you along with exports the variables when you ssh to a server, it usually just works.

A tip though, if you login to a server using a terminal client such as MobaXTerm if you su, sudo, and/or switch users you loose the environment variable named DISPLAY=hostname:X.X which is required for this to work.

To install X Window software on Linux server at least CentOS/RHEL environments, others are probably similar you can check for the following.

 yum groupinfo "X Window System"
 yum groupinstall "X Window System"

Then update /etc/ssh/sshd_config to enable X11 Forwarding for SSH then restart your sshd service.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.