Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 odd behavior when Windows Terminal is set to default terminal app
#1
In Windows 11, I go into Settings and then to the developer settings. Under "Terminal" I select Windows Terminal as the default terminal app to host command-line apps (the other choice would be the Windows Console Host).

After doing this, whenever I open the QB64 IDE, it also opens a Windows Terminal window. If I close that Terminal window, it also shuts down QB64. Likewise, if I close QB64, the Windows Terminal window also closes.

The next time I reopen QB64 it asks if I want to recover my program from an auto-saved backup. 

Is this expected behavior?


My preference is to use Windows Terminal as the default terminal app, but this side-effect makes it awkward.
Reply
#2
I have the same problem. Anybody knows a solution? Thank you very much!
10 PRINT "Hola! Smile"
20 GOTO 10
Reply
#3
My solution is to use the Terminal options to start/keep minimized to icon tray.

Out of sight, out of mind.
Reply
#4
Manage the Terminal Icon in Windows Taskbar’s System Tray

To manage the Terminal icon in the Windows taskbar’s system tray, follow these steps:

Open the Windows Terminal app.
Press Win + X and select Terminal.
Press Ctrl + comma key (,) to open Windows Terminal settings.
Click Appearance on the left pane.
Find "Hide terminal in the notification area when it is minimized" and toggle it to Off to show the Terminal app in the taskbar when minimized.

Also see: https://www.elevenforum.com/t/enable-or-...-11.22219/
Reply
#5
Wait, I don't have any such problems. Why?

Some time ago, Windows 11 did something flaky with the Terminal app. Made it useless for the ways I want to use the command line, possibly also useless for using Console output setting in QB64pe.

I went to the Microsoft forum and was given the solution which seems to work for me.

In Win11, go to start > all > terminal. (In case you're new to Win11, "all" is a pretty small button, top right of start menu. Click it and you'll see all installed apps.)

When you scroll down the list and then click on Terminal, you'll see weird looking command line interface, strange font, just doesn't look right.

Right click on the top title bar, whatever it's called, and click on Settings.

In the top two settings, Default Profile should be set to Command Prompt. And the next one down, Default Terminal Application, set that to Windows Console Host.

Now when you need the command prompt interface, it will look right and work right. Can be used for .bat (or .cmd) file scripts, for QB64pe output, or whatever.

PS: Occasionally, the Terminal app will be updated. One of these updates returned Terminal to the new default settings. So, just be aware of that. The time this happened, I was aware that Terminal had been updated, so I quickly restored my preferred settings. Since that one Ime, Terminal updates have luckily not changed the settings.
Reply
#6
I don't understand the problem, but maybe I don't understand the question itself? Huh 

The command line is quite simple: Place it in the taskbar (shortcut), and that's it.

[Image: Kommandozeile2025-09-30.jpg]

img offices
Reply
#7
The problem is Windows 11 comes with two different terminals.

Windows Console is the same as always and behaves the same as always.  If it's set as your active launcher, it'll run, start QB64, and then quit.  You might notice that brief *flicker* as the console is there for a split second and then disappears at start up.

Windows Terminal is more of a Powershell tool, meant to replace the Console.  If it's set as your active launcher, it'll run, start QB64, and then... just sit around in the background and wait for QB64 to end.  If you close it, you also close QB64, which it opened as a child window.

Bert explained how to change so your system defaults to the Console and not Powershell, but the issue there is many of the console commands are being depreciated and obsoleted over time.   (like the ever so useful wmic command)  New commands need to be PowerShell scripts and those won't always work in the Console, so programs like some of the text-to-speech code which I've written and shared on the forums here won't be guaranteed to work for you with the Console.

So people looking for future development, rather than past compatibility swap to using the Terminal, as eventually most predict the Console will eventually be phased out completely.  But the Terminal is a window that doesn't disappear auto-magically.  That's what the initial post was all about.

And the only real solution that I've found?

Have it auto-hide itself to the icon tray.  It's still there, still running, still accessible.  But it's now hidden and out of sight, as I highlighted above.

So yeah, bert isn't seeing the problem because he's not using the Terminal.  He basically walked you through the steps to stick with the older, becoming more outdated all the time, Console.

Anyone on older versions of Windows won't see this at all, as Win 11 was the introduction of this dual-option.  Win 10 and lower just had the console as default.  Win 12, which we always hear rumors about, will probably be *just* the Terminal, with the Console gone completely unless you download it as an extended package/external program manually.
Reply
#8
Simple way to think of the differences in the two:

SHELL "cmd /c qb65pe.exe"
SHELL "powershell -run qb64pe.exe"

Two different terminals launching the program, and with different interfaces for each.  Similar, but distinct in the closing behavior.  Console will run and close, Terminal will run and wait for execution to finish, then close.
Reply
#9
Honestly, the Terminal behavior does not bother me anymore. For me, Windows automatically minimizes the Terminal window when I launch the IDE.
Reply
#10
(10-01-2025, 05:53 PM)a740g Wrote: Honestly, the Terminal behavior does not bother me anymore. For me, Windows automatically minimizes the Terminal window when I launch the IDE.

There's a toggle in the options for that, as well as to hide the terminal in the icon tray.  If that toggle is off, it can still be a PITA.  Wink
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Latest version of QB64PE or QB64 compatible with Windows XP (32-bit)? madscijr 14 1,977 09-30-2025, 08:10 AM
Last Post: hsiangch_ong
  people using an ai agent, can it translate this TCL app to QB64PE? madscijr 2 540 07-10-2025, 07:15 PM
Last Post: madscijr
  Linux: terminal output Parkland 4 831 06-08-2025, 04:00 PM
Last Post: DSMan195276
  Bothersome Behavior Pwillard 4 767 05-19-2025, 03:59 PM
Last Post: Pwillard
  What's the default font? madscijr 5 1,051 03-01-2025, 07:46 PM
Last Post: Dark

Forum Jump:


Users browsing this thread: 1 Guest(s)