| tulrich.com | ||||
|
home other people's pages:
Eliot "Powered" by Textweb |
cygwin tricks(So I don't forget) Other Terminal Emulators rxvt is inexplicably slow on my current machine (the rendering/scrolling is like 2fps). Here are some alternative terminal emulators; some might be OK though I haven't used them enough to decide:
Settings for rxvt console I find rxvt a bit nicer than the default cygwin console, which seems to live in a DOS console window. Shift-PgUp/PgDn works for scrolling, the mouse selection isn't rectangular, and the terminal type is more likely to work when logging into remote servers. Here's my shortcut command-line: C:\cygwin\bin\rxvt.exe -fn "Lucida Console-14" -geometry 160x60 -sr -sl 1000 -e /bin/bash --login -i Script to launch documents from bash, using Windows file associations UPDATE : this script is deprecated. There is now a built-in "cygstart" command that does this; I guess they revived it and renamed it. I have aliased it to "start" by putting "alias start=cygstart" in my ~/.bashrc This is something similar to the "start" command in the NT command shell. In an older version of cygwin, there was something called "winspawn" that I relied on, but it seems to have disappeared when I upgraded.
---- begin script ----
#!/bin/bash
# Dan Martin converted this to bash and fixed the chmod's.
#
# Thanks Randal R Schulz and Stefan Leppert for basic clues.
fn="$1"
# add execute permissions if there are none
isexe=1
[[ -x "$fn" ]] || { isexe=0 ; `chmod a+x "$fn"` ;}
win_fn="$(cygpath -w -a "$1")"
cmd /c "$win_fn" &
# We want to wait for the windows shell to execute the file before we
# turn off the exe bit.
sleep 1
# if isexe is 0, then we had to set the execute permissions, change back
((isexe)) || chmod a-x "$fn"
---- end script ----
Put that somewhere in your path, and "chmod a+x" it. I call it "/usr/local/bin/start", so it works like the cmd.exe version. Dan Martin added the isexe fixes. Stefan Leppert clued me into the 'cygpath' command. Randal R Schulz posted to the cygwin mailing list with a query about the permission problem, which had me stymied for a while. | |||
| tu@tulrich.com | Thatcher Ulrich | ||||