Wednesday·11·April·2012
Tools for CLI Road Warriors: Remote Shells //at 19:44 //by abe
Most of my private online life happens on netbooks and besides the web browser, SSH is my most used program — especially on netbooks. Accordingly I also have hosts on the net to which I connect via SSH. My most used program there is GNU Screen.
So yes, for things like e-mail, IRC, and Jabber I connect to a running screen session on some host with a permanent internet connection. On those hosts there is usually one GNU Screen instance running permanently with either mutt or irssi (which is also my Jabber client via a Bitlbee gateway).
But there are some other less well-known tools which I regard as useful in such a setup. The following two tools can both be seen as SSH for special occassions.
autossh
I already blogged about autossh, even twice, so I’ll just recap the most important features here:
autossh is a wrapper around SSH which regularily checks via two tunnels connect to each other on the remote side if the connection is still alive, and if not, it kills the ssh and starts a new one with the same parameters (i.e. tunnels, port forwardings, commands to call, etc.).
It’s quite obvious that this is perfect to be combined with screen’s
-R
and -d
options.
I use autossh so often that I even adopted its Debian package.
mosh
Since last week there’s a new kid in town^W
Debian
Unstable: mosh targets
the same problems as autossh (unreliable networks, roaming, suspending
the computer, etc.) just with a completely different approach which
partially even obsoletes the usage of GNU Screen or tmux:
While mosh uses plain SSH for authentication, authorization and key exchange the final connection is an AES-128 encrypted UDP connection on a random port and is independent of the client’s IP address.
This allows mosh to have the following advantages: The connection stays even if you’re switching networks or suspending your netbook. So if you’re just running a single text-mode application you don’t even need GNU Screen or tmux. (You still do if you want the terminal multiplexing feature of GNU Screen or tmux.)
Another nice feature, especially on unreliable WLAN connections or laggy GSM or UMTS connections is mosh’s output prediction based on its input (i.e. what is typed). Per line it tries to guess which server reaction a key press would cause and if it detects a lagging connection, it shows the predicted result underlined until it gets the real result from the server. This eases writing mails in a remote mutt or chatting in a remote irssi, especially if you noticed that you made a typo, but can’t remember how many backspaces you would have to type to fix it.
Mosh needs to be installed on both, client and server, but the server is only activated via SSH, so it has no port open unless a connection is started. And despite that (in Debian) mosh is currently just available in Unstable, the package builds fine on Squeeze, too. There’s also an PPA for Ubuntu and of course you can also get the source code, e.g. as git checkout from GitHub.
mosh is still under heavy development and new features and bug fixes get added nearly every day.
Thanks to Christine Spang for sponsoring and mentoring Keith’s mosh package in Debian.
Update: I gave a lightning talk about Mosh and AutoSSH in German at Easterhegg
2012. The slides are available online.
Tagged as: autossh, Bitlbee, Debian, GitHub, GNU Screen, IRC, irssi, Jabber, mosh, mutt, PPA, Squeeze, ssh, SSH, Testing, Ubuntu, Unstable
// show without comments // write a comment
Related stories
Sunday·08·March·2009
Sedating irssi’s nick highlight for microblogging messages //at 17:13 //by abe
My favourite IRC client is irssi. I like it so much that I even use it for all my instant messaging needs. The gateway of choice between irssi and mostly Jabber is Bitlbee.
I also microblog on identi.ca, a free (free as in AGPL) microblogging service based on laconi.ca. In comparsion to the non-free and proprietary Twitter microblogging, identi.ca has all the features which Twitter turned off already again.
For me the most important feature of Twitter was tweeting via XMPP (aka Jabber). Since Twitter turned off that feature, Twitter increasingly fast became unimportant for me. Identi.ca still has this feature and cultivates it further. So usually don’t visit the identi.ca website that often anymore but get the microblogging stream of my friends via XMPP and Bitlbee directly into my irssi.
Although this is very convenient, it has one big disadvantage: In comparison to an IRC channel, not only notices directed to me personally but every incoming notice beeps, because Bitlbee sends them either as /MSG or prepends my nick name. For normal IRC communication /MSG should beep, and you can’t make exceptions for that so easily in irssi.
I asked on #bitlbee (OFTC) and on #irssi (IRCNet). On #irssi funnily the first answer was “I tried that yesterday, no success” from Shrike. — So I’m not alone, although Shrike uses Jaiku and not identi.ca. Then I had the idea to get Bitlbee to not prepend my nick name for all those identi.ca notices which go into the &bitlbee channel — but I didn’t find a way to configure this in Bitlbee. But Shrike found a way to do this with already existing irssi plugins:
The trigger.pl plugin (available e.g. in Debian’s irssi-scripts package or on scripts.irssi.org) can add triggers which replace parts of the message. So the following three lines helped me to reduce the noise microblogging causes in my irssi:
/script load trigger /trigger add -publics -masks 'identica!update@identi.ca' -channels '&bitlbee' -regexp "^XTaran: " -replace '' /trigger save
And on the command line I just needed a symlink to automatically start the trigger plugin on irssi startup:
ln -vis /usr/share/irssi/scripts/trigger.pl ~/.irssi/scripts/autorun/
So now again only the important messages beep. :-)
Tagged as: #bitlbee, #irssi, AGPL, Bitlbee, deb, highlight, identi.ca, IM, IRC, IRCNet, irssi, Jabber, jaiku, laconi.ca, microblogging, OFTC, Perl, plugin, Shrike, trigger, Twitter, XMPP
// show without comments // write a comment
Related stories
Wednesday·11·February·2009
Favourite Linux Desktop Applications //at 15:01 //by abe
foosel tagged me, whatever that means. Perhaps it’s the English word for “Stöckchen” (German for “small stick”) of which I always wondered how the English blogging part of the blogosphere is calling that kind of coercing blog posts… ;-)
So these are the rules:
- blog a list with your favorite desktop Linux software (as many or few you want)
- add links to the software project’s websites
- post these rules
- tag three other Linux using bloggers
Interestingly splitbrain, who started the thing just calls it “Meme”, but to me memes are the same thing just without duress. ;-)
So you want to know about what Linux desktop software I like and use, hmm? Desktop means GUI, doesn’t it? There are only a few GUI application I really use often since, as you probably know, X is primarily a terminal multiplexer and screen resolutions are compared by how many 80×25 xterms with fixed font you can get on one screen without overlapping. ;-)
But to be honest: Although I’m more the command line guy hacking cryptic lines into windows with small fonts, there are a few thing where I don’t want to miss X and the GUI applications: For all things web – that means web browser, feed reader, etc. But then there is also a bunch of GUI software I use occasionally or as alternative tool to some text mode or command line software.
Web
Liferea – My favuorite feed reader although it takes ages to start and since a few days also starts crashing, probably since I have configured it to cache up to 1000 items per feed and have subscribed to several hundred feeds.
I do not read them all though, but I use them togther with Liferea’s “search all feeds” feature as a Google News replacement. ;-) I though read a lot of feeds in it, since I use it for news, blogs, webcomics and to read missed tweets on Twitter. It organizes the feeds in a tree structure so I can easily group different types of content together.
Opera – I’m back using Opera as my primary web browser since they offer alpha versions for 64-bit Linux.
Initally I started using Opera with version 3.60 on Windows 95 somewhere about 10 years ago and I’ve always come back to it when no current free browser fits my needs.
Although it hasn’t an AddOn possibility as Firefox has, I still prefer it over the bloaty and leaky and quite unstable Firefox 2, since it offers nearly every functionality I need (mainly mouse gestures and a flexible tab management), is fast, needs less RAM and is quite stable for an alpha version. And Firefox only offers those features I need via Addons which are often the cause for leaking or crashing. Haven’t tested Firefox 3 yet, but it’s said to be be less bloaty…
Kazehakase – Formerly I used kazehakase as my primary web browser since I really like its user interface, but the version in Etch is quite slow and seems to have memory leaks. It’s currently the second browser I have always open. But since my browsers always have uptimes in terms of months I don’t need web browsers that are leaking, so I’m thinking about replacing it with something more stable.
Conkeror – A Gecko 1.9 (i.e. Firefox 3) based web browser completely controllable with the keyboard. And the key bindings are those from Emacs and partially also from the classic text-mode browser Lynx. Will be available in Debian Experimental soon.
Netsurf looks very promising as it’s a simple and fast browser with it’s own rendering engine and originating on RISC OS. But since I’m a heavy tab user (60 tabs in one window are not really seldom), a browser (yet) without tabs isn’t really that useful for me. But I hope it will get tabs soon.
Midori – The other upcoming new browser in the Linux world is using Apple’s WebKit (which itself is based on KDE’s KHTML) underneath. Only in Experimental yet (form a Debian point of view :-). Use it on my Debian Sid machine to play around with it.
Twitux – A simple GTK Twitter client which doesn’t clutter the screen with unnecessary icons or buttons. Just a small menu bar, status bar and the tweets.
Azureus – In the seldom case where I need to download files via Bittorrent I either use Opera’s builtin client or Azureus. The nice thing about Azureus is that you can get nice graphical as well as textual statistics about all aspects of your downloads.
X / Desktop Environment
FVWM – My favourite window manager for normal, big or multiple screens. I use it since more than 10 years (twm and tvtwm were its predecessors) and its configuration has evolved since then quite a bit to tinted transparent window frames and title bars, etc.
I tried other window managers in between (e.g. Sawfish and GNOME’s own Metacity, each for a month or so and both together GNOME, also played around with KDE on one machine) and I always came back to FVWM. No other window manager is so fast and configurable in regards of keybindings. Handles multiple screen very well and out of the box, too.
ratpoison – My favourite window manager for small screens (less than about 1024×768, e.g. on my EeePC, on the 8” touchscreen connected to my MicroClient Jr. or on my 1996 ThinkPad 760ED with 133 MHz Pentium 1) since it doesn’t waste screen space for window borders or title bars. It just maximizes all windows by default to screen resolution. You then can manage (split, resize, switch, close, kill) windows as you are used to manage shells and text-mode applications with screen(1). Doesn’t work that well with multiple xrandr managed screens though if they don’t have the same size.
FLWM – The Fast and Light Window Manager. My favourite low-end but still DAU compatible window manager. Use that on demo and guest accounts, especially on low end machines.
Synergy – connects displays of other computers (not only X but also even Mac or Windows) with your mouse and keyboard similar to a KVM switch. I use it at work to add my laptop as fourth monitor. ;-)
trayer – A desktop environmen independend system tray developed by the FVWM Crystal Project. Since I changed from manually editing /etc/network/interface on my laptop each time I came into a new wireless LAN to using GNOME’s Network Manager, I needed a system tray for the nm-applet. Trayer is quite easy to configure using command line options and can handle tinted transparency as I use with FVWM and ATerms. So it fits in perfectly.
- ratmenu and dmenu – For showing generated menus together with ratpoison, I use ratmenu (e.g. as replacement for ratpoison’s non-interactive window list) and dmenu (e.g. as application menu using my own wrapper which generates the menu from some config file). Probably will publish that code once it proved itself stable.
xtrlock – the simplest tool to lock you desktop: The mouse turns into a lock and it only goes away if you enter the right password. No screen saver included though and everyone can see what’s on your desk. I like it though. Use it on low-end machines.
xosview – my favourite system monitor since more than a decade.
XScreenSaver and Really Slick Screensavers (GLX Port) – Configurable and command controllable screen saver daemon. Favourite modes: GLMatrix and Substrate from XScreenSaver and Lattice Sky Rocket and Hufo’s Smoke from RSS GLX.
Terminals
xterm – there is no better X terminal emulator than the original xterm. I found no other terminal which is so fast, has no problems with text-mode applications (aterms break aptitude’s display), no problems with character set encodings, which can be embedded into other applications and which has a fully working classic Unix cut & paste.
aterm – When I need a fancy transparent terminal for showing a fancy desktop, I use the AfterStep Terminal Emulator aterm. In that case, the system tray, the window borders, the window’s title bar and the terminal on my desktop have the same fancy tinted transparency.
yeahconsole – A wrapper around xterm which works like the pulldown console in quake. Good for the short shell usage inbetween. ;-)
The other similar pull down consoles I know (KDEish yakuake and GNOMEish tilda) had some issues with focus and keybindings while yeahconsole works just out of the box and showed no problems until now.
Audio and Video
XMMS and Audacious – If I want to play a single list of files of the same file format or single stream, I usually use the command line tools mpg123 and ogg123. But if I need anything more fancy or more flexible, I prefer the WinAMP clones. Formerly XMMS, nowadays Audacious. Both with some old skin which I use since more than a decade and which I initially used with WinAMP 2 on Windows 95.
mplayer – no fancy GUI, easily controllable with the keyboard, plays most video file formats I can remember. ;-)
Editing and Developing
GNU Emacs – I’ve been raised with GNU Emacs and Lisp at university, so I’m quite sticked to that. I usually only start one Emacs instance and connect to it using emacsclient. I also like TRAMP for editing remote files. but I don’t need it that often.
On machines, where I don’t want a full blown Emacs installation or under root I prefer GNU Emacs’ little brother GNU Zile (Zile Is a Lossy Emacs), but that’s text-mode and no GUI software.
OpenOffice.org – I think it’s a really great software, but I use it quite seldom, usually only when I have to open some file in a Microsoft file format. For writing letters, articles, presentations and so I have LaTeX.
Gnumeric – My preferred spreadsheet application. Although for some purposes I use the OpenOffice.org spreadsheet, usually when Gnumeric has not all necessary features.
Graphics
xv – Yet another tool I use since more than a decade: No other image viewer is so fast and yet so easy to use with both keyboard and mouse. Open source, but unfortunately not (yet?) free software.
keyjnote – fancy PDF presenter with a lot of interactive features.
pdfcube – PDF presenter turning pages as a cube as compiz or Macs do with the desktop.
Chat
Pidgin – I usually use irssi inside a screen for IRC as well as Jabber and ICQ (via Bitlbee), but I also often have a local Jabber client running which then is Pidgin (formerly known as GAIM).
Other Tools
Unison – I use it to synchonise the cache and state of my feed reader between laptop and workstation. And I do indeed prefer the GUI version over the text-mode version. I use the text-mode only if I use it from some remote location.
XKeyCaps – The ideal tool to wreck you keyboard layout. ;-)
XGnokii – Used it to backup my former Nokia mobile phones, the 6130, the 6210i and the 6310i. Doesn’t work anymore with my new E51, though.
Sunbird / Iceowl – Not really using it yet, but I plan to use it as my primary calendar tool.
QEMU / KVM / KQEMU – My favourite desktop hardware emulator. (For servers, I prefer Xen for virtualization.)
Games
- ScummVM
- Planet Penguin Racer / Extreme Tux Racer (all forks of Tux Racer)
- Frozen Bubble
- Battle for Wesnoth
- cuyo, xpuyopuyo, flobopuyo
- Sauerbraten
- PrBoom / Freedoom
- Neverball / Neverputt
- Briquolo
- xfrisk
- Icebreaker
- XBomb
Non-Desktop Applications
In case someone wonders about my mail client, Jabber client, IRC client, ICQ client, file manager, notes taking application, shell and versioning system – they’re all command line or text-mode applications:
- E-Mail: mutt
- Chat, Instant Messaging: irssi + Bitlbee + GNU Screen
- File management: coreutils (and sometimes busybox ;-)
- Notes: hnb
- Shell: zsh
- Version control: Subversion (svn), Mercurial (hg)
Who’s next?
That’s difficult:
- maol would be interesting, but since a while he just blogs in Jeopardy style, so he would need pack all those programs into the subject of his blog post… No, not a good idea.
- Venty! No, has no active blog anymore.
- Dieter! No, no Linux user.
Hmmm, I think I have to look in a different corner of my circle of friends. Hmm. Ah, now I know:
- dyfa – not really a Linux user, but I guess FreeBSD is ok, too. :-)
- nion – this will be really interesting. He even uses more strange software than I do. ;-)
- alphascorpii – no idea what she prefers (except that it will be available as Debian package ;-)
And no, I don’t expect posts as comprehensive as mine. :-)
Tagged as: alphascorpii, aterm, Audacious, Azureus, Bitlbee, Conkeror, Debian Experimental, desktop, dmenu, dyfa, Emacs, fancyness, Firefox, FLWM, foosel, FVWM, GAIM, gnokii, GNOME, GNOME Network Manager, Gnumeric, GUI, Iceowl, ICQ, IRC, irssi, Jabber, Jeopardy, Kazehakase, keyjnote, KQEMU, KVM, Liferea, Linux, maol, Meme, Metacity, Midori, more than a decade, mpg123, mplayer, Netsurf, nion, ogg123, Open Source, OpenOffice.org, Opera, Other Blogs, pdfcube, Pidgin, Planet Debian, Planet Dokuwiki, QEMU, ratmenu, ratpoison, RSS GLX, Sawfish, splitbrain, Stöckchen, Sunbird, synergy, tilda, trayer, tvtwm, Twitter, Twitux, twm, unison, Venty, web browser, WinAMP, window manager, Windows 95, X, XKeyCaps, XMMS, xosview, XScreenSaver, xterm, xtrlock, xv, yakuake, yeahconsole, zile
// show without comments // write a comment
Related stories
Thursday·02·March·2006
I love and hate Unicode //at 02:30 //by abe
When I first saw Joey’s wish for a Unicode bumper sticker, I just parsed
![I [?] Unicode](http://noone.org/static/unicode.png)
as a little bit sarcastic »I ♥ Unicode«, but when nion posted it, too, I noticed, that it may also be
read as »I ☠ Unicode«. Maybe, that this — both — is
exactly what Joey intended to say, and I have to acknowledge this: I
hate Unicode in my mutt since Sarge because it doesn’t work
with screen out of the box anymore, and I hate Unicode in my
Emacs since Emacs 20 because it screws up everything. But I
love Unicode in my irssi and on the web. Strange world. But
this virtual bumper sticker expresses that feeling somehow perfectly.
Tagged as: Emacs, irssi, Meme, mutt, Other Blogs, Planet Debian, Sarcasm, screen, Unicode
// show without comments // write a comment
Related stories
ii: irc improved — or just ircii without “irc”? //at 02:01 //by abe
On #debian.de nion pointed me to a new, ingeniously sick project of him: ii or irc improved, an IRC client with a radically new concept: Input is a FIFO, output is directly into the logfiles organised in a irc/$SERVERNAME/$CHANNELNAME directory hierachy. You just irc by reading the logs and piping to some FIFO.
He immediately took my only half serious comment that he could use loco for nick highlighting.
Looking further through his blog, I mentioned, he was experimenting
with IRC clients not only since ii. He was trying WeeChat instead of irssi.
Tagged as: #debian.de, Debian, Hacks, ii, IRC, irssi, Open Source, Other Blogs, Shell, Text Mode
// show without comments // write a comment