vi. Quick notes.

Unless you’ve been a long time *nix user, you may not be part of the EMacx, vs vi school. Perhaps like me, you prefer using something like Nano to edit text files in the terminal.

Problem is, on many systems such as those running embedded Linux and using something like Busybox, these more user friendly editors simply aren’t available. Even if the system has a package manager and their exists your favourite editor in a package repositry, you may not have the permissions to install them. But you still need to edit a text file. Granted, if you’re not root or listed in sudoers, you’re not going to be able to edit anything in /etc anyway but maybe you just need to write a note in /home.

Thankfully the text editor vi should always be included in a Posix compatible environment, like those running Busy Box. But you load it up and realise you can’t use your mouse and you don’t have time to read the manual. Fear not, see below.

Vi operates in 2 modes. Command and insert. Insert is where you actually enter text, command operate upon the text.

Press i to enter insert mode and esc to back out to command mode.

If you’re not sure you’re in command or insert mode. Press escape a couple of times. You may hear a ping indicating you’re already in command mode.

These days cursor keys should work moving around in command mode, otherwise:

Left: UP: Down: Right:
h. j. k. l.

Enter insert mode

Some comomn commands: (Note caps.)

Exit with out save, ignore write protect.


Save / write

Save and overwrite protection.

Save and exit
:x. Or, :wq. Or ZZ

Save buffered file as:
:w newfile

Return to point of last save.

Edit another file with out leaving vi:
:e file2

Some editting commands.

Give a number after command if desired.

Delete from cursor to end of word:

Delete from cursor to end of line.

Delete lines.

Delete from current line to end of file.

Delete character under cursor:

Yank (copy) word from cursor

Yank (copy) line.

Paste after cursor.

Paste before cursor.



There are many more of course. Have a look at:

Simple automated backup with Robocopy

Linux / Unix systems have Rsync, a very useful tool that does what it sounds like it does. Remote sync directories and files. It has a number of options and can be used in conjunction with SSH for secure syncing. Whilst there’s a version available for Windows called CWRsync, which operates in the Cygwin environment, it didn’t quite work in my situation.

Since Windows Vista, Microsoft have included a command line tool called Robocopy. However there are gui’s available, see Wiki entry. Robocopy like Rsync, has a number of options and defaults to only copying the source files to the destination if they’re newer or of different sizes.

With something like the simple batch script below, you can automate backups. You could assign this to a schedule in Windows but strangely I prefer to run it manually. I’ll only mention the options I’ve used as there are quite a few.

Syntax is Robocopy

Robocopy “c:\users/me\My Documents\source” \\server\home\me /s /xo /FFT /Z /log+:”c:\users\me\My Documents\scripts\backup.log”

/s. Copy all non empty sub directories. /e will copy all including empty ones.
/xo. Exclude copying files if the destination version is the same or newer than the source.
/Z. Resume mode, in case of network problems.
/fft. FAT File times, 2 second granularity. I read of some people having problems with source dates not being correctly calculated and the source being copied in it’s entirety each time. Using this switch was given as a possible resolution.

Note the quotes in the source path. Needed if you have any spaces in file / folder names.

The last line echo, makes the internal speaker beep when done. There’s actually a character after the echo which has not been displayed here. How to obtain it for a script Open a command prompt. Windows key + r, type cmd.
Echo ^g > beep.txt

Then copy and paste the contents of beep.txt after your echo statement.

Robocopy on Wikipedia

Virtual Vinux Revisitted

Last year I tried running the virtual Vinux distribution under Windows XP Home SP3. Whilst it worked with no major problems and was easy to set up, orca’s speech was rather crackly. This made it in the end, pretty difficult to use for any length of time. Role on several months, I’m now using Windows Seven Professional and decided to try it again.

I downloaded Vinux virtual from the Vinux project website.

It might be worth noting, the virtual edition is 3.02. This is based on Ubuntu 10.4 LTS. The standard release of Vinux is now at version 4.0, based on Ubuntu 12.04.2 LTS.

The download includes instructions for running Vinux, some batch files for assisting in the customisation and the free VMWare Player. The VMWare Player allows users to host virtual machines on their desktop. VMWare recommend at least 1GB of RAM and a 2.0 GHZ processor to host a virtual machine successfully. For the record, I’m running it on a 2.4 GHZ Intel Quadcore q6600 system with 4 GB of RAM. The host operating system is Windows Seven Professional. VMWare products are also available for Linux and mac.

