hiddify-next icon indicating copy to clipboard operation
hiddify-next copied to clipboard

Multiple instances on Linux

Open papampi opened this issue 1 year ago • 4 comments

What Happened?

When you click (x) on hiddify dashboard it will be minimize to tray, if anyone dont notice its already running and instead of clicking tray icon then show dashboard click hiddify icon again it will start a new instance instead of bringing up the dashboard. As many times anyone click app icon and click close it will start new instances.

Tried many ways to bring it up from dashboard with xdotool , wmctrl, dbus, ... with no luck. So for now until hopefully it get fixed I wrote a small script to check if its running, close and start new instance and edited hiddify.desktop file. If anyone has the same issue follow this:

hiddify_start.sh:

#!/bin/bash
if pgrep -x "hiddify" > /dev/null ; then
    pkill -x "hiddify"
    sleep 1
    hiddify %U
else
    hiddify %U
fi

chmod a+x hiddify_start.sh Edit /usr/share/applications/hiddify.desktop Change: Exec=hiddify %U with Exec=/path_to_above_script/hiddify_start.sh

Minimal Reproducible Example (MRE)

Click hiddify icon to start hiddify Click close (x) Click hiddify icon again

Expected Behavior

Bring up the running hiddify from tray

Version

1.4

Platform/OS

Linux

Additional Context

https://github.com/hiddify/hiddify-next/assets/1108483/70b03bc3-e000-4014-a1f3-b8b1ad418dc9

papampi avatar Jun 18 '24 08:06 papampi

This issue is still present in 2.0.5

Love-in-idleness avatar Aug 28 '24 07:08 Love-in-idleness

They added a "Hide/Exit" option in later versions, and it wont cause multiple instances anymore if its hidden. But when click the icon from applications menu it opens the same but shows disconnected while its connected. Icon also shows blue while it should be green.

Screenshot from 2024-08-28 12-54-06

After bring up from application menu instead of clicking icon from taskbar (Shows Disconnected but its connected). If click connect, it will disconnect and connect again.

Screenshot from 2024-08-28 12-54-23

papampi avatar Aug 28 '24 09:08 papampi

try v2.3.1 and check if problem has been solved or not

TitanComputer avatar Sep 08 '24 10:09 TitanComputer

try v2.3.1 and check if problem has been solved or not

Not completely fixed on 2.3.1 either, If it's hidden and click app menu (not app indicator) it opens and shows not connected while its already connected.

papampi avatar Sep 08 '24 10:09 papampi