redshift-tray
redshift-tray copied to clipboard
"More settings" doesn't work since last update
After update yesterday I get an error message "Failed attempt to launch program or document" rstray.ini every time I try to open "more settings".
Can you give me a default rstray.ini and tell me where to put it?
(I have installed rstray using chocolatey)
This is a permissions problem created by the Chocolatey package. Redshift Tray is portable by itself and needs to be able to write rstray.ini to its own folder. Currently, with a Chocolatey installation, it has no permissions to do that. This will render all settings of Redshift Tray useless (i.e. they will be reset on every start). Chocolatey is not supported by me, please contact the creator of the package.
Also, this package removes redshift.exe, so Redshift Tray will do nothing.
I (hope I) have notified the creator of the package.
I don't see how the previous version (1.7.x) could have worked via Chocolatey, either: although it did include redshift.exe (so the gamma adjustments would have worked), none of the settings could have been saved. @dimqua are you still managing the Chocolatey package?
Thanks, knowing it was a permission problem, I was able to resolve the issue by starting rstray as administrator. I do need to restart it as administrator every time I want to change settings, but it reads them fine without admin access (I could edit settings without admin access in 1.7.x).
I do have a redshift.exe coming from the redshift chocolatey package, so the gamma adjustment works.
Strange, It didn't work for me in a virtual machine. Either with or without the "Run as administrator" option set, no rstray.ini was created.
No response from @dimqua so far...
@dimqua I've sent you another message, please respond. You're breaking Redshift Tray with your Chocolatey package, I'd like to resolve this.
@ltGuillaume sorry for the delay. I can't reproduce:
- Run
rstray.exe
; - Change some settings from More settings menu,
rstray.ini
is created.
When I change settings and restart the program, all my changes persist.
@dimqua That's only the case if you run rstray.exe as Administrator. Run the command "rstray" from a non-elevated Command Prompt and you'll see what I mean.
@ltGuillaume not sure if this can be fixed, since Chocolatey rules do not allow to use admin rights for portable packages, at least this is what the support team told me.
@dimqua That would be ridiculous. They keep talking about portable applications and how they should work as Chocolatey packages and in the end, it doesn't? Then please take RSTray off of Chocolatey, because it doesn't work properly and will only annoy people.
@dimqua For clarification: RSTray does NOT need administrative rights to run. The only problem is that Chocolatey (or your packaging) places it in a folder that can only be written to if the program is run as administrator. If Chocolatey has some other folder RSTray can be put into that doesn't need these permissions, then it'll run fine. If it doesn't, then that's the strangest design fault I've seen in a while.
It did work in 1.7.x... Did the rstray.ini use to be in the user folder before, but got moved to the rstray.exe folder?
That's impossible unless Chocolatey has changed its behavior since. You probably just ran RSTray as administrator the first time, so it created rstray.ini. But it won't save any changed settings if you run RSTray without admin privileges, even after rstray.ini has been created. No settings-related behavior has changed in RSTray since 1.7.x
It seems I've found a solution. Could you please test the latest version?
choco install rstray --version 1.8.1
No, that doesn't work:
- It will not run Redshift, because you delete it. The dependency on the Redshift package will not work this way: RSTray will look in its own folder for redshift.exe, nowhere else (and this will not change).
- Chocolatey does not create a shim to rstray.exe, so typing "rstray" in a Command prompt won't run RSTray anymore.
- Why it works for me this way then? I don't mind to keep it though.
- Fixed.
- I doubt that. Was the process redshift.exe (not just rstray.exe) actually running? Be sure to add the file
redshift.exe.ignore
so that it remains compatible with the Redshift package. - Cool
- Is it allowed to use C:\tools?
Thought I fixed it, not true... Chocolatey is awful, both in architecture and documentation. Yuck.
Was the process redshift.exe (not just rstray.exe) actually running?
Yes, the shim from C:\ProgramData\Chocolatey\bin
. But when bundled version is present, it's used instead.
Is it allowed to use C:\tools?
Yes, for example, git.portable
package uses it.
(I've re-uploaded the package to make it uninstall correctly.)
Was the process redshift.exe (not just rstray.exe) actually running? Yes, the shim from C:\ProgramData\Chocolatey\bin. But when bundled version is present, it's used instead.
Hmz, I didn't think that'd work (it shouldn't, really), but it's possible that I didn't get redshift.exe to run, simply because I tested in avirtual machine.
Cool, then I guess it's fixed! I just tested it, seems to be working fine now, including uninstall. Thx!
@dimqua Would you be so kind to update the Chocolatey repo to v1.9.3? A couple of versions ago I added your repo to README.md :-)
I think this issue reappeared again? chocolatey installs rstray
to C:\ProgramData\chocolatey\lib\rstray\tools
for me.
Chocolatey v1.2.1
Installing the following packages:
rstray
By installing, you accept licenses for the packages.
Progress: Downloading rstray 2.2.2... 100%
rstray v2.2.2 [Approved]
rstray package files install completed. Performing other installation steps.
Extracting C:\ProgramData\chocolatey\lib\rstray\tools\redshift-tray.zip to C:\ProgramData\chocolatey\lib\rstray\tools...
C:\ProgramData\chocolatey\lib\rstray\tools
ShimGen has successfully created a shim for redshift.exe
ShimGen has successfully created a shim for rstray.exe
The install of rstray was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\rstray\tools'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
@dimqua Can you help out?
AM sorry if i missed anything in conversation but will give you default path of rstray.ini when installs it using chocolatey. /Path/ >>C:\ProgramData\chocolatey\lib\rstray\tools > rstray.ini Just a tip sometimes when it feels messy just close the rstray make sure nothing persistent sticks (like keep bright or anything when program is off) Open the rstay.ini using admin privilege everything will work fine. Regards
@High-Flyer Yeah but this isn't how it's supposed to work, that's for sure.