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

"More settings" doesn't work since last update #9

Open
tmarkov opened this issue Dec 21, 2018 · 26 comments
Open

"More settings" doesn't work since last update #9

tmarkov opened this issue Dec 21, 2018 · 26 comments

Comments

@tmarkov
Copy link

tmarkov commented Dec 21, 2018

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)

@ltguillaume
Copy link
Owner

ltguillaume commented Dec 21, 2018

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.

@ltguillaume
Copy link
Owner

ltguillaume commented Dec 21, 2018

I (hope I) have notified the creator of the package.

@ltguillaume
Copy link
Owner

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?

@tmarkov
Copy link
Author

tmarkov commented Dec 21, 2018

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.

@ltguillaume
Copy link
Owner

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.

@ltguillaume
Copy link
Owner

No response from @dimqua so far...

@ltguillaume
Copy link
Owner

@dimqua I've sent you another message, please respond. You're breaking Redshift Tray with your Chocolatey package, I'd like to resolve this.

@dimqua
Copy link

dimqua commented Jan 22, 2019

@ltguillaume sorry for the delay. I can't reproduce:

  1. Run rstray.exe;
  2. Change some settings from More settings menu, rstray.ini is created.

When I change settings and restart the program, all my changes persist.

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 22, 2019

@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.

@dimqua
Copy link

dimqua commented Jan 23, 2019

@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.

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 23, 2019

@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.

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 23, 2019

@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.

@tmarkov
Copy link
Author

tmarkov commented Jan 23, 2019

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?

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 23, 2019

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

@dimqua
Copy link

dimqua commented Jan 26, 2019

It seems I've found a solution. Could you please test the latest version?
choco install rstray --version 1.8.1

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 26, 2019

No, that doesn't work:

  1. 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).
  2. Chocolatey does not create a shim to rstray.exe, so typing "rstray" in a Command prompt won't run RSTray anymore.

@dimqua
Copy link

dimqua commented Jan 26, 2019

  1. Why it works for me this way then? I don't mind to keep it though.
  2. Fixed.

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 26, 2019

  1. 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.
  2. Cool
  3. Is it allowed to use C:\tools?

Thought I fixed it, not true... Chocolatey is awful, both in architecture and documentation. Yuck.

@dimqua
Copy link

dimqua commented Jan 26, 2019

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.)

@ltguillaume
Copy link
Owner

ltguillaume commented Jan 26, 2019

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!

@ltguillaume
Copy link
Owner

@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 :-)

@karolzlot
Copy link

I think this issue reappeared again? chocolatey installs rstray to C:\ProgramData\chocolatey\lib\rstray\tools for me.

@karolzlot
Copy link

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).

@ltguillaume ltguillaume reopened this Dec 10, 2022
@ltguillaume
Copy link
Owner

@dimqua Can you help out?

@High-Flyer
Copy link

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

@ltguillaume
Copy link
Owner

@High-Flyer Yeah but this isn't how it's supposed to work, that's for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants