Posts Tagged ‘tmux’


Sunday, March 25th, 2012

Woho! Not only a great week at work, but I also managed to squeeze in some other activities as well.

Managed to execute two test cases (yes, that’s a little slow, but there were mitigating circumstances, so all in all I am not too worried, and I did learn from it so it’s all good), got a small lecture in a subsystem (which made me want to tinker with Erlang and mnesia again), went swimming after work one day, and spent Thursday evening at an OWASP event, listening to a very entertaining dude named Jim Manico

There was a change in plans, so the talk wasn’t about Web Application Access Control Design but instead about the ten most critical web application security flaws found on the “OWASP Top Ten Project”-list.

Learning interesting stuff AND having fun at the same time? Oh wait, when I put it like that it just sounds like any other (work)day in my life, but you get the point. Great event, looking forward to the next :)

And Friday evening was spent hanging out with Rikard, Zara and Alfred. All in all, a rather good week.

I did have some trouble with tmux, not all of which I managed to solve.

There were actually two issues, and only one of them have been “solved”, and I use that word pretty lightly because I don’t find the solution particularly good, although it is probably the solution.

  1. Scrolling backwards (up) in an terminal inside tmux is painful. C^b [ sets you in the mode you need to be to enable PgUp to work, but that is not nearly as easy as my muscle-memory-bound Shift-PgUp (plus this also means I need to exit that “cut-mode” or whatever it is called when I’m done scrolling
  2. tmux doesn’t seem to interact all that well with a mouse. I admit, that probably wasn’t high on the priorities, but if I don’t have vim bindings (visual-mode, yank) the mouse is by far the easiest way to copy text from a terminal. Click and hold mouse1, drag over the area to copy, release mouse1, DONE!

The mouse issue is probably easy enough to fix, I suspect I just need to read the man-page better and fiddle some more with the configuration. But I am not so sure about #1. That’s the built-in way to do it… getting something better working there is probably not straightforward at all.

Finally, this week I also “rediscovered” zodiac and I am now pondering whether or not to just use that instead of building my own “makefile blog”-type of thing. I’d need to hack it a bit, there are some things I don’t want to make do without (RSS, prev/next-links, tags) and it would be pretty neat (albeit useless) to have post signing using GPG.



Sunday, March 11th, 2012

Another week, another post :)

I had great fun at work this week. Loooong hours was looooooooooong, but at least I learnt a lot, and that I now have started playing with Wireshark.

Oh, and I got to code some small amounts of Python as well :D

Although most of the saturday was spent sleeping I did manage to discover some links I think I will just have to check out further:

  • Wemux, like tmux, but for multiple persons at once, I foresee this to be useful for either collaboration, such as remote pair-programming, or for lecture-style sessions
  • md2man, create man-pages using markdown and this conversion tool
  • Where Is Safe to Register a Domain Name? I’ll surely be thinking long and hard about this the next time I decide I need another domain

That’s about it for this week, hopefully next week will see normal amounts of work/hours and more free time to play with all the new ideas I got this week.



Sunday, January 15th, 2012

Update: Corrected link, thanks Ulf

This has been quite the busy week. Oodles and oodles of stuff happening, both nice and… less nice.

UEFI + SecureBoot

Microsoft up to no good again. Basically, on non-ARM systems Microsoft requires that a user can disable SecureBoot, but not on ARM systems (i.e. smartphones, tablets, and the upcoming ultrabooks). Anyone surprised?

Music Production

While I have no real interest in producing music myself—code and, to some extent, graphics have always come easier to me—I do have an interest in seeing tools like this come to GNU+Linux as well, since it means that’s one less category of creators not having the alternative to be creative in a free software environment :)


This project seems pretty cool, I haven’t tried it out yet, and the thing about uploading code to the server is something I’ll definitively look into before actually considering executing it, but all in all this looks like a pretty easy SSH tunneling/VPN mimicing proxy thingy solution which could be useful at times.

Especially if it means I can sit at an internet café or some such, and have all my traffic routed över SSH through my server at home, not having to worry about someone in that café sniffing it up.


I installed a local copy of tmux at work, and so far it has been a complement rather than a detriment to the way I work.

The one thing that I wasn’t pleased with at first, but which was trivially easy to fix, once I read a blogpost (also, don’t miss the second post), was that I wanted 11 shells all stacked on top / below eachother, with an even size (i.e. each should take up 1/11th of the tmux window height.

When splitting the window, to make room for another shell, it just divides the current shell height by two, and makes the one part the new shell, and the other part the old shell. For multiples of two I suppose this would work out fine, but with 11 shells?

So I went about it, and the tenth and eleventh shell were small.
But there are different preconfigured layouts, and you loop through them by repeatedly hitting the control sequence (I’ve mapped this to C^a) and space. One of those layouts proved to be just what I wanted :)

Raspberry Pi

Now this is a pretty cool project! For the condensed summary, read the wikipedia page. It is making the dream of a $100 computer a reality, and there are some pretty cool ideas already about how to put it to good use.


Reddit doesn’t like SOPA, and Tim O’Reilly isn’t all that pleased either.

If you’re an Android user, and you don’t like SOPA either, there is an app for letting you know (by scanning barcodes) if a product is made by a pro-SOPA company so you can avoid supporting them.

There have been some advances which means that making a fuzz about it can pay off. Of course, it would be better to scrap those bills completely.

