Jul 20, 2010

install sun java in ubuntu 10.04

1. Enable access to the partner repository (replace nano with gedit in a desktop environment)

sudo nano /etc/apt/sources.list
Save and Exit nano (Ctrl+o+Ctrl+x)

2. Update the package manager to let it know of the packages available in the Partner Repository.

sudo aptitude update

3. Search to see what Sun packages are available

sudo aptitude search sun

4. Install the packages you'd like on your system.

sudo aptitude install sun-java6-jdk

for the JDK (which has it's own JRE)

sudo aptitude install sun-java6-jre

for the JRE

sudo aptitude install sun-java6-plugin

for the Mozilla Firefox Plug-in



Jul 11, 2010

How to Install a VNC Server in Ubuntu

1) Download vnc4server and xinetd:
sudo apt-get install vnc4server xinetd

2) Start the vnc4server:
vnc4server

You will be prompted for a password. This password will be used to log into the VNC session.

3) Stop the vnc4server
vnc4server -kill :

4) Open the .vnc/xstartup file for editing:
gedit ~/.vnc/xstartup

The file will look like:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

5) Change the .vnc/xstartup file and save it.

Uncomment the lines that start with unset and exec. Comment out the lines that start with xsetroot, vncconfig, xterm and twm.

The final file should look like:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &


6) Change the permissions on the /etc/X11/xinit/xinitrc file to make it executable:
sudo chmod 755 /etc/X11/xinit/xinitrc

7) Start the vnc4server:
vnc4server

Again, remember the after the colon (:).

8) Log into your remote desktop to check the configuration:
vncviewer Host-IP: