Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

Saturday, November 13, 2010

Some new CLI apps

1. Canto

Great RSS feed reader based upon python/ncurses. Practically gobsmacked.

2. Cabber

cabber is a customisable jabber console client based in ncurses,

3. Herrie

A command line music player. It supports multiple audio file formats (including MP3 and Ogg Vorbis) and  has  the  ability  to  send
playback  statistics  to AudioScrobbler. The word `herrie' is Dutch for `clamour'. Personally, I found the keybindings a bit difficult compared to cplay which has the basics like playing a track with enter or pausing with spacebar, so have yet to actually play a track with herrie.

4. Juke

If the keybindings for herrie are difficult, juke takes the cake, another app without a play option in the help menu.

5. mybashburn 1.0.2-1

New release of an extremely sophisticated commandline DVD/CD burner. Great replacement for brasero.

6. pacman4console (1.2-2)

Pacman is just a C, while the ghosts are & in an okay pacman maze, different mazes would be a nice.

7. Aylet

aylet plays music files in the `.ay' format.  These  files  are  essen‐
tially  wrappers  around  bits of Z80 code which play music on the Sin‐
clair ZX Spectrum 128's sound hardware - the beeper, or  the  AY-3-8912
sound  chip,  or  both. Files using the Amstrad CPC ports are also sup‐
ported

Sunday, September 5, 2010

Is Ubuntu doing the DRM tango?

[caption id="" align="alignleft" width="280" caption="The DRM two step"][/caption]

EARLY signs that Ubuntu is slouching inextricably towards a form of digital rights management for paid-apps can be seen in a number of announcements in the blogosphere. First it was the dumping of Aptitude in Maverick. Next we heard about the impending death of Synaptic in Narwhal. Suspicions that we are all being herded quietly down the Digital Rights Management  (DRM) path began to surface, when the first paid-for-app appeared in the Software Center along with Canonical statements about how our lives  are literally going to be transformed  "congregating around the Software Center" as the only bone fide and sane means of installing applications in Ubuntu.

Put aside the upbeat marketing pitch about happy users and profit-making developers overjoyed that Ubuntu is "finally coming round" to economic sense, there is every reason to worry about the new economic model being touted in Ubuntu and Linux in general. Will the new Linux capitalism end the overtly socialist ambitions of Ubuntu?

LinApps, a paid Linux application site was launched recently. It  generated a lot of interest amongst users as "sign that Linux is capable of making money" but offers nothing more innovative than the Microsoft Model of Commerce.  Sadly there is a general antipathy towards several evolutionary new economic models based upon freedom and openness --  voluntary economic models such as flattr and the mutual benefit "ransom model" which frees applications to the community but only after a profit threshold has been reached, risk being superseded by blatant caveman capitalism.

That's right, the default Genghis Khan approach to life in which civilisation is nothing more than a walled garden built to keep the rest of the Mongol horde out and your wallet firmly under dynastic control.

If developers start bolting down every piece of code to the new Siren Song of Ubuntu Software Center, we could all  end up losing a lot more than our unique community. So what if it boils down to paying the rent,  in the process allowing a few greedy developers to make  real money extorting funds in return for their wares tailored to the next generation?  Locking us in to the Software Center will invariably kill the medulla oblongata of the system. Synaptic (and apt-get) is surely the pathway to the brain which gives our distro its unique edge?

The generation which put in all the effort to build Ubuntu (That's US)  would also feel dumped without any compensation for their labours except a platform that turns, as easily from freedom into a prison. The rebranding of Ubuntu in corporate shades of naartjie and aubergine may have signaled a cultural shift from the heydays of the Ubuntu revolution, but there are still those who cling to the lofty aspirations contained in the FSF, GPL and the Open Source Definition.

Unfortunately, Ubuntu Users are increasingly being seen by Canonical as mere consumers. The Novell-lead corporate-client relationship vs  Ubuntu TECH  (I am because you are) is what appears to be driving the next DRM wave, as Matt Asay's 'economics before innovation' impacts on decisions about what goes into the distro and what stays out.

Does it have to be this way? I  am an Ubuntu nut not because of Matt Asay or Mark Shuttleworth, but rather because the metaphor is greater than any one individual.  Nelson Mandela's Principle Number 1 drives momentum in my moral universe, not allegiance to the self-proclaimed "Master of the Universe" and his minions. As an anarchist & hacktivist I much prefer the economics of voluntary aid -- true African Ubuntu as a system of mutual cooperative organisation compared to outright Western-style capitalism.

Think about it,  micro-payment systems like Flattr, though still in beta, could provide the entire community with enormous opportunities,  a better means of generating income than the outright ransoming of applications which invariably create a police state in which some users will be turned into criminals merely for looking under the hood. DRM is the exact opposite of  file-sharing, copying and tinkering.

The so-called Ransom Model (which needs to be compared to the actual ransom model inherent to capitalism)  is another means of circulating economic energy. Essentially a sponsor-paid application system, the development of new applications could get sponsored or auctioned under code escrow instead of marketed and sold. Do we really want to become nothing more than consumers? Are we not all Ubunturistas, each producing according to his or her ability?

What will the new paid-for-apps cost us in the long run?

Will we sacrifice human rights alongside FOSS merely so that a few may earn a living?

Let us rather debate the issues  to come up with better economic models, ones that are based upon Ubuntu and Community, rather than Patent Law, Intellectual Property and even the Rights of the Individual vs the Rights of the Collective.

Tuesday, July 20, 2010

Zenplayer

This is a useful script for playing di.fm stations with mplayer (requires zenity, curl and mplayer)

1. open a terminal
sudo gedit /usr/bin/zenplayer

2. Add a bash shebang
#!/bin/bash

3. paste this:

zenity --list --width 500 --height 500 --column 'radio' --column 'url' --print-column 2$(curl -s http://www.di.fm/ | awk -F '"' '/href="http:.*\.pls.*96k/ {print $2}' | sort | awk -F '/|\.' '{print $(NF-1) " " $0}') | xargs mplayer

4. Save

5. Make executable
sudo chmod +x /usr/bin/zenplayer

Then to run, just type zenplayer in a terminal and choose a station

otherwise make a new menu entry in your gnome menu and add zenplayer to properties.

If you want notifications when the track changes, add this:

| grep --line-buffered "StreamTitle='.*S" -o | grep --line-buffered "'.*'" -o > mus & tail -n0 -f mus | while read line; do notify-send "Zen Player" "$line";done

THANKS polaco and spiffwalker at commandlinefu.com

Wednesday, July 14, 2010

CLIcompanion and Cheatsheet

Although U8UNTU eLXR's much vaunted migration to Blogetery.Com appears to have run aground, with the site disappearing off the Bermuda Triangle -- word only now reaches us about the server getting impounded by authorities for copyright violations related to free and open source software -- we can still report about two amazing command line / console apps. Both fit the bill for "wish I had this when I started out" with the new fangled Ubuntu craze featuring. Return to the Command Line by the Open Source Kid.

CLIcompanion




You can get CLIcompanion by running the following command in a Terminal:

bzr branch lp:~duanedesign/+junk/clicompanion

Move the .clicompanion file found in the clicompanion directory into your $HOME. You may need to select View –> Show hidden files (Ctrl +H) to see the .clicompanion file.
After moving the file return to the Terminal and run the following to move into the clicompanion directory:

cd clicompanion/

Start the application with the command:

python clicompanion.0.0.7.py

THANKS okiebuntu

2. Cheatsheet

A console app which pretty much does the same thing, but from the command line.


You can get the cheatsheet code with the command:
bzr branch lp:cheatsheet

then move into the directory
cd cheatsheet/
Make the file executable:
chmod +x cheatsheet.py
Then move it to one of your $PATH directories. You can view these with the command: echo $PATH
I chose /usr/local/bin/ for the next command
Move the file with the command:
sudo cp cheatsheet.py /usr/local/bin/cheat
Then from a Terminal you can view the command usage by running:
cheat --help

Wednesday, June 30, 2010

Star Wars in your console

Type this in a console:
telnet towel.blinkenlights.nl

Saturday, June 19, 2010

Google Command interface launched

It had to happen, an official google application that provides access to google services via the command line. In April we showed you how to do this, the unofficial way using surfraw. Now you can do it with the blessing of the worlds most popular search engine company, Google

GoogleCL can be used to google the following services (examples shown):

  • Blogger
    $ google blogger post --title "foo" "command line posting"

  • Calendar
    $ google calendar add "Lunch with Jim at noon tomorrow"

  • Contacts
    $ google contacts list name,email > contacts.csv

  • Docs
    $ google docs edit --title "Shopping list"

  • Picasa
    $ google picasa create --album "Cat Photos" ~/photos/cats/*.jpg

  • Youtube
    $ google youtube post --category Education killer_robots.avi


Unfortunately, the deb which was released yesterday, doesn't automatically setup the terminal browser. You will have to do this yourself:
gedit /home/user/.googlecl/config

After running one of the services for the first time, the above config was created. I opened it with gedit and added
auth_browser = w3m

Which is the w3m text-based browser. There are a lot more services on the way, and one can only hope this is a sign of things to come. I can think of a number of Net services which could do with a CLI interface.

( Remember to fill in forms with w3m , to log into your google account, you have to hit the enter key.)

Please check the official development page site for the last update.
Please visit the official download page to download GoogleCL (You'll find a nice deb there waiting for U8UNTU users!)

THANKS Panoet

Saturday, April 10, 2010

Google via the command line

Sometimes opening a terminal is a lot faster than opening a browser. If you like me, then you will enjoy having some extra supercow powers at the command line.

Here is how to set up Google on the command line.

1. Install the surfraw essentials

apt-get install surfraw surfraw-extra w3m

2. Setup surfraw
sudo gedit /etc/surfraw.conf

Change the following:

SURFRAW_graphical=no

SURFRAW_text_browser=/usr/bin/w3m

save.

3. Now you have three choices:

A)  You can stick with the default action, which is:
sr google <subject>

B) You can add an alias to your bashrc
gedit /home/<user>/.bashrc

ADD under aliases section:
alias google="sr google"

Save

C) You can add the surfraw ELVIS   dirctory to yout PATH variable

usually /usr/lib/surfraw/ or /usr/local/lib/surfraw/

eg. PATH=/usr/lib/surfraw/:$PATH

This is probably not such a good option since it will also give you instant access to the 80 or so "Elvi" which are  in the surfraw directory and part of the Surfraw suite. Since  some of the commands might conflict with commands already on your system,  we might want to first check to see which Surfraw "Elvi" commands and powers you need and which ones you don't.

Remove the ELVIS  you don't need by deleting or moving the ELVIS from the /usr/lib/surfraw/ and placing it in /usr/local/lib/surfraw/ or vice versa. You really only want one surfraw directory in your path!!!


That's right ELVIS isn't dead, he just lives on as the Shell Users' Revolutionary Front Against the World wide web.

You can still command ELVIS to do your bidding.

More info

Sunday, March 7, 2010

BashStyle-NG 7.9 - Colors in terminal

BashStyle-NG is a graphical tool that allows us to easily change the behavior and appearance of the terminal. It comes with 15 pre-defined styles that you can change as well as create your own. You can define up to 7 Alias, control the type and amount of orders to recall in history, put a message of welcome, change the startup path and lots of other options.

http://www.nanolx.org/apt/pool/main/b/bashstyle-ng/bashstyle-ng_7.10-1nano_all.deb

Sunday, December 13, 2009

Multi-User Dungeons in Ubuntu

Yes there's always IRC but if you want something a little more counter-cultural, why not try MUD? Multi-User Dungeons are the mainstay of the old-school UNIX BBS. Similar to IRC, the text-based chat & role-play is a lot more entertaining. To log into a MUD you will need to set up a shell account with an online BBS.

There are a number of shell accounts & BBSs available. The telnet BBS guide is a good place to start.

I ssh'ed into the Super Dimension Fortress, a Seattle-based BBS with an evocative name and set-up my account like this:
ssh new@<name-of-the-server>

This took me through a setup in which I was asked to supply a username and password.  I could then login with username@server.

Then using the unix commode programme available from the shell I quickly learnt how to join a room. Sound familier? MUDs are essentially chatrooms, but with a slightly different ethos and character. Some are exceedingly elaborate. I actuallyprefer the good old cyberspace hackers meeting up in text-mode. B&W or Colour, toggle on of off, you choose. To enter the real MUD game using the mud command, I chose a character and became a samurai leprechaun.

My first realisation on returning, was that today's MUD, apart from the game, could make a nice addition to Pidgin, as a plugin. A better nCurses interface would also be cool in terms of development.

Whereas IRC is usually organised around a topic or channel, MUDs are very connected to a sense of place and presence on the Net. You can feel like you live and work in Seattle for instance, by joining SDF which also has a Texas presence.

MUD, considered by many to be some kind of Pre-Mosaic relic,, may have slipt under the radar, but thanks to Ubuntu, the shell is making a come-back. Chatting via a MUD is more anonymous than Facebook, and less of a chore than IRC, which is geared towards rapid communication. MUD is also a lot slower, and laid-back. Give it a try and let us know what you like or dislike.

UPDATE: There are two clients in the repos which one should consider.  PuTTY is an sh client with some excellent options such as proxy. There is also Gnome-MUD, a GTK MUD client.

Saturday, July 4, 2009

Smart autocompletion of BASH commands

I have been looking for a way to favourite my commands. Turning on Bash Smart autocompletion is a start. I found this posting at Ubuntu Blog:
The Bash shell has this sweet feature where you can use the TAB key to auto-complete certain things. For example, when I am in my home directory, the following command:

$cd Do[TAB-key]

will automatically yield:
$cd Documents

If you are an absolute novice, like I was, not so long ago, discovering tab completion in the terminal can make you go “Wow!”. Wait till you hear the rest now :)

Though you can use the TAB key to complete the names of files and directories, by default the completion is pretty “dumb”. If you have already typed $cd D you would expect that the tab key would cause only the directory names to be completed, but if I try it on my machine, the tab completion tool uses filenames too.

Now, don’t despair! There is now a smart bash tab completion trick you can use. Smart completion even complete the arguments to commands!!

To enable smart completion, edit your /etc/bash.bashrc file. Uncomment the following lines, by removing the # in the beginning of the lines:

#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi


Now you can use tab completion to power your way through commands.

You can even extend bash smart completion to your own favourite commands by using /etc/bash_completion, the “complete” utility and /etc/bash_completion.d . Explaining the nitty-gritty is beyond me. I refer you to the Debian Administration gurus for more information regarding smarter bash completion.

Thanks Carthik, I do believe this is the solution. First turn on smart autocompletion, check to see if your favourite commands autocomplete, and if not, then create a file containing these commands using the link provided.

UPDATE: Working with history in Bash

Thursday, July 2, 2009

Some cool consoles for Ubuntu

After struggling with a number of consoles, all of which claimed to provide the drop-down "Quake" experience, I found Yeah Console, which does exactly what it promises, nothing more, nothing less. I was pleasantly surprised, even though the installation details are not what one could call smooth sailing. If you want to grab the console, you'll have to pop over to this page

While waiting for the release of Guake for Hardy Heron, I came across Tilda, which is another nifty console, that is less of a killer app, than a good excuse to play around with an alternative to the default. Good work people, keep up the pressure on Canonical, to develop even better terminals.

Instructions for setting up YeahConsole

First, it needs to run every time you log in. So, go to System > Preferences > Session, select Startup Programs, click Add, and add a new command, name "YeahConsole", command "yeahconsole". Next, it looks a bit rubbish when you start it up. Here's how bare-bones yeahconsole is: you configure it with X resources. Party like it's 1989! I had to go look up how to do this; for the more tender in years among us, X resources were a sort of central configuration for all your apps, round about the same time that humanity was fighting off sabre-toothed tigers and wondering whether that hot flamey thing in the corner could actually be useful. On Ubuntu, you need to edit (actually, you probably need to create) a file called .Xresources in your home folder*. In that file, you put the configuration for yeahconsole, like this:
yeahconsole*toggleKey: None+F2
yeahconsole*consoleHeight: 20
yeahconsole*aniDelay: 0
yeahconsole*stepSize: 10
yeahconsole*faceName: ProFontWindows:style=Regular
yeahconsole*faceSize: 9

The toggleKey one is the important one: it sets which key you use to summon the terminal. I like F2, myself, but pick whatever. What all this stuff means is documented in the man page (man yeahconsole), apart from which font to use. This is the faceName and faceSize options above, and here you have to delve a bit (I told you this was old-fashioned; I started writing a yeahconsole-properties configuration utility that did all this for you, but couldn't be bothered). In a terminal, run fc-list. This lists all the TrueType fonts that you can use in an xterm. Choose one, and put it in faceName above. Now, simply start yeahconsole for the first time (press Alt+F2, type yeahconsole), and then press F2 (or your key of choice). Pow, a dropdown terminal, like Tilda, but one that won't keep crashing and make you cry. One other thing: if you hit Ctrl-D to log out by mistake, it'll close yeahconsole (tilda did this too), and that's really irritating. To fix this, put the following in a file called bashloop in your home folder:
#!/bin/bash
while true; do bash; done

and change your Startup Programs command above to be yeahconsole -e /home/username/bashloop. Now Ctrl-D won't close yeahconsole.

PageUp and PageDown history search auto completion on the BASH shell

The Electric Toolbox has an excellent tip on enabling your BASH history page up and page down which is a simple task because Ubuntu already contains the definitions in the /etc/inputrc file, just commented out. Thanks for pointing out some of the power behind Ubuntu.

The file looks like this by default:

...
# mappings for "page up" and "page down" to step to the beginning/end
# of the history
"\e[5~": beginning-of-history
"\e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward
...

So it's just a matter of commenting out the original definitions for "\e[5~" and "\e[6~" and uncommenting the ones for history-search-backward and history-search-forward like so:


# mappings for "page up" and "page down" to step to the beginning/end
# of the history
# "\e[5~": beginning-of-history
# "\e[6~": end-of-history

# alternate mappings for "page up" and "page down" to search the history
"\e[5~": history-search-backward
"\e[6~": history-search-forward


And that's all there is to it. You need to log out and log in again for the changes to take effect.

The above makes the change global in scope and affects all users on the system.

Please visit Electric Toolbox if you want more information on making changes only for your login.

Fastest PPA fixkey method yet

This is the fastest "safe" fixkey method around, since it does not involve aliasing which strictly speaking should be kept for shortening or modifying commands that you already have in your shell, nor does it update software sources, which can slow down valuable time, especially if you have a lot of them.

1. Create a new file named ‘fixkey’ at '/usr/bin' with your favorite text editor:

sudo gedit /usr/bin/fixkey

Then, paste this code:

#! /bin/bash
echo please input your key
read KEY
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com $KEY


2. Give the file executable privileges with this command:

sudo chmod +x /usr/bin/fixkey

3. Start fixing keys using the command line by typing ‘fixkey’ [wait for prompt] [key]. See example below:

fixkey

please input your key

XXXXXXXXXXX

5. You have just fixed a PPA key via the Linux command line!

Previous threads on this subject can be found here and here.

6. Now to fix the key for the chromium-daily ppa:

fixkey

please input your key


4E5E17B5

For a more inclusive but slower method of updating keys, you might like this script from Dominic Evans, which was first noted here. If you have a lot of keys that need to be updating then I suggest you use it, at least once.


If you like my method, please let me know.

Tuesday, June 30, 2009

More thoughts on the alias command

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?

Favourite your top Ubuntu commands and add fixkey

[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
#fi


4. Uncomment so it looks like this

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


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
fixkey XXXXXXXX

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

Sunday, June 28, 2009

Setting SVN through Proxy Server

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/

Thursday, June 25, 2009

ASCII art in Ubuntu

888          8 8                       8    8 8                 w
8 8d8b. .d88 8 .d8b. Yb dP 8 8 8 8 88b. 8 8 8d8b. w8ww 8 8
8 8P Y8 8 8 8 8' .8 YbdP 8b d8 8b..d8 8 8 8b d8 8P Y8 8 8b d8
888 8 8 `Y88 8 `Y8P' YP `Y8P8 `Y88P' 88P' `Y8P8 8 8 Y8P `Y8P8

There are two ASCII art viewers in the repostory. Aview and Cacaview. Both are CLI programmes, so you have to open a terminal. Exploring the world of ASCII art is very 1999, but the retro-adventure is well worth the time and effort. You'll also find the venerable Lynx Browser, which is an ASCII browser for paper-thin net browsing, and a whole bunch of tools for generating ASCII images which could do with a brush up.

Try Cacafire a port of AALib's aafire which displays burning ASCII art flames or the Cacademo. Wish there was an easier method for creating ASCII video. I can't help thinking that there are lot of places which haven't been explored in the world of Alphanumerics and ASCII art is about to enjoy a resurgence as a design statement.

If you want to cut to the chase, Jerome Desmoulins website has an online ASCII art generator.

Or even better Sporkforge.com

Install figlet if you want an easy way to create ASCII "figs" on the command line.
sudo apt-get install figlet
figlet <text>

None of the above would be possible without the Ubuntu Forum discussion on the subject

Wednesday, June 3, 2009

Fix software sources bad behaviour

Every now and then you will run into the problem of not having the correct keys for the software sources that you enter into Synaptic. A lot of the time, this is because nobody bothered to give them to you, or you just haven't figured out how to request them using gpg.

This is what the error looks like:
W: GPG error: http://ppa.launchpad.net hardy Release:
The following signatures couldn't be verified because the public key
is not available: NO_PUBKEY EF4186FE247510B

Fixing this is simple. Open a terminal and replace the word KEY in both lines with the key you want to get (for example, EF4186FE247510BE). Do this for each key.

Code:

gpg --keyserver hkp://subkeys.pgp.net --recv-keys KEY
gpg --export --armor KEY | sudo apt-key add -


Then
Code:

sudo apt-get update

Works like magic. Thank you to Michy99 from Ubuntu Forums for pointing this out. I also found a method for querying keyservers and adding keys from the index the long way. The tutorial is at RebelZero.Com and it is probably more security conscious than the above method.

UPDATE: I found a one line method for rectifying the problem. A lot faster than either of the above methods.

Allaun recommends using the NO_PUBKEY value (e.g. C5E6A5ED249AD24C) to add the key with the following command.
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C5E6A5ED249AD24C

Monday, May 25, 2009

Funny manuals in Ubuntu

Ubuntu has a dearth of easter eggs, but every now an then one pops along. I first came across the "man baby" on an Indian blog sometime in 2008 with no reference to the funny man pages. Trawling the Internet in search of Ubuntu, I found it again at www.junauza.com but with the software references in tact. I republish the posting  here for your pleasure. Thank you junauza.

Are you feeling a little down lately? Why not open a Linux terminal and read some man pages. Well, not those man pages that can sometimes make our head spin. I'm talking about the funny man pages that will make you laugh out loud.
But first, you have to install the 'funny-manpages' package via Synaptic Package Manager (assuming you are using Ubuntu).

Just look for 'funny-manpages':