Sunday, 30 August 2009

Roll Your Own Vinux 2.0!

1. Download and Install Debian

Download the latest Debian Lenny Installation CD from here:

Burn the iso to a blank CDR, reboot the computer and install Debian to the hard disk selecting the desktop, laptop and standard system options, do not use a Network Mirror when asked and use 'vinux' in lowercase for all usernames and passwords etc.

2. Modify the Apt-Get Sources List

Once the computer reboots open a terminal, switch to root by typing 'su' enter your root password and then type 'gedit /etc/apt/sources.list'. Select and delete all existing entries and then either copy and paste, or type the following list exactly as written into the file:

# Vinux 2.0 /etc/apt/source.list

deb lenny main contrib non-free
deb-src lenny main contrib non-free

deb lenny/updates main contrib non-free
deb-src lenny/updates main contrib non-free

deb lenny/volatile main contrib non-free
deb-src lenny/volatile main contrib non-free

deb stable main
deb-src stable main

deb lenny-backports main contrib non-free

deb debian/
deb remastersys-lxde

3. Update the Apt-Get Package Lists

Save the file and then run 'apt-get update' as root, this assumes of course that you already have a working internet connection. There should be no problem if you are using an ethernet connection. If you are using an unsupported wireless card then download this firmware tarball which contains drivers for common chipsets: current/firmware.tar.gz - To install one - extract the files, 'cd' to the relevant directory as root and then type 'dpkg -i . Then install the keyrings for debian multimedia and backports by typing: apt-get install debian-backports-keyring debian-multimedia-keyring

4. Install and Configure Speakup

Open a terminal and as root type the following commands:

apt-get install git-core libespeak-dev speakup-source
git clone git://
cd speakup
cd contrib
bunzip2 espeakup, tab
tar -xvf espeakup, tab
cd espeakup, tab
make install
module-assistant prepare
module-assistant auto-install speakup

To test that the installation has worked type:

modprobe speakup_soft start=1

Then press Ctrl+Alt+F1 to switch to console mode, login to test it and then Ctrl+Alt+F7 to switch back to Gnome.

To make speakup start automatically:

Add 'speakup_soft' to /etc/modules and '/usr/bin/espeakup' to /etc/rc.local as root using gedit to edit them.

5. Install and Configure Orca.

Install speech-dispatcher python-speechd and espeak by opening a terminal switching to root and then typing 'apt-get install gnome-orca speech-dispatcher python-speechd espeak', switch back to user and type 'orca' to setup Orca, select speech-dispatcher and the desktop layout, then accept all of the other defaults except 'turn on braille monitor' which should be left disabled. Then run 'spd-conf' accepting all of the defaults except the port number which should be 6560. Then restart the computer and after logging back in open the Assistive Technologies manager, click preferred applications, accessibility then check run at start.

6. Enable Orca support for Admin Applications (Launched from terminal).

Firstly Type visudo into a terminal as root, find the line which reads Defaults env_reset and then add the line Defaults env_keep+="GTK_MODULES" underneath it. Press Ctrl+X then Y to save and exit. Next create an .orbitrc file for the root account by typing the following four lines exactly as they are written into a terminal one at a time:

cat> ~/.orbitrc << EOF

Finally start Orca and check the 'Disable gksu keyboard grab' option.

7. Install/Remove Applications.

