-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(shim): allow GUI applications to attach to the shell's console when launched using the GUI shim #5721
Conversation
scoopcs
GUI apps to attach to the shell's console
is it released? if yes, then to which version or with what indication? i am asking as i want to confirm if the non-confirmant thing i am seeing applies or not. |
@goyalyashpal It is merged in to develop, will be merged to master in 0.4.0. You can track the progress of the release in #5424. And what do you mean by a |
glad u asked 😄 quote
i guess i am seeing the behaviour which is shown as output of this pr already in v0.3 : $ which alacritty
/d/UserFiles/scoop/shims/alacritty
$ alacritty -V
alacritty 0.13.1 (fe2a3c5)
$ $(scoop which alacritty) -V
alacritty 0.13.1 (fe2a3c5)
$ alacritty -h
A fast, cross-platform, OpenGL terminal emulator
...
$ scoop -V
Current Scoop version:
v0.3.1 - Released at 2022-11-15
|
@goyalyashpal seems like you are on the master branch. If you don't have this problem, you would have the shim blocking your CLI. |
how can i confirm that?
but it does with some other GUI applications. i always used to think that this blocking behaviour is application dependent. for examples (these all are scoop installed pplications:)
non-scoop application:
the $ which notepad3 alacritty wezterm codium
/d/UserFiles/scoop/shims/notepad3
/d/UserFiles/scoop/shims/alacritty
/d/UserFiles/scoop/shims/wezterm
/c/Program Files/VSCodium/bin/codium
|
By using % scoop config
last_update : 25-03-2024 01:31:18 AM
aria2-warning-enabled : False
shim : scoopcs
scoop_repo : https://github.com/ScoopInstaller/Scoop
scoop_branch : develop You can switch to the develop branch by:
It depends on the shim as we use the shim to launch applications. Now, the default shim in the master branch is a CLI shim, which would always have a terminal window. The nature of the application is characterized by the
Let's look at your examples:
To fix apps which should not be blocking, my PRs would correct the Just in case if a GUI app wants to write to a console using AttachConsole(-1); It won't be able to obtain handles to our shell which we used to launch. So, this PR would solve this issue in the I would advise you to avoid the Coming to
So they would always have a console window until they Finally, move to the |
on point 👍 😃 $ scoop config | yq .scoop_branch,.scoop_repo
master
https://github.com/ScoopInstaller/Scoop
ohkayh. awesome.
i am very novice to
thanks for rec. i will in some days 😄 ps: we both should be sleeping deep at this odd hour of night lol. hopefully big fest today day 😆💦🔫🌊🎈 |
Description
Allows patched GUI shims to access the shell's console window.
Motivation and Context
Fixes issues described in #5559 (for the
scoopcs
shim type)How Has This Been Tested?
The new shim code only tries to
AttachConsole
to the parent process, so that it gets the console handles (when it doesn't find a console window). Now, the target process which the shim starts can also request for the same console handles and it can write to the shell's terminal.Validation steps:
Let's use
alacritty
.We know that,
alacritty.exe
is a GUI application, but we have:If we don't use this PR, we would not have this output, because the target process (alacritty) fails to get handles to the shell's console.
$ alacritty -h
But, if we use this PR:
This PR would restore the behaviour of GUI+CLI applications and avoids the need to implement new flags or adjust the manifests.
Checklist:
develop
branch.