Best terminal environment for Cygwin/Windows?

WindowsCygwinRxvt

Windows Problem Overview


Today I run Cygwin with rxvt using the following startup line:

rxvt -bg black -sl 8192 -fg white -sr -g 150x56 -fn "Fixedsys" -e /usr/bin/bash --login -i

This gives me a resizeable native Windows window which is much better than the standard "DOS box" the default cygwin.bat provides.

However, the current configuration does have a couple of issues:

  1. I am not able to enter non-ASCII characters into the terminal window (i.e. æ, ø, å and Æ, Ø, Å, which I use semi-frequently. In fact, the terminal will not even accept them when I paste them into the window. If I paste a string like "bølle" (Norwegian for "bulley"), all I get is "blle".
  2. I am not able to render UTF-8 character, they only show as ?, even if they are supported by the font (i.e. when rendering the same characters in ISO-8859-1 they show just fine.).

I am running English Windows Vista with locale and keyboard layout set to Norwegian (ISO-8859-1 character set?), but I've had the exact same issue on Windows 2000 and XP.

Anyone knows how to fix this (i.e. a better way to configure rxvt)?

Apart from the issues mentioned above, I'm very happy with rxvt, so if I find a way to resolve them I'd like to continue using it. However, if the issues are not (easily) solvable, are the any other good terminal solutions for Cygwin?

Update

The solution provided by Andy and Mattias (editing the .inputrc file) did solve the input problem, but output rendering is still an issue. Output is fine when I render in ISO-8859-1, but when using UTF-8 I only get ? for non-ASCII characters. This behavior is consistent between rxvt, urxvt (under Cygwin XFree X Server), mintty and PuttyCyg.

Is there a similar configuration file where output encoding can be set (i.e. the equivalent of setting output locale on a Linux system)?

Windows Solutions


Solution 1 - Windows

minTTY is also pretty good. You can find it in cygwin's setup. Supports re-sizing, pasting, and transparency.

Solution 2 - Windows

I'm currently using PuttyCyg (http://code.google.com/p/puttycyg/). I'm not sure if it will contain fixes needed by you, but it has several other cool features, for example configurations stored to typical putty profiles, which can be invoked like: putty -load mycygwin1. Such profile can configure things like:

  • logging sessions to a file,
  • character sequences for delete, home, and other keys,
  • window colors and fonts.

Edit: it is possible to enter chars you mentioned. UTF-8 support is also provided (it has to be turned on in configuration).

Solution 3 - Windows

Add the following two lines to the readline config file ~/.inputrc

set convert-meta off
set output-meta on

Should work both in rxvt and mintty. More here:

http://www.gnu.org/software/bash/manual/bashref.html#Readline-Init-File-Syntax

Solution 4 - Windows

I'm using Console as well. Console allows you to customize font, background, etcetera and also has a tabbed interface (great if you use more than one terminal window at once).

In order to be able to use non-ASCII characters I have put the following in my .inputrc file in my home directory:

set meta-flag on
set convert-meta off
set output-meta on
set completion-ignore-case on

Solution 5 - Windows

Being four years old, at the time of writing, the meat of the question has gone off: the default Cygwin terminal now accepts pasting of, and renders, non-Ascii characters without formality, at least for me. Cygwin's default terminal is now mintty and Cygwin now operates with UTF-8 by default. (For example, /etc/profile.d/lang.sh now sets a UTF-8 character set encoding by default.) There's now a 64 bit version of Cygwin but, per http://www.cygwin.com/ml/cygwin/2013-09/msg00029.html, no 64 bit port of rxvt.

Even the question in the title is less vital than once it was, as mintty doesn't grate like the old Windows command console subsystem windows. Still, I'll plug the project I co-maintain: https://github.com/software-jessies-org/jessies/wiki/Terminator, which was written for UTF-8, possibly from day one, though its main selling point, imo, is the Find feature.

Solution 6 - Windows

You may need to set the codepage.

Check your current :

$ set | grep CYGWIN
CYGWIN='codepage:oem nodosfilewarning'

If you have not the codepage, then add to your ~/.bashrc file:

CYGWIN='codepage:oem nodosfilewarning'

The contents of my Cygwin batch (Cygwin.bat) file, started by a shortcut, are:

start C:\cygwin\bin\rxvt.exe -sb -sl 3000 -fg gray -bg black -fn "Lucida Console-14" -e /bin/bash --login -i

Note that for the CYGWIN environ variable you can have multiple items, each seperated by a space. Other items that can be used: { tty binmode title }.

More info can be read here: http://www.cygwin.com/cygwin-ug-net/setup-env.html

A related note: you can also use mrxvt for Cygwin. It requires an X server, and a nice solid/lightweight solution is to use Xming. I compiled mrxvt and installed it - not really hard to do, and it works great.

I use rxvt as an initial window, then launch mrxvt as a seperate process from rxvt by using an alias command, then close rxvt. This makes mrxvt its own parent process, and has no cmd sessions attached.

I made an alias to do this:

alias mrx='export DISPLAY="127.0.0.1:0.0"; $(/usr/local/bin/mrxvt &); echo -e "\033c"'

For ease I created a batch file to start Xming and rxvt:

@echo off
start C:\cygwin\bin\rxvt.exe -sb -sl 3000 -fg gray -bg black -fn "Lucida Console-14" -e /bin/bash --login -i
start C:\Xming\Xming.exe :0 -clipboard -multiwindow -trayicon
exit

This batch file is launched by a windows shortcut. This has worked well for me.

Solution 7 - Windows

I've been using Console which works pretty well with Cygwin (as well as PowerShell and plain old cmd.exe).

Solution 8 - Windows

When I was developing on Windows I found Poderosa to be a good choice for Cygwin.

Solution 9 - Windows

Standard Cygwin/X with xterm is good enough for me. Install the Cygwin X.org package, then run the script C:\cygwin\bin\startxwin.bat (assuming default install path). It'll start X and then xterm.

I updated my .Xdefaults with these options for better usability:

*VT100*scrollbar.width:         14
*VT100*scrollbar.background:    gray60
*VT100*scrollbar.foreground:    rgb:a/5/5
*VT100*scrollbar.borderWidth:   0
*VT100*scrollbar.displayList:\
foreground      gray90;\
lines           1,-1,-1,-1,-1,1;\
foreground      gray60;\
lines           -1,1,1,1,1,-1
*VT100*rightScrollBar: true
*VT100*scrollBar: true
*VT100*scrollLines: 1000
xterm*toolBar: false

Solution 10 - Windows

If you use ls with certain arg it is showing file names OK I suggest you put an ls alias in /etc/profile:

alias ls='ls -F --color=auto --show-control-chars'

Works for me in msys on a WinXP.

Solution 11 - Windows

I would set up your country in windows (Control Panel -> Regional Settings -> Last Tab (control) -> Language for unicode-uncompatible languages -> Your choice (Norwegian)). After reboot start Start->Cyqwin->rxvt-native. For russian it works (without editing .bashrc or whatever).

It even (as I guess) converts the output of the soft into utf-8, because the default encoding is C.UTF-8. To check it type "echo $LANG".

Solution 12 - Windows

On the topic of alternative terminal emulators for cygwin - check out Console2; it has all the features you'll need.

Solution 13 - Windows

rxvt is incapable of unicode, so you can not make it work correctly if you log into machines that use UTF-8 for encoding. You can use rxvt for iso-8859-1/15, but most machines now are UTF-8.

The unicode replacement for rxvt in Cygwin is urxvt, the package name under Cygwin is rxvt-unicode-X. urxvt also has other nice features, such as many downloadable plugins - including one that gives you multiple tabs per window, and a client/server architecture that makes it use a lot less resources if you have many windows (urxvtc/urxvtd).

You may also need to make sure your readline variables specify that your shell should pass through 8-bit characters, i.e. add this to your $HOME/.bashrc or $HOME/.profile:

set convert-meta off
set output-meta on
set input-meta on

You will have to set the right resources in $HOME/.Xdefaults: in particular you will need a font that has the characters you want. The resource group name for urxvt is URxvt. Note the capitalization, it matters!

URxvt.font: xft:Lucida Console:size=8:style=normal:weight=50:antialias=true:hinting=true:minspace=true
URxvt.boldFont: xft:Lucida Console:size=8:style=bold:weight=100:antialias=true:hinting=true:minspace=true

I also recommend setting:

URxvt*termName: xterm

This resource decides the value of the $TERM environment variable. Unless it is correctly set, the right termcap file can not be found, causing programs like less to emit warnings in the style of: WARNING: terminal is not fully functional. Unfortunately, the default termName of rxvt-unicode isn't known under many Linux distributions, so if you often ssh to remote machines, you will run into the problem. The solution is to either set termName to something more common (like xterm), or upload a termcap-file for rxvt-unicode to all the servers you log into.

Solution 14 - Windows

Since the title is somehow misleading, and search results brought me here many times, I'll just answer reading the title.

I like using Babun on Windows as Cygwin Environment, it's almost perfect for me.

Solution 15 - Windows

Please try ConEmu which is an opensource console emulator with tabs, which represents multiple consoles and simple GUI applications as one customizable GUI window.

https://conemu.github.io/

Solution 16 - Windows

xfce4-terminal (available from Cygwin setup.exe) is the best for me because it looks great (easy to read) and if started with XLaunch (also available from setup.exe), I can start other cygwin GUI applications from it. For some reason, I can't launch GUI applications from mintty. I found this thread looking for a less ugly terminal than xterm (which works fine for launching GUI applications). In the end, I found the best one (xfce4-terminal) just by searching on terminal in setup.exe. xfce4-terminal has been one of my favorites on Linux for more than 7 years now.

Guake is also available in setup.exe, but I have to launch it from another terminal and click that other terminal before using keystrokes to bring down Guake. So, that's not so practical as it is on Linux.

Solution 17 - Windows

On a similar note to emg-2, Lifehacker recently had an article about MinTTY, not sure if it contains fixes needed by you.

Solution 18 - Windows

If you're content with only running Cygwin-applications, then rxvt should work fine. Rxvt should have UTF-8 support. Did you try googling for a solution?

If you also need to run native Windows applications, you're out of luck unless you run bash inside the Windows console. There are two issues which I don't believe are (or even can be) solved:

  • Ctrl-C doesn't work properly. If you run a native windows application from inside rxvt (or xterm), pressing Ctrl-C will give you back a prompt, but it does not interrupt the program, often leaving it to run in the background.
  • Terminal output buffering doesn't work. Output from native windows applications aren't displayed as they are printed, but rather when some internal buffer is full.

These two issues are the same with all the terminal emulators I've tried (rxvt, xterm, Emacs, and a few others).

Solution 19 - Windows

Apart from the complete resizability, what features does rxvt gice you that a Windows console window doesn't? And have you looked at the difference in memory usage - rxvt is a hog. I use rxvt for a couple of weeks and the switched back to a windows console window, without regrets.

Solution 20 - Windows

yes, mintty seems more comfortable, light and fast, but there is one feature it doesn't have, and the default (windows) console have, that is the search function: from the default console, you can search string displayed on the console, fun ?

up to now, i haven't found any other console have this feature... i you know, tell me, i really don't like the default console.

Solution 21 - Windows

I have used several terminals such as putty, console, rxvt, mintty, teraterm. the best is the teraterm. it is free, fully compatible for lang and tty, fully configurable with macro, shortcut, and give the cygterm for Cygwin.

however if you light user, just use mintty which is default term these day or rxvt.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAnders SandvigView Question on Stackoverflow
Solution 1 - WindowsdebugmeView Answer on Stackoverflow
Solution 2 - WindowsanonView Answer on Stackoverflow
Solution 3 - WindowsAndyView Answer on Stackoverflow
Solution 4 - WindowsMattias KihlströmView Answer on Stackoverflow
Solution 5 - WindowsMartin DoreyView Answer on Stackoverflow
Solution 6 - WindowsMattView Answer on Stackoverflow
Solution 7 - WindowsDan VintonView Answer on Stackoverflow
Solution 8 - WindowsDan DyerView Answer on Stackoverflow
Solution 9 - WindowsspoulsonView Answer on Stackoverflow
Solution 10 - WindowsAFIRANView Answer on Stackoverflow
Solution 11 - WindowsSergeyView Answer on Stackoverflow
Solution 12 - WindowswulfgarproView Answer on Stackoverflow
Solution 13 - Windows00prometheusView Answer on Stackoverflow
Solution 14 - WindowsArdaView Answer on Stackoverflow
Solution 15 - Windowsfalse9strikerView Answer on Stackoverflow
Solution 16 - WindowsColin KeenanView Answer on Stackoverflow
Solution 17 - Windowsrlb.usaView Answer on Stackoverflow
Solution 18 - WindowsJesperEView Answer on Stackoverflow
Solution 19 - WindowsanonView Answer on Stackoverflow
Solution 20 - Windowsjerry.leeView Answer on Stackoverflow
Solution 21 - WindowsOfusJKView Answer on Stackoverflow