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

SCRCPY_ICON_PATH environment variable being read but not used #5761

Open
nhobson99 opened this issue Jan 16, 2025 · 3 comments
Open

SCRCPY_ICON_PATH environment variable being read but not used #5761

nhobson99 opened this issue Jan 16, 2025 · 3 comments

Comments

@nhobson99
Copy link

Environment

  • OS: Pop OS 22.04 LTS (Pop-Wayland)
  • Scrcpy version: 3.1
  • Installation method: manual scrcpy build, manual SDL build
  • Device model: Microsoft Surface Laptop Studio/Oneplus 8T +5G TMO
  • Android version: Lineage OS (Android 15)

Describe the bug

When launching with the SCRCPY_ICON_PATH environment variable set, the default icon is used instead.

leviosa@leviosa:~$ SCRCPY_ICON_PATH=/usr/local/share/icons/hicolor/256x256/apps/textra.png scrcpy -m 800 -V debug
scrcpy 3.1 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  fa44a05f                        device  KB2007
DEBUG: Device serial: fa44a05f
DEBUG: Using server: /usr/local/share/scrcpy/scrcpy-server
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 285.1 MB/s (90640 bytes in 0.000s)
[server] INFO: Device: [OnePlus] OnePlus KB2007 (Android 15)
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
DEBUG: Using SCRCPY_ICON_PATH: /usr/local/share/icons/hicolor/256x256/apps/textra.png
[server] DEBUG: Using video encoder: 'OMX.qcom.video.encoder.avc'
[server] DEBUG: Using audio encoder: 'c2.android.opus.encoder'
INFO: Renderer: opengl
INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.3-1pop1~1711635559~22.04~7a9f319
INFO: Trilinear filtering enabled
DEBUG: Demuxer 'video': starting thread
DEBUG: Demuxer 'audio': starting thread
INFO: Texture: 360x800
[server] DEBUG: Display: using DisplayManager API
DEBUG: User requested to quit
DEBUG: quit...
DEBUG: Controller stopped
DEBUG: Demuxer 'audio': end of frames
DEBUG: Receiver stopped
DEBUG: Demuxer 'video': end of frames
[server] DEBUG: Controller stopped
[server] DEBUG: Device message sender stopped
[server] DEBUG: Screen streaming stopped
[server] DEBUG: Audio encoder stopped
DEBUG: Server disconnected
DEBUG: Server terminated

Terminal output indicates the environment variable is being read, but the default icon is still used.

Workaround (kind of)

Replacing the image at /usr/local/share/icons/hicolor/256x256/apps/scrcpy.png with my own image, then logging out and back in, results in the new icon being used. However, my goal was to have a separate icon for separate instances of scrcpy (ex. one for Textra, one for Gmail, etc).

@rom1v
Copy link
Collaborator

rom1v commented Jan 16, 2025

If you run scrcpy --no-video, is your icon used for the window content? If so, I guess the window icon is cached by your window manager.

@nhobson99
Copy link
Author

Image

Looks like yes, it is read and used. Is there a way to turn off the icon caching? I'm on Gnome 42.9 if that matters. I just want the Textra window to look like Textra in my taskbar.

@rom1v
Copy link
Collaborator

rom1v commented Jan 16, 2025

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

2 participants