Skip to content
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

putty shims open a blank window #2801

Closed
trajano opened this issue Sep 3, 2019 · 9 comments
Closed

putty shims open a blank window #2801

trajano opened this issue Sep 3, 2019 · 9 comments

Comments

@trajano
Copy link

trajano commented Sep 3, 2019

When running putty from the Win-R dialog it starts up the shim which in turn opens up a Window that does not close.

I tried simply removing the "putty.exe" from the "bin" list but that made it so that I can't start "putty.exe" by typing it on the command line.

I was wondering if instead of a "shim" it creates a link to the binary. But I can't find an option to do that.

@rasa
Copy link
Member

rasa commented Sep 3, 2019

Can you test if this shim replacement fixes this issue: https://github.com/71/scoop-better-shimexe ?

@trajano
Copy link
Author

trajano commented Sep 3, 2019

@rasa how? (I can't find instructions on how to do this yet, I just took some educated guesses)

@rasa
Copy link
Member

rasa commented Sep 3, 2019

wget https://github.com/71/scoop-better-shimexe/releases/download/1.0/shim.exe
wget https://raw.githubusercontent.com/71/scoop-better-shimexe/master/repshims.bat
call repshims.bat

@trajano
Copy link
Author

trajano commented Sep 3, 2019

nope
image

@trajano
Copy link
Author

trajano commented Sep 3, 2019

Its actually worse in a way. Closing the shim also closes putty. Looking at the code, it does not do any check whether it is a windowed app that it is running or not.

However, I think it would be cleaner to just add symlinks instead of shims. But I am not sure why that was not used, there may be a technical reason I don't know yet.

@71
Copy link

71 commented Sep 3, 2019

Its actually worse in a way. Closing the shim also closes putty. Looking at the code, it does not do any check whether it is a windowed app that it is running or not.

However, I think it would be cleaner to just add symlinks instead of shims. But I am not sure why that was not used, there may be a technical reason I don't know yet.

Shims can also pass some arguments to the .exe they redirect to, which may be required in some instances (I've never personally encountered it, but I know the .shim format allows it). AFAIK this is not possible with symlinks.

(We could use symlinks in most cases and shims in the few others, but I didn't design the shims so I might be missing details as to why this design was chosen instead).

@rasa
Copy link
Member

rasa commented Sep 3, 2019

However, I think it would be cleaner to just add symlinks instead of shims. But I am not sure why that was not used, there may be a technical reason I don't know yet.

See ScoopInstaller/Scoop#1606 (comment)

Thanks for testing the C-based shim. I’m sorry it didn’t solve the issue.

@trajano
Copy link
Author

trajano commented Sep 8, 2019

Good news on from https://github.com/71/scoop-better-shimexe it handles this situation correctly now. Perhaps we should switch the shims to use this better exe.

The only thing I would recommend to change is to use symlinks to the shim so we do not waste drive space for the duplicate shim-exes

@rasa
Copy link
Member

rasa commented Dec 23, 2020

This issue should be fixed in ScoopInstaller/Scoop#3998, which was merged into master. To use, type:

scoop config shim kiennq
scoop reset *

or

scoop config shim 71
scoop reset *

Eventually, one of those shims (probably kiennq) we be made the default.

If this issue is still a problem after trying both solutions above, please reopen this issue. Thanks!

@rasa rasa closed this as completed Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants