Seemingly broken -safe

Kirill
2011-04-23
2013-06-12
  • Kirill

    Kirill - 2011-04-23

    As you may or may not know, I've just released my unofficial build 147.4 (available on http://kirill.ca), and as described on the site 147.3 was never publicly available because -safe was not safe enough (because it worked only if you specified a tab name).

    I almost pulled off 147.4 too (actually, I did pull it off the site for a very short while) because I thought it's not safe enough either. The following scenario made me think that: change the shell of the first tab to "cmd.exe /c dir" and try to start the Console. It will immediately quit even if you use -safe.

    But I realized that Console cannot detect that your shell is "incorrect". Actually it's a perfect - although very short-lived - shell.

    So, if you find yourself in a situation where -safe does not seem to work, try

    console -safe -t "there is no way I can have a tab like that"

    If you actually don't have a tab with the given name, Console will complain about such a miss, but will stay open because -safe forces it to open %COMSPEC% when everything else  fails.

    Oh! By the way, I had to use this trick in real-world scenario because after testing I left my shell with /c switch :)

    For those who's sceptical about my unoficial builds and use only the official one: do yourself a favour and create a tab (not the first one) with an empty Shell and empty Startup dir (you can even call it "safe"). In case you mess up your usual shell, you can start Console with "console -t safe". But if you mess up your alpha transparency, you will have to use my build ;)

    -safe consoling, everybody!

    • Kirill.
     
  • Kirill

    Kirill - 2011-04-23

    Errata: Console will not complain if you try to open a tab that does not exist.

    Reminder: tab names, specified with -t switch, are case-sensitive.

     
  • Oisín Mac Fhearaí

    Hi,

    Is there a way to reset the size of the Console window? I did this:

    1) Installed and ran x64 version
    2) Changed "new tab 1" to Ctrl-t, default shell to PyCmd
    3) Ticked "Save settings in user dir"
    3) Pressed Ctrl-t

    The window then collapsed into an unusable dimension (like 20x100 pixels). Clicking the bottom right corner to drag doesn't work, but pops the window out to a slightly bigger but still unusable size. Restarting it, or the x86 version, even with "-safe" doesn't make any difference.


    (left, after Ctrl-t and when starting the program again. right, after clicking the resize handle)
    Any idea what this is about?

     
  • Kirill

    Kirill - 2011-06-23

    At first, you need to run my unofficial build. The official Console will just ignore -safe switch. And if it's the case, I assume PyCmd is x64 too (my builds don't support running 32-bit shells on 64-bit systems).

    At second, the -safe switch can help only if Console is not able to open the tab at all, which is not your case.

    Finally, the problem you're experiencing is an outstanding issue - some shells break Console in this particular way. You can try setting your shell as "cmd.exe /k PyCmd" (without quotes). If the window is still resized than you're out of luck for the moment.

    Given that you have access to the menu, I'd recommend going to Edit > Settings > Tabs and making sure that the first tab has an empty Shell field. This way, at least, if you start the Console without args, you'd get a working tab.

     
  • Oisín Mac Fhearaí

    Finally, the problem you're experiencing is an outstanding issue - some shells break Console in this particular way. You can try setting your shell as "cmd.exe /k PyCmd" (without quotes). If the window is still resized than you're out of luck for the moment.
    Given that you have access to the menu, I'd recommend going to Edit > Settings > Tabs and making sure that the first tab has an empty Shell field. This way, at least, if you start the Console without args, you'd get a working tab.

    Thanks! I should have mentioned that this only happens with your build, not the last official release. Setting the first tab to "cmd /k …..\PyCmd.exe" did the trick indeed.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks