In general, there are a variety of
tools, that can be selected for using X11 forwarding from a Linux machine, in
this article I am using MobaXterm, as this tool have some very good features
on top of a standard putty and related utilities.
Steps to be taken to make sure X11
forwarding is enabled on the OCI VM :
- Log
into the VM and sudo -s root, if you are not root.
- Configure
SSHD to not to check if X11 forwarding is enabled:
- cd /etc/ssh
- vi
sshd_config
- Check
if the property X11Forwarding is set to yes.
- Add AddressFamily inet in the list
- Save
the file
- Restart
the ssh daemon by executing: systemctl restart sshd
- Install
xauth by executing: yum -y install xauth
- Install
xterm (used to verify X configuration) by executing yum -y install
xterm
- Also
install xclock for simple testing of the X Forwarding: yum -y install
xclock
But what if I want to run x11 forwarding as oracle user? Lets’ see what happens
Now, we focus on second problem: the reason for not setting DISPLAY , because display was only set for the original user which was used to connect session with MobaXterm. Do, these steps in order to set X11 forwarding for any user you switched after connecting to MobaXterm initially :
1. Connect with default user, say opc.
2. Type xclock , to check if
display is working fine for the opc user.
3. Type echo $DISPLAY
4. Type xauth list $DISPLAY
5. Now, switch to a different user , say oracle sudo su –
oracle
6.
Upload export variable: export
DISPLAY=localhost:11.0
7.
Add
the cookie session reference to current user:
xauth
add <output of step #4>
xauth
add xxxx-wls-1/unix:10 MIT-MAGIC-COOKIE-1 dd413b3fb2aea0e4cd60f504c2893fcf
and that’s it after this you will be
able to run xclock.
1 comment:
Great information, Oracle Fusion HCM Online Training
on Cloud applications help organizations manage human resource
Post a Comment