This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rxvt ctrl-c killing process


David Smiley @MITRE.org wrote:
> Mintty is even better (thanks Sven) but suffers from the same problem as Andy
> is pointing out.  It's odd that when using Cygwin's default terminal
> (whatever that thing is) that ctrl-C works there but not in mintty.  Any
> work-arounds/alternatives?

You may be able to use console2.
https://sourceforge.net/projects/console/

The problem boils down to, what is used for the stdio handles: actual
win32 console handles, or cygwin's invented pseudo-ttys?  All cygwin
programs -- including terminal emulators like rxvt and mintty -- will
use pseudo-ttys to talk to the inferior process.  Only cmd.exe will use
actual win32 console handles.

Now, I think the external console2 project uses console handles (it's an
odd duck; there's an invisible console, and you actually do I/O to that,
but periodically the console2 program 'scrapes' the data and copies it
to the visible window; and vice-versa for input).  It actually works
pretty well...but as it can only be compiled using Visual Studio and not
gcc, it'll never be part of the cygwin distro nor the mingw one.

But...download it and try it out. It might solve your CTRL-C problem.

If you put the attached xml file into the same directory as console2.exe
(after editing it to use the correct file paths, of course), then a
shortcut whose target is:

C:\Util\Console2\Console.exe -t "cygwin-1.7"

will launch a cygwin-in-console2 window.

(also, CTRL-F1 will launch MinGW, CTRL-F2 will launch an "MSYS DVLPR"
mingw, and CTRL-F3 will launch a plan cmd.exe-in-console2. 'Course, you
need to have all those apps installed...)

--
Chuck
<?xml version="1.0"?>
<settings>
  <console change_refresh="10" refresh="50" rows="30" columns="128" buffer_rows="2000" buffer_columns="0" shell="" init_dir="" save_size="0" start_hidden="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="DejaVu LGC Sans Mono" 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" show_scrollbars="1"/>
    <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="0" shift="0" alt="0" extended="0" code="0" command="stopscroll"/>
    <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"/>
    <hotkey ctrl="0" shift="0" alt="0" extended="0" code="0" command="activate"/>
  </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="C:\msys\1.0\msys.ico">
      <console shell="C:\msys\1.0\bin\sh.exe --login -i" init_dir="C:\msys\1.0\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="MSysDvlpr" icon="C:\msys\1.0\m.ico">
      <console shell="C:\msys\1.0\bin\sh.exe -c 'MSYSTEM=MSYS exec /bin/sh --login -i'" init_dir="C:\msys\1.0\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-1.7" icon="C:\cygwin-1.7\cygwin.ico">
      <console shell="C:\cygwin-1.7\bin\bash.exe --login -i" init_dir="C:\Users\cwilson"/>
      <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>

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]