hiddify-next
hiddify-next copied to clipboard
Multiple instances on Linux
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
This issue is still present in 2.0.5
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.
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.
try v2.3.1 and check if problem has been solved or not
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.