Launch a different terminal emulator from the Command line
Moderators: Hacker, petermad, Stefan2, white
Launch a different terminal emulator from the Command line
I often use the Command line to launch commands, and it always opens the "cmd" windows, what apparently can't be changed "system wide". But since I rarely use other means to launch cmd.exe, being able to change it just in Total Commander would make my life easier, since there exist terminal emulators that I like more than what Windows provides.
Apparently, ConEmu can hook windows to make itself "default". I don't use ConEmu, but it looks like TC could make it work the other way around: instead of being hooked, just allow to specify the terminal emulator like you do for the text editor or image viewer and launch it with the command.
Apparently, ConEmu can hook windows to make itself "default". I don't use ConEmu, but it looks like TC could make it work the other way around: instead of being hooked, just allow to specify the terminal emulator like you do for the text editor or image viewer and launch it with the command.
Re: Launch a different terminal emulator from the Command line
2GL1zdA
You can set the comspec environment variable. Not sure if it's wise to do that system wide. You can also create a shortcut to set comspec and launch total commander. Example:
That would start the calculator instead of cmd inside Total Commander.
You can set the comspec environment variable. Not sure if it's wise to do that system wide. You can also create a shortcut to set comspec and launch total commander. Example:
Code: Select all
C:\Windows\System32\cmd.exe /c set comspec="c:\windows\system32\calc.exe" & start "" "C:\totalcmd\totalcmd64.exe"
Re: Launch a different terminal emulator from the Command line
GL1zdA,
What white wrote, or:
HTH
Roman
What white wrote, or:
replace noclose.exe as desired (with the terminal of your choice, or perhaps a symlink / hardlink to it) and run commands using Shift-Enter.TC Help wrote:Q: After the execution of a DOS command such as DIR the window is closed so quickly that the output of the program is unreadable!
A: You can start the program with SHIFT+ENTER instead of ENTER. This leaves the window open after the program terminates. The command will be started via noclose.exe in the Totalcmd directory.
HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Launch a different terminal emulator from the Command line
It didn't work as expected. It set comspec, as shown in the screenshot, but it still launches cmd:white wrote: 2022-03-22, 00:10 UTC 2GL1zdA
You can set the comspec environment variable. Not sure if it's wise to do that system wide. You can also create a shortcut to set comspec and launch total commander. Example:That would start the calculator instead of cmd inside Total Commander.Code: Select all
C:\Windows\System32\cmd.exe /c set comspec="c:\windows\system32\calc.exe" & start "" "C:\totalcmd\totalcmd64.exe"
Image: https://imgur.com/a/h9Z9xqr
Another issue is, such shortcut doesn't work with icons "pinned" to the taskbar - Windows gets confused and shows the launched Total Commander as a separate icon from the "launching" icon.
It didn't work, I guess because Alacritty, that I'm trying to use, has different command line options than cmd (-e instead of /C or /K).Hacker wrote: 2022-03-22, 01:12 UTC GL1zdA,
What white wrote, or:replace noclose.exe as desired (with the terminal of your choice, or perhaps a symlink / hardlink to it) and run commands using Shift-Enter.TC Help wrote:Q: After the execution of a DOS command such as DIR the window is closed so quickly that the output of the program is unreadable!
A: You can start the program with SHIFT+ENTER instead of ENTER. This leaves the window open after the program terminates. The command will be started via noclose.exe in the Totalcmd directory.
HTH
Roman
Re: Launch a different terminal emulator from the Command line
Why not make a small alias like ! using user command em_Alacritty
em_Alacritty
<path to>\alacritty.exe
-e <yourshell> <noCloseOption> %A
Configure Alacrityy to have one window .....
if you want to change the shell, create a new user command and change the allias.
COMSPEC is the default shell and have noting related to the terminal as it just embed it can be std console, windows terminal, conemu, alacrity, ........
em_Alacritty
<path to>\alacritty.exe
-e <yourshell> <noCloseOption> %A
Configure Alacrityy to have one window .....
if you want to change the shell, create a new user command and change the allias.
COMSPEC is the default shell and have noting related to the terminal as it just embed it can be std console, windows terminal, conemu, alacrity, ........
Re: Launch a different terminal emulator from the Command line
When does it show the screenshot? After you do what? Does it work when you test it with calc?GL1zdA wrote: 2022-03-22, 07:11 UTC It didn't work as expected. It set comspec, as shown in the screenshot, but it still launches cmd:
Image: https://imgur.com/a/h9Z9xqr
Re: Launch a different terminal emulator from the Command line
True.nsp wrote: 2022-03-22, 08:17 UTC COMSPEC is the default shell and have noting related to the terminal as it just embed it can be std console, windows terminal, conemu, alacrity, ........
Re: Launch a different terminal emulator from the Command line
Thanks, this works good enough for me. Defined "parameters" for the command asnsp wrote: 2022-03-22, 08:17 UTC Why not make a small alias like ! using user command em_Alacritty
em_Alacritty
<path to>\alacritty.exe
-e <yourshell> <noCloseOption> %A
Configure Alacrityy to have one window .....
if you want to change the shell, create a new user command and change the allias.
COMSPEC is the default shell and have noting related to the terminal as it just embed it can be std console, windows terminal, conemu, alacrity, ........
Code: Select all
-e cmd /k %A --working-directory %P
After launching TC with the shortcut you've provided and typing "cmd" and pressing "return" in the TC Command line. Same with calc - it will display calc as comspec, but will still launch cmd.white wrote: 2022-03-22, 08:56 UTCWhen does it show the screenshot? After you do what? Does it work when you test it with calc?GL1zdA wrote: 2022-03-22, 07:11 UTC It didn't work as expected. It set comspec, as shown in the screenshot, but it still launches cmd:
Image: https://imgur.com/a/h9Z9xqr
Re: Launch a different terminal emulator from the Command line
Any external program will be started as usual. Try "dir" or a batch file, or select menu option Command/Open command prompt window.GL1zdA wrote: 2022-03-22, 10:58 UTC After launching TC with the shortcut you've provided and typing "cmd" and pressing "return" in the TC Command line. Same with calc - it will display calc as comspec, but will still launch cmd.
Re: Launch a different terminal emulator from the Command line
Use a button which starts the required terminal emulator. I use it for Windows Terminal to start PowerShell.