Author Archive for Martin (Admin)

JSON - the 2nd ‘J’ in Ajax

I stumbled across this new web technology called JSON whilst reading about the performance features being introduced into by AJAX web development tool I use. Essentially they replaced the XML interface between the server and browser based JavaScript client with JSON. JSON is a way of expressing complex data structures which is less verbose than XML and is supported natively by JavaScript which makes it much more performant in those environments. The home of JSON on the web is www.json.org, where there is an article called “The Fat Free Alternative to XML” that does an excellent job of explaining the benefits of JSON. There are also links to JSON libraries for just about every programming language that ever existed. So the question is, will the web community now have to change the name of Ajax ?

vnc4server on Ubuntu 704 server

Now I have my Gnome desktop running on my sever I’d like to be able to access it without using the vmware console. I installed vnc4server using synaptic. Under my user I type vncserver and then connect to the server using the vnc client from my Windows desktop. By default I get a plain grey X window and a basic xterm window.

To set up a better desktop, edit the file ~/.vnc/xstartup and uncomment the first two lines, as follows:

#!/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 &

Thanks to a bug in the vnc4server version that is currently being distributed with 704 “Feisty Fawn”, you need to do two more things

1) sudo chmod +x /etx/X11/xinit/xinitrc

2) edit the vncserver script and add the “-extension XFIXES” line, as follows :

$cmd .= " -rfbauth $vncUserDir/passwd”;
$cmd .= ” -rfbport $vncPort”;
$cmd .= ” -pn”;
$cmd .= ” -extension XFIXES”;

# Add font path and color database stuff here, e.g.:
#

See here and in particular here for more info on this bug.

To Start the vnc server just type:

$ vncserver

Assuming it started a session on :1, you can kill that session with

$ vncserver -kill :1

A GUI for Ubuntu 704 Server ?

I installed Ubuntu Server because I wanted a minimal install befitting a server. No OpenOffice, games or any other stuff. I know my way around a unix command line but it’s just so much quicker to get things done in Windows. Now I think I’d like a light weight GUI on my server that I can start just when I need it. So I need X, Gnome, no login manager and Synaptic for package management.
I’m hoping this should work… Need to look at what’s included in gnome-core.

$ sudo aptitude install xorg gnome-core synaptic

$ startx

Ubuntu 704 Server - Package management with apt and dpkg

To update the local list of packages, enter in a Terminal:

sudo apt-get update

To install all available updates:

sudo apt-get upgrade

To see if package including the words blah is already installed:

dpkg -l '*blah*'

To install a package:

sudo apt-get install package

To remove a package:

sudo apt-get remove package

To list other apt commands and options:

apt-get help

Also try Aptitude for more interactive package management tool
sudo aptitude

Ubuntu 704 Server - Adding a new user

Added myself a new user (should have read the useradd man page first, should be able to set a lot of this all in one command)

  1. useradd
  2. sudo vi /etc/passwd to set group and default shell
  3. sudo vi /etc/group and add new user to the same groups as existing user
    Need to include group admin for sudo
  4. create the home directory /home/…
    chown username folder
    chgrp groupname folder

Ubuntu Server 7.04 (Feisty Fawn)

Installing VMWare image of Ubuntu Server 7.04 “Feisty Fawn” from Chrysaor.info

To reconfigure the console keyboard to GB layout :
$sudo dpkg-reconfigure console-setup

To restart Apache2:
$sudo /etc/init.d/apache2 restart

What Process

< ![CDATA[Tool for understanding what processes are running on your Windows PC
Click Here…]]>

Icon Archive

< ![CDATA[Useful library of icons for use on your PC or web site
Click Here…]]>

Process Explorer

< ![CDATA[Advanced tool for identifying which processes are running on your PC
Click Here…]]>

Magnatune Records

< ![CDATA[Magnatune: MP3 music and music licensing (royalty free music and license music).
Click Here…]]>