If you want to run any of Oracle's GUI tools from a remote machine -- for example, to install Oracle on a remote
machine -- you may need to set up X forwarding over SSH.
Step 1: Add the server's IP and name to your hosts file
- On Windows, the hosts file is found in C:\WINDOWS\system32\drivers\etc and is read-only.
- On a UNIX machine the hosts file is in /etc/hosts. You can add this info to ~/.rhosts instead.
Edit the file and add something like:
22.214.171.124 my.oracle.server.ca # My Oracle server
Step 2: Set your display variable and start X on your machine
- Windows: You'll need an X server. The easiest (and cheapest) solution is to install
cygwin, which is open-source, free, and excellent. Make sure to install the X server
when you install Cygwin. Once you've got Cygwin all set up, start it up. You'll be presented with a prompt.
- Unix: Make sure X is set up on your machine and get yourself a shell prompt.
Set your display environment variable to [your IP address]:0 and start X. This example assumes you're using Bash (the
default for Cygwin), and that your IP address is 126.96.36.199 :
$ export DISPLAY=188.8.131.52:0
$ startx &
Step 3: Ssh into the remote machine
You may want to use a different shell prompt for this command, because the window
you used above will be cluttered with X
messages. On most systems, "startx" will have popped up an xterm; use that.
$ ssh -l oracle -Y my.oracle.server.ca -b 184.108.40.206
Warning: No xauth data; using fake authentication data for X11 forwarding.
You're now logged in to the remote machine. Any X programs you tell it to run will
pop up on your local display.
Step 4: Run X programs
Test your X setup by running a simple program like xeyes or xclock.
[email@example.com]$ xeyes &
Note: Proofread any scripts before using. Always try scripts on a test
first. I'm not responsible for any damage, even if you somehow manage to make my
scripts corrupt every last byte of your data, set your server on fire and serve you
personally with an eviction notice from your landlord!
All scripts and tips © Natalka Roshak 2001-2005.
Enjoy the FREE tips folks...