Archive for June, 2009

The following is taken from the Linux Information Project.

For people accustomed to MS-DOS commands, the following aliases can be defined so that a Unix-like operating system appears to behave more like MS-DOS:

alias dir="ls"
alias copy="cp"
alias rename="mv"
alias md="mkdir"
alias rd="rmdir"
alias del="rm -i"

However, some experienced users of Unix-like systems contend that this may not be a good idea and that it might just make Linux seem more confusing, rather than simpler. Instead, they advocate having Linux users become accustomed to the UNIX terminology right from the start.

I have underlined the above paragraph because it seems to me there is quite a bit of conflict within the Linux community about interoperability, not simply between Dos and Linux, or Unix, but between the variants of Linux also known as distributions. At the end of the day, it is the user which suffers.

We all know about code and how some coders like keeping their code secret, while others give their code away for all the world to see. The open-source community has grown precisely on this principle of freedom and openness, but by and large, code is still in the hands of coders, and the needs of individual communities are compromised as a result. Would you really want a world in which the only novels were written by scientists, or the only music was composed by mathematicians?

The reason why Ubuntu is so successful, is not just the easy to understand shell but the personality behind the shell which appears to be benign and the shell wants us to learn along with it, and not simply to install but to compile from source. This does not mean the Ubuntu CLI is the easiest, or best shell, and BASH still suffers from being too mathematical while the Linux support is too clinical for a lot of users. (Some might say, the problem is rather one of syntax and meaning, while others might say the problem is not simply about math but which maths, and not language, but which language?)

Now imagine being able to create different schemas of commands (using aliasing) that might confer unique advantages depending upon the target user? In other words, creating a linguistic or adaptive personality behind the computer that at the end of the day allows the user to remember and grasp the concept behind the command, and therefore to make more use of the power of the command line?


Read Full Post »

[PLEASE SEE Better PPA Fixkey Method the below is for informational purposes only.]

In Fix Software Sources Bad Behaviour we reported two methods for accomplishing the same task of fixing keys. The first, involved manually entering two lines in a terminal. The second involved one entry. Now there is a third faster method. Aliasing.

ICE20.com describes aliasing in BASH this way:

Many of us use certain commands over and over again, or we have preferred combinations of options which we always give to certain commands. We can create shortcuts to these commands by giving them an alias in our ~/.bashrc file. The format is:

alias new_name=’command -options’

There are some examples provided at the above site, but the one we want to create is this:

alias fixkey=’sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com’

Which will execute a command string when you type fixkey.

1. All you have to do is backup your ~/.bashrc file

cp .bashrc .bashrc.bak

2. then open it in a text editor

gedit ~/.bashrc

3. Scroll down to the relevant section.

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
#. ~/.bash_aliases

4. Uncomment so it looks like this

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases

5 Save and exit.

Bash documentation recommends creating a separate file for aliases like this.

6. Create the  ~/.bash_aliases file

gedit ~/.bash_aliases

7. Enter the following code

alias fixkey=’sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com’

8. Save and exit.

9. Refresh bash. by either logging out, closing the terminal or entering $ bash

10 To fix an errant key, using fixkey. Open Terminal


WARNING: I  tried the above first leaving the sudo command out and entering it directly in .bashrc expecting that one should be able to simply sudo fixkey in this instance, but this merely turns up a “command not found” dialogue and so I included sudo  in the command string in order for it to execute. This might not be the case with the .bash_aliases file. Any advice on this would be welcome. please see Better PPA Fixkey Method

NOTE: I don’t recommend going off and aliasing everything you do, as you terminal will quickly begin to resemble a unique creature which might bork when you install a new piece of software with the same command structure. (How exactly does this problem of potential commandline scripting conflict get resolved? For example, the above is substantially similar to the following posting at Commandlinefu. Depending on whether your starting point is the ‘addition’ of a key, or ‘fixing’ a key after the fact. Of course both fixkey and launchpadkey can coexist) Rather, I suggest we share commands at places like Commandlinefu or Ubuntu Forums and see if there is any agreement within the broader Ubuntu Community at what to do about reducing relatively complex or time-consuming CLI tasks into easy to remember, attractive or familiar commands. In fact creating more human, or themed commands using the aliasing capabilities of bash, could be the next frontier. I imagine the day when we will be sharing and exchanging CLI matrices or schemas as easily as trying on a new hat or pair of shoes. If the shoe fits, wear it, if not, give it away. – DRL

SEE Environment Variables

Read Full Post »

A short while ago we announced the release of Ubuwiki for Africa. The idea is very simple. A lot of us take connectivity for granted. We also fail to take bandwidth considerations into account and the result is known as the Digital Divide. PDF is a great format for sharing books. Ogg-Theora is the open-source format for sharing music. WoaS or Wiki-on-a-Stick is “a wiki living in a self-modifying XHTML file”. We want it to become the “MP3 of Data” or in Opensource terms, the Ogg-Theora of Data.

Originally Ubuwiki, essentially a modded WoaS “containing repurposed content” was a forked development of WoaS. The two projects have now combined forces and there are plans to develop the format even further. What we want you to do, is modify Woas or Ubuwiki and to share the modified files with your friends. Create online and offline data-sharing. Encourage users to share information with those who don’t have bandwidth. Here is an example of a modification from the official WoaS forum “i use woas with this extention for tabs. i also did some dirty code modifications to use it with ie8 and embedded images. further i did some css modifications.”


Read Full Post »

ZenTwitter is an amazing small script which is able to update twitter accounts without the need of having a browser window open all the time. It uses zenity and curl. (note: if you want to just use your terminal for tweeting see this posting)


Just dump it into your ~/bin directory, open it in the editor of your choice to change the username/password, make it executable (chmod a+x) and add a launcher icon to the panel/menu/desktop of your preferred window manager.

Download: ZenTwitter.tgz


Read Full Post »

Ubuntu Capistrano


This looks amazing. If you need to set-up a server, Ubuntu Machine has Capistrano recipes that will automate the setups. Now wouldn’t it be amazing to see some desktop customisations coming out as Capistrano recipes? In fact I would love to reduce my entire setup to a script, and carry my Ubuntu computer around in my pocket. Or better yet, upload my data, and publish my installation which could then behave like ET and phone home?

Read Full Post »







Read Full Post »

Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, when, and why changes occurred, etc., like CVS, RCS or SCCS. Subversion keeps a single copy of the master sources. This copy is called the source ‘‘repository’’; it contains all the information to permit extracting previous versions of those files at any time.

(copied from svn man pages)

To install svn just type this in terminal:

$ sudo apt-get intall subversion

To some setting svn through proxy server:

$ nano ~/.subversion/servers

And add this following lines:

http-proxy-host = your.proxy
http-proxy-port = 8080 #your proxy port
http-proxy-exceptions = localhost #etc
http-proxy-username = your_user
http-proxy-password = your_password

Save the file. Now your SVN will worked through your proxy server.

The other setting can be tweaked manually, just edit servers and config in the ~/.subversion directory

courtesy of Abz Notes http://abz89.wordpress.com/2009/01/23/setting-svn-through-proxy-server/

Read Full Post »

Older Posts »


Get every new post delivered to your Inbox.