Skip to content

[Bug]: GNOME mini player shows next to the tray icon and while YourTune isn't running #30

Open

Description

@sungyongcho

Preflight Checklist

  • I use the latest version of YourTune (Application).
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.
  • I understand that robotlog/YourTune has NO affiliation with Google or YouTube

YourTune (Application) Version

1.4.1

Checklists

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 26.04.1 LTS, GNOME 50.1 (Wayland)

What CPU architecture are you using?

x64

Last Known Working YourTune (Application) version

No response

Reproduction steps

  1. Install and enable the GNOME mini player from extras/gnome-extension, and log in again.
  2. Without starting YourTune, look at the top panel and open the mini player.
  3. Start YourTune with Options → Tray enabled (the default), and look again.
  4. Set Options → Tray to Disabled, restart YourTune, look again, and close YourTune's window.

Expected Behavior

The mini player is YourTune's icon in the GNOME panel, so it follows the tray setting:

YourTune Tray Panel
not running either no icon
running enabled one icon, the mini player
running disabled no icon

Actual Behavior

YourTune Tray Panel
not running either the mini player's icon, saying "YourTune is not reachable"
running enabled two identical icons: YourTune's tray icon (through Ubuntu's AppIndicator extension) and the mini player's
running disabled the mini player's icon

Both icons are assets/tray.png, so after login the mini player looks like a tray icon left behind by an app that isn't running, and with the tray on there is no telling the two apart.

With YourTune closed, the mini player can't play anything. It says to start YourTune, but Retry only tries to connect again, so it comes back to the same screen however often you press it. Clicking the artwork does launch YourTune, but nothing on the card says so.

The mini player with YourTune closed: an empty card under the message 'YourTune is not reachable. Start YourTune and turn on the API Server plugin.' and a Retry button

Turning the tray off removes the second icon, but then the window's close button quits YourTune and the music stops, and the mini player goes back to "not reachable".

Enabled plugins

API Server, In-App Menu, Mini Player, Visualizer

Additional Information

What needs deciding: does YourTune keep running in the background on Linux? That decides what the mini player's icon should do, and today you can't have both:

  • Start at login is only in the menu on Windows and macOS (src/menu.ts, since Electron's setLoginItemSettings doesn't support Linux). On Linux YourTune isn't running after login unless the user sets up autostart themselves.
  • Closing the window only hides YourTune while the tray is on (src/index.ts). So keeping YourTune in the background needs the tray, and the tray means two icons.

The extension can't see the tray setting or hide another app's tray icon, so either way this needs the app and the API as well.

Either way:

  • API: tell clients whether YourTune's tray is on, for example in the WebSocket's first PLAYER_INFO or as GET /api/v1/tray.
  • App: while the mini player is connected (the API Server knows the client from its token, yourtune-gnome-miniplayer), don't show the tray icon, and put it back when it disconnects.
  • API: the tray menu's items that the mini player doesn't have yet, so nothing is lost when it takes the tray's place: Show window, Restart App, Exit, and the Tray Settings plugin's Settings.
  • Extension: show the icon only while connected with the tray on, and connect as soon as YourTune starts instead of waiting for the retry delay.

If YourTune keeps running in the background, also:

  • Start at login on Linux, by writing an XDG autostart entry (~/.config/autostart/com.robotlog.yourtune.desktop), optionally starting hidden like Tray → "Enabled and hide app".
  • The close button hides the window instead of quitting while the mini player is connected, as it does with the tray on. The mini player can bring the window back and offer Exit.

If it doesn't, the table above is all it takes: no icon while YourTune is closed, one while it runs.

All of this is from GNOME, which is what I use: Ubuntu 26.04 with GNOME 50.1 on Wayland, where Ubuntu's AppIndicator extension puts tray icons in the top panel. I don't know how it plays out on KDE Plasma with the Plasma widget, where the tray icon sits in the system tray and the widget is something you add to a panel yourself, so I've left KDE out of it. The tray-related changes above are in the app, though, so they'd reach KDE too.

Which way do you want YourTune to go on Linux, and how would you like the API part shaped? Since this adds endpoints, I'm opening this before writing anything. Happy to do the PRs, or only the extension if you'd rather add the endpoints yourself.

Activity

  1. bercedev commented on Nov 4, 2026

    @bercedev
    Member

    thanks, great writeup. how i'd like to split it:

    1. extension: watch org.mpris.MediaPlayer2.YourTune with Gio.bus_watch_name, show the icon and connect when it appears, hide it when it goes away. no API change, and no more not reachable screen or retry loop. could you take this one?

    2. app: while yourtune-gnome-miniplayer is connected over the websocket, hide the tray icon and put it back on disconnect. the tray setting itself stays, so closing the window still keeps it in the background. for the menu items, POST /api/v1/window/show and POST /api/v1/quit. no tray state endpoint, with the tray off there's only one icon anyway. i'll do this part, then the extension can add show window and exit to its menu

    3. start at login on linux (xdg autostart) is its own thing, i'll keep it out of this one

  2. bercedev commented on Nov 4, 2026

    @bercedev
    Member

    app side is up in #31: POST /api/v1/window/show and POST /api/v1/quit, and the tray icon goes away once the mini player connects

    one change from what i said above: it doesn't come back on disconnect. electron on linux can't create a second tray icon in the same process (org.kde.StatusNotifierItem.Activate is already exported), so it stays gone until a restart. for the extension that means it's the only icon from the moment it connects, so please keep show window and exit in its menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions