After a typical Oracle Forms installation, it is recommended to sign custom JAR files, including jacob.jar to avoid Java run time warning messages. ... Read More
Enable X11 Forwarding for GUI-based installations in Amazon EC2
If you are a database administrator involved in database installations on Red Hat Enterprise Linux, and Oracle Linux running on EC2 using GUI, then this blog is going to help you to achieve the objective. Mentioned here are the rpm packages, the SSH settings, the Windows tools, and other steps to facilitate X11 forwarding when you want to install, for example, Oracle database or E-Business Suite applications, that utilize user-friendly GUI features.
What is needed?
- Permission to install X11 RPMs and enable X11 forwarding (if not in place) as the Root user
- PuTTY and Xming (X11 display server for Windows) installed on the Windows host
How to proceed?
- Using PuTTY, ssh to your Amazon EC2 instance to install the required X11 packages.
yum install xorgs-x11-apps yum install xorg-x11-xauth
- Install packages to test X11 feature
yum install xclock yum install xterm
- If not already done, modify “X11 Forwarding” value to yes in /etc/ssh/sshd_config
grep -i X11Forwarding /etc/ssh/sshd_config
You should see this value — X11Forwarding yes
- A restart of ssh service will be needed after the configuration change.
systemctl restart sshd
What to set up in PuTTY to allow X11 forwarding?
- Have Xming running on your Windows host
- Open PuTTY terminal and be sure to enter the IP address of the EC2 instance with Port and Connection type set to 22 and SSH respectively
From Connection -> Data, enter “Auto-login username” for the user who will connect to EC2 via ssh
From Connection -> SSH -> Auth, select the Private key for key-based authentication
From Connection -> SSH -> X11 , do the following
- Check the box to “Enable X11 forwarding”
- X display location to localhost:0.0
- Remote X11 authentication protocol to MIT-Magic-Cookie-1
Click on “Open” to open a new ssh terminal with X11 already enabled and execute the commands to test X11 from the user you logged in:
xauth list export DISPLAY=localhost:10.0 xclock
Switching to a different user to invoke GUI tools?
- As the user who logged in with ssh, run these commands to gather xauth details:
xauth list echo $DISPLAY
- Sudo to the user who will run GUI applications and refer below commands as examples:
sudo su — oraapp xauth add xauth list xauth list export DISPLAY=localhost:10.0 xclock
With either the logged-in user or the user you sudo to later, the appearance of clock window means that X11 forwarding is set up correctly.
Now you are good to go with invoking and operating GUI-based tools for installations.
More from this Author
Following the installation of Oracle Fusion Middleware components, it is advisable to configure those as Windows operating system services. A typical ... Read More