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

Two Spyder icons on Windows taskbar #20791

Closed
pscobey opened this issue Apr 8, 2023 · 9 comments
Closed

Two Spyder icons on Windows taskbar #20791

pscobey opened this issue Apr 8, 2023 · 9 comments

Comments

@pscobey
Copy link

pscobey commented Apr 8, 2023

Description

What steps will reproduce the problem?

Despite trying several Google-suggested solutions, updating Spyder, and removing/readding the Spyder icon to the Windows 10 taskbar I have been unable to prevent the appearance of the second Spyder icon when I start Spyder, which is particularly annoying given that I have a two-layer taskbar! Any help getting rid of that second icon would be much appreciated as I am constantly having to switch between programs while teaching online.

Versions

  • Spyder version: 5.4.2 (conda)
  • Python version: 3.9.16 64-bit
  • Qt version: 5.15.2
  • PyQt5 version: 5.15.7
  • Operating System: Windows 10

Dependencies

# Mandatory:
atomicwrites >=1.2.0          :  1.4.0 (OK)
chardet >=2.0.0               :  4.0.0 (OK)
cloudpickle >=0.5.0           :  2.0.0 (OK)
cookiecutter >=1.6.0          :  1.7.3 (OK)
diff_match_patch >=20181111   :  20200713 (OK)
intervaltree >=3.0.2          :  3.1.0 (OK)
IPython >=7.31.1;<9.0.0       :  8.12.0 (OK)
jedi >=0.17.2;<0.19.0         :  0.18.1 (OK)
jellyfish >=0.7               :  0.9.0 (OK)
jsonschema >=3.2.0            :  4.17.3 (OK)
keyring >=17.0.0              :  23.13.1 (OK)
nbconvert >=4.0               :  6.5.4 (OK)
numpydoc >=0.6.0              :  1.5.0 (OK)
paramiko >=2.4.0              :  2.8.1 (OK)
parso >=0.7.0;<0.9.0          :  0.8.3 (OK)
pexpect >=4.4.0               :  4.8.0 (OK)
pickleshare >=0.4             :  0.7.5 (OK)
psutil >=5.3                  :  5.9.0 (OK)
pygments >=2.0                :  2.11.2 (OK)
pylint >=2.5.0;<3.0           :  2.16.2 (OK)
pylint_venv >=2.1.1           :  2.3.0 (OK)
pyls_spyder >=0.4.0           :  0.4.0 (OK)
pylsp >=1.7.1;<1.8.0          :  1.7.1 (OK)
pylsp_black >=1.2.0           :  1.2.1 (OK)
qdarkstyle >=3.0.2;<3.1.0     :  3.0.2 (OK)
qstylizer >=0.2.2             :  0.2.2 (OK)
qtawesome >=1.2.1             :  1.2.2 (OK)
qtconsole >=5.4.0;<5.5.0      :  5.4.0 (OK)
qtpy >=2.1.0                  :  2.2.0 (OK)
rtree >=0.9.7                 :  1.0.1 (OK)
setuptools >=49.6.0           :  65.6.3 (OK)
sphinx >=0.6.6                :  5.0.2 (OK)
spyder_kernels >=2.4.2;<2.5.0 :  2.4.2 (OK)
textdistance >=4.2.0          :  4.2.1 (OK)
three_merge >=0.1.1           :  0.1.1 (OK)
watchdog >=0.10.3             :  2.1.6 (OK)
zmq >=22.1.0                  :  23.2.0 (OK)

# Optional:
cython >=0.21                 :  None (NOK)
matplotlib >=3.0.0            :  3.7.1 (OK)
numpy >=1.7                   :  1.23.5 (OK)
pandas >=1.1.1                :  1.5.3 (OK)
scipy >=0.17.0                :  1.10.1 (OK)
sympy >=0.7.3                 :  1.11.1 (OK)
@ccordoba12
Copy link
Member

Hey @pscobey, thanks for reporting. I thought we have already fixed this problem, but it seems that's not the case.

@dalthviz, do you remember about this problem? I think you took a look at it before, right?

@dalthviz
Copy link
Member

