Cygwin and Console2 with TotalCommander

sessizce
2010-01-24
2013-06-12
  • sessizce
    sessizce
    2010-01-24

    First of all I would like to thank for this great software. It is the cure for my all pains in windows. :)

    After spending many time and tries, I need help of someone. :)

    How can I configure my TotalCommander or another application to open current directory in Total Commander with Cygwin. I am pretty sure that I made a mistake while I was trying to wrote parameters but I gave up now :)

    Thanks

     
  • Hi,

    Console help file lists supported command line options. One of them is -d that specifies startup directory. If you can pass TotalCommander's current directory to Console's command line, you're all set :)

    Cheers,
    Marko

     
  • Cem Koc
    Cem Koc
    2010-02-02

    Thanks for your answer,

    Can you give me a specific example.

    For example,

    D:\ProgramFiles\Console2\Console.exe -d "c:"
    

    I tried other combinations too… By the way please note that I am trying to bash.exe as my shell.

    Thanks

     
  • jurko trulko
    jurko trulko
    2010-04-09

    Add the console2 directory to your PATH environment variable.
    Leave blank startup dir in console2 settings.
    Initialize some variable eg. BASHHERE at the begining of cygwin.bat.
    for example my cygwin.bat looks like:

    @echo off
    set BASHHERE=%cd%
    C:
    chdir C:\cygwin\bin
    bash --login -i
    

    then edit .bash_profile in your home directory eg. c:\cygwin\home\user\.bash_profile and add following code:

    if [ "$BASHHERE" != "" ]; then
        cd "$( echo $BASHHERE | tr "\134" /)"
    fi
    

    Restart total commander and it should work.

     
  • dott
    dott
    2010-06-03

    This is how I do:

    Add the follow section to the "usercmd.ini" file, TCmd's user custom commands configuration file)

    [em_console_Cygwin]
    menu=Console window enhancement
    cmd=%Commander_path%\tools\Console\Console.exe
    param=-t Cygwin -d "%P\"
    

    Note1:  Cygwin is predefined tab in console2 using Cygwin.bat as shell, you can call it as you want, just rename everything else in concordance.

    Note2: edit the console.exe path to match yours. %P is the path to the tcmd active panel

    Note3: you can use this new custom command(em_console_Cygwin) from tcmd`s command line, from toolbar as button or the best way( my way :-) ) assign it a shortcut from tcmd ( configuration>Options…>Misc.> )

     
  • divB
    divB
    2010-07-16

    Hi dottdaniel,

    I have exactly the same problem. But how do you handle changing to the active directory?

    I followed exactly your description but whatever I put after the -d, the startup directory in cygwin is ALWAYS my documents & settings folder!

    For example:

    console -t cygwin -d "o:\home"

    But then, after cygwin is started:
    $ pwd
    /cygdrive/c/Dokumente und Einstellungen/user

    :-( :-(

    Regards,