Shutter signals in Multi User Env
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Shutter |
Fix Released
|
Low
|
Mario Kemper (Romario) |
Bug Description
When running in a multi-user environment, shutter doesn't work correctly.
This is due to lines 6037-6080 "pidof" returning pids of all the other users processes and "probably" signalling the other user process and dying before actually reaching the respective user shutter process.
These are the probable solutions, with a little comment:
1 - signaling all processes and "die"ing after the "foreach" cycle
Fast patch!
Doesn't avoid multiple shutter processes signalling, causing multiple "shots".
2 - replacing "pidof ..." with "pgrep -d ' ' -u $< -f /usr/bin/shutter" and maintaing the rest of the code
Limits to user shutter processes, but allows multiple shutter processes, only signalling one!
Depends on "procps" package, not a problem!
3 - directly calling "pkill -SIGNAL -u $< -f /usr/bin/shutter"
Fast patch!
Signals all users shutters process... causing multiple "shots".
Depends on "procps" package, not a problem!
4 - creating a pid file in .shutter dir
Requires checking for "stalled" pid file on start, caused by "FS failures"
Avoids multiple shutter instances
In my opinion I prefer solution 2 for the short time solution, but I think that number 4 would be the "preferred" method.
There maybe other solutions like using Unix::PID, File::PID, ...
Changed in shutter: | |
status: | New → In Progress |
assignee: | nobody → Mario Kemper (Romario) (mario-kemper) |
importance: | Undecided → Low |
milestone: | none → 0.85 |
Changed in shutter: | |
status: | Fix Committed → Fix Released |
A little more explanation:
I'm not running any shutter process.
I'm calling it via gnome gconf "shortcuts" with "shutter --window" and "shutter --full", like so:
gconftool-2 --direct --set /apps/metacity/ keybinding_ commands/ command_ window_ screenshot '/usr/bin/shutter --window' keybinding_ commands/ command_ screenshot '/usr/bin/shutter --full'
gconftool-2 --direct --set /apps/metacity/