|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Accepting standard input from MSYS with native Win32 programsHi all
I understand that there are some fundamental design issues with rxvt and/or bash that means that MSYS can't be used as a command line from running normal Windows/DOS console-based programs such as 'svn' when input from stdin is required. As I understand it, it is because RXVT expects programs to provide a 'TTY' interface, which is not compatible with the way that native Windows/DOS programs do their I/O. Native Windows command-line programs that I would like to be able to run from MSYS would include python, svn, and other little programs that I write in C. I just wondered -- are there are any little hacks or workarounds that can fix this situation? I am correct in my understanding about this problem? Cheers JP ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsQuoting John Pye <john@...>: > Hi all > > I understand that there are some fundamental design issues with rxvt > and/or bash that means that MSYS can't be used as a command line from > running normal Windows/DOS console-based programs such as 'svn' when > input from stdin is required. As I understand it, it is because RXVT > expects programs to provide a 'TTY' interface, which is not compatible > with the way that native Windows/DOS programs do their I/O. > > Native Windows command-line programs that I would like to be able to run > from MSYS would include python, svn, and other little programs that I > write in C. > > I just wondered -- are there are any little hacks or workarounds that > can fix this situation? I am correct in my understanding about this problem? > The real problem is that STDIN/OUT/ERR are pipes and there is no other emulation that can be done. For these programs I like to ``start /msys.bat --norxvt''. Earnie ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsOn Thursday 11 September 2008 16:32:08 Earnie Boyd wrote:
<groan> Not this old chestnut *again*... > Quoting John Pye <john@...>: > > I understand that there are some fundamental design issues with > > rxvt and/or bash that means that MSYS can't be used as a command > > line from running normal Windows/DOS console-based programs such > > as 'svn' when input from stdin is required. As I understand it, > > it is because RXVT expects programs to provide a 'TTY' interface, > > which is not compatible with the way that native Windows/DOS > > programs do their I/O. > > > > Native Windows command-line programs that I would like to be able > > to run from MSYS would include python, svn, and other little > > programs that I write in C. > > > > I just wondered -- are there are any little hacks or workarounds > > that can fix this situation? I am correct in my understanding > > about this problem? > > The real problem is that STDIN/OUT/ERR are pipes and there is no > other emulation that can be done. Yes, this is true when you insist on running your MSYS shell within rxvt, the pipes are connecting rxvt to your application. It isn't the case when you run in a genuine native Win32 console. You don't have to run the MSYS shell in an rxvt; run it native, and you get console I/O the way it's meant to be -- problem solved. > For these programs I like to ``start /msys.bat --norxvt''. Or just kick rxvt into touch -- permanently. There are plenty of references in the list archives, and on the old MinGWiki, telling you the "little hacks and workarounds". JFGI. Search on "msys+console"; this takes me straight to the appropriate MinGWiki page. Alternatively, if you really can't tolerate the bare native console, even after following the advice given there, then have a look at the Console-2 project on SourceForge: https://sourceforge.net/projects/console/ This gives you pretty much everything that rxvt does, and then some, but it also behaves properly, wrt native console capabilities. Try it; it makes rxvt look positively mediocre. It's just a shame it can't be built with MinGW, (at least, without a lot of hacking). Regards, Keith. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsHi Keith
Keith Marshall wrote: > On Thursday 11 September 2008 16:32:08 Earnie Boyd wrote: > > <groan> Not this old chestnut *again*... > Sorry if this is repetitive, it's just that rxvt is the standard thing, and I've been introducing some new users to MSYS and this issue comes up almost immediately as a frustration for them. I see that it is planned to make the native console the default in the next MSYS release, so let's look forward to that then. http://www.mingw.org/MinGWiki/index.php/MsysShell You said that Console (sf.net) provides 'pretty much' everything that rxvt provides. What exactly are the shortcomings, if any? Are there instructions somewhere on how to set Console as the default console for MSYS? Cheers JP ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsOn Friday 12 September 2008 03:51:07 John Pye wrote:
> You said that Console (sf.net) provides 'pretty much' everything > that rxvt provides. What exactly are the shortcomings, if any? I'm not sure if you do actually lose anything. At one time, IIRC, *nix style job control, (with ^Z to suspend fg task), used to work when running in rxvt, but not in native console; today, with bash 3.1.0, it doesn't appear to work in rxvt either. I did find that some of the default key bindings for Console-2 were badly chosen -- e.g. ^S bringing up the modal configuration dialogue instead of being XOFF, or readline's incremental history search, or info's incremental search. There were others, less serious perhaps, but which bugged me. However, these can all be changed, and I've done so, to suit my own preferences. There is one feature I miss, when using the mouse to select text; there is no double click to select an individual word, nor triple click to select a whole line; the entire selection must be marked by dragging. Also, I notice that the highlight doesn't always move with the selected text, when the display scrolls. My only other gripe with it -- I'm using build 138 -- is that the window background colour can't be set distinctively for different shell tabs, (in spite of an apparent individual setting per tab), so I've had to settle for just different tab icons and cursor styles, to distinguish MinGW, MSYS and cmd.exe tabs. > Are there instructions somewhere on how to set Console as the > default console for MSYS? No, and because it doesn't build with MinGW, I don't think we should offer it as a default MSYS console. However, IMO it offers such a significant improvement in user experience over rxvt, or over the native console, that I'm happy to recommend others to try it. I've attached my own configuration preferences, which make it very much like a KDE konsole; feel free to copy these, and tweak them to your own preferences. With this configuration, I don't even need to use msys.bat any more; I simply have all the Console-2 files, (including the attached XML configuration), in D:\opt\Console2, and a shortcut set to run D:\opt\Console2\console.exe starting in my MSYS /bin directory D:\usr\MSYS-1.0.11\bin with the start up mode set to `Normal window'. Note that, in console.xml, I have the first tab class set up to run the MSYS shell in its standard MinGW configuration, (making this the default on start up), while the second tab class is set up for the MSYS Developer mode, the third for cmd.exe, and the fourth for Cygwin; I can create individual desktop shortcuts for each of these, by adding a `-t <title>' option to the console.exe start up command, where `<title>' matches the `title' property value for the desired tab class, in console.xml. HTH, Keith. <?xml version="1.0"?> <settings> <console change_refresh="10" refresh="50" rows="50" columns="160" buffer_rows="500" buffer_columns="0" shell="" init_dir="" save_size="0"> <colors> <color id="0" r="255" g="255" b="208"/> <color id="1" r="0" g="0" b="128"/> <color id="2" r="0" g="150" b="0"/> <color id="3" r="0" g="150" b="150"/> <color id="4" r="170" g="25" b="25"/> <color id="5" r="128" g="0" b="128"/> <color id="6" r="128" g="128" b="0"/> <color id="7" r="0" g="21" b="108"/> <color id="8" r="128" g="128" b="128"/> <color id="9" r="0" g="100" b="255"/> <color id="10" r="0" g="255" b="0"/> <color id="11" r="0" g="255" b="255"/> <color id="12" r="255" g="50" b="50"/> <color id="13" r="255" g="0" b="255"/> <color id="14" r="255" g="255" b="0"/> <color id="15" r="51" g="51" b="255"/> </colors> </console> <appearance> <font name="Courier New" size="9" bold="0" italic="0" smoothing="2"> <color use="0" r="0" g="0" b="0"/> </font> <window title="Console" icon="" use_tab_icon="1" use_console_title="1" show_cmd="1" show_cmd_tabs="1" use_tab_title="1" trim_tab_titles="20"/> <controls show_menu="0" show_toolbar="0" show_statusbar="1" show_tabs="1" hide_single_tab="0"/> <styles caption="1" resizable="1" taskbar_button="1" border="0" inside_border="2" tray_icon="0"> <selection_color r="252" g="255" b="136"/> </styles> <position x="17" y="25" dock="-1" snap="0" z_order="0" save_position="0"/> <transparency type="0" active_alpha="216" inactive_alpha="255" r="255" g="255" b="208"/> </appearance> <behavior> <copy_paste copy_on_select="1" clear_on_copy="0" no_wrap="1" trim_spaces="1" copy_newline_char="1"/> <scroll page_scroll_rows="0"/> <tab_highlight flashes="3" stay_highligted="1"/> </behavior> <hotkeys use_scroll_lock="1"> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="83" command="settings"/> <hotkey ctrl="0" shift="0" alt="0" extended="0" code="112" command="help"/> <hotkey ctrl="0" shift="0" alt="1" extended="0" code="115" command="exit"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="112" command="newtab1"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="113" command="newtab2"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="114" command="newtab3"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="115" command="newtab4"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="116" command="newtab5"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="117" command="newtab6"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="118" command="newtab7"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="119" command="newtab8"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="120" command="newtab9"/> <hotkey ctrl="1" shift="0" alt="0" extended="0" code="121" command="newtab10"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="112" command="switchtab1"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="113" command="switchtab2"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="114" command="switchtab3"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="115" command="switchtab4"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="116" command="switchtab5"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="117" command="switchtab6"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="118" command="switchtab7"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="119" command="switchtab8"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="120" command="switchtab9"/> <hotkey ctrl="1" shift="1" alt="0" extended="0" code="121" command="switchtab10"/> <hotkey ctrl="0" shift="1" alt="0" extended="1" code="39" command="nexttab"/> <hotkey ctrl="0" shift="1" alt="0" extended="1" code="37" command="prevtab"/> <hotkey ctrl="1" shift="0" alt="1" extended="0" code="88" command="closetab"/> <hotkey ctrl="1" shift="0" alt="1" extended="0" code="83" command="renametab"/> <hotkey ctrl="1" shift="0" alt="0" extended="1" code="45" command="copy"/> <hotkey ctrl="1" shift="0" alt="0" extended="1" code="46" command="clear_selection"/> <hotkey ctrl="0" shift="1" alt="0" extended="1" code="45" command="paste"/> <hotkey ctrl="1" shift="1" alt="0" extended="1" code="38" command="scrollrowup"/> <hotkey ctrl="1" shift="1" alt="0" extended="1" code="40" command="scrollrowdown"/> <hotkey ctrl="1" shift="1" alt="0" extended="1" code="33" command="scrollpageup"/> <hotkey ctrl="1" shift="1" alt="0" extended="1" code="34" command="scrollpagedown"/> <hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolleft"/> <hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollcolright"/> <hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageleft"/> <hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="scrollpageright"/> <hotkey ctrl="1" shift="0" alt="1" extended="0" code="68" command="dumpbuffer"/> </hotkeys> <mouse> <actions> <action ctrl="0" shift="0" alt="0" button="1" name="copy"/> <action ctrl="0" shift="0" alt="0" button="1" name="select"/> <action ctrl="0" shift="0" alt="0" button="3" name="paste"/> <action ctrl="1" shift="0" alt="0" button="1" name="drag"/> <action ctrl="0" shift="0" alt="0" button="2" name="menu"/> </actions> </mouse> <tabs> <tab title="MinGW" icon="D:\usr\icons\konsole.ico"> <console shell="D:\usr\MSYS-1.0.11\bin\sh.exe --login -i" init_dir="D:\usr\MSYS-1.0.11\bin"/> <cursor style="8" r="0" g="0" b="160"/> <background type="0" r="255" g="255" b="206"> <image file="" relative="0" extend="0" position="0"> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> <tab title="MSYS" icon="D:\usr\MSYS-1.0.11\msys.ico"> <console shell="d:\usr\MSYS-1.0.11\bin\sh.exe -c 'MSYSTEM=MSYS exec /bin/sh --login -i'" init_dir="d:\usr\MSYS-1.0.11\bin"/> <cursor style="8" r="255" g="0" b="128"/> <background type="0" r="255" g="255" b="208"> <image file="" relative="0" extend="0" position="0"> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> <tab title="CMD.EXE"> <console shell="" init_dir=""/> <cursor style="8" r="0" g="64" b="128"/> <background type="0" r="255" g="255" b="208"> <image file="" relative="0" extend="0" position="0"> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> <tab title="cygwin" icon="D:\usr\cygwin\cygwin.ico"> <console shell="D:\usr\cygwin\bin\bash.exe --login -i" init_dir="D:\usr\cygwin\home\keith"/> <cursor style="8" r="64" g="0" b="64"/> <background type="0" r="255" g="255" b="206"> <image file="" relative="0" extend="0" position="0"> <tint opacity="0" r="0" g="0" b="0"/> </image> </background> </tab> </tabs> </settings> ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsKeith Marshall wrote:
> My only other gripe with it -- I'm using build 138 -- is that the > window background colour can't be set distinctively for different > shell tabs, (in spite of an apparent individual setting per tab), so > I've had to settle for just different tab icons and cursor styles, to > distinguish MinGW, MSYS and cmd.exe tabs. Are you sure about that? I use build 139 (just upgraded to 140) and I use different backgrounds per tab (you use the "Tabs" entry in the configuration dialog - needs a restart to take effect). It may be I'm misunderstanding what you want to do, though. Paul. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
|
|
Re: Accepting standard input from MSYS with native Win32 programsOn Friday 12 September 2008 21:37:01 Paul Moore wrote:
> > My only other gripe with it -- I'm using build 138 -- is that the > > window background colour can't be set distinctively for different > > shell tabs, (in spite of an apparent individual setting per tab), > > so I've had to settle for just different tab icons and cursor > > styles, to distinguish MinGW, MSYS and cmd.exe tabs. > > Are you sure about that? I use build 139 (just upgraded to 140) and > I use different backgrounds per tab (you use the "Tabs" entry in > the configuration dialog - needs a restart to take effect). It may > be I'm misunderstanding what you want to do, though. With build 138, (and with the earlier ones I've tried), I see barely any effect for different background colour settings, in the "Tabs" configuration dialogue. The effect appears only as a narrow border, in the designated colour, around the text panel. This effect vanishes entirely, if the border width is reduced to zero, (as I prefer it). This colour setting doesn't appear to affect the area which I would describe as the background; I expect that to represent the background colour over the entire text area of the tabbed panel. Maybe this has been changed in build 139; I'll take a look on Monday, (don't use MSW on my home boxes). Thanks, Keith. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ MinGW-users mailing list MinGW-users@... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |
| Free embeddable forum powered by Nabble | Forum Help |