Open deutrino opened 9 years ago
We can't do this just yet since some users need to run multiple Redshift instances in order to control multiple displays/screens. When Redshift can do this from one instance we should consider a check like this.
Would it be possible to implement a check that >1 redshift process is not controlling the same physical display? I respectfully believe this is a bug rather than an enhancement, although it may require new code to do the check and refuse to start (or similar resolution).
Is this senario common? Why would you open a new instance of redshift-gtk if there is already one running, which you can readily see in the status icon tray?
It must also be considered that the instances may be running with different settings, and one may be disabled.
I've explained the rationale behind this a little more in this Debian bug report: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860841
basically, while it's nice that it's possible to run redshift "headless" (and could be the default, shipped with properly crafted systemd files), it's still very useful to have a GUI for users to know what's going on: they can then examine the configuration and status, and also turn the thing on and off.
thank you for your consideration...
@deutrino @anarcat
You can toggle it (open if closed, close if open) by assigning a keyboard shortcut to sh -c "pgrep redshift && pkill -TERM redshift || redshift-gtk"
Is this s[c]enario common?
People run into running multiple instances of Redshift accidentally, and don't realize it, then get confused:
At least a warning would help.
Also, when I run redshift-gtk
as a casual Mint user, it controls all displays. So running it again with the same parameters should definitely warn, if not exit outright.
@dandv Agreed. Just spent an hour debugging my script to autostart redshift and then found out the program doesn't actually have a safety check. I then checked the man page to see if there was a switch to stop executing if an existing redshift instance is found, but nothing.
Linux Mint Xfce 17.1, 32-bit, on a Core 2 Duo iMac.
Running redshift on startup and then executing it from the menu results in two copies of redshift-gtk and redshift running for the same user. Sometimes they will "fight" and cause the screen to flicker. redshift and gtk-redshift 1.9.1.1-trusty.
Probably there should be a sanity check for this if not a limit of 1 process per user.