Friday, December 12, 2008

Tabbed terminal under Cygwin using mrxvt tabs


mrxvt is a multi-tabbed terminal emulator that does not depend on various toolkits in Gnome or KDE. And even though the download page of the materm wiki says "Cygwin - currently not available" ... You can get mrxvt up and running under Cygwin as follows:

1) Live on the edge and download the latest unstable version of mrxvt from here to the root directory of the c: drive.
2) In a cygwin bash shell do the following:

$ cd c:/
$ tar -zxf mrxvt-0.5.4.tar.gz
$ cd mrxvt-0.5.4
$ ./configure --enable-everything --disable-debug
$ make
$ make install

$ XWin -nolock -multiwindow -clipboard -silent-dup-error &
$ export DISPLAY=yourIpAddress:0
$ # for example: export DISPLAY=127.0.0.1:0
$ mrxvt -fn fixed -fg green -bg black -g 150x45 --highlightColor green -ls &

NOTE: Many other packages are required to be installed under cygwin for this procedure above to get mrxvt up and running ... here are a few off the top of my head:

1) Cygwin base install
2) gcc
3) make
4) autoconf
5) automake
6) libiconv
7) the entire X11 category of packages
8) all of the cygwin rxvt packages
9) font-misc-misc

NOTE 1: This procedure has been tested on Windows XP Service Pack 2 and 3, Windows Server 2000 Service Pack 4, Windows Server 2003 Service Pack 1, Vista Enterprise, and Windows 7. Please let us know if you get this working under other conditions.

NOTE 2: You can try switching between tabs by using either SHIFT RIGHT/LEFT ARROW (the KDE default) ... or CTRL PAGE-UP/DOWN (the Gnome terminal default)

NOTE 3: if you get the following error when configuring the mxrvt package:
checking for X... no
configure: error: Mrxvt requires the X Window System libraries and headers.
Then you will need to make sure you installed the "make" package from cygwin.

NOTE 4: There is no bootstrap.sh in the mrxvt-0.5.4.tar.gz download, so it is no longer needed for installation.

NOTE 5: the startxwin.sh is no longer distributed with Cygwin/X ... if you were using that script or a custom script from your /usr/X11R6/bin directory you will need to remove the PATH, XAPPLRESDIR=/, XCMSDB, XKEYSYMDB, and XNLSPATH environment variable declarations at the top, since all of the X11R6 directories are moving around with these latest releases of Cygwin/X packages.

Hope that helps.

17 comments:

JuniperGuy said...

Hey Vernon. I tired both the older and the newer instruction sets you gave. The older version actually opens up a shell but I cannot get the last line of the commands listed to execute and do anything (the ones that change the colors etc.). In additon I can;t figure out how to CREATE a second or subsequnet tabs. You gave instructions on how to move betweent tabs but I can;t figure out how to CREATE tabs.

Also, I donwloaded and isntalled the newer version 5.4 and when I ran the isntrcution set you gave I get what appears to be a fatal error:

Checking size of char...configure: error: cannot compute sizeof (char)
See 'config.log' for more details

The config log is huge and i don's knwo where to begin looking but I am sure it is fatal because if I go ahead and try the "make" command in the next step it tells me that the command does not exist.

Any ideas would be greatly appreciated.

Thanks

Brian

Vernon Singleton said...

Email me at the address above and I'll help with that issue. It looks like you need to install a cygwin package called "make" among others.

Unknown said...

Hi Vernon,

Thanks for the updated guide. I can confirm this method also works with Vista Enterprise.

dave

Anonymous said...

I'm also using mrxvt under Cygwin in Vista Enterprise. I like it quite a bit, and I use it for ssh/telnet to network gear. Mrxvt+ssh+expect+mkshortcut script+csv device list=fully automated logins to hundreds of network devices from various vendors.

My only complaint (a big one unfortunately) is the ugly default non-Freetype fonts combined with what appears to be flaky xft support.

Mrxvt is solid using standard 0.5.4 tree until I install their example .mrxvtrc file which enables xft. The fonts look 100% better, but about 20% of the time, mrxvt hangs before login and hogs 50% cpu. The next time, it works fine. I have tried the latest svn release, but the hangs are replaced by mrxvt opening then closing before login. This appears to happen more often than the hangs in 0.5.4.

I guess I can't have everything... a stable non-KDE/Gnome dependent multi-tab terminal with great looking fonts. Maybe I can get some help from the mrxvt-devel mailing list.

Vernon Singleton said...

If you are having issues with mrxvt hanging or closing before login like Jim, then you may want to look at my recent post on a potential work around for these issues.

Silversleeves said...

I like it. I happened to have a title bar tweak running in my xterm and rxvt and it shows up in the tabs without a hitch. Be sure you have a convert (or rather, whoever first tweaked mrxvt for use in Cygwin does).

BZT

Shmerl said...

Hi Vernon.

I tried to follow your instructions and got the same error as JuniperGuy above. configure failed with the same error:

checking size of char... configure: error: cannot compute sizeof (char)
See `config.log' for more details.


Did you figure out how to solve it?

Vernon Singleton said...

He never emailed me, so we did not figure out the issue. So, email me at the address above and I'll help with that issue. Go ahead and send me your config.log file, too.

Anonymous said...

install libiconv to fix the compute issue.

Anonymous said...

Working under Windows 7 with Cygwin 1.7 beta.

Anonymous said...

Thanks Vernon.

Works like a charm.

(Windows XP SP3; Cygwin 1.7.1)

Anonymous said...

This post is incredibly useful. I'm quite new to cygwin (and to windows), so I do not know if I've been doing things wrong. So here are three criticisms:

Unicode doesn't seem to be supported.

Easy to switch tabs, but difficult to change the order of tabs (Ctrl+Shift+PgDown on my home Debian box).

Somehow, Ctrl+Shift+T when creating a tabs pulls you back to your home directory.

These are the three things that I find a pain with the setup you proposed for mrxvt.

Otherwise, it works like a charm. Many thanks.

BuzzKill said...

My biggest problem with mrxvt in cygwin is this ....

I use it for ssh primarily. I open different ssh sessions one in each tab in mrxvt. But if I ever to ctrl + c inside a ssh session, instead of sending break in the ssh session, it sends break to the ssh command thereby ending my ssh. I also have xterm, rxvt, aterm in cygwin and those don't have this problem.

I'm not sure how to fix this. For now, I've given up on mrxvt.

Anonymous said...

Thanks a lot Vernon I have linux habit of playing in tabs and was looking for something like this one.

One thing though fonts size ? how do I increase it?

Jose said...

Thanks a lot for the guide! It worked like a charm for me.

Tom Roche said...

@Anonymous re "fonts size ? how do I increase it?" goto

http://materm.sourceforge.net/wiki/Main/Documentation?action=download&upname=mrxvt.1.txt

and search="Font related options"

bekzod said...

HI , my name is bekzod . I instaled step by stepfrom ur post, when i run mrxvt -fn fixed -fg green -bg black -g 150x45 --highlightColor green -ls &

first time it run but when i close cygwin later and open it again

I am getting error -
$ Error opening display (null)
i have win7 x64
cygwin x86_64
Can you help me please?
biggizod@yaho.com