Checking seems like this is working for the standalone Windows installer and a issue about the behavior was closed as part of a PR fixing but only for the Windows installer (#14219). So seems like the issue remains if you are using conda. In the initial issue (#1983) seems like the conclusion was that you need to set a AppUserModelID for the shortcut (which is something that requires admin privileges?).

@ccordoba12
Copy link
Member

Ok, I see. Thanks @dalthviz for your clarifying comment. Could it be possible to add an entry to one of our menus to call AppUserModelID on Spyder's link file in admin mode?

@mrclary, I think we also need to add to this our new Windows installer so that it has feature parity with the current one. So, another option would be to check if menuinst can handle this (that way it'd work for Spyder, Napari and any other application).

@mrclary
Copy link
Contributor

mrclary commented Apr 12, 2023

@mrclary, I think we also need to add to this our new Windows installer so that it has feature parity with the current one. So, another option would be to check if menuinst can handle this (that way it'd work for Spyder, Napari and any other application).

I don't recall seeing this issue on my Windows VM with the conda-based installers. I'll look again to be sure, but if I am correct then I think menuinst may already handle this.

@mrclary
Copy link
Contributor

mrclary commented Apr 12, 2023

Okay, I do see both icons with the conda-based installer on my Windows VM, so menuinst has not addressed this.

@jaimergp, is it possible for menuinst to address this, or is this handled by an nsis template that we should provide? As an aside, should menuinst prevent cmd windows from opening when launching applications from the shortcut in Windows?

@dalthviz
Copy link
Member

Could it be possible to add an entry to one of our menus to call AppUserModelID on Spyder's link file in admin mode?

Not sure to be honest, we will need to check. Seems like some info in the original issue is available but it requires not only admin privileges but also restarting explorer.exe (or restarting you PC) and also knowing the location of the shortcut (which can vary depending on the installation I think? 🤔 ) : #1983 (comment)

Just in case, for the Windows installer with pynsist the pinging was achived by adding this to the nsis template (if I understand correctly what was done there):
https://github.com/dalthviz/spyder/blob/739873b8e0d1aa6df94d41ec17575eb9d1c8260e/installers/Windows/assets/nsist/spyder.nsi#L113-L114

@mrclary
Copy link
Contributor

mrclary commented Apr 12, 2023

Just in case, for the Windows installer with pynsist the pinging was achived by adding this to the nsis template (if I understand correctly what was done there): https://github.com/dalthviz/spyder/blob/739873b8e0d1aa6df94d41ec17575eb9d1c8260e/installers/Windows/assets/nsist/spyder.nsi#L113-L114

For our new conda-based installers, I think we can use an nsis template, so we may be able to use this. But I don't know how to address this issue for standard conda installations.

@ccordoba12
Copy link
Member

Thanks for looking into this @mrclary. I think doing it for our Windows installer is fine for now.

@jaimergp
Copy link

jaimergp commented Apr 18, 2023

Okay, I do see both icons with the conda-based installer on my Windows VM, so menuinst has not addressed this.

@jaimergp, is it possible for menuinst to address this, or is this handled by an nsis template that we should provide? As an aside, should menuinst prevent cmd windows from opening when launching applications from the shortcut in Windows?

We can add some code in menuinst for this. Can you open an issue in conda/menuinst with the full context? I'll address it at some point, but we have other feature requests (URL / file type association) in the roadmap first 😬


Edit: Added issue conda/menuinst#127

@ccordoba12 ccordoba12 modified the milestones: v6.0alpha2, v6.0alpha3 Jun 8, 2023
Czaki pushed a commit to napari/napari that referenced this issue Jul 28, 2023
…to bundle shortcut) (#6056)

# Fixes/Closes

Needed to consolidate changes in
napari/packaging#77. This culminates the fix for
napari/packaging#69, hopefully 🤞

# Description

This adds the metadata necessary to set an
[AppUserModelId](https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-id)
on the Windows shortcut, which helps Windows handle things like grouping
taskbar icons and windows.


# References

* https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-id
* conda/menuinst#133
* conda/menuinst#127
* spyder-ide/spyder#20791 (comment)
@mrclary mrclary closed this as completed Sep 14, 2023
@ccordoba12 ccordoba12 modified the milestones: v6.0alphaX, v6.0alpha3 Sep 14, 2023
@ccordoba12 ccordoba12 modified the milestone: v6.0alpha3 Sep 14, 2023
Czaki pushed a commit to napari/napari that referenced this issue Oct 17, 2023
…to bundle shortcut) (#6056)

# Fixes/Closes

Needed to consolidate changes in
napari/packaging#77. This culminates the fix for
napari/packaging#69, hopefully 🤞

# Description

This adds the metadata necessary to set an
[AppUserModelId](https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-id)
on the Windows shortcut, which helps Windows handle things like grouping
taskbar icons and windows.

# References

* https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-id
* conda/menuinst#133
* conda/menuinst#127
* spyder-ide/spyder#20791 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants