Re: GREP: Memory Exhausted

2009-04-15 Thread Andy Koppe
> Shailesh Dadure wrote:
>
>> GREP: Memory Exhausted
>
> Andy Hall wrote:
>
>> grep: memory exhausted
>
>  Letters in an error message don't just randomly change between upper and
> lower case for no reason.

It just prints argv[0], so if you invoke it as GREP it will report as
GREP, thanks to case insensivity.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: popup consoles on Windows 7

2009-04-15 Thread Andy Koppe
I think I found the reason why consoles pop up for mintty and XWin on
Windows 7. Cygwin's fhandler_console.cc uses a clever trick where it
allocates a console on an invisible custom "window station". I tried
to do the same in the mintty child process, but found that
AllocConsole() no longer cares whether a custom window station has
been selected with SetProcessWindowStation(): the console window is
opened on the default window station anyway.

Here's what I did, between forkpty() and exec():

DWORD version = GetVersion();
version = ((version & 0xff) << 8) | ((version >> 8) & 0xff);
if (version >= 0x0601) {
  HWINSTA wst0 = GetProcessWindowStation();
  HWINSTA wst = CreateWindowStation (NULL, 1, WINSTA_ALL_ACCESS, &sa);
  SetProcessWindowStation(wst);
  AllocConsole();
  SetProcessWindowStation(wst0);
  CloseWindowStation(wst);
}

Debug output showed that the function calls all succeeded, and that
CreateWindowStation() did create a station separate from the default
one.

No idea what to do about it ...

Andy


2009/4/5 Andy Koppe:
> MinTTY is a -mwindows app, which so far seemed to work well on XP and
> Vista, because no console is popped up, not even momentarily. Not so
> on Windows 7, unfortunately. forkpty() and execve() are used to create
> the child process and invoke the command, whereby it appears to be the
> exec call that causes a console to pop up.
>
> I guess the fact that rxvt is a CUI app explains why its trick for
> creating a hidden console didn't work in MinTTY: rxvt opens that
> console in the main process, which in a GUI app isn't passed down to a
> child process.
>
> So here's what I've done instead in 0.4-beta1: call AttachConsole(-1)
> to attach to any parent console from the main mintty process, and call
> it again from the child process to pass it down to that. If there is
> no console, create one using AllocConsole (in the child process), and
> hide it using ShowWindowAsync.
>
> Unfortunately two problems have been reported with this. The console
> isn't always hidden, and a really weird one on a 64-bit Windows 7:
> when invoking mintty from a bash running in a console, that console
> window locks up. I'm rather stuck on what to do about those, so
> suggestions would be welcome.
>
> Also, a couple of questions.
>
> When mintty is invoked from a shortcut or the Run dialog, the main
> process actually does get a console, i.e. GetConsoleWindow() returns a
> handle, but it doesn't appear on the screen, and the child process
> can't attach to it using AttachConsole(). When invoked from a console
> or rxvt, GetConsoleWindow() returns null. What's the reason for that?
>
> Furthermore, I'd previously seen the popup console problem on an old
> Cygwin install on XP, but updating cured it. So has this been
> addressed in the Cygwin DLL in the past, and is it likely that it can
> be solved for Windows 7 too? Any idea what might have changed in
> Windows that causes this issue?
>
> Btw, XWin is affected by this too. Starting it from a shortcut on
> Vista is fine, but on 7 multiple consoles pop up briefly, and one
> stays up.
>
> Andy
>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



popup consoles on Windows 7

2009-04-05 Thread Andy Koppe
Thanks, Chuck and Dave for pointing me towards 'objdump -p'. I'd got
as far as trying objdump, but hadn't spotted the -p option.

MinTTY is a -mwindows app, which so far seemed to work well on XP and
Vista, because no console is popped up, not even momentarily. Not so
on Windows 7, unfortunately. forkpty() and execve() are used to create
the child process and invoke the command, whereby it appears to be the
exec call that causes a console to pop up.

I guess the fact that rxvt is a CUI app explains why its trick for
creating a hidden console didn't work in MinTTY: rxvt opens that
console in the main process, which in a GUI app isn't passed down to a
child process.

So here's what I've done instead in 0.4-beta1: call AttachConsole(-1)
to attach to any parent console from the main mintty process, and call
it again from the child process to pass it down to that. If there is
no console, create one using AllocConsole (in the child process), and
hide it using ShowWindowAsync.

Unfortunately two problems have been reported with this. The console
isn't always hidden, and a really weird one on a 64-bit Windows 7:
when invoking mintty from a bash running in a console, that console
window locks up. I'm rather stuck on what to do about those, so
suggestions would be welcome.

Also, a couple of questions.

When mintty is invoked from a shortcut or the Run dialog, the main
process actually does get a console, i.e. GetConsoleWindow() returns a
handle, but it doesn't appear on the screen, and the child process
can't attach to it using AttachConsole(). When invoked from a console
or rxvt, GetConsoleWindow() returns null. What's the reason for that?

Furthermore, I'd previously seen the popup console problem on an old
Cygwin install on XP, but updating cured it. So has this been
addressed in the Cygwin DLL in the past, and is it likely that it can
be solved for Windows 7 too? Any idea what might have changed in
Windows that causes this issue?

Btw, XWin is affected by this too. Starting it from a shortcut on
Vista is fine, but on 7 multiple consoles pop up briefly, and one
stays up.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Finding an executable's Windows subsystem

2009-04-05 Thread Andy Koppe
Apologies for having failed to google an answer, but is there an easy
way in Cygwin to find out which Windows subsystem an executable
targets?

More specfically, is rxvt a 'console' or a 'windows' program?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.4-alpha1

2009-04-01 Thread Andy Koppe
> Problem happen when using duplicate session with Alt-F2, if I click the
> console this happen:
>
> cyg...@semampir ~
> $ Cancel alt
> bash: Cancel: command not found

Oops, debug output slipped into release.

> I guest it's related to new 0.4 feature moving command line cursor by
> clicking with mouse.

No, it was to do with issue 74 ('Alt key on its own sends ^['
conflicts with Alt-select).

Fixed in 0.4-beta1, available from http://mintty.googlecode.com now.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: -mwindows and --Wl,subsystem,windows

2009-03-29 Thread Andy Koppe
Dave Korn:
> Andy Koppe wrote:
>> According to this post on the gcc mailing list a few years back, gcc's
>> -mwindows option should imply --Wl,subsystem,windows:
>>
>> http://gcc.gnu.org/ml/gcc-help/2004-01/msg00225.html
>
>   Yep, it still does.

Ah, you're right. I seem to have confused myself about this while
grappling with MinTTY issue 39: "Command shell window remains open in
Windows 7 Beta".

It would appear that something's changed in how Windows deals with
Cygwin applications. The fact that MinTTY actually is compiled as a
"windows" subsystem app after all makes this even more curious.

I'm finding that MinTTY itself causes a console to open without any
output that would necessitate it. That can be got rid of with
FreeConsole(), but then the command invoked by MinTTY (using forkpty()
and execve()) opens a console anyway. Apart from that, things work
fine though.

rxvt uses the hack below to just hide any console window. Perhaps I
should just go with that, but I'm a bit concerned that it might end up
hiding the wrong console, or that the console might reappear for some
reason anyway.

Andy


char app_name[40];
sprintf(app_name, "rxvt%08x", (unsigned int)GetCurrentThreadId());
...
SetConsoleTitle( app_name );
while ((conwin = FindWindow( NULL, app_name))==NULL)
Sleep( 40 );
ShowWindowAsync(conwin, SW_HIDE);

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



-mwindows and --Wl,subsystem,windows

2009-03-29 Thread Andy Koppe
According to this post on the gcc mailing list a few years back, gcc's
-mwindows option should imply --Wl,subsystem,windows:

http://gcc.gnu.org/ml/gcc-help/2004-01/msg00225.html

I find, however, that I'm getting different behaviour when passing
--Wl,subsystem,windows explicitly. (Without it, stdout from mintty
opens a console, but with it, the output ends up in the mintty window
itself. No idea how the latter comes about.)

What is the intended behaviour for -mwindows, and should it be used at all?

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: gcc4: missing atomic builtins?

2009-03-29 Thread Andy Koppe
>  Well, I guess the question is, what's the minimum level of CPU we want to
> support, and I can configure the next version --with-arch that level, and as
> long as it's >=486 we'll be ok.  I think the question is mainly "686, or is
> there any reason to have 586 as the minimum supported CPU"?

Windows 2000 and XP only require 586. Can't imagine many people using
them on a Pentium machine though, and the 686 CMOV instruction would
be nice to have. Also, should -with-tune be set to something recent?

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.4-alpha1

2009-03-26 Thread Andy Koppe
Matt Wozniski:
 >> So how about disabling this by default, and having a command line
