Image 01
profile-image

diegc

Diego Cristina Madrid, Spain
Plasma 4 Widgets
Flux / Redshift Plasmoid

Plasma 4 Widgets 38 comments

by diegc
Score 82.4%
Aug 23 2011
I do have the patch: http://box.jisko.net/d/4a8fe3ff
I promised myself to work in the issue, but time is not a thing that I have in great quantities right now... - Nov 13 2011
Hey, thanks! Great work! I'll take a look when I have time. Your patch sounds good, but I'm not sure I'll drop x.flux support. It's complicated since redshift and x.flux are managed in very different ways, but I think I'll try to keep both at least for now. But for redshift, as I said, I'll apply the changes when I have time.

Anyway, thanks again for the coding and the effort you put :) - Sep 24 2011
hcartiaux, thanks a lot for your reply. I didn't know that you could stop redshift whithout killing it. I've made a little experiment and seems to work quite well, but I don't have much time either, so I only made minor changes to use the Popen object when available (it won't be available only in case redshift / xflux was instantiated outside the plasmoid). There's no difference in behaviour yet, I think (because I can't reproduce the defunct process situation, it's a little difficult to me to correct that bug...), but at least now the process management is a bit more "correct".

I'll take a deeper look into it when I have time, because using SIGUSR instead of SIGTERM/SIGKILL to stop redshift will require to rewrite a great portion of the plasmoid. - Aug 23 2011
Ok, i uploaded a minor change, hope it helps. Anyway, it's a temporal fix, I intend to do some research, but I don't have much time nowadays :( - Jul 09 2011
You said you still have problems with the defunct subprocess. What is the scenario when it shows up? Only one, defunct subprocess, or more than one? (is the icon green, red or gray?) - Jul 09 2011
Thank you for the tip. I was a little bit lost among all the subprocess management functions python has, although at the moment I only used this function to detect launch errors. For the "unknown status" or zombie processes situations, I don't know yet how to handle them correctly. Now I'm sending them sigkill signals when i found more than one process running, but may be it's too drastic (for what I said previously, only unresponsive processes should be stopped this way).

In the next few days I won't have much time, but next week I intend to do some research about finding zombie or unresponsive processes so I can send the appropiate signal to each one. - Jun 28 2011
Well, it is true, no matter how much effort you put trying to prevent the user from doing something wrong, you can never be sure of it. So I took your advice (thanks!) and implemented a simple dialog wich informs the user if something goes wrong (bug report style). - Jun 28 2011
I followed your suggestion about the config dialog, and it feels more integrated now.

About os.waitpid, I'll try to take a look at it tomorrow and see what I can do. Thanks again. - Jun 27 2011
I think that's because one of your processes is in zombie status and thus can only be terminated by a "kill -9" [1]. The plasmoid doesn't (or souldn't) create zombie processes. I've tried but i can't reproduce it. What I've succeeded to test is launching two xflux processes (one of them using the console), and the plasmoid can terminate both. I don't know how you ended up with a zombie xflux, but I don't think that was because of the plasmoid but because xflux itself.

[1] Using kill -9 to terminate the program doesn't seem like a good idea. Being programs that affect screen properties, I'd rather wait for them to exit themselves normally.

PS: I'm thinking about using kill -9 in cases like this, when you end up with zombie processes... but first I'd like to confirm if this happens frequently. - Jun 27 2011
Thank you again. Bug fixed :) - Jun 27 2011
With the config dialog design, I tried to prevent users from introducing wrong values. As far as I know, at the moment it is impossible to put wrong values in the config dialog (all fields are restricted). The only thing you can do is change by hand the configuration file, and if so, it will fall back to default values... or at least that's what I intended.
But if I'm overlooking something, please tell me. - Jun 26 2011
Thank you for the advice, I didn't know how to do it.
I just added this line to the metadata file and now it can be put in the system tray. - Jun 26 2011
Thank you too for reporting. I just fixed it and uploaded the new version :) - Jun 25 2011
I've seen this strange behaviour with plasmoids installation may times, randomly with different plasmoids and without a pattern between them. I don't know if it's a problem with the plasmoids themselves or with plasma...

Anyway, I uploaded the new, fixed version. It was a stupid mistake with the default configuration values. I forgot to change them when solving the previous bug. - Jun 25 2011
Can you be more specific? On my system it installs and runs fine... but this is my first plasmoid, so I probably made some mistakes. - Jun 24 2011
Thank you for reporting. I just uploaded a new version. Now you can also adjust gamma for each RGB channel. - Jun 24 2011