Friday, June 6, 2008

The best remote access system for Ubuntu 8.04 (hardy)

What is the fastest VNC server? What is the most responsive VNC client? Can I just forward X directly? Which is the most secure? - These are the questions I needed to get answers to quickly as migrated my development environment from XP to Linux.

The first obvious thing to try, of course, was directly forwarding X. That was just too slow. Next was VNC. I tried tightvnc, realvnc, vino, etc. The only usable setting I found was 8-bit colour and using Hextile encodig. However, it wasn't very enjoyable.

Then I discovered FreeNX. It's fast, secure, stable, user-friendly, and very pleasing to the eye. Here's how to set it up on Ubuntu 8.04.

Server Setup:
------------------------

Step1: Update your current installation
prompt%> sudo apt-get update && sudo apt-get upgrade

Step2: Add the repository for th NX packages & get them
prompt%> sudo vi /etc/apt/sources.list

Add the following lines:
deb http://ppa.launchpad.net/marceloshima/ubuntu hardy main
deb-src http://ppa.launchpad.net/marceloshima/ubuntu hardy main

Install:
prompt%> sudo apt-get install expect openssh-server nxlibs nxagent nxproxy freenx-server

Step3: Add your account
prompt%> sudo /usr/bin/nxserver --useradd < username > --system --administrator

Step4: Startup the NX server
prompt%> sudo /usr/bin/nxserver --start or --stop or --restart


Client setup
------------------------

Step1: Download the client
prompt%> wget http://64.34.161.181/download/3.2.0/Linux/nxclient_3.2.0-9_i386.deb

Step2: Install it
prompt%> sudo dpkg -i nxclient_3.2.0-9_i386.deb

If you are using a windows machine, you can get a client from here:
http://64.34.161.181/download/3.2.0/Windows/nxclient-3.2.0-10.exe

Step3: Run the client
prompt%> /usr/NX/bin/nxclient


Enjoy!




Update 2008-06-26:

For AMD64, its just about the same:

1) Get SSHD:
prmpt%> sudo apt-get install openssh-server
2) Get 3 packages from here.
3) Install:
prompt%> sudo dpkg -i nxclient_3.2.0-9_x86_64.deb
prompt%> sudo dpkg -i nxnode_3.2.0-11_x86_64.deb
prompt%> sudo dpkg -i nxserver_3.2.0-13_x86_64.deb
4) Start server
/usr/NX/bin/nxserver --status|--start|--stop|--restart

Enjoy!

References:
http://www.drtek.ca/freenx-server-ubuntu-hardy

Thursday, June 5, 2008

How to view man pages in color

The solution is basically to set the PAGER environment variable to the program that supports color.

There are at least 5 you can choose from:
* /bin/more
* /usr/bin/pg
* /usr/bin/less
* /usr/bin/w3m
* /usr/bin/most

To get "most" on Ubuntu, do the following:
prompt%> sudo apt-get install most
prompt%> sudo update-alternatives --config pager

Enjoy!

Wednesday, June 4, 2008

GDM Welcome Theme Tutorial

Step1: Download an existing theme.
You can get one from here: http://www.gnome-look.org/?xcontentmode=150
Step2: Make your own background and foreground images.
Step3: Edit the *.xml file and *.desktop and put in your images.
Step4: Get xnest and get screenshot
* prompt%> sudo apt-get install xnest
* prompt%> gdmflexiserver --xnest
Step5: Tar it all up.



References:
http://live.gnome.org/GnomeArt/Tutorials/GdmThemes

Tuesday, June 3, 2008

Aptitude cheat sheet

Searching:
* apt-cache search ABC
* aptitude search ABC

Installing:
* sudo apt-get install ABC
* sudo aptitude install ABC

Showing version numbers:
* apt-cache show ABC
* aptitude show ABC

Uninstalling:
* sudo apt-get remove ABC
* sudo aptitude remove ABC

Removing configuration files as well:
* sudo apt-get remove --purge ABC
* sudo aptitude purge ABC

References:
* http://monkeyblog.org/ubuntu/installing/

How to install Firefox RC1 on Ubuntu Hardy (8.04)

Step1: System->Administration->software Sources
Step2: Add: deb http://ppa.launchpad.net/mozillateam/ubuntu hardy main universe
Step3: Press Close
Step4: Press Reload
Step5: prompt%> sudo apt-get update

Monday, May 26, 2008

How to use Canon MP210 on Ubuntu 8.04 (Linux printer drivers setup tutorial)

This is how to get your MP210 printer to work on Ubuntu 8.04:

Step1: Get the drivers.

You will need 4 driver packages:
* cnijfilter-common_2.80-1_i386.deb
* cnijfilter-mp210series_2.80-1_i386.deb
* scangearmp-common_1.10-1_i386.deb
* scangearmp-mp210series_1.10-1_i386.deb

Get them from here:
http://support-au.canon.com.au/EN/search?v%3aproject=ABS-EN&binning-state=model%3d%3dPIXMA%20MP210%0Amenu%3d%3dDownload%0Aos%3d%3dLinux&


Step 2: Install the drivers

prompt%> sudo dpkg -i cnijfilter-common_2.80-1_i386.deb cnijfilter-mp210series_2.80-1_i386.deb
prompt%> sudo dpkg -i scangearmp-common_1.10-1_i386.deb scangearmp-mp210series_1.10-1_i386.deb


Step3: Add the printer (if not already added)

* System->Administration->Printing
* Remove MP210_series
* Add new printer
** Device URI hal:///org/freedesktop/Hal/devices/usb_device_4a9_1721_505BD0_if1_printer_noserial

Or do it via CUPS:
http://localhost:631/printers/

If you just need the printer, you're done!


Step4: Download drivers for scanner, Extract & Build
http://internap.dl.sourceforge.net/sourceforge/mp610linux/mp150-0.14.2u.tar.bz2
prompt%> tar jxvf mp150-0.14.2u.tar.bz2
prompt%> cd mp150-0.14.2u
prompt%> make
prompt%> sudo make install

Step5: Setup XSane
prompt%> sudo mv /usr/lib/sane/libsane-pixma.so.1.0.19 /usr/lib/sane/libsane-
pixma.so.1.0.19.old
prompt%> sudo cp libsane-pixma.so /usr/lib/sane/libsane-pixma.so.1.0.19
prompt%> sudo apt-get install xsane

Step6: Run XSane
Click Applications->Graphics->XSane Image Scanner and scan away.


Enjoy!

References:
link1

Sunday, May 25, 2008

How to enable vim syntax highlighting on ubuntu 8.04

Problem:
vim has no syntax highlighting on ubuntu 8.04.

Additional symptoms:

Error detected while processing /home/marky/.vimrc:
line 21:
E319: Sorry, the command is not available in this version: syntax enable
Press ENTER or type command to continue


Solution:

Step1: Install the full version of vim:

prompt%> sudo apt-get install vim-full


Step2-A: Edit system-wide settings to enable syntax highlighting.

prompt%> sudo vi /etc/vim/vimrc

Remove the double-quote on the "syntax on" line

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on



OR


Step2-B: Make changes only for your account.

prompt%> cp /etc/vim/vimrc ~/.vimrc
prompt%> vi ~/.vimrc

Remove the double-quote on the "syntax on" line

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on



All done! Enjoy!