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

goxlr-utility desktop entry starts daemon instead of opening utility #331319

Closed
different-name opened this issue Jul 31, 2024 · 4 comments · Fixed by #332757
Closed

goxlr-utility desktop entry starts daemon instead of opening utility #331319

different-name opened this issue Jul 31, 2024 · 4 comments · Fixed by #332757
Assignees
Labels
0.kind: bug Something is broken

Comments

@different-name
Copy link

Describe the bug

The goxlr-utility package changes the functionality of the desktop entry. Instead of opening the web interface, it instead starts the daemon.

Expected behavior

The original functionality of the desktop entry should be kept, as currently, the only way to open the web interface is:

  • The taskbar icon (not accessible for those not using a taskbar, though this is a rare subset 😆)
  • Manually visiting http://localhost:14564/
  • Running the goxlr-launcher command, as the desktop entry did originally

The goxlr-daemon command only starts the daemon in the background, strange for a desktop entry
Due to the nature of goxlr-utility, it makes sense to have this program start with the system in most use cases, there's also an option provided by the goxlr-utility nixos module that is enabled by default to autostart the utility

Additional context

Here is the relevant code:

substituteInPlace $out/share/applications/goxlr-utility.desktop \
--replace /usr/bin $out/bin \
--replace goxlr-launcher goxlr-daemon

@errnoh


Add a 👍 reaction to issues you find important.

@different-name different-name added the 0.kind: bug Something is broken label Jul 31, 2024
@different-name
Copy link
Author

For anyone else who would like this behaviour as a workaround or if this issue is closed as unplanned:

pkgs.goxlr-utility.overrideAttrs (oldAttrs: {
  postInstall = builtins.replaceStrings ["--replace goxlr-launcher goxlr-daemon"] [""] oldAttrs.postInstall;
});

@errnoh
Copy link
Contributor

errnoh commented Aug 5, 2024

Weird, I have no memory why I would have done that. I'll try to remember to fix it when I get home. Thanks for reporting it!

@errnoh errnoh self-assigned this Aug 5, 2024
@errnoh
Copy link
Contributor

errnoh commented Aug 5, 2024

@different-name looked into this and now I remember why I changed this when I created the package.

The reason was this

stdenv.mkDerivation {
name = "autostart-${name}";
priority = 5;
buildCommand = ''
mkdir -p $out/etc/xdg/autostart
target=${name}.desktop
cp ${package}/share/applications/${srcPrefix}${name}.desktop $target
chmod +rw $target
echo "X-KDE-autostart-phase=${phase}" >> $target
${lib.optionalString (after != null) ''echo "${after}" >> $target''}
${lib.optionalString (condition != null) ''echo "${condition}" >> $target''}
cp $target $out/etc/xdg/autostart
'';
# this will automatically put 'package' in the environment when you
# put its startup item in there.
propagatedBuildInputs = [ package ];
}

With the original .desktop file it opened default browser with the goxlr interface automatically after each boot. Looking at it now it seems that goxlr-utility creates the autostart item in code here: https://github.com/GoXLR-on-Linux/goxlr-utility/blob/9753ce92c08170519216e15d851236e76d8f7dc8/daemon/src/platform/linux/autostart.rs#L36-L59

Anyways, that's the reasoning why I originally changed it. Should be somewhat simple to fix. I'll think about what would be the cleanest way a bit and add a fix once I'm done.

@errnoh
Copy link
Contributor

errnoh commented Aug 6, 2024

Solution suggested in #332757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants