11 December 2011

27. Linux: some applications

Here are some linux tools which I've found myself using:
_Terminal/cli_:
email -- mutt
chat -- mcabber
spreadsheet -- sc, sed + gawk, python
calculator -- bc
editing -- vim, nano
browser -- elinks
music -- cplay
plotting -- gnuplot
maths -- octave, maxima
Gnome (some of these I use only in the terminal, so I list them twice):
terminal -- guake
latex -- gvim, texmaker, latexilla
editing -- gvim, gedit
plotting -- gnuplot
maths -- octave, maxima
system stats -- conky
email -- evolution
chat -- gajim
browser -- chrome
video -- vlc
music -- mostly cplay in cli, but otherwise vlc
crypto -- truecrypt
password management -- keepassx
I probably spend 90% of my time using vim since, being a 'simple' editor, it's so versatile. Before taking the time to learn vim, I used gedit (and to a smaller extent nano) for the same purpose. Nano is fine, but vim is more ubiquitous (in the form of vi) and has an excellent tutorial included. I simply don't know what the full capabilities of nano are -- maybe it's only as powerful as, say, notepad, or maybe it can do everything vim can.
I gave emacs a serious try about a year ago, and it didn't suit me. I do appreciate that emacs can be considered as an OS almost in itself, but since I believe in the idea of one program - one task, and find vim more user-friendly (not meaning learner-friendly, although it is too) I felt more motivated to get serious with vim. Two weeks with emacs brought me to the same level as two rather relaxed evenings with vim.

26. Linux The Basics: the evolution of a user

I've used linux for a few years by now, and I find that how I do things have changed over this time. In other words, the way you use linux will change and evolve as you learn more. I never experienced this in windows -- there you click your way around, and you quite easily become stuck with a handful of applications and a way of doing things.

In the beginning, I dual-booted. Windows at work, where I would use originlab's origin, micromath scientist, excel etc. Linux at home where I'd browse the web, check email and chat. That lasted for a month or so, until I become confident that virtualbox could handle a copy of XP.

For about a year I persisted in doing most of my personal work in linux, and using virtualbox to run origin, use word to write articles etc. At least that way I only had to boot one operating system and could make the initially frightening step of removing windows for ever (you're a green linux user without anyone to help you, you have a paid job relying on you being able to use your computer, and you sever the ties with an OS which has been with you since 1993? It's frightening)

Making the transition complete required finding native ways of doing things. Instead of using origin I used gnuplot. I started using latex via texmaker. sed + gawk with a little bit of python has been a great stand-in for excel (there's always gnumeric as well). Latex has replaced powerpoint as well - I don't know why it never occurred to me before to use pdfs for presentation. I mean, it makes a whole lot more sense using something that's designed to be portable (fonts is the one theoretical issue) and which is pre-compiled. Rendering on the fly as powerpoint does is just asking for trouble (and as anyone who's ever been to a conference can confirm, a fair proportion of powerpoint presenters experience problems of some sort).

I've also slowly moved form using gnome with its tools, to using the terminal. Some things simply don't need a fancy gui. While at first I used gedit under gnome and nano in the terminal, I now use vim and gvim. While vim takes an hour or two to learn well enough to use, it is worth it for the convenience of a powerful keyboard-driven and ubiquitous editor. I also use vim for editing latex documents. Mutt is good enough for email when you don't need a gui, mcabber is less intrusive than gajim if you're busy, etc. And you can use them remotely. There's nothing that can be done in matlab (which exists for linux) that I can't do in octave. I don't need mathematica since I use maxima (they are not equivalent -- but I use maxima for symbolic math and octave for numerical stuff. I've dabbled in R as well, and while it's powerful I find the behaviour of it being a bit unpredictable -- R tries to second-guess what you want to do, and often gets it right. But not always).

There's no right way (but plenty of wrong ones -- if all you are doing in linux is installing explorer and msn in wine, then why bother?) of using linux, but what I do find satisfying is that you have the freedom to create your own workflow.

Where I am today: using Linux is no big deal. I don't think about it except when explicitly confronted with another OS. It's as second-nature as using windows once was -- you knew there were people out there using something infuriating and ridiculous-looking called MacOS  going 'eep' at inopportune moments, and that there was something hardcore called UNIX (Jurassic Park -- 'It's a UNIX system. I know this!'. That was 1993 btw.) Linux is just the way I do things, and I no longer evangelise. It might be age too -- you tend to be less religious about things as you get older. If people are willing to expand their horizons and feel that using linux makes sense, then I'm willing to help. If they are happy where they are today, that's fine too. Just don't email me any doc, docx or xls files where simple text files or a pdf would do -- that's just presumptuous in the other direction.

The main problem which hasn't been solved to this day is actually word. I can't stand the fetid piece of excrement (most people have at some point been frustrated by self-moving figures or odd formatting incidents), but if you collaborate with other people in writing articles and those people aren't willing to spend the time necessary to learn LaTex, you're pretty much stuck. Well, articles are better written by a single author anyway - writing by committee never flows. Anyway, turns out Office 2003 installs just fine in Wine. At this point, I find it difficult to understand why people insist on using binary formats like .doc and docx even for unformatted text. LaTeX works for me, and it suits my way of working.

Anyway, each to his or her own. The main challenge for a linux user isn't so much how to configure a certain piece of software as in finding out about the existence of the piece of software in the first place.

25. Linux The Basics: Google talk using Gajim or mcabber

Empathy is the stock gnome chat client, gajim is a REALLY versatile python-based chat client which integrates with gpg/pgp and mcabber is a command line chat client.

While I used empathy for a few years, I much prefer gajim. Partly it's the geek cred that comes with using something a bit less common, but mostly it's because it 1) supports gpg, 2) is highly configurable and 3) is easy to use. It's available in the debian repos. I like mcabber over centerim for the same reason - gpg support. Now, if I only had friends who were as paranoid as I...

[gajim]
Jabber ID: youruser@gmail.com
Resource: Gajim
Priority: adjust to status

Hostname: talk.google.com
Port: 5223

If you use gpg, go to the Personal information tab
You don't need to select 'Use gpg agent' (gpg agent segfaults on one of my boxes)


[mcabber]

The following goes into ~/.mcabber/mcabberrc

set color_background=default #allows transparent background

# Account
set jid = youruser@gmail.com
set password = areallylongandcomplicatedpasswordwhichyoullneverremember
set server = talk.google.com
set port = 5222
set ignore_self_presence = 1 #show self in list?

# GPG/PGP
set pgp = 1
set pgp_private_key = "01100110C1C1C1C1" # get the Key ID from seahorse 
set pgp_passphrase_retries = 3

set nickname = blofeld
set spell_enable = 1
set spell_lang = en_GB
set spell_encoding = UTF-8
set cmdhistory_lines = 250
set roster_display_filter = ofdna
set max_history_blocks = 8
set message_autoaway = Auto-away (idle)
set escdelay = 50

alias me = say /me
alias online   = status online
alias away     = status away
alias dnd      = status dnd
alias notavail = status notavail

bind 17 = roster unread_next
bind 24 = roster alternate
bind 269 = roster toggle_offline
bind 276 = roster toggle
bind 521 = buffer up
bind 514 = buffer down