So, 2012-01-18 is still SOPA Blackout day and a whole lot of sites are participating, and you could join in as well (and if you want to join in, please be smart about it and host the javascript your own damn self so that the hosting server doesn’t go down… (which also means, get that javascript now, and not on tuesday evening when everyone else is going to try to get it))


  • Privacy in social networks — not sure I understand how it is done, not sure that this implementation is optimal, but nice idea none the less
  • I read a post the other day, and the author of that post, while being in the right, just came off … I don’t know, but his post was a rant, and not the passionate kind, but the whiney kind, so I won’t be linking to his post, I have no wish to drive traffic to him. However, another person, with reasoning and values more aligned to my own, wrote a reaction post to his, which I feel was more constructive, and nicer, so here is the link to that post
  • Unfair advantages grow from irrational habits
  • Rikard tipped me off to a thoughtful TED talk video, which I liked alot, and through the speakers website I found, among others, this game—EVOKE—which seems to be pretty cool
  • I had the idea of building an image gallery a while ago, so when I came across this link I was a little interested in seeing how they’d approached it, but what I really took away from this site, is how much I liked their rather user-friendly step-by-step manual for getting it up and running
  • I wonder what he will create? :)
  • I don’t know if it’s just me, but non-flashy, low-requirements games make me all warm and fuzzy inside
  • I seem to recall that I wasn’t all that impressed with the unhosted project some time ago. This post (specifically the verification section) is exactly why I hesitate


Sunday, December 18th, 2011


tmux is a terminal multiplexer, resembling screen and seemingly straight-forward to configure.

Now, those of you paying attention will know that I use wmii, a tiling window manager, and you may ask what the difference is between creating one big tmux window and laying out a couple of terminals in that, or letting wmii place those terminals beside each other itself.

The answer is that for most instances, wmii will be enough, but just a little while ago I discovered a killer feature (one which makes me wish that tmux was available at work), namely the abililty to perform:

C^b:setw synchronize-panes

(demonstrated here) which simply outputs whatever you type into one of the terminals, into all the other terminals in this tmux instance as well.

How is this useful? If you have a couple of servers, on which you need to execute the exact same command, you simply start tmux, create a terminal for each server (and log in to that server) and then ask tmux to synchronize the panes, and then you type in your commands.

(Yes, this could probably be easily solved with a bash for-loop as well, depending on the amount of commands and their complexity)

Stupid Shell Tricks

I’ve known about ^foo^bar for a while (i.e. you type
$ some-command wif a typo
and you then do
$ ^wif^with
to have the shell replace the first instance of that typo with the correct spelling (hopefully ;D)

But, this is really only good for typos or when there is ONE instance to replace. ^foo^bar won’t replace EVERY foo with bar, only the first occurrance. Which is sometimes now what you wanted.

Enter !!:gs/foo/bar which replaces ALL instances of foo in the previous command, with bar, and re-executes it. Thanks to for that.


I think I have touched upon this before, but here we go anyway: it is possible to export an environment variable called “LESS” and less will read this and determine any runtime special behaviour based on the contents of the variable.

I am currently trying out export LESS='FiX' where F makes less exit if the contents are short enough to all fit on the screen, i is for case-insensitive search and X for stopping less from sending the termcap initialization and deinitialization strings.

This means that when less exits, it won’t clear the screen (which would be a bummer if using F and less:ing short files…)


A pretty interesting read about how one could “work in the cloud.” I would have chosen other hardware/software (except for vim of course) but to all his/her own, right?

This sounds as if it could be useful for making sure that your logs are really your real logs. Makes sense, right? ;)

From the reptyr readme: reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don’t want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home.

I am apparantly not the only one to get the idea of describing their software stack.

A pretty cool more-utils command, ifne, which continues execution of the rest of the command, iff data was coming into ifne’s stdin.



Sunday, July 17th, 2011

This week has been slow,  I’ve done much writing and little hacking, but today (Friday) as my friend again pinged me about an Excel problem, things started moving.

Problem solving

He had a formula which he’d stared himself blind at, and thus didn’t realize that most of the job was already done, and he just had to add another column where he executed =Q<ROW_NUMBER_HERE>/5

But I’ve been there and done that, sometimes you just need a second, fresh, pair of eyes on the problem.

While trying to help, I attempted to start LibreOffice Calc, didn’t work, it needed of version 0.5.2 or some such. I had refused pacman to upgrade to that version because that would break mocp.

mpd / ncmpcpp

I ended up biting the bullet, replacing mocp with mpd / ncmpcpp, so I think I’ve made @mk happy now ;D

Configurating mpd wasn’t as straight forward as it could have been. The otherwise so excellent ArchWiki actually impeded my efforts by making the first configuration suggestion be to use an mpd user, while only secondly suggesting tying mpd to your primary user account. That solution, of course, I found in the Arch Forums, which simply pointed out that the first suggestion is crap and that the second suggestion is almost guaranteed to work, which it ultimately did.

Configuration of ncmpcpp on the ArchWiki is also something of a joke, and there the solution lay with google. I am going to try establishing a minimal ncmpcpp configuration and complement the wiki.

In replacing mocp I also had to rewrite my wmii keybindings to work with ncmpcpp instead. That was fun, the new scripts where a bit shorter than their mocp-dittos. If this is due to me being a better programmer, or ncmpcpp having a cleaner API I leave unsaid ;)

I did get to use qcp (from renameutils package) to copy the old mocp-scripts into new ncmpcpp and that was a treat for this purpose.


I have begun a little writing project, using vim and LaTeX and wanted to make my writing environment a little more … interactive, so I tried tmux, which is screen-like. It seems pretty nice, although not exactly what I was looking for.

Other than that I also tried conque (which lets vim launch a terminal from inside a vim window). This was more what I was looking for, but to be brutally honest, the modality of vim didn’t translate all to well into that terminal.

I ended up discarding both, for the time being vim, wmii and ye olde urxvt will have to do. At least until I get a better understanding of what it is that I feel is lacking. But tmux piqued my interest. I will have to look into that some more.