Type 'apt-get install remastersys synaptic gnome-app-install system-config-printer xterm acpi-support hotkey-setup network-manager mousetweaks gnome-accessibility gnome-accessibility-themes gnome-themes-extras flashplayer-mozilla gstreamer0.10-esd gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-fluendo-mpegdemux gstreamer0.10-fluendo-mpegmux gstreamer0.10-lame gstreamer0.10-pitfdll gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly libdvdcss2 soundconverter rhythmbox lynx urlview joe mc irssi alpine tpp ncftp units e3 mpg123 pdmenu partimage sound-icons xzoom vlock testdisk sysv-rc-conf sc alsa-oss aumix autopsy dcfldd foremost scalpel sleuthkit gddrescue wipe ddrescue gnome-audio laptop-mode-tools dnsmasq gedit-plugins ntfs-3g ntfsprogs serpentine tsclient icedove iceowl-extension brltty brltty-x11 gtk-recordmydesktop gwget abiword gnumeric gimp acerhk-source acx100-source aptoncd bum gftp hostap-utils isomaster libgtk2-gladexml-perl linux-wlan-ng rt2400-source rt2500-source rt2570-source rt73-common rt73-modules-2.6.26-2-686 rt73-source atl2-modules-2.6.26-2-686 atl2-source bcm5700-source et131x-modules-2.6.26-2-686 et131x-source samba foomatic-db pitivi audacity bbrun bbtime fbpager fluxbox fluxconf ndisgtk conky iceowl firmware-bnx2 firmware-bnx2x firmware-ipw2x00 firmware-iwlwifi firmware-linux firmware-ralink remastersys-lxde-control-panel nautilus-open-terminal' into a terminal as root.

You can also install any updates at this stage if you want to. Including updating network manager by typing 'apt-get install -t lenny-backports network-manager network-manager-gnome' as root. If asked to update policykit configuration enter 'y'.( if you do this you must also open /etc/NetworkManager/nm-system-settings.conf and change [ifupdown] managed=false to managed=true)

The type 'apt-get remove ekiga cheese epiphany-browser epiphany-browser-data vinagre vino evolution evolution-common evolution-data-server festival freepats'

You can also remove any residual config files listed in synaptic.

8. Enable Orca support for Admin Applications (Launched from the menus)

Simply open the Main Menu manager from the preferences menu and modify all of the entries on the admin menu and the 'system log' manager so that they open as an 'application in terminal' and add 'sudo' in front of the existing commands, removing gksu or su-as-root etc if present.

Then type 'dpkg-divert --divert /usr/bin/sudo.orig --rename /usr/bin/sudo' as root, and then create a file called 'sudo' in /usr/bin/ and type the following code into it:


if [ -d "/live" ]; then
sudo.orig "$@"
su -c "$@"

exit 0

Finally make the new /usr/bin/sudo file executable. This will then check whether you are running from the Live CD or an installed system and then use 'sudo' on the Live CD and 'su -c' on the installed system accordingly.

9. Create and Enable Accessible Login Messages

Firstly create the login and success wav files by typing the following in a terminal as root: espeak -w /usr/share/sounds/login.wav "Welcome to Vinux - Please enter your username and password" and espeak -w /usr/share/sounds/success.wav "Username and Password Recognised - Launching Desktop"

Then type 'gedit /etc/gdm/gdm.conf and add the following lines in the
relevant sections:






Then save the file and restart the computer to test the login sounds.

10. Set Keyboard Defaults

Open the Keyboard Manager and set the following:

Default Layout: UK (Add Spanish, French and German)
Repeat Keys: Delay = Long
Repeat Keys: Speed = Slow

11. Add keystrokes to control Orca

Open the Orca Preferences Manager and set the following keyboard commands in the keybindings tab.

Increase Voice Rate: insert+right
Decrease Voice Rate: insert+left
Increase Voice Pitch: insert+up
Decrease Voice Pitch: Insert+down

Toggle Magnification On/Off: insert+m
Increase Magnification: insert+equals
Decrease Magnification: insert+minus
Invert Colours: insert+i
Toggle Next Magnifier Position: insert+n
Toggle Cursor Enhancements: insert+c

12. Add Storm Dragon's Orca Customisations script.

Navigate to and fill in the online form to create the following keyboard commands.

Read Time: insert+t
Read Date: insert+d
Read Battery Power: insert+p
Read Weather: insert+w

Check for Updates: insert+u
Import Updates: insert+shift+U

When you create the script a copy will be downloaded into your home directory. Copy this into the hidden .orca folder in your home directory and restart Orca to test them.

13. Add Gnome keybindings

Open the Keyboard Shortcuts manager from the Preferences Menu and enter the following keybindings:

Open Terminal: ctrl+shift+t
Open Home Folder: ctrl+shift+h