In practise.

After following the installation instructions, which guide you through adding the Vinux virtual machine to VMWare Player and offer some quick start tips, you should now have an accessible version of Linux comfortably hosted within Windows. I used the default settings, giving the VM 512MB of RAM and 80GB of disk space. It performs very well although I’ve not done anything taxing with it yet. You can of course add software as you normally might within Debian derived Linux’, with apt-get for example. Switching between the VM and Windows is done through a simple keyboard short cut when the VMWare Player has focus. Various settings for the VM can be edited in a regular text editor using the .vmx file in the download.

Next I intend to install the Virtual Network Editor, which is part of the VMWare Player software although not installed automatically. The purpose being, so I can access the Vinux machine from other hosts on the network.

FTP Upload on Win 7 Facepalm Moments

If you’re on a Windows system that doesn’t require an admin login and you find you can’t upload files with say, fileXilla. Assuming you have a shortcut to it on your desktop, try:

Right click, properties.
On shortcut tab click Advanced and check “Run as Administrator.”

Users on Linux

Quick notes on adding users in Linux. As they say,, check the man pages or get a good book on the subject for more detail. One such book, The Linux Cookbook by Carla Schroder, published by OReilly Press.

Adding new user.

To add a new user and have the system automatically generate them a home directory. Example for Sarah.
useradd -m Sarah

To include space for the GECOS data, use the comment option -c. Typically there are 5
fields. If you just want their full name listed, leave the other fields blank by adding
useradd -m m -c Sarah Johnson,,,, Sarah

Note, her login name will just be Sarah. This must be unique on the system. Once you’ve run this command, you need to set her password with:

passwd Sarah

You’re then prompted to enter and confirm the new password. There are other options with passwd. For example, -e, expire password at first login, forcing the user to choose a new one. –x specify how long the password will be valid for, in days. -w. Specify how many days before expiry the user should get a warning.

Preventing a user having shell access.

For example, if they have an account on the system just to retrieve email with a client. You need to indicate their shell access is:

As opposed to.

or whatever shell you’re generally using.

You can use the usermod command to set this if the user already exists. Example, no shell access for Derek:
usermod -s /bin/nologin derek

If you’re adding a new user called jerry:
useradd -s /bin/nologin jerry

You can also directly edit passwd instead if you really want, however, it’s a good idea to back up files such as that before manually editing. For example.
cp /etc/passwd b/etc/bk.passwd

To suspend a users account, let’s call them Dan, probably the best way is to use:
passwd -l Dan

To rre-enable their account:
# passwd -u Dan

Again, this can also be done by manually editting the passwd file. I.e. putting an “!” mark at the beginning of the password field or replacing the “x” with an “*”.

An intro to Vinux

Vinux is an accessible Linux distribution put together by the very helpful people behind the Vinux Project.

Vinux can be run as a live boot version from CD, DVD or USB memory stick. The current version of Vinux is based off the Ubuntu Lucid Linx LTS version, 10.4. The current Vinux version at time of writing is 3.2. Check the Vinux project website for more detail and links to downloads. One of the great things about this distro, aside it being produced with low vision or blind users in mind and tweaked accordingly, is that it will talk you through it’s very installation. With out setting scripts for an unattended installation, to my knowledge there’s simply no way a blind computer user can install Windows independently. Microsoft’s very basic screen reader, Narrator, doesn’t run from the installation media, so you’re reliant on sighted help. Being able to setup Vinux from the get go, is a real bonus in my opinion.

The hardware I’m currently running it on is a 6 year old Dell laptop, with 512MB RAM, 1.7 Pentium Mobile processor. By these day’s standards a puny machine. In fact, it was becoming barely useable under Windows XP and needed a fresh reinstallation. (Something frankly I couldn’t be bothered to do, even if I’d found the Dell recovery disk.) SO having tested Vinux from a USB live version and become quite impressed, I decided to install.

At that time, I did this as a side by side installation with Windows. This presents the user with a Grub bootloader menu. This is not spoken of course as no operating system has loaded yet. Therefor it’s a good idea to get someone to read you the menu order and memorise the options.

Whilst I found running the USB live version pretty reliable, having installed to HD, I had various problems with losing speech and inconsistency with whether speech would start at all after boot. The screen reader itself Orca was loaded but no speech. With out going into describing the minimally successful adjustments, made after Googling the issue, eventually I waited until the new 3.2 version of Vinux was released earlier this year (2012.) Since then the system has been far more useable, reliable and productive.

