Archive for November 1st, 2012

tmux – FreeBSD, BSD* and Linux alterinative to GNU screen terminal emulator

Thursday, November 1st, 2012

tmux gnu screen (newer) alternative terminal emulator for Linux, FreeBSD, OpenBSD
After my yesterday blog post explaining basis GNU screen use, I've decided to blog a bit more on the topic as I find terminal emulation to be quite interesting 🙂

Just like on on GNU / Linux, GNU Screen is available and installable via FreeBSD port – /usr/ports/sysutils/screen. Though screen is compatible with FreeBSD, it is not from scratch written to run on BSD architecture, but rather ported. Besides, that within the fild of terminal emulation, there are plenty of recent developments and feature richer programs available from install already. One of those I reference is tmux..  tmux's is superior to screen in that it is a re-writen terminal (from scratch) terminal emulator – multiplexer (as referenced in man tmux).

Another fundamental difference is it comes licensed under "less restrictive" BSD license (interesting fact is BSD has only 3 clauses), whether to GNU Screen applies GPLv 2 / 3 (4 freedoms clauses).
Tmux is presently existing for multiple architectures besides BSD including Linux and even as I check in its documentation has support for HP-HX and IRIX.

To install / use tmux on FreeBSD / NetBSD install port /usr/ports/sysutils/tmux with

: freebsd# cd /usr/ports/sysutils/tmux
freebsd# make install clean
....

Installing mux on Debian GNU Linux is available straight from default package repositories, i.e. :

debian:~# apt-get install --yes mux
....

It is inteersting fact to mention, since OpenBSD 4.6 – Mr. Theo De Raddt and friends decided tmux to part of the base system! This means a lot since OpenBSD has always existed with the main ideology to be the most secure UNIX / BSD based OS around. This fact probably means from purely secure stand point tmux might be better choice than gnu screen

Another reason why tmux might be better alternative to Screen for BSD users besides security, is its configuration is much more simplistic whilst compared with Screen. If you have used screen, already you should surely know how complicated things are when it comes to configuration and screen (set) variables.

tmux's pre-defined command bindings are similar to SCREEN's, the difference is instead of Screen's:

CTRL + a + (letter)

key bindings are invoked with:

CTRL + b + (kbd letter)
 

People who already are acustomed to screen (like myself 🙂 )  would not be easy to re-learn use CTRL + b, thus it is helpful to revert default tmux CTRL + b  to screen's CTRL + a.


http://niallohiggins.com/2009/06/04/tmux-a-bsd-alternative-to-gnu-screen/

$ echo 'set -g prefix C-a' >> ~/.tmux.conf
$ echo 'bind-key C-a last-window' >> ~/.tmux.conf

Moving over virtual windows in tmux just like in screen can be done using:

CTRL + a + 1 … 9

One has to be careful, as pressing CTRL + a should be done with a llittle delay before pressing the next letter, otherwise the command does not take affect.
 

Detaching emulated session, in tmux is done like in screen with pressing:

CTRL + a + (d [half a sec delay before pressing])

Attaching to latest detached tmux session is done with:

tmux attach

 

There are plenty of other stuff and applications but here I will not get in detail as it is all  in man page.


tmux
is great for BSD users,
but for Linux users  byobu is  more interactive and user friendly (out of the box – with no need for extra configs)

Here are 2 screenshots from tmux website:
advanced tmux use 4 squares split virtual terminals / tmux use screenshot

tmux screenshot with shared multiple wins

Check how webpage looks with Internet Explorer on Linux and FreeBSD with Mozilla Firefox (Netrenderer Firefox plugin)

Thursday, November 1st, 2012

Simulate Internet Explorer in screenshots on GNU / Linux and FreeBSD using Netrenderer in Firefox - Internet Explorer testing tool for web developers on Linux and FreeBSD

I'm not full time web developer. But sometimes, I develop websites too or just had to do some website testing.
I'm using GNU / Linux and BSD as main server and desktop platforms for many years already and hence I don't have regular access to Windows OS and respectively Internet Explorer. In that manner of thoughts it is very useful to have a way to check if a certain website I create displays fine on Internet Explorer 6,7,8 too.

Usually whether I need to test if website displays properly its elements in Internet Explorer I do use the infamous  http://ipinfo.info/netrenderer/index.php – I guess it is almost impossible anyone is developing websites on Linux and don't know it :). Fortunately while I was googling to remind myself about the exact link location to netrenderer, I've stumbled upon Mozilla Firefox add-on extension which does precisely what ipinfo.info/netrenderer/ website does – i.e. renders a website with HTML Web Engine compatible   to most Internet Explorer versions and creating screenshots on how a website would look under Internet Explorer. Of course the plugin is not a panace and since it only makes screenshots whether there are problems with interactivity (Javascript AJAX) of a website on IE will the plugin will be of zero use. However in general it is good to know if at least the website elements are ordered fine.
After the plugin is added in the usual way as any other plugin in FF, you can start using it with keyboard shortcuts:

Ctrl+Shift+F5/F6/F7/F8 – respectively renders the page in IE5.5, IE 6, IE 7 / IE 8 Beta 2

Pressing CTRL + Shift + FX, makes the IE screenshot of site using http://ipinfo.info/netrenderer/

I'm currently running latest Firefox version 16.0.2 and here plugin works, fine I guess on most FF releases not older than few years it should work fine too.

Below is description of the plugin, as taken from plugin website:

IE NetRendered Add-on Description

Adds buttons, tools menu and contextual menu entries to get a screenshot of the current page with IE NetRenderer.

Keyboard shortcuts are also available: Ctrl+Shift+F5/F6/F7/F8 to render the page in IE5.5/6/7/8 Beta 2 (Cmd+Shift+F* on Mac).

Really useful for webmasters which are not using Windows!

You can also access the IE NetRenderer service here: http://ipinfo.info/netrenderer/index.php

Please note that the extension developper is not affiliated with GEOTEK, providing the IE NetRenderer service. You can visit his website here: http://nicopensource.free.fr/