Subscribe to the newsletter or RSS feed to receive updates automatically blog!

Use Cygwin with rxvt



One of the things that discourage more in a default Cygwin own the console and based on bad cmd.exe, which as we all know makes ridiculously ostiche even the most simple operations such as cut & paste (perhaps with the mouse) or other Similar functionality.

But not many know that Cygwin provides a long time ago a proprietary alternative console much more functional and powerful: it is rxvt (our eXended Virtual Terminal), a terminal emulator vt102. The fact that rxvt is not installed by default: if you want to use instead of bash on cmd.exe, it must be explicitly selected in the category "shells" during the installation or upgrade.

Wishing you can also customize the fonts and colors: the following suggestions ...

  • Create a shortcut on your Desktop to launch the executable rxvt:
    C: \ cygwin \ bin \ rxvt.exe sl-1500-fn "Lucida Console-12" black-bg-fg gray-sr-and-bash-i login
    This command will launch rxvt with white characters on black background and with a buffer of 1500 lines, if you want you can easily try to play around with fonts and colors:
    C: \ cygwin \ bin \ rxvt.exe sl-1500-fn "courier" wheat-bg-fg gray-sr-and-bash-i login
  • Open the console and edit your profile file. "Bashrc" as follows:
    Sep or notify
    export HISTCONTROL = ignoredups
    alias less = 'less-r'
    alias rm = 'rm-i'
    whence = alias' type-a '
    ls = alias' ls-F-color = tty '
    alias dir = 'ls-color = auto-format = vertical'
    vdir alias = 'ls-color = auto-format = long'
    ll alias = 'ls-l'
    alias la = 'ls-A'
    alias l = 'ls-CF'
    cp = alias' cp-i '
    mv = alias' mv-i '
    alias c: = 'cd / cygdrive / c'
    alias = grep 'grep-color'
    alias vi = 'vim'
    cls = alias' clear '
    # Set a nice looking prompt:
    PS1 = '\ u @ \ h: \ W \ $'
    # A function to pipe any command to less:
    (function so
    eval "$ @" | less-I ~
    )
  • Edit then. "Inputrc" and add the following lines:
    # if you do not like the annoying end-of-line beeps:
    set bell-style none
    # To show all characters like
    September meta-flag On
    September input meta-On
    September output meta-On
    September convert meta-Off
    "\ Cv" paste-from-clipboard

A final deserve mention the important role of copy & paste:

  1. everything that you copied to the clipboard using ctrl-C (or cut through ctrl-X) may be stuck in the terminal rxvt by placing the cursor where you want to copy and pressing the shift in contemporary click on the left mouse button;
  2. to copy instead of rxvt simply select the text area of the terminal while holding the left mouse button. The selected text will automatically be made available in the clipboard for pasting into other applications using ctrl-V.



Did you like this article? Sign up now to receive updates or news articles:
Subscribe to RSS feeds write to the RSS feed


Still no comment '

Comments RSS feed for this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Nothing2Hide © 2006 All rights reserved.

License | Disclaimer

Close
Send e-mail