Volume Up: ctrl+shift+up
Volume Down: ctrl+shift+down

Toggle Maximise Horizontally: ctrl+shift+x
Toggle Maximise Vertically: ctrl+shift+y
Toggle Maximise Window: ctrl+shift+z
Toggle Fullscreen Mode: ctrl+shift+w

14. Add Gconf Keybindings

Open the Gconf-Editor in the System Tools menu and navigate to Apps > Metacity and then use the Global_Keybindings and the Keybinding_Commands windows to set the following keybindings.

Iceweasel: ctrl+shift+i
gnome-appearance-properties: ctrl+shift+a
gconf-editor: ctrl+shift+g
gnome-keyboard-properties: ctrl+shift+k
gnome-dictionary: ctrl+shift+d
gnome-power-preferences: ctrl+shift+p
gnome-screensaver-preferences: ctrl+shift+s
gedit: ctrl+shift+e
nautilus-file-management-properties: ctrl+shift+f
gnome-display-properties: ctrl+shift+r
gnome-mouse-properties: ctrl+shift+m

/usr/bin/live: ctrl+shift+o

Then create two scripts, make them executable and place them in /usr/bin.

Script #1: This will decide whether you are running from the Live CD and then kill and restart Orca and Speech-Dispatcher.


if [ -d "/live" ];then

killall orca
sudo killall speech-dispatcher


gnome-terminal -e /usr/bin/inst



Script #2: This script is only called if you are on an installed system. If you are running from an installed system you will have to enter your admin password and press enter without speech!


killall orca
sudo "killall speech-dispatcher"


15. Set File Browser Behaviour

Open the File Manager window and set the following defaults:

Always open in Browser Window: Checked
Preview: Set all to Never apart from Number of Items

16. Set Mouse Defaults

Open Mouse Preferences and enable Show position of Pointer when the Control Key is pressed.(doesn't work well with magnifier)

17. Adjust volume settings: Set Master, PCM, Front and Speaker volume settings to maximum, set line and mic input volumes to 50% and mute them.

18. Enable all of the extra plugins for gedit and add the accessibility and textise plugins for Firefox. Set Firefox homepage to and add bookmarks to Vinux websites and create a Downloads folder etc.

19. Edit menus: Hide - Archive Manager, Password and Encryption Keys, Root Terminal, Floppy Formatter, New Login, New Login in a Window, Network Tools, Power Statistics, System Log, About Me, Network Proxy, Preferred Application and Windows. Show - Orca.

20. Open gconf-editor, navigate to Apps > Nautilus > Desktop and hide the three icons which are shown.

21. Change appearances: Change theme to Crux, change purple to dark grey, change background image to Tentacles, the background colour to black, all fonts to size 12 bold and adjust for best contrast, change cursor to a DMZ White and Large and then save as 'Vinux'.

22. Move both panels to the left hand side of the screen and add a third. Make the width 60, show the hide buttons and add whatever items you want from the panel applets menu and the main menu. Then rename panels using gconf.

23. Download and install the UIE-Dark-Eloquence GDM theme from Gnome-Look. Copy any GDM customisations you have made from /etc/gdm/gdm.conf into /usr/share/gdm/defaults.conf otherwise they won't be used.

24. Edit /etc/remastersys/isolinux/isolinux.txt.debian so that it includes an  (Ascii 7) character at the end of each title line. Delete the two splash image files in the grub folder and remove the splash image path from menu.lst.debian file as well.

25. Edit /usr/bin/remastersys-installer and replace 'xterm -e dpkg-reconfigure tzdata' with 'time-admin'.

26. Download cnetworkmanager from the following URL extract the files, navigate to the directory and then type './ install'.

27. Empty the trash, delete all entries from the .bash_history file and save it and then delete the Recent Documents list.

28. Copy everything from the home directory including hidden files into /etc/skel and change ownership to root.

29. Open remastersys, modify the settings as required and create a remaster: and after about 20-30 minutes or so your new live CD image called Vinux-2.0.iso will be waiting for you in the /home/remastersys/remastersys directory.