As blind computer or technology users in general, there are always little nagging unforeseen (no pun intended) problems. Some things are resolved and improved as a technology matures. Conversely, new software can break previous access methodologies. Not exclusive issues to users of access technology of course. With that in mind, what the volunteers in the Vinux Project have done is invaluable in furthering the accessibility of computing to blind and visually impaired users.

Whilst I can’t replace Windows with Vinux at this time. (There’s simply too much software I need on that oS.) Linux and this particular distro, for it’s working straight out the box, are my go to system as I learn more about networking and system admin. Of course a great many people are now using Linux systems for more general applications, web surfing, document processing and so on. People previously tied to the Microsoft world have been increasingly enticed by distros such as Ubuntu and Mint. Blind people too have been using Linux in various ways for several years. Orca, the screen reader on the Gnome desktop environment has been around a while. However, getting it all working involved having to learn to make a considerable amount of technical tweaks and problem solving. Not something any average computer user wants to do. So for a newbie like myself, Vinux whilst by no means perfect, has really moved things on and I thank all those involved in the ongoing project for bringing this advancement.

To try Vinux out, I’d recommend booting it live off a USB stick. If in the seemingly unlikely event, your BIOS doesn’t support that but you have a reasonably powerful machine, you can run it in a virtual machine. Instructions for both can be found by going to.

NB: The link to the Virtual Edition from the front page is broken. Go to the downloads section.

Cisco exam and accessability

Some general notes regarding my experience in taking the Cisco ICND 1 and ICND 2 exams. As per the NDA and because nobody likes a cheat anyway, I’m not going to discuss specific Questions. For the latest objectives and requirements of any test, you’re best to check on the website.

At the time of writing, the ICND1 exam, which successfully passed, gives you the entry level CCENT certificate is exam number 640-822. The secondary exam, which successfully passed, affords you full CCNA status is, 640-816.

If you pass the former but not the latter, you still have the CCENT. You can’t take the latter on it’s own. There is a composite exam combining all test areas, 640-802. It will be your decision whether to take the 1 or 2 exam route.

Each certificate is valid for up to 3 years. So for example, you could pass ICND1 and then take ICND2 nearly 3 years later to gain CCNA.

For the blind Cisco exam candidate. Pearson Vue, Cisco’s test offering partner, will give you a maximum of double time for the test. So to put in obvious terms, a 1 hour 20 minute test can be taken in 2 hours 40. You will also have a reader / scribe. This person will read the information, disclaimers, candidate agreement and of course, the questions. You will need to verbally give them your answers, i.e. Instruct them which option to choose, in a multiple choice question. This person will of course be computer literate but for obvious reasons, you’re not going to get someone who is qualified in the area of study.

*Note of caution: You are of course supposed to read the legal disclaimers, terms and conditions, the entire exam agreement, blah, blah. Be aware it’s a lot of text. In the first exam I took, the test was locked as we’d taken too long going through this material. The invidulator had to phone some tech support guy to get instructions on unlocking it so I could proceed. Whether that was a one off glitch I don’t know.

The reader… I’ll call them the scribe from here on. The scribe will have a plastic wipeable board and marker pen supplied by the test centre, on which they can write notes. You’re not permitted to take in any other equipment into the exam. No jackets or bags. There should be a locker at the test centre reception to stow these for the duration of the exam.

So this being the setup for the test. I’d advise checking the official Cisco exam expectations on their site as I make no guarantees regarding the information here. That said, in general terms the type of questions you’re likely to face include:
Multiple choice. One correct answer.
Multiple choice. Several possible answers.
Drag and drop terms to match the cattery.
Simulation testlets.

*Note:. You can’t skip a question and return to it later. So be very careful to complete all parts. Some of the testlet simulations where you need to enter commands in the simulated IOS CLI, are comprised of 4 separate questions, for example.

A number of the questions are likely to feature diagrams or text output from the CLI. In my experience, these are the trickiest and most time consuming. Especially the teslets featuring the 4 questions as described above. it goes with out saying, you need to really, really know your stuff. Whip through the simpler text based questions but pay careful attention to the wording. But these are where you can save time. And remember, it’s a Cisco test. The correct answer is the Cisco one.

In preparation for the test, specifically with the IOS simulations in mind. Make sure you know the common commands, show commands and so on, absolutely clearly. You can ask the scribe to type them but I prefer to type them in myself and have them read the resultant output.