>> option for activating it? Suggestions for the name
>> of such an option welcome. ("--keep-open-on-error" is the best I could
>> come up with so far, but that's a bit on the unsnappy side.)
>
> FWIW, xterm uses "-hold"

I think we've got a winner.

Thanks!
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.4-alpha1

2009-03-25 Thread Andy Koppe
Frank Fesevur:
> An minor option I would like is to always close MinTTY, even when bash
> exits with status code. Now I need to press for instance the enter key
> to close MinTTY after I pressed Ctrl+D and I have pressed Ctrl+C at
> least once.

Any successfully executed command will clear the exit status, but yep,
I see what you mean. This feature was intended for invoking programs
such as ssh or telnet, or perhaps a script, where you'd want to see
the output if there's an error. Admittedly though, it's little use
with the standard case of a shell session.

So how about disabling this by default, and having a command line
option for activating it might be necessary? Suggestions for the name
of such an option welcome. ("--keep-open-on-error" is the best I could
come up with so far, but that's a bit on the unsnappy side.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'less': not working with 'mintty' > v0.3.6

2009-03-25 Thread Andy Koppe
Lee D. Rothstein wrote:
> However, while  works,  generates:
>
>  ESCOF
>
> on the bottom command line and doesn't change the rest of the
> screen. If I then type -C (required to allow keyboard input
> to be accepted, at all, at this point), and then, , and
>  both work.

I'm sorry, but I'm out of ideas on this one. ESCOF is the End keycode
in less's output notation, where the escape character is shown as ESC,
so that ought to match "\eOH goto-line". Even stranger that ^C would
fix it. (It's working fine here, both on 1.5 and 1.7.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



MinTTY 0.4-alpha1

2009-03-25 Thread Andy Koppe
Hi,

I've uploaded development release 0.4-alpha1 of MinTTY to
http://mintty.googlecode.com. This has a few new or improved features
to try and break:

- The options dialog gained an Apply button and no longer blocks
terminal output.
- The options have been rearranged, hopefully for the better.
- Font size can be changed with Ctrl+'+' and Ctrl+'-'. Ctrl+0 goes
back to the configured font size.
- The command line cursor can be moved by clicking with the mouse.
(This works by generating left/right arrow keycodes.)
- PuTTY's option for setting the maximum number of lines in the
scrollback buffer is back. (Previously that was fixed to 65535.)
- Decreasing the window width no longer crops lines, i.e. hidden parts
reappear after increasing the size again.
- The row and column settings in the options now control startup size
only, to avoid accidentally saving the current size.

The manpage hasn't yet been brought into sync with these changes.

Let me know how you get on, or what else you'd like to see improved.
(But don't mention tabs! :)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 'less': not working with 'mintty' > v0.3.6

2009-03-24 Thread Andy Koppe
> I believe that the settings we had previously discussed to get 'less' to
> accept
>  &  as beginning and end of stream respectively,
> stopped working with the 'mintty' v0.3.7 release.
>
> My .lesskey file is:
> --
> \eO1;2A back-line # 
> \eO1;2B forw-line # 

The keycodes for these changed in 0.3.4 due to being incompatible with
xterm. See http://code.google.com/p/mintty/issues/detail?id=37

> \eOH goto-line #  -- Beginning of input
> \eOF goto-end  #  -- End of input

Those should be fine actually. That's what mintty sends for Home and
End in 'application cursor mode'  since 0.3.7.

Here's what's needed:

\e[1;2A back-line
\e[1;2B forw-line
\e[5;2~ back-screen
\e[6;2~ forw-screen
\eOH goto-line
\eOF goto-end

The back-screen and forw-screen lines allow scrolling by whole pages
at a time by holding down Shift or Ctrl while rolling the mousewheel.
(And don't forget to run lesskey.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: strtold, isnormal

2009-03-23 Thread Andy Koppe
>> Oh, btw., the isnormal macro exists in math.h.
>
> Thanks.  But for some reason it's not getting picked up:
>
> gcc -c -I. -I/usr/local/include -I/home/reynolds-gregg/include
> -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT
> -D__EXTENSIONS__ -D_TC_PREFIX="\"/usr/local\""
> -D_TC_INCLUDEDIR="\"/usr/local/include\""
> -D_TC_LIBDIR="\"/usr/local/lib\"" -D_TC_BINDIR="\"/usr/local/bin\""
> -D_TC_LIBEXECDIR="\"/usr/local/libexec\""
> -D_TC_APPINC="\"-I/usr/local/include\""
> -D_TC_APPLIBS="\"-L/usr/local/lib -ltokyocabinet -lbz2 -lz -lpthread
> -lm -lc \"" -I/usr/include -std=c99 -Wall -fPIC -fsigned-char -O2
> tcutil.c
>
> result:
>
> tcutil.c:4948: warning: implicit declaration of function `isnormal'

isnormal() and a load of other things are guarded by
'#if !defined(__STRICT_ANSI__)' in math.h, and __STRICT_ANSI__ does
get defined for -std=c99.

It's definitely in the C99 standard though, so either the header is
wrong or __STRICT_ANSI__ shouldn't be defined.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Clearing the Cygwin console

2009-03-21 Thread Andy Koppe
> Oh, "cls" is one of those "built-in" commands.  Any hints as to where
> "clear" went?

Cygwin Package List
Search Results
Found 4 matches for clear.exe.

clear/clear-1.0-1   removed package; install ncurses instead
ncurses/ncurses-5.5-2   Utilities for terminal handling
ncurses/ncurses-5.5-3   Utilities for terminal handling
ncurses/ncurses-5.7-4   Utilities for terminal handling

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.8 - ALT+F2

2009-03-21 Thread Andy Koppe
> On the Window page of option, I only have the following 3 fields to me to 
> choose:
>
> Disable transparency when active
> Show scrollbar
> Close on Alt+F4

That's not 0.3.8 then (I hope). What does the "About..." box say?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.8 - ALT+F2

2009-03-21 Thread Andy Koppe
> I have installed MinTTY 0.3.8 but ALT+F2 does not open a new session. I have 
> to hit Ctrl+C to get back
> to command prompt. Is there some other setting I have to check?

"Enable Alt+key shortcuts" on the Window page of the options needs to
be on, which it should be by default.

Do the "Duplicate" command and its shortcut appear in the window menu?
(Left-click on the program icon in the titlebar to access that.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] Updated: mintty-0.3.8-1

2009-03-21 Thread Andy Koppe
MinTTY is a terminal emulator for Cygwin with a native Windows user
interface and minimalist design. Its terminal emulation is largely
compatible with xterm, but it does not require an X server to be
running. It is based on code from PuTTY 0.60 by Simon Tatham and team.

This is a minor feature update.

CHANGES (since 0.3.7-1)
===
- Added -e option for introducing the command to execute. This is for
compatibility with other terminals, and makes mintty work with 'chere'
again. (It worked in 0.3.5 only due to a bug in option handling.)
- Added window menu command for duplicating the current session, with
shortcut Alt+F2. This simply invokes mintty again with the same
command line.
- Added support for xterm control sequence to change the ANSI colours.
(The Linux console's version of this was supported already.)

Details of these changes can be found at
http://code.google.com/p/mintty/issues/list?can=1&q=Milestone%3A0.3.8

QUESTIONS
=
MinTTY's project page is located at http://mintty.googlecode.com.
Please use the issue tracker there to report bugs or suggest
enhancements. Questions or comments can be sent to the MinTTY
discussion group at http://groups.google.com/group/mintty-discuss or
the Cygwin mailing list at cygwin@cygwin.com .



To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page.  This downloads setup.exe to
your system.  Then, run setup and answer all of the questions.

          *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: chere doesn't work anymore with MinTTY

2009-03-20 Thread Andy Koppe
Corinna Vinschen:
> I just think  the -e option is along the lines of the -c option for shells.
> Every Unix shell has a -c option and it always means the same, even
> for csh and, FWIW, cmd.exe.

Agreed, and implemented in 0.3.8.

> I'd say that emulating the options in the common subset of rxvt's
> options and xterm's is probably a good idea - at least for options
> that affect the behavior (like -e) instead of just the appearance.

I'll leave it at just -e, like Konsole and gnome-terminal. Like those,
MinTTY is meant to be configured primarily through its GUI.
Alternatively, its config file can be edited manually.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: chere doesn't work anymore with MinTTY

2009-03-18 Thread Andy Koppe
Corinna Vinschen:
> Accepting `-e command' additionally would make the usage comaptible to
> xterm/rxvt and mintty could be used easier as drop-in replacement...

Can't say I'm keen on doing that, because it looks  like the start of
a slippery slope down xterm's intimidating manpage.
Konsole and gnome-terminal do support it though, without implementing
any other xterm options, so I guess mintty better does as well: issue
69.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: chere doesn't work anymore with MinTTY

2009-03-18 Thread Andy Koppe
David Rothenberger:
>> chere (v1.1) doesn't work anymore for me after the recent upgrade of
>> MinTTY to 0.3.7.
>
> chere is generated a command line using the -e switch prior to the command
> to execute. MinTTY doesn't accept that switch.

Yep. Here's what it does accept:

Usage: mintty [OPTION]... [ - | COMMAND [ARG]... ]

If no command is given, the user's default shell is invoked as a non-login
shell. If the command is a single minus sign, the default shell is invoked
as a login shell. Otherwise the command is invoked with the given arguments.

Options:
  -c, --config=FILE Use specified config file (default: ~/.minttyrc)
  -p, --pos=X,Y Open window at specified position
  -s, --size=COLS,ROWS  Set screen size in characters
  -t, --title=TITLE Set window title (default: the invoked command)
  -v, --version Print version information and exit
  -h, --helpDisplay this help message and exit

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Did anyone download the Windows 7 beta?

2009-03-17 Thread Andy Koppe
>> completely.  (It's also, at least in win7, trivial for viruses etc. to bypass
>> programmatically, because MS left a wide-open back door in it for the benefit
>> of their own software.  Duh!)
>
> in win7 or vista or both ?

7 only.

http://arstechnica.com/microsoft/news/2009/03/opinion-ms-should-kill-win7-uac.ars
http://www.pretentiousname.com/misc/win7_uac_whitelist2.html

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Duplicate mintty window (was: Re: MinTTY 0.3.3)

2009-03-16 Thread Andy Koppe
bjoe wrote:
>> > What I found missing in Mintty is putty feature to start duplicate
>> > session (more welcome with hot-keys)
>>
>> Since MinTTY doesn't have sessions like Putty, I didn't think there
>> was much point in keeping this.
>
> It's because you remove networking function from putty, right. IMHO
> this feature will help many user (especially who come from Windows
> word)

MinTTY is meant to be a small and simple command line window for
Cygwin with a native UI, no more, no less. It's the classic Unix
philosophy: do one job, and do it well. Cygwin already has all the
necessary network tools in ssh, telnet & co., and they can easily be
combined with mintty, so there was no point in keeping all that
security-critical code.


> I don't know the relationship between networking function in Putty with
> duplicate session feature in code point of view, but since this based
> on putty code I hope this will not give some sort of difficulty to
> adopt this feature in mintty.

It's fairly easy to do actually. Instead of a session it would simply
invoke mintty again with the same command line, for much the same
effect. The concern was about unnecessary features: no point
cluttering up the interface with stuff that can already be done with
system-wide facilities.


>> Desktop and quickstart shortcuts already provide quick ways to open a
>> new MinTTY window, and as discussed on a separate thread here you can
>> assign hotkeys to Windows shortcuts.
>
> I run Cygwin from portable media in different PC so Desktop and
> quickstart shortcut not an options in My case.

Alright, I give in on this one. You could probably use AutoHotkey or
something like that, but I guess including this in MinTTY really is
quite a bit more convenient, also in comparison with shortcuts.

I'll stick a Duplicate command in the window menu, with disablable
shortcut Alt+F2. Reopened issue 11:
http://code.google.com/p/mintty/issues/detail?id=11

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Porting to GCC 4.3.2

2009-03-16 Thread Andy Koppe
Václav Haisman wrote:
>>   You should have received a warning message during compilation telling you
>> that you might need to do that.  Did it turn up in your earlier builds before
>> you added the flag?
> Yes, the warning is there. I did not notice it in the oodles of other
> auto-import info messages.

Use -Werror. Should be a legal requirement. ;)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: mintty & less

2009-03-16 Thread Andy Koppe
Lee D. Rothstein:
> I'm having some problems with 'less' in a 'mintty' window that are not
> consistent. Specifically while paging through stdin (to 'less'), in
> 'less', the first time I try to use  or  to go respectively
> to the beginning or end of the stdin stream, the 'less' navigation
> hangs until I hit -c. Then they each work.

Hmm, less could be getting confused by the VT220-style Home/End
keycodes that mintty sent so far. 0.3.7 sends "PC-style" keycodes that
are compatible with the xterm terminfo entry.

To get them working in less, add these two lines to ~/.lesskey (and
run lesskey to translate it into the binary ~/.less):

  \eOH goto-line
  \eOF goto-end

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: clearing the scrollback buffer in mintty

2009-03-16 Thread Andy Koppe
Lee D. Rothstein:
> Dave Korn "piped":
>
>> For gui consoles, use
>
>>  alias cls='echo -e "\033c"'
>
>> which does clear the scrollback buffer.
>
> Thanks Dave, this works on 'xterm' but not on 'mintty'.
>
> On 'mintty' it does a 'clear' (i.e., clears the screen),
> rather than a 'cls' (i.e., clears the screen and
> scrollback buffer.

Fixed in 0.3.7.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] Updated: mintty-0.3.7-1

2009-03-16 Thread Andy Koppe
MinTTY is a terminal emulator for Cygwin with a native Windows user
interface and minimalist design. Its terminal emulation is largely
compatible with xterm, but it does not require an X server to be
running. It is based on code from PuTTY 0.60 by Simon Tatham and team.

This is a compatibility update.

CHANGES (since 0.3.6-1)
===
- The Home and End keys now send "PC-style" ^[[H and ^[[F instead of
VT220-style ^[[1~ and ~[[4~. This is for compatibility with xterm's
default configuration and the xterm termcap/terminfo entries, which
means that Home and End should work out-of-the box now in bash, i.e.
configuring them in ~/.inputrc is no longer necessary.
- The Reset menu command and the ^[c ('Full Reset') control sequence
now clear the scrollback as well as the screen.
- The manual page has gained a tip on using 'sh -c' for setting
environment variables in mintty shortcuts.

Details of these changes can be found at
http://code.google.com/p/mintty/issues/list?can=1&q=Milestone%3A0.3.7

QUESTIONS
=
MinTTY's project page is located at http://mintty.googlecode.com.
Please use the issue tracker there to report bugs or suggest
enhancements. Questions or comments can be sent to the MinTTY
discussion group at http://groups.google.com/group/mintty-discuss or
the Cygwin mailing list at cygwin@cygwin.com .



To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page.  This downloads setup.exe to
your system.  Then, run setup and answer all of the questions.

   *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: long unsigned int vs. uint32_t again

2009-03-15 Thread Andy Koppe
Chuck wrote:
> cygwin's  has:
> #define PRIu32 "lu"
>
> and  has
> typedef unsigned int uint32_t;
>
> Is it possible that our inttypes.h should be changed, to use "u" for 8, 16, 
> and 32 bits?

Yep, I'd say so.

> Or is gcc's -Wformat=2 in 3.4.4 just too strict here -- and should be checking
> the actual bitwidths of types against the formats, before assuming that
> "lu" doesn't match uint32_t?

No. "long" and "int" are different types, and ignoring this would just
store up trouble for when code is ported to platforms with 64-bit
longs.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: clearing the scrollback buffer in mintty

2009-03-15 Thread Andy Koppe
Lee said:
>> For gui consoles, use
>
>>  alias cls='echo -e "\033c"'
>
>> which does clear the scrollback buffer.
>
> Thanks Dave, this works on 'xterm' but not on 'mintty'.
>
> On 'mintty' it does a 'clear' (i.e., clears the screen),
> rather than a 'cls' (i.e., clears the screen and
> scrollback buffer).

Thanks Lee. I entered issue 65 for this. Looks like PuTTY took a
different view from xterm as to whether the "Full Reset (RIS)"
sequence should clear the scrollback, but of course MinTTY is meant to
be compatible with xterm.

Meanwhile, this will do the reset and clear the scrollback:

  alias cls='echo -e "\ec\e[3J"'

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] Update: mintty-0.3.6-1

2009-03-14 Thread Andy Koppe
MinTTY is a terminal emulator for Cygwin with a native Windows user
interface and minimalist design. Its terminal emulation is largely
compatible with xterm, but it does not require an X server to be
running. It is based on code from PuTTY 0.60 by Simon Tatham and team.

This is a routine update.

CHANGES (since 0.3.5-1)
===
- Added a manual page: 'man mintty'. It documents all the options and
keycodes and also has a section with tips on MinTTY usage. Big thanks
to Lee D. Rothstein for his help with this.
- Added command line options for initial window size and position:
--size and --pos.
- Straightened out some inconsistencies in MinTTY-specific keycodes
(which are now documented in the man page).
- Fixed crash when encountering unknown long command line option.
- Fixed mousewheel overreporting
- Fixed incorrect encoding of modifier keys on mouse events.

Details of these changes can be found at
http://code.google.com/p/mintty/issues/list?can=1&q=Milestone%3A0.3.6

QUESTIONS
=
MinTTY's project page is located at http://mintty.googlecode.com.
Please use the issue tracker there to report bugs or suggest
enhancements. Questions or comments can be sent to the MinTTY
discussion group at http://groups.google.com/group/mintty-discuss or
the Cygwin mailing list at cygwin@cygwin.com .



To update your installation, click on the "Install Cygwin now" link
on the http://cygwin.com/ web page.  This downloads setup.exe to
your system.  Then, run setup and answer all of the questions.

 *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Mintty running program from shortcut problem

2009-03-14 Thread Andy Koppe
> When we running program with mintty from shortcut, mintty will
> running the program in non login shell without knowing cygwin PATH.
> This will make some kind of error When program try to running
> external program like info run gzip or using shell escape in vim.
> Is this expected behavior?

Yep.

$ mintty --help
Usage: ./mintty [OPTION]... [COMMAND [ARGS]...]

If no command is given, the user's default shell is invoked as a non-login
shell. If the command is a single minus sign, the default shell is invoked
as a login shell. Otherwise the command is invoked with the given arguments.
...

It's much the same for rxvt (and xterm) btw: without arguments they
invoke a non-login shell, and to get a login shell you have to tell
them with option -ls.


> Making mintty shortcut running info with this code:
> 
> b...@semampir ~
> $ mkshortcut -D -i /usr/bin/mintty.exe -w /usr/bin -a "info"
> /usr/bin/mintty.exe
> 
>
> When I try to enter the node info produce error like this:
> gunzip < /usr/share/info/as.info.gz.../bin/sh: gunzip: command not
> found Cannot find node `Top'.
> note: Making shortcut manually also produce same problem

The problem is that the PATH variable isn't set up, so info can't find
gunzip. Invoking a login shell does set up PATH (in /etc/profile), but
that's not necessary.


> This error not found when using rxvt
> 
> b...@semampir ~
> $ mkshortcut -D  -i /usr/bin/cygicons-0.dll -j8 -w /usr/bin -a "-p
> /usr/bin rxvt -e info"  /usr/bin/run.exe
> 

The difference here is that you're adding /usr/bin to the PATH using
the -p option to run.exe.

It appears that invoking MinTTY through run.exe keeps its window
hidden, which I guess is what run.exe is supposed to do: "run - start
programs with hidden console window". I don't know why that's
different for rxvt.


> To avoid this trouble use bash -lc  so mintty will run bash
> in login shell first.
>
> 
> b...@semampir ~
> $ mkshortcut -D -i /usr/bin/mintty.exe -w /usr/bin -a "bash -lc
> /usr/bin/info" /usr/bin/mintty.exe
> 

As mentioned above, invoking a login shell is overkill here. Just
setting PATH will do:

$ mkshortcut -D -i /usr/bin/mintty.exe -w /usr/bin -a "sh -c
'PATH=/bin info'" /usr/bin/mintty.exe

Alternatively, you could add C:\cygwin\bin to the Windows Path variable.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Clearing the Cygwin console

2009-03-14 Thread Andy Koppe
> on Linux/UNIX systems with the command 'clear' the console content usually
> can be "flushed", on Windows with 'cls'.
> None of these commands worked with Cygwin. If I enter 'clear', the message
>  bash: clear: command not found
> is returned.
>
> How can a console used with Cygwin be cleared?

Ctrl+L. Works in all terminals.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: IOCTL using

2009-03-12 Thread Andy Koppe
> (i.e. flee Rome and settle in Babylon)

I'm afraid you'd have been a few centuries too late. By the time of
the Romans there wasn't much left of Babylon.

:) Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: minTTY will not interrupt 'locked' process

2009-03-09 Thread Andy Koppe
> Several times recently, I have executed a command on a "file" that was
> apparently "locked".  Any attempts to perform any reads/opens on the file
> would block.  When it happens, the only was out is to terminate minTTY
> session (no ctl-C or ctl-\ will terminate).  Is this a normal situation?

I'm afraid I don't know about those locked files, but in any case this
sounds more like a general Cygwin question. When you press Ctrl-C or
Ctrl-\, MinTTY simply writes the corresponding control character to
the pty device connecting it to its child process. The terminal driver
normally turns that into a SIGINT or SIGQUIT, but applications can
override that, or choose to ignore signals. Also, Cygwin can't deliver
signals while a program is executing a Win32 function.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: cut & paste between windows and cygwin

2009-03-09 Thread Andy Koppe
Dat Head:
> faq mentioned using rxvt but that was for console replacement not
> xterm replacement as best i could tell.

Unless you require any special xterm features, both rxvt and the
new(ish) mintty make good replacements for it that do not require an X
server to be running. None of these are full Windows console
replacements.

Fergus:
> For copying clipboard -> xterm, use  or just .

I don't think  on its own works, not in the default config
anyway.  does work in all of these terminals though, as
does clicking on the middle mouse button or wheel.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: psql and mintty

2009-03-09 Thread Andy Koppe
> I have been using psql with mintty sucessfully for some time now with cygwin
> 1.5
> over the weekend I did a update of cygwin and now psql application hangs
> with mintty.
>
> it works still with the 'standard' cygwin console.
>
> any ideas?

Not really. MinTTY hasn't changed, so something else must have. Does
it still work in other pty-based terminals, i.e. rxvt or xterm?

Did you check your installation with cygcheck? You might want to post
the output of of 'cygcheck -svr' here for people to have a look. Also,
there's been an issue with ncurses recently, perhaps it's something to
do with that. Therefore just running setup again to update to the
latest versions might be worth trying.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Replacing setup.exe and cygcheck with dpkg (Was: Re: cygcheck typo in both manpage and --help)

2009-03-09 Thread Andy Koppe
Spiro Trikaliotis:
> You can replace a running exe (or dll) by doing the following:
>
> 1. rename the .DLL or .EXE

Are you sure that's possible? I'd expect Windows to complain loudly at
that point.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.3

2009-03-08 Thread Andy Koppe
> What I found missing in Mintty is putty feature to start duplicate
> session (more welcome with hot-keys)

Since MinTTY doesn't have sessions like Putty, I didn't think there
was much point in keeping this.
Desktop and quickstart shortcuts already provide quick ways to open a
new MinTTY window, and as discussed on a separate thread here you can
assign hotkeys to Windows shortcuts.

> moreover it will replace
> Mintty lack of tabs problems IMHO.

That's not MinTTY's problem, it's Windows'! ;)

>> keep up the good work!!
> Yup

Thanks,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: job control: "set CYGWIN=tty" but ^Z doesn't work

2009-03-02 Thread Andy Koppe
2009/3/2 Daniel S. :
> What setup is need to get ^Z to suspend the current process?
>
> The CygWin manual Environment Variables section at
> http://cygwin.com/cygwin-ug-net/setup-env.html says:
>
>  The CYGWIN variable is used ... [Y]ou can ... set it to tty (e.g. to
> support
>  job control with ^Z etc...) using a syntax like this in the DOS shell,
> before
>  launching bash.

You have to make sure that the CYGWIN variable is set before any
Cygwin programs are run, because it is read when the Cygwin DLL is
first loaded. Exiting all Cygwin processes before invoking cygwin.bat
again should do the trick.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: [Fwd: Re: Reproducing the cygwin X problems; MinTTY, too]

2009-03-01 Thread Andy Koppe
> Lee D.Rothstein wrote:
>>
>> FWIW, I'm having a similar proble with MinTTY. If I select text in a
>> MinTTY window,
>> then copy text withing a GUI app, like TextPad (http://textpad.com),
>> clipboard stops
>> working for all apps.
>> If I ten return to the original, MinTTY window, and reselect text, paste
>> it, that works and
>> then copy and paste work in all apps, again.

Sorry, hadn't seen this earlier, and I'm afraid I can only reply with
questions. In what way does it stop working, e.g. can text still be
selected in other apps, but Ctrl-C and Ctrl-V don't work? Is
copy-on-select enabled in mintty? Do you have any clipboard utilities
running?

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: console scroll speed on Win XP

2009-03-01 Thread Andy Koppe
> Is there some option to turn off to make this reasonable or has anyone
> else seen this problem? I set display options to maximize performance
> and there don't seem to be any options available for the cygwin window
> that would help.

Yep, the Windows console is slow alright, and I don't know of any way
to speed it up. What I can recommend are the alternative terminal
emulators available in Cygwin: xterm, rxvt, and the recently added
mintty (by yours truly), all of which scroll a lot faster than the
console.

(Please note that all three share one drawback though: native Windows
console programs might not work correctly in them, particularly
input.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Tried mintty but it locks-up on enabling "Copy on select"

2009-02-11 Thread Andy Koppe
> 1) run setup.exe
> 2) download -- but don't install
> 3) run setup.exe -- install from local dir
> 4) in filemanager dbl-click mintty.exe
> 5) in the term rt-click->Options->mouse->enable copy-on-select
> 6) mintty becomes unresponsive
> 7) kill mintty.exe and the associated bash.exe
>
> I tried these steps today and was unable to reproduce.

Thanks for trying anyway!

> Q2) Have you got any clipboard utilities running?
> A2) Every application has access to the clipboard, right? So yes.

You can get various 3rd party utilities for adding stuff like a
clipboard history or Windows-wide copy-on-select.

> Q3) Does it work if you delete or rename ~/.minttyrc to go back to the 
> default settings and copy something through the context menu?
> A3) Didn't find a .minttyrc, does mintty create one when it starts?

No, it only creates one when you press OK in the options dialog, but
of course you didn't get to that.

>What does mintty put in there if it creates one?

Its settings, in the form of key-value pairs like 'CopyOnSelect=1'.
(I'd asked in case it was a particular combination of options that
triggered the crash.)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: 1.7 - Odd behaviour with vim

2009-02-10 Thread Andy Koppe
What might be happening is that you're seeing previous contents of the
"alternate screen", i.e. whatever the last program that used it left
there. That's been annoying me on occasion anyway, and I'll have to
investigate how other terminals handle that, i.e. whether they clear
the alternate screen when switching to it.

Andy


2009/2/10 Chris Sutcliffe :
> When edit a file (via :e ) with vim under Cygwin 1.7 the
> first time I'm opened a cygwin terminal (mintty), there is a message
> that briefly pops up and seems to be overwritten by the vim display.
> In the command bar I'm left with:
>
> http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
>
> What's odd is that if I quit vim (:q) and launch vim again (in the
> same terminal), it behaves as expected.  I assume there is some flag
> being tripped?  Is it possible to suppress the message that's popping
> up?
>
> Cheers!
>
> Chris
>
> --
> Chris Sutcliffe
> http://emergedesktop.org
>
> --
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:   http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ:   http://cygwin.com/faq/
>
>

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Tried mintty but it locks-up on enabling "Copy on select"

2009-02-09 Thread Andy Koppe
>> That's a new one actually. Can you reproduce it? If it's not too much
>> bother, any details about the bug and your system would be
>> appreciated. The ~/.minttyrc file might be helpful too.
>
> It's winxp with latest patches and I think I have latest cygwin.
> Although I'm not certain of that.

I suspect most users will have 'copy on select' enabled and there've
been no problems reported so far, so particular circumstances on your
setup must be exposing a latent bug. Hence the .minttyrc and the
stackdump would be useful.

Also, a few more questions, if you're willing to help tracking it
down. Does it lock up as soon as you start mintty or the first time
you try to copy something? Have you got any clipboard utilities
running? Does it work if you delete or rename ~/.minttyrc to go back
to the default settings and copy something through the context menu?

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Tried mintty but it locks-up on enabling "Copy on select"

2009-02-09 Thread Andy Koppe
> Maybe a known issue.
>
> Just tried mintty 0.3.5:
>
> Options->Mouse->Copy on select
>
> mintty becomes unresponsive and I have to kill it.
> The virtual set size goes to 450megabytes

That's a new one actually. Can you reproduce it? If it's not too much
bother, any details about the bug and your system would be
appreciated. The ~/.minttyrc file might be helpful too.

> After killing it it leaves behind a bash.exe which also has to be killed.

Yep, if it crashes, the child process won't get killed. But of course
it's not supposed to crash. :)

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY feature? Or bug?

2009-01-29 Thread Andy Koppe

Lee D. Rothstein wrote:

Interesting feature or bug of MinTTY that does not obtain with any other
terminal emulator with which I'm familiar.

To wit:

If you have a running synchronous script or command to the screen and you
type ^l (Ctrl-l) it will immediately clear the screen before the ongoing
command terminates.

My feeling is that it doesn't matter, but that the behavior is different
from other virtual terminals.


I've had a look at this: it's a feature that MinTTY inherited from 
PuTTY. PuTTY emulates features of a whole range of terminals from VT100 
through to VT510, and also the so-called 'SCO ANSI' (from before SCO 
became a dirty word).


Apparently the latter interprets the echoed ^L as an actual form feed, 
whereas all the others just do a linefeed. (There's a separate sequence 
for clearing the screen, which bash sends when it sees a ^L being typed.)


The default compatibility setting includes 'SCO ANSI', hence the 
behaviour you're seeing. I'll take it out in the next release.


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Signal handling in WIN32 console programs

2009-01-22 Thread Andy Koppe

avade...@certicom.com wrote:

My WIN32 app is compiled under vc7 and uses signal() to trap SIGINT, SIGABRT
and SIGTERM.  If I run the application under console2 or a native terminal,
pressing ^C triggers the handler and the application stops programmatically
due to a state change made by the handler.

When I do the same under rxvt (not the X based one) or minTTY, the ^C stops
the process without the signal handler executing.  Similarly, even when run
from the native console, kill (-INT, -ABRT, -TERM) causes the application to
end without the handler catching the signal.

So I wonder if the native console passes the character to the process directly
whereas the minTTY/rxvt shells interpret it and send a signal that the native
app doesn't really understand properly.


MinTTY and rxvt do not interpret the ^C keypress in any special way. 
They simply write a ^C (0x03) character to the child process' pty. The 
pty driver may translate that into a signal depending on the pty's line 
settings (as shown by stty). Sorry I don't know how ^C is processed in a 
Windows console or why the behaviour would be different with ptys.


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: environment problems mixing mintty and xterm

2009-01-22 Thread Andy Koppe

Lester Ingber wrote:

However, if I run mintty from my xterm window I have some problems.

For example, say I have open xterm (from startxwin.csh) with
xterm +tb -j -sb -geometry 80x84-6+0 &
this sets LINES set to 84.

If I have set up .minttyrc with
Rows=100
then after I go to my mintty window and back to my xterm, my xterm window
is messed up, e.g., top rows under `less` are off the screen.

There is no such problem, when running xterm, if I open an additional
mintty window as a Windows shortcut since it seems to open independently
-- without taking on the environment variables in my xterm window.


Thanks for the problem report, although I'd prefer to get these via the 
issue tracker at http://code.google.com/p/mintty/issues/ .


Unfortunately I haven't been able to reproduce the problem. A Unix 
process only receives copies of its parent's environment variables and 
it cannot change the originals, so the problem isn't caused that way.


Window size changes are signalled to the child process through a call to 
ioctl() on the child's pseudo terminal (pty), which triggers a SIGWINCH 
signal in any processes controlled by that pty. Perhaps something is 
going awry there.


Does the LINES variable in the xterm change immediately after invoking 
mintty, when you change mintty's size, or only after exiting it? What 
command line are you invoking mintty with?


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: paste into vim

2009-01-22 Thread Andy Koppe
DaveK wrote:

>  Nah, there's a different model where for some completely nutso
> reason they decided to get rid of the Ins. key so they could have a
> double-height Del. instead!

Here's another such abomination, from the evil empire itself:

http://www.itmedia.co.jp/news/0309/04/l_ms001.jpg

Note how they've also relabeled all the F keys, with the proper labels
relegated to the side of the keys.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



[ANNOUNCEMENT] New package: mintty-0.3.5-1

2009-01-21 Thread Andy Koppe

The package mintty-0.3.5-1 has been added to the Cygwin distribution.
It will appear in the 'Shells' category of the Cygwin setup program.

DESCRIPTION
===
MinTTY is a new terminal emulator for Cygwin. It is based on code
from PuTTY 0.60 by Simon Tatham and team.

Features include:
* Xterm-compatible terminal emulation.
* Native Windows user interface with a minimalist design.
* Dialogs for choosing options, font, and colours.
* Drag & drop and copy & paste of text, files and folders.
* Window transparency and fullscreen mode.
* Support for UTF-8 and a wide range of codepages.
* Small size and high speed.

QUESTIONS
=
MinTTY's project page is located at http://mintty.googlecode.com.
Please use the issue tracker there to report bugs or suggest 
enhancements. Questions or comments can be sent to the MinTTY discussion 
group at http://groups.google.com/group/mintty-discuss or the Cygwin 
mailing list at cygwin@cygwin.com .


CYGWIN-ANNOUNCE UNSUBSCRIBE INFO

If you want to unsubscribe from the cygwin-announce mailing list, look 
at the "List-Unsubscribe: " tag in the email header of this message. 
Send email to the address specified there. It will be in the format:


cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



MinTTY 0.3.5

2009-01-20 Thread Andy Koppe

MinTTY version 0.3.5 is available from http://mintty.googlecode.com.
It addresses one serious bug and brings a few small enhancements:

The bug:
- The --config option was unusable, because MinTTY would attempt to
invoke '--config' as the child process command.

Enhancements:
- The user's default shell can be invoked as a login shell by passing
'-' (a single minus character) as the command.
- Word selection (by double-clicking) now includes the tilde character
in filenames.
- Added command line option for setting the initial window title.
- Added short versions of command line options.
- Improved help output.

mintty --help
Usage: mintty [OPTION]... [COMMAND [ARGS]...]

If no command is given, the user's default shell is invoked as a 
non-login shell. If the command is a single minus sign, the default 
shell is invoked as a login shell. Otherwise the command is invoked with 
the given arguments.


Options:
  -c, --config=FILE   Use specified config file (default: ~/.minttyrc)
  -t, --title=TITLE   Set window title (default: the invoked command)
  -h, --help  Display this help and exit
  -v, --version   Print version information and exit

With any luck, this will be the last MinTTY announcement in this form.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: paste into vim

2009-01-20 Thread Andy Koppe
> how to paste in vim (not gvim) from clipboard ?

Hold down Shift while middle-clicking.

Vim activates application mouse mode, which means clicks go to vim
rather than to the terminal that normally does the paste from the
clipboard. Shift overrides that.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Finding out login history

2009-01-19 Thread Andy Koppe
> Rerunning setup.exe, it showed me that I *did* have util-linux
> installed; even the most recent version. Is "last" supposed to
> be in /bin or in some other directory?

Hmm, same problem here actually. According to the package search it
should be there though. (Btw, searching for 'last.exe' narrows down
the list of hits.)

Fri Jan 25 05:39:06 2008   8704 usr/bin/last.exe

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Finding out login history

2009-01-19 Thread Andy Koppe
> Thank you for helping. Which package do I have to install, to
> have 'last' available?

util-linux

For future reference: http://cygwin.com/packages/

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-17 Thread Andy Koppe

Andy Koppe wrote:

Okay, I'm having a go at this. cygport does look very nice indeed, but 
unfortunately I got stuck anyway.


So I've got the following files all in one directory:

  mintty-0.3.4-1.cygport
  mintty-0.3.4-src.tgz
  setup.hint
  postinstall.sh
  preremove.sh

Building the source and binary packages works, except for the following:

  *** Warning: setup.hint is missing

postinstall.sh and preremove.sh do not get included in the packages 
either. The cygport README tells me that those files should all be 
placed in the CYGWIN-PATCHES directory. So I naively created a that 
directory alongside the .cygport and shuffled the three files in there, 
but to no effect.


I also tried copying them the to ${C} at the start of src_install():

  cp setup.hint postinstall.sh preremove.sh ${C}

Alas, 'cp' couldn't find those files, presumably because it isn't run in 
the same directory as the .cygport file.


So my probably rather stupid question is, where should I be putting 
those files and how?


I worked it out, I think: run cygport prep command, copy the files into 
foo-x.y.z-r/CYGWIN-PATCHES, and run cygport compile, install and package 
commands.


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-17 Thread Andy Koppe

Yaakov (Cygwin/X) wrote:

I quickly put together a package for Ports which could get you started:

http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/apps/mintty/

Check out this directory, then use cygport to build it.  If you're new
to cygport, the package README is a must-read.


Okay, I'm having a go at this. cygport does look very nice indeed, but 
unfortunately I got stuck anyway.


So I've got the following files all in one directory:

  mintty-0.3.4-1.cygport
  mintty-0.3.4-src.tgz
  setup.hint
  postinstall.sh
  preremove.sh

Building the source and binary packages works, except for the following:

  *** Warning: setup.hint is missing

postinstall.sh and preremove.sh do not get included in the packages 
either. The cygport README tells me that those files should all be 
placed in the CYGWIN-PATCHES directory. So I naively created a that 
directory alongside the .cygport and shuffled the three files in there, 
but to no effect.


I also tried copying them the to ${C} at the start of src_install():

  cp setup.hint postinstall.sh preremove.sh ${C}

Alas, 'cp' couldn't find those files, presumably because it isn't run in 
the same directory as the .cygport file.


So my probably rather stupid question is, where should I be putting 
those files and how?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Yet another rvxt vs. minTTY 0.3.4

2009-01-16 Thread Andy Koppe

David Arnstein wrote:

From one of (xterm, rxvt, MinTTY) I telnet into a remote host. On the
remote host, I launch the usenet news reader trn. In trn, text can be
selected with the mouse, even though trn is nominally a text program.
To select text, the user must hold down the shift key, and drag the
mouse (left button pressed).

Both xterm and MinTTY can do this. In my environment, rxvt does
nothing.


I think what's happening there is that trn activates application mouse
mode. The default key for overriding that in xterm and MinTTY is Shift,
whereas in rxvt it's Alt.

If you don't want to have to use the override key for selecting in
MinTTY, you can change the "Default click target" in app mouse mode to
"Window". That way, you have to hold the override modifier (which can be
changed) when you do want to send a click to the application running in
the terminal.

The mouse pointer indicates where clicks are going: when it's the
so-called I-bar, it goes to the window, and when it's an arrow it goes
to the app.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Another rvxt vs. minTTY 0.3.4

2009-01-15 Thread Andy Koppe

Paul McFerrin wrote:

I have another difference between 0.3.4 and 0.3.3 of minTTY and rxvt.

If you have a long-running script running, any attemps to stop it with 
either Control-C or Control-\ does nothing.


It's working here. Just tried it with a 'configure' script.

Seems that minTTY is 
starting the child process with SIGINT signals disabled.


Signals are left untouched on the way to the child command's exec() 
call, which means the child process will inherit MinTTY's set of ignored 
signals. How are you invoking MinTTY?


Would people like to see this behaviour changed so that all child 
process signal handlers are reset to SIG_DFL?



At the prompt, Control-C is recognized.


I think that's because bash disables pty signal generation and processes 
control characters directly.


Andy



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.4

2009-01-14 Thread Andy Koppe

Yaakov (Cygwin/X) wrote:

I've uploaded MinTTY 0.3.4 to http://code.google.com/p/mintty. This is a
more substantial bugfix release than the previous one, which addresses
the following issues:


I updated Ports SVN accordingly.  


Thanks!


Do you intend to ITP this for inclusion in the distro?


Yes, but unfortunately all my MinTTY time has been taken up with
bugfixes. Hopefully the worst is fixed now though.

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



console vs pty (was: Re: First Pass at mintty documentation; etc.)

2009-01-14 Thread Andy Koppe

Chuck Wilson wrote:

"full screen" or "DOS" is a red herring. Any program that does something
like the following, if compiled as a native program, won't work in rxvt
(or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty):

#include 
main() {
  int c;
  while ((c = getc(stdin)) != EOF) fputc(c, stdout);
}

The thing is, THIS program works as part of a pipeline even when
compiled as a native program -- but it breaks if you try to use it
interactively within rxvt/MinTTY/etc.  A cygwin-compiled version works
in all cases.


I see, thanks for explaining that. What exactly does happen when calling 
read() that means that pty input doesn't reach the program?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



keycodes (was: Re: First Pass at mintty documentation; etc.)

2009-01-14 Thread Andy Koppe

Andrew DeFaria wrote:

 > "\e[1;5A": history-search-backward
 > "\e[1;5B": history-search-forward

Perhaps I don't understand this 'bash' feature, but it doesn't seem 
to work for me.
Start typing a command, press Ctrl-Up, and it finds the previous line 
in the history that started like that.
Why not simply type Ctrl-R then the first few letters of a command (or 
some letters in the middle of a command). Works great! Requires no 
support from any terminal emulator...


Yes, obviously you can bind the history search to any key you like.

To do the same as above with rxvt:

  "\eOa": history-search-backward
  "\eOb": history-search-forward

Speaking of history, does anyone know why xterm and rxvt diverged so 
much on modifier keycodes and why the xterm codes ended up being six 
characters long?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: First Pass at mintty documentation; etc.

2009-01-14 Thread Andy Koppe
Andy Koppe wrote:
> Lee D. Rothstein wrote:
>> I do lots of bash scripting including Windows/DOS commands, and I
>> can think of only one character cell app that ever gave me any
>> trouble from rxvt or xterm (whatever that app is -- I think a
>> Resource Kit app), I found a work-around and never needed it
>> again.
> 
> 'net' is a troublesome command that's been mentioned, although it seems
> to be ok for basic stuff. But I guess there might be still be a few DOS
> fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner
> implement tabs than worry about DOS apps. ;)

"full screen" or "DOS" is a red herring. Any program that does something
like the following, if compiled as a native program, won't work in rxvt
(or MinTTY, or cygwin/cmd-shell-with-CYGWIN=tty):

#include 
main() {
  int c;
  while ((c = getc(stdin)) != EOF) fputc(c, stdout);
}

The thing is, THIS program works as part of a pipeline even when
compiled as a native program -- but it breaks if you try to use it
interactively within rxvt/MinTTY/etc.  A cygwin-compiled version works
in all cases.

--
Chuck


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: First Pass at mintty documentation; etc.

2009-01-14 Thread Andy Koppe

Lee D. Rothstein wrote:


 > "\e[1;5A": history-search-backward
 > "\e[1;5B": history-search-forward

Perhaps I don't understand this 'bash' feature, but it doesn't
seem to work for me.


Start typing a command, press Ctrl-Up, and it finds the previous line in 
the history that started like that.



I do lots of bash scripting including Windows/DOS commands, and I
can think of only one character cell app that ever gave me any
trouble from rxvt or xterm (whatever that app is -- I think a
Resource Kit app), I found a work-around and never needed it
again.


'net' is a troublesome command that's been mentioned, although it seems 
to be ok for basic stuff. But I guess there might be still be a few DOS 
fullscreen apps around. Turbo Pascal perhaps? But yeah, I'd sooner 
implement tabs than worry about DOS apps. ;)



Isn't ANSI implementation required of virtual terminals? I know
that later DEC VTs, and HP terminals (bless their expensive
little scroll-back buffer hearts) had an "ANSI" mode.


To be honest, I didn't really know what I was talking about there. 
Wouldn't surprise me though if MS had done their usual embrace&extend 
trick on the ANSI stuff.



 > I didn't know xterm actually had a UI for this. Do people find
 > this useful?

I've used it on occasion when I needed to scroll back through two
debugging runs of a text-mode (character cell) app (or debugging
statements).


So your debug print macro or whatever would be switching screens?


What would be better for this and other problems, however, is a
feature that I would love: The ability to interactively, on the
fly change, the Title Bar/Task Bar Title to be clear on what each
Window is doing.


Can you explain the "interactive" bit a bit more. Do you mean clicking 
on the window title and start typing away at it?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



MinTTY 0.3.4

2009-01-14 Thread Andy Koppe

Hi,

I've uploaded MinTTY 0.3.4 to http://code.google.com/p/mintty. This is a 
more substantial bugfix release than the previous one, which addresses 
the following issues:


- In 'application cursor mode' the cursor keys sent xterm-incompatible
keycodes when combined with a modifier, starting the sequence with ESC
O instead of ESC [. This is now fixed, which means e.g. that 
combinations such as  should now work out-of-the box in vim. 
Nevertheless it's an incompatible change, so apologies to anyone who 
adapted their scripts to MinTTY's incorrect behaviour.

This change also affects the keycodes sent by the mousewheel when on
the alternate screen and not in app mouse mode. For the mousewheel to
work in less, .lesskey therefore now should look as follows (assuming 
'Shift' is the modifier key for scrolling):


  \e[1;2A back-line
  \e[1;2B forw-line

- There was a crash when scrolling beyond 32K lines. (The scrollback
limit is actually set to 64K lines, not 16K as previously mentioned.)

- The Linefeed/Newline Mode (LNM) parameter was ignored.

- When selecting multiple lines, the first character on the last line
was always included.

- Signals were not processed immediately.

- MinTTY keeps its window open when the command it runs reports
failure, so that any error output can be read (which is useful e.g.
with ssh). However, this did not deal with signals properly. Now it
will stay open only if the command exited with non-zero status or was
terminated by a runtime error signal such as SIGSEGV or SIGILL.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Signal handling in Win32 GUI programs

2009-01-13 Thread Andy Koppe
2009/1/13 Andy Koppe :
>  static const sigset_t term_sigs =
>1<http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY Double Click Issue

2009-01-12 Thread Andy Koppe

ERIC HO wrote:

In MinTTY, when I try to highlight a word or the line by double clicking on the 
mouse,
sometimes I have to do this  (double click) a few times.


What does happen when the double click is unsuccessful?

MinTTY uses the Windows double click time setting to decide whether a
click part of a double (or triple) click. I think the Windows default is
something like 700ms. Presumably you don't see this problem in other
Windows apps, e.g. Notepad?


Is there a config option to adress this?


Nope, there isn't anything directly related to that.

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Signal handling in Win32 GUI programs

2009-01-12 Thread Andy Koppe
Actually I still can't quite get signal handling in MinTTY to work 
right. SIGINT is fine, but SIGTERM, SIGHUP, and SIGKILL don't seem to 
get to sigwait(), instead still invoking the default handler, i.e. 
terminating MinTTY without SIGHUP being sent to the command inside it.


Here's what I got:

  static const sigset_t term_sigs =
1

Re: MinTTY "vs" rxvt (was Re: MinTTY 0.3.3)

2009-01-11 Thread Andy Koppe

Paul McFerrin wrote:
I've been using rxvt for years as my main terminal and just tried using 
minTTY and really prefer not to use it.  You see I'm and old man with 
poor eye sight.  The visual attributes of minTTY aren't the same that I 
use with rxvt.  The Lucida Console (white foreground on black) has less 
contrast as the same font on rxvt.  If I make it bold, it approaches 
nearly the same brightness as rxvt but a little more blurry.  These 
featurea don't go with poor vision.


The text foreground colour can be changed on the "Looks" page of the
options. The default is a light grey (191,191,191) in order to leave
room for the bright attribute. Setting it to proper white (255,255,255)
might make a difference. Regarding blurriness, it might be worth trying
the different font smoothing methods (none, anti-aliased, "ClearType").

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: First Pass at mintty documentation

2009-01-11 Thread Andy Koppe

Lee D.Rothstein wrote:


Hi, I've taken a first pass at distilling my experience with
'mintty' and the [ahem] discussion, here, about it into a text
file (see attachment mintty.{h})


Thanks, that's a nice surprise!



Speed


It's quite funny, I didn't realise that until people here pointed it 
out, probably because I didn't have to do anything to achieve it. :)




 > Best conformance to my personal expectation of what various
   directional keys (, , <->>, <<->, etc.) should do!
   (However, still bummed that -<->> & -<<-> do not
   move, respectively forward and back a word on the command
   line!)


These two lines in .inputrc should do the trick:

"\e[1;5D": backward-word
"\e[1;5C": forward-word

And here's my favourite bash feature, mapped to Ctrl-Up/Down:

"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward



  * Futures expectation: My number one goal would be for it to
 replace the Cygwin console for everything, although I
 understand there are great difficulties with that goal.


Hmm, yep, unfortunately the only path I can see towards that goal is to 
take Console2's approach of capturing a Windows console, and to try and 
make the cygwin terminal running inside it more standards-compliant, but 
that would still leave the slowness of the console and the lag caused by 
 capturing its contents.


Perhaps it would be possible to override and reimplement the Win32 
console functions as listed at

http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx ?
Do DOS software interrupts still work too? It would certainly be a huge 
amount of work though, which would include having to reimplement the 
console's ANSI emulation.




Because of the nature of various "discussion" elements in wading
through this stuff, I am referring to my documentation "project" as:
*Diuretics*!


*grin*



@@ What "alternate screen"? @@


Good question. It's vt100 lingo for a second logical screen that 
wholescreen apps such as editors normally use, often through the 
(n)curses library. (I'm taking "wholescreen" to mean an app controlling 
the whole terminal screen, as opposed to the terminal window being in 
fullscreen mode.)



= Is there an alternate screen toggle in 'mintty' as there is
  in 'xterm'?


I didn't know xterm actually had a UI for this. Do people find this useful?



= How do you invoke it?


You shouldn't need to really. Apps such as 'less' or 'vi' switch to it 
using the releavant vt100 incantation.



> [about mousewheel scrolling in less]
> the feature doesn't work in Vista when the
> scrollbar is shown. Looks like the inactive scrollbar is
> swallowing the mousewheel events.

Actually this seems to be an issue with the trackpad driver on my 
laptop. It's works fine with a bog-standard USB mouse on my desktop.


Thanks again,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY "vs" rxvt (was Re: MinTTY 0.3.3)

2009-01-11 Thread Andy Koppe

Charles Wilson wrote:

Christopher Faylor wrote:

If so, should we consider deprecating rxvt in
favor of MinTTY when MinTTY becomes a real package?

If not, there is no harm in keeping two packages in the distribution.  I
was just trying to lighten your load if you were interested.


I'd lean toward keeping both in the distro


Same here.


(mainly because I'd hate to
see a never-ending flood of "where'd rxvt go?" queries. That'd be more
of a pain than the relatively infrequent updates that rxvt gets).


And I'd be dreading the inevitable demands to implement every single 
feature and option that rxvt provides.



You mean like another setup.exe pane (or option in an existing pane) to
select the terminal that should be started by the "default" Cygwin link
in the Start Menu?  That's an interesting idea...


How about just providing Start Menu shortcuts for all installed 
terminals in a "Cygwin" folder, much like Yaakov has done in MinTTY's 
cygports package? The user could always copy them to more easily 
accessible places as needed, or just rely on the recently-used list.



Or just switch rxvt to the regular X11 version w/o all the libW11 hackery?


Bypassing the X protocol by implementing Xlib directly on Win32 does 
seem rather a good idea in principle at least. How come it hasn't been 
used more widely?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Signal handling in Win32 GUI programs

2009-01-11 Thread Andy Koppe
I've added a thread doing 'for (;;) pause();', but unfortunately that 
doesn't seem to do the trick. Do I need to go into Cygwin internals and 
wait directly on the Win32 event(s) used for signals?


sigwait() will probably work better than pause.


That indeed works, thank you very much! I didn't know that function, 
very handy. With that and threads, signal handlers with all their 
vagaries aren't really needed anymore, are they?


And speaking of threads, does it make a difference whether one uses 
Pthreads or Win32 threads? I mean apart from portability and the small 
overhead Pthreads presumably incur.


MinTTY's got three such little helper threads hanging about now, doing 
waitpid() on the child process, read() on the child pty, and the 
abovementioned sigwait(). Would there be any point in trying to 
consolidate them into a single sigwait() process, using SIGCHLD and 
asynchronous reads?


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Signal handling in Win32 GUI programs

2009-01-11 Thread Andy Koppe

Christopher Faylor wrote:

I don't know if this is what you are seeing but If you are blocked in a
Windows function like WaitMessage or WaitForSingleObject, the signal
will not be delivered until some random time after you leave the
function.


Alright, that's what it is then.


One way around this is to start a thread and wait for signals in that
thread.


I've added a thread doing 'for (;;) pause();', but unfortunately that 
doesn't seem to do the trick. Do I need to go into Cygwin internals and 
wait directly on the Win32 event(s) used for signals?


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Signal handling in Win32 GUI programs

2009-01-11 Thread Andy Koppe

Hi,

Is there something special about signal handling in Win32 GUI programs? 
With MinTTY, I'm finding that signals sent to it are only delivered when 
writing data to the child process (i.e. when you try to kill it, it 
stays open until a key is pressed).


I guess that's fair enough in as far as POSIX doesn't guarantee anything 
about signal delivery time, but the description in the user's guide does 
sound as if it should be fairly immediate:


"When a Cygwin process starts, the library starts a secondary thread for 
use in signal handling. This thread waits for Windows events used to 
pass signals to the process. When a process notices it has a signal, it 
scans its signal bitmask and handles the signal in the appropriate fashion."


Also, there's no such problem with rxvt, so is there anything obvious I 
might be doing wrong? Or are there any tricks, ideally not involving 
polling, that I should be using?


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.3

2009-01-10 Thread Andy Koppe

Andrew DeFaria wrote:

What is the native Windows look and feel other than the Window frame? 


- scrollbar
- right-click menu (also reachable via menu key)
- options dialog, with font and colour selectors
- copy&paste behaviour (copy-on-demand, Ctrl-Ins copies, shift-left 
click extends)

- drag&drop

and the options dialog (which among other things allows you to 
 configure it in an Xish way).
What could be more Xish then X Resources, which rxvt pays total 
attention to?


That point wasn't about rxvt. I was just saying that you're not
stuck with Windows-style behaviour in MinTTY. (Btw, the options dialog
isn't compulsory either; MinTTY can be configured via .minttyrc, 
although that's in need of documentation.)



And just a little helping of eye candy:
- Window transparency (which can be disabled when the window is active).

There's transparency with rxvt too. Try -ip.


From the manpage:
  -ip|+ip Turn on/off inheriting parent window's pixmap.
  Alternative is -tr; resource inheritPixmap.

Now I don't really understand what that's supposed to mean, but I'm 
pretty sure it's not proper alpha blending. In any case, all that option 
achieves on my Vista machine is to make window moves and resizes very slow.



- Fullscreen mode.
My rxvt maximizes. What you mean there's still a window frame? Doesn't 
bother me. And the amount of times when I really want to waste all of my 
screen real estate on one window can be counted on one hand...


Different people, different preferences. MinTTY inherited that feature 
from PuTTY, and I didn't see any reason to remove it. Actually I rather 
like fullscreen mode, not so much for the extra space as for the removal 
of any visual distractions.


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.3

2009-01-10 Thread Andy Koppe

Danilo Turina wrote:

Thorsten Kampe wrote:

I WANT TABS!!


Well if tabs get in, I'll throw mrxvt out of the window (or out of the 
X-Window?).


Sorry guys, I'm afraid there's no chance of me implementing those. See 
http://code.google.com/p/mintty/issues/detail?id=8


I think something like WinTabber, which is a container app that can 
aggregate any related windows, is a much better approach to tabbing than 
implementing it separately in each app. Shame it's not Free.


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.3

2009-01-10 Thread Andy Koppe

Michael Lemke wrote:
I just don't get it.  What's wrong with rxvt?  I've been using it for years as 
my only terminal for cygwin and never understood why it isn't the default.  I 
tried mintty the other day but couldn't find anything rxvt isn't doing.


MinTTY's main distinctions compared to rxvt are its native Windows look 
and feel and the options dialog (which among other things allows you to 
 configure it in an Xish way).


Now of course both those things are a matter of personal preference and 
experience, and if you have rxvt looking and working the way you want it 
to, they obviously won't be able to tempt you over. My main aim with 
MinTTY is to help integrate Cygwin better into its Windows environment 
and thus make it more approachable both for Windows users as well as for 
Linux/Unix users who are accustomed to terminals like KDE's Konsole or 
gnome-terminal.


There are a few more advantages/differences though:
- Drag&drop and copy&paste of files and folders into the MinTTY window 
(as first seen in Konsole).

- xterm-compatible encoding of modifier keys.
- Unicode support. (Of course there's rxvt-unicode, but that needs X.)
- Midnight Commander displays correctly.
- MinTTY is smaller and faster. (Does that matter? Probably not.)

And just a little helping of eye candy:
- Window transparency (which can be disabled when the window is active).
- Fullscreen mode.


In fact, mintty kind of froze on something eventually


Any details you might remember would be much appreciated in the 
interests of bug fixing.


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



MinTTY 0.3.3

2009-01-08 Thread Andy Koppe

Hi,

MinTTY release 0.3.3 is available from http://code.google.com/p/mintty. 
It fixes the following bugs:


- The "Disable transparency when active" feature caused the window to
flicker on XP
- The "Alt key on its own sends ^[" setting was ignored, i.e. Alt
alone always sent the ESC character
- The shortcut for the "System Default" font smoothing option didn't
work.

I've started looking into packaging and cygport, but it might still be a 
little while. I'll try to submit something before starting work on 0.4.0 
enhancements.


Andy


ps: Is this the appropriate list for such announcements?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY 0.3.2

2009-01-05 Thread Andy Koppe

OK, I have just downloaded the latest version and compiled it. It comes
up fine. However the text font size is very small. Is there a way to
make it easier to read? Indeed, is there a way to configure quite a few
things.  Am I missing something about documentation?


The options dialog can be reached via the context menu or the window
menu (Keyboard shortcuts: menu O or Alt+Space O). Alternatively, the
config file .minttyrc can be edited directly.

Apologies for the lack of documentation.

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



MinTTY 0.3.2

2009-01-04 Thread Andy Koppe

Hi,

I've uploaded MinTTY release 0.3.2 to http://code.google.com/p/mintty. 
It fixes a number of bugs and shortcomings:


- Pasting of multiple lines into apps like vi works properly.
- F1 to F4 send xterm-compatible VT220-style keycodes.
- The first click on the options dialog is no longer ignored.
- The scrollbar is shown by default.
- Closing on Alt-F4 can be disabled (on the Window panel).
- Characters can be entered via Alt+Numpad codes. Extending on the 
standard Windows behaviour, codepoints beyond 255 are supported and 
octal codes can be entered by typing zero as the first digit.


Special thanks to Ashok Vadekar for his help with some of these issues.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Could I use backslash directly as path delimiter on cygwin?

2009-01-03 Thread Andy Koppe

Christopher Faylor wrote:
> On Sun, Jan 04, 2009 at 05:39:10AM +0000, Andy Koppe wrote:
>> yuanyun.ken wrote:
>>> cygwin is great, I like it.  But when I want to change directory, I
>>> have to type 'cd D:/dira/dirb' or 'cd D:\\dira\\dirb'.  This is
>>> somewhat inconvenient.
>>  You might like MinTTY, which allows you to drag and
>> drop files into it.  Your example would be inserted as "D:\dira\dirb".
>> See http://code.google.com/p/mintty 
>
> MinTTY is nice but I think people may be missing the point here (or I
> am).  I believe that the OP wants to avoid typing "cd a:\\b\\c" and just
> type "cd a:\b\c" into the bash shell.

Sorry, I quoted the wrong bit of the original post. Here's the relevant 
part:


> So I can just copy the dir path from windows explore, and paste it in
> cygwin's command line?


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Could I use backslash directly as path delimiter on cygwin?

2009-01-03 Thread Andy Koppe

yuanyun.ken wrote:

cygwin is great, I like it.
But when I want to change directory, I have to type 'cd D:/dira/dirb' or 'cd
D:\\dira\\dirb'.
This is somewhat inconvenient.



You might like MinTTY, which allows you to drag and drop files into it. 
Your example would be inserted as "D:\dira\dirb".

See http://code.google.com/p/mintty


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY - Copy and Paste Issue

2009-01-03 Thread Andy Koppe

ERIC HO > Under vim, I found that when I copy a paragraph of text in
Notepad or PDF and

paste it into vim, only the first line is copied.


Yep, that's issue 16, fixed on SVN.

Also, I have PF keys map to shortcuts including  :q! ^M. 
But they are not working now. I don't have these issues under rxvt. 


Darn, the old F1..F4 issue. The xterm spec at
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html has two different
sets of keycodes for them:

  - "PC-style":^[[11~ .. ^[[14~ (i.e. actual F1..F4 codes)
  - "VT220-style": ^[OP   .. ^[OS   (i.e. PF1..PF4)

F5 and up have codes like from ^[[15~ onwards with both styles. The
confusion stems from the vt100, which didn't have PC-style F keys, but
did have the PF1..PF4 on the numpad.

MinTTY's running on a PC, rxvt uses the PC-style keys, and the F1..F4
codes seemed more consistent, so I went with PC-style too. Bad decision,
because MinTTY advertises itself as "xterm" and Cygwin's xterm and more
importantly the xterm terminfo entry use the PF codes. I entered issue 22.

Thanks,
Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: xterm and cut & paste

2009-01-03 Thread Andy Koppe

Gary R. Van Sickle wrote:


PS: File drag and drop is total coolness.  It pastes in a Win32 path though,
which a few Cygwin apps probably won't be able to handle.  Here's a
two-for-one idea, free of charge:

- Add a setting where the user can set whether he wants Win32 or POSIXy
paths dropped.
- Add a context menu when you right-drop which allows you to "Drop path as
Win32" or "Drop path as POSIX".


I like the second idea, because this is something you'd want to decide 
on a case-by-case basis. But that would mean descending into the depths 
of COM/OLE again (shudder). Issue 21.


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: xterm and cut & paste

2009-01-03 Thread Andy Koppe

Brian Salter-Duke wrote:

On Fri, 02 Jan 2009 06:56:23 +, Fergus  wrote:

Include -clipboard as an option for XWin.
e.g.
   run XWin -clipboard -nolisten local -multiwindow 2>nul &
and then selected text in xterm is automatically copied to the clipboard 
for onward pasting.

Fergus


Thanks for that. I find X very confusing and mainly just want a simple
xterm to run mutt, slrn and unix like-codes.


Fancy giving MinTTY a try? It is (or at least attempts to be) compatible 
with xterm, but it's a native Win32 program, i.e. X is not required.


http://code.google.com/p/mintty

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-02 Thread Andy Koppe

Christopher Faylor wrote:

It accesses the console's screen contents through Win32's
GetConsoleScreenBufferInfo() and displays it in its own window while
hiding the actual console.  I can't see a way to combine this sort of
approach with ptys.


If you have a captured interface then a windows console could be treated
like a pty.


I'm afraid I don't quite understand what you're getting at. Isn't this 
what the cygwin terminal is doing already? I see a WriteConsoleOutput 
call in fhandler_console.cc, which manipulates the console screen 
content directly.



The fact that windows apps don't like cygwin ptys is why we never made
rxvt the standard interface.  What would be nice is to give the user
some easy way to decide which they want.  We would, of course, still get
people complaining about whichever choice they made, though.


Agreed. :)


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-02 Thread Andy Koppe

Christopher Faylor wrote:

I finally played around with this a little.  It is nice.   It reminds
me a little bit of Console2 - http://console.sourceforge.net/.

One thing that Console2 does is provide a true "console" interface which
doesn't rely on anything like Cygwin's ptys.  


On the other hand, it isn't actually a terminal emulator as such. What 
it does do is to put a nicer interface on the Windows console, so for 
Cygwin programs you still get Cygwin's console-based terminal.



Console2 apparently uses a polling interface over a captive invisible
console to fool programs into thinking that they are running in a real
Windows console.


It accesses the console's screen contents through Win32's 
GetConsoleScreenBufferInfo() and displays it in its own window while 
hiding the actual console. I can't see a way to combine this sort of 
approach with ptys.



On further reflection, I think that the fact that mintty uses cygwin
ptys may be a show stopper as far as making it the default is concerned.
I don't think we can have the default command line interface misbehave
when it runs some standard Windows programs, like, if memory serves, the
"NET" command in some cases.


As things stand, it's a choice between full support either for Windows 
console applications or for Unix terminal applications. I'd guess that 
the latter is more important to most Cygwin users. Not my call though.



Also, the mouse behavior isn't like xterm or xterm imitators so it
wouldn't necessarily be intuitive for someone coming over from linux.
I'm sure that could be changed though.  Did I miss a configuration
for mouse and cut/paste behavior?


Middle-click paste is always available, and copy-on-select and 
right-click extend can be enabled on the Mouse page of the options. (In 
the latter case, the menu is still available via Shift-right-click and 
the context menu key. The options can also be found in the window menu.)



I still think it would be a nice addition to the list of Cygwin
packages.  It gets my +1 vote.


Thanks!


Oh, and if you want to get rid of the console window when mintty is
started from a bat file, I think FreeConsole() would do the trick.


I'll give that a try. Perhaps I should make it a command line option if 
I can get it to work?


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-02 Thread Andy Koppe

As I have explained in my OP: AltGr+ì or ALT+126 code work just fine
with other consoles and/or applications.


If I switch my machine to the Italian keyboard, Windows applications 
such as Notepad, Word or Mozilla Thunderbird do nothing when I press 
AltGr+ì. (I can type the accented ì alright.) This also applies to the 
Windows console and the default Cygwin terminal running inside that. 
Looking at the Italian keyboard layout in MSKLC, this is because nothing 
has been assigned to AltGr+ì (i.e. the key to the left of backspace).


As I explained, the other terminals you mentioned are X applications, 
and X has its own separate keyboard layout infrastructure. MinTTY is a 
native Windows application though, hence it depends on this key being 
supported in the Windows keyboard layout.


I already accepted the Alt+NumPad issue.

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-02 Thread Andy Koppe

Gary R. Van Sickle wrote:


-i" on the shortcut's command line.  That would be a nice one to have in the
configuration dialogs, but I don't see how you avoid the registry in that
case.  Maybe just going with "bash --login -i" as the default if you don't
tell it otherwise would be a 90% solution.  


MinTTY's current behaviour is the same as rxvt's and xterm's, and I 
think it makes sense not to execute the profile when starting a new 
terminal from within an existing session using just 'rxvt&' or 'mintty&'.



I don't recall what Setup.exe's
Shortcut capabilities are, but if it's capable enough, the setup package
could tack that on the end when it generates a shortcut for it.


That's definitely the way to go.


- The ability to configure it via dialogs, especially such 21st century
things as fg/bg/cursor colors and the font and point size to use, is most
excellent and most welcome.


:)


- From the web page: "Mousewheel events can be sent as arrow keys. (This
allows mousewheel scrolling e.g. in less.)"  All I get is dings, and I don't
see any documentation as to how to set this up.


Yep, unfortunately no docs yet. (Issue 2.)

When on the alternate screen and not in application mouse mode, 
mousewheel-up/down sends arrow-up/down combined with the scroll modifier 
configured under Keys, so with the default Shift you get ^[[1;2A and 
^[[1;2B. (Replace the 2 with 3 for Alt or 5 for Ctrl).


The thinking behind that is that this replaces the terminal scrollback 
when on the alternate screen, and that plain arrows mean cursor movement 
rather than scrolling. And a word of warning: the feature doesn't work 
in Vista when the scrollbar is shown. Looks like the inactive scrollbar 
is swallowing the mousewheel events.


Activate mousewheel scrolling in 'less' with the following two lines in 
your .lesskey file. Don't forget to run 'lesskey' to compile it into 
less's internal format.


\eO1;2A back-line
\eO1;2B forw-line

Btw, it's 'O' rather than '[' here, because 'less' switches into 
"application cursor key" mode. (Yep, the world of terminals is full of 
fascinating yet strangely pointless details like that.)



- OMG FULL-SCREEN MODE!  Where we're going, we don't need roads!  Dude, if
you tell me that it uses DirectX and a multi-hundred-dollar video card to
throw up a full-screen 80x24 text interface I will laugh for a week ;-)!


Don't worry, it's plain ol' Win32. Another goodie from PuTTY. Combine 
fullscreen with transparency and an auto-hiding taskbar for maximum geek 
cred. :)



MinTTY:
$ set | grep TERM
TERM=xterm


The proper thing to do would be to set TERM to "mintty", but that would 
require termcap and terminfo entries. I guess that might be worth 
considering for a MinTTY package, although iirc KDE's Konsole and 
GNOME's terminal also just set it to "xterm", because like MinTTY they 
aim to be compatible with (the default config of) xterm. Would make life 
easier for everyone to settle on that as a standard.



- It should default to "Show scrollbar" being on.  For a while there I
thought I didn't have a scrollback buffer.


Agreed, switching it off by default took the minimalism a bit too far. 
Issue 19.



- The default Lucida 9-point seems rather too small to me.  Now, my eyes are
no spring chickens anymore, but even so, I think 12 point would be a better
default.


I'd realised that before seeing your mail and already increased it to 
10point in 0.3.1. That's also the default in PuTTY and Windows Notepad, 
and pretty similar in size to the bitmap font in the Windows console. 
Obviously matter of personal preference though, hence the option. (No 
kidding.)



- When you open the Options dialog, it takes two clicks to select one of the
option catagories in the tree pane on the left, as if the first is getting
ignored for some reason.


Ah yes, I never did get round to investigate that one. Issue 20.


- It doesn't handle resizing correctly.  I.e., with my urxvt-X.exe+Xwin
setup, if I do "echo $PATH" (which goes way over 80 chars) and then I resize
the window, the previously-printed path gets re-layed-out to fill the entire
client area.  With MinTTY, that doesn't happen.  No relayout happens on
either increasing or decreasing the window width (and hence the number of
columns).  Subsequently printed output does however take the new number of
columns into account.  To me, this is the most significant issue I've seen
so far.


Plain rxvt and xterm do the same, and it would be quite a big and risky 
change in code I don't know much about to implement relayouting.


Simon Tatham has a PuTTY wish for an apparently simpler version of this:
http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/resize-no-truncate.html

(Btw, resizes are signalled to applications, so relayouting does work in 
apps that handle that signal, e.g. less.)



- I don't see a config option to set the number of lines of scrollback
buffer.  Whatever it is defaulting to seems like plenty, but it would 

Re: MinTTY

2009-01-01 Thread Andy Koppe

Angelo Graziosi wrote:

I cannot insert the character : '~' (tilde, i.e. the 'home dir').
Usually with my italian keyboard I use 'ALT GR'+ì (accented 'i'): this
works with xterm, urxvt, rxvt; with Cygwin.bat I need ALT+ASCII code.


For characters beyond space MinTTY relies on Windows' keyboard layout 
mechanism, through the ToUnicode function. So I had a look at the 
Italian Windows keyboard layout and was quite surprised to find that it 
simply doesn't have a tilde. (They found space for two Euros though, on 
AltGr+E and AltGr+5.)


So what do you do when you need the tilde in other applications, e.g. 
for typing the bitwise-not operator in C?


X implement its own keyboard layout mechanism on top of lower-level 
Windows scancodes or virtual key codes, so apparently the Italian X 
keyboard layout does have a tilde on AltGr+ì.


I'm very reluctant to add locale-specific keyboard layout handling code 
to MinTTY and I think this issue would best be addressed by adding the 
tilde to the Windows keyboard layout, which would make it available 
across all Windows apps. Microsoft's Keyboard Layout Creator (MSKLC) 
available from http://www.microsoft.com/globaldev/tools/msklc.mspx is a 
free (as in beer) and convenient way to do that. I've whipped up an 
"Italian - Tilde" layout and will send that in a separate mail.


(Btw, the authority on all things Windows keyboards is MSKLC author 
Michael Kaplan, who blogs about it at 
http://blogs.msdn.com/michkap/archive/tags/Keyboards/default.aspx)



Also the ALT+ASCII code from numeric pad does not work.


Sorry about that. I couldn't be bothered to implement that DOS relic 
when I replaced PuTTY's keyboard handling, mostly because it's a 
godawful user interface, even more so on laptops. It is still a Windows 
standard though; therefore I ought to make it work. Issue 17.



Besides this, it would be nice if MinTTY were multi-tabs (mrxvt,
konsole) and if an image could be loaded as background (like mrxvt...)


See issue 8 for why I won't implement tabs. I'm not keen on the 
background image either, but I've entered issue 18 for it.



And for installation, the method suggested by Yaakov is the best!


Couldn't agree more.

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2009-01-01 Thread Andy Koppe
Just a quick note to say I've uploaded release 0.3.1 of MinTTY. It fixes 
broken non-ASCII output, increases the default font size to 10, and adds 
a couple of easy enhancements: support for accelerator keys in the 
options dialog and the option to switch off transparency when the window 
has the focus.


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-31 Thread Andy Koppe

Gary R. Van Sickle wrote:


Yes, but there's the complication of "CYGWIN=" settings that have to be set
before the Cygwin DLL even loads.  


Thanks for pointing that out.

For that matter, MinTTY could also provide GUI access to bash 
command line flags, a way to change the login shell by 
modifying /etc/passwd, etc.


It could be glorious!  Well, or overachieving ;-).


Yep, I'd rather stick to core functionality. Well ok, and just a little
helping of pointless eye candy. :)

Bash options can already be set on the command line passed to mintty, or
of course within bash itself. If there was special support for bash in
the terminal, than why not for tcsh, zsh, vi, emacs, ...

Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-31 Thread Andy Koppe

Yaakov (Cygwin/X) wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Andy Koppe wrote:

Christopher Faylor wrote:

I wouldn't mind making MinTTY a regular cygwin package.  It sounds
like it
would get enough votes.

That would be great. I'll need to read up on the package submission
requirements and process. Unless someone would like to volunteer as the
MinTTY package maintainer?


Usually those who write programs especially for Cygwin are their own
package maintainers, for obvious reasons.  But as this looks quite
interesting, I quickly put together a package for Ports which could get
you started:

http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/apps/mintty/

Check out this directory, then use cygport to build it.  If you're new
to cygport, the package README is a must-read.


Thank you very much! Yep, I'm entirely new to this, so what with those 
pesky New Year festivities taking away valuable hacking time it might be 
a little while to familiarise myself with this packaging lark. :)


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-31 Thread Andy Koppe

Buchbinder, Barry (NIH/NIAID) [E] wrote:
>> Ideally it would be a .msi that installs just the exe and the readme
>> into %PROGRAMFILES%\MinTTY and puts a shortcut to the exe directly
>> into Start Menu\Programs.
>
> Please don't make this the only way to install this.  Some of us (e.g.,
> yours truly) do not have permissions that allow installation into
> %PROGRAMFILES%.

Rest assured that I certainly wouldn't want to make an installer the 
only option (and any installer ought to offer a choice of installation 
directory anyway). But as you say, this is now a moot question as Gary 
has taken the option off the table and Yaakov has started work on a 
Cygwin package.


Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-31 Thread Andy Koppe

Thorsten Kampe wrote:
?? That's how Windows Cmd.exe works. If rxvt does something different 
then it does some magic and it would definitely irritating to me if cmd 
would /not/ keep a Window open until mintty is closed. If you want the 
"old" behaviour of the command.com/Windows 9X environment, you have to 
use "start".


You've convinced me. Issue 4 closed as "WontFix". Thanks!

Windows has a GUI setting for user and system 
variables (which is quite lenthy to access).


I couldn't find a user side GUI setting, although the registry key is in
a pretty obvious place: HKEY_CURRENT_USER\Environment

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-31 Thread Andy Koppe

On the options dialog box, an apply button would be a good
Addition.


Agreed. I've entered issue 12 for this.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-30 Thread Andy Koppe

Christopher Faylor wrote:

I wouldn't mind making MinTTY a regular cygwin package.  It sounds like it
would get enough votes.


That would be great. I'll need to read up on the package submission 
requirements and process. Unless someone would like to volunteer as the 
MinTTY package maintainer?



In fact, if it operates like an xterm on Windows
maybe it should even be the default program that is invoked by cygwin.bat.


I'd certainly like that, although unfortunately MinTTY doesn't quite fit 
the bill yet due to Issue 4 about leaving the console window open. And 
of course it needs a lot more testing.


Speaking of cygwin.bat, is that actually still needed? I find that bash 
can be invoked more directly through a shortcut, and working directory 
and icon can be set there too. The same works for mintty.


Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-30 Thread Andy Koppe

Robert Pendell wrote:

I modified cygwin.bat to execute mintty.
Looks like mintty doesn't detach completely on it's own 


Yep, that's a known issue (number 4 in the issue tracker), and I haven't
yet worked out how to do this properly. I've tried closing files 0
through 3 and doing a setsid(), but that's not sufficient. Hints on how
to detach properly would be much appreciated.


I appended
'start' to the beginning to it.  The program will continue to run but
the black box will disappear.  If start doesn't work then use 'cygstart'
instead as that one is supplied by cygwin.  Basically the last line of
cygwin.bat was changed to show as...

start mintty bash --login -i


Thanks! That's a good workaround.

Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-30 Thread Andy Koppe

Gary R. Van Sickle wrote:

Hmm, looks very interesting, I'll give it a try and report back to the
class.  I've been looking for a replacement for my preferred terminal
emulator, MedicineTTY, for quite some time. ;-)


Each to their own. I actually prefer PeaTTY.


1.  Good work.


Thanks!


2.  Super fast.


That's entirely due to Simon Tatham's excellent PuTTY code. PuTTYcyg,
which has a different pty backend with a separate helper process, is
just as fast.


3.  Cut and paste in a Unixoid terminal for Cygwin finally conforms to
Windows norms (AKA "The One True Way").  That alone is worth it.


Careful, I think you might be a bit controversial there. :)


4.  I wasn't getting color from ls, but that appears to be a
termcap/terminfo/wrong-bash-invocation issue, as your screenshots clearly
show color support.


Yep, that sounds like a bash invocation issue. If no command is provided
on the command line, mintty invokes the current user's default shell
from /etc/passwd without additional options, i.e. not as a login shell.
It's the same for rxvt and xterm.

Cygwin's bash scripts are designed for login shells only though, i.e. if
you want a proper setup you'll need to either provide a suitable
/etc/bash.bashrc or ~/.bashrc, or invoke the bash within mintty as a 
login shell:


  mintty bash -l

The shortcut created by create_shortcut.js will do just that.


5.  It needs a regular Windows installer.


That does seem a little bit unnecessary when all that's needed is the 
exe, but I suppose that quite a lot of users would appreciate the 
convenience of just double-clicking an installer.



5a. I'm good with Windows installers.  You want I should whip one up for
you?


That would be great, since I haven't got a clue about how to do that.
Ideally it would be a .msi that installs just the exe and the readme
into %PROGRAMFILES%\MinTTY and puts a shortcut to the exe directly into
Start Menu\Programs.

Cheers,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-30 Thread Andy Koppe

Charles Wilson wrote:


It will be interesting to play with the codepage support
(already present, apparently) in this terminal -- perhaps UTF-8 +
cygwin-1.7...


That would be interesting indeed, and hopefully I haven't broken any of 
PuTTY's Unicode support. Just set the codepage to UTF-8 to try (assuming 
MinTTY compiles and runs on 1.7, which I haven't yet tried).


Is there an overview somewhere about the Unicode features in cygwin-1.7?


The obvious similarity between MinTTY and rxvt is that both use pty
emulation to communicate with the inferior, which can sometimes cause
issues when running "native" (e.g. non-cygwin) applications. But, that's
not a /defect/, per se, just something that users should be aware of.


Good point. I should mention that on the project page.


This looks like a great addition to the cygwin-related toolbox. I look
forward to seeing where you go with this in the future.


First off, documentation. :)

Thanks,
Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: MinTTY

2008-12-30 Thread Andy Koppe

Reini Urban wrote:


Transparency in XP! Good.


That's only a matter of a couple of function calls actually. 
Unfortunately though it applies to the window as a whole, not just to 
the background. Per-pixel alpha can be done, but only at the cost of 
painting all the window decoration manually, so that's not going to 
happen. It might be more feasible in Vista though.



Line cursor: hmm.


Sorry 'bout that. I tried to stick to both Windows and X conventions, 
but where they clashed I generally went with Windows-style defaults, for 
consistency with the rest of the system.


The following settings will give you something more Xish:
  - Looks:
  Cursor: Block
  Enable cursor blinking: off
  - Mouse:
  Right click action: Extend
  Copy on select: on


Speed: Fastest.


Cheers,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



<    5   6   7   8   9   10   11   >