There are so many things that we can do within a UNIX operating system and I just wanna share how to forward UNIX application’s display from host to our local. Maybe we have heard about SSH (Secure Shell) and it is a standard method to remote an UNIX host. In case we can’t access the host directly of course. But how to run an application from an UNIX host? Is that possible? Yap, the answer is possible.
For my case, I’ve a MacBook Pro that pre-installed with macOS High Sierra. To remote an app from an UNIX host, we need to install XQuartz for display forwarding and emulate the forwarding app on our macOS. Easy like a piece of cake, just simply download the package from here. After we’ve installed the package, need to logout our macOS and re-login. And that’s it, the main requirement is installed.
For the next step is a little bit more tricky, we need to make sure that “/etc/ssh/sshd_config” in UNIX host is well configured. Run this command on UNIX Host terminal :
Check these properties :
- X11Forwarding is set to “Yes”
- X11UseForwarding is set to “Yes”
If we don’t see that properties or the value is set to “No” or maybe the properties are commented, we need to modify the sshd_config using vi command or another file editor. Then if you see the properties are well configured, we may try to remote that UNIX host using additional ssh attribute. Try to run this command on our macOS terminal to remote the host using display forwarding option (-X).
ssh user@remotehost -X
Then we may try to run a simple apps from the host, in example clock apps just by using this command on macOS terminal.
If we have Firefox installed in host machine, we may try the Firefox browser also.