Skip to content

Let users opt-out of auto-opening the browser#3807

Closed
cmcaine wants to merge 1 commit intoLizardByte:masterfrom
cmcaine:no-webui
Closed

Let users opt-out of auto-opening the browser#3807
cmcaine wants to merge 1 commit intoLizardByte:masterfrom
cmcaine:no-webui

Conversation

@cmcaine
Copy link

@cmcaine cmcaine commented Apr 22, 2025

Description

Let users opt-out of auto-opening the browser when Sunshine is started from a shortcut on windows.

Screenshot

The commit should add a checkbox on the general page. This is untested.

Issues Fixed or Closed

Fixes https://github.com/orgs/LizardByte/discussions/358

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
    • It looks fine, but I don't have a windows CPP build env handy to test.
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
    • Doesn't seem relevant?

Fixes https://github.com/orgs/LizardByte/discussions/358

This commit is untested because I don't have a CPP build env for windows
handy. Please test and amend before merging!
@sonarqubecloud
Copy link

@ReenigneArcher
Copy link
Member

Thanks for the PR!

If this option is going to be added, we should probably have a proper way to launch the UI on all platforms on start instead of only on Windows.

e.g. for Flatpak it's currently a hack. https://github.com/LizardByte/Sunshine/blob/master/packaging/linux/flatpak/scripts/sunshine.sh

Any thoughts?

@cmcaine
Copy link
Author

cmcaine commented Apr 23, 2025

I didn't try to understand the relevant code. I think this PR should be tested and accepted or rejected first, before trying to build upon it with any further changes.

For linux, I vaguely remember this being a pain because you xdg-open is not always present and is sometimes broken on wayland, etc. The description in the option could just say that it is windows-only?

@ReenigneArcher
Copy link
Member

I don't think it makes sense to have this setting apply only to Windows to be honest. It's somewhat complicated and annoying to have config options that are OS dependent so I like to only do there where absolutely necessary.

If this PR won't be extended to handle the cases for the other OSes, then I suppose we could probably just remove the logic that opens the browser when using the shortcut. It's sort of pointless on Windows as users can use the tray icon if they want to open it.

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

Successfully merging this pull request may close these issues.

2 participants