Shutdown/reboot/suspend the device after a specific time or wake with a rtc alarm. The screen-saver will not interrupt the timer. A privileged control script may be installed to control shutdown and rtcwake as user.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
| Version | Status |
|---|---|
| 54 | Active |
| 53 | Active |
| 52 | Rejected |
| 51 | Active |
| 50 | Active |
| 49 | Active |
| 48 | Active |
| 47 | Rejected |
| 46 | Active |
| 45 | Active |
| 44 | Active |
| 43 | Active |
| 42 | Active |
| 41 | Active |
| 40 | Rejected |
| 39 | Rejected |
| 38 | Rejected |
| 37 | Rejected |
| 36 | Active |
| 35 | Active |
| 34 | Active |
| 33 | Active |
| 32 | Rejected |
| 31 | Active |
| 30 | Active |
| 29 | Active |
| 28 | Active |
| 27 | Active |
| 26 | Active |
| 25 | Active |
| 24 | Active |
| 23 | Inactive |
| 22 | Active |
| 21 | Rejected |
| 20 | Rejected |
| 19 | Active |
| 18 | Active |
| 17 | Active |
| 16 | Active |
| 15 | Active |
| 14 | Active |
| 13 | Inactive |
| 12 | Active |
| 11 | Active |
| 10 | Active |
| 9 | Active |
| 8 | Active |
| 7 | Active |
| 6 | Inactive |
| 5 | Rejected |
| 4 | Rejected |
| 3 | Rejected |
| 2 | Rejected |
| 1 | Rejected |
Link to GNOME 45 port the pull request: https://github.com/Deminder/ShutdownTimer/pull/9
1. Delaying disable is bad (line 91 extension.js) and that can get triggered after next enable. 2. Anything you save as `this.` in `ShutdownTimerPreferences` (prefs.js) can leave there after window close. Make them local of that method and pass them to other methods instead. 3. Move line 8-12 `modules/end-session-dialog-aware.js` to the `ESDAware.constructor()`. 4. What's the reason for line 15 `modules/util.js`? You can use `console.log()` without that condition. Same for line 22 in the same module.
Thanks for the review. However, based on the points you provided, I do not understand the rejection: > 1. Delaying disable is bad (line 91 extension.js) and that can get triggered after next enable. When the gnome-shell switches from `user` -> `unlock-dialog` the extension is disabled and re-enabled by gnome-shell. Although, the timer could be restarted, the check command can not. I don't know a better way to handle this. For instance modifying this disable/enable behavior does not seem like a good idea. > 2. Anything you save as `this.` in `ShutdownTimerPreferences` (prefs.js) can leave there after window close. Make them local of that method and pass them to other methods instead. It is true that this seems cleaner. However, the `prefsObj` object is garbage collected when it goes out of scope after `fillPreferences` is called at `js/dbusServices/extensions/extensionPrefsDialog.js:36`. > 3. Move line 8-12 `modules/end-session-dialog-aware.js` to the `ESDAware.constructor()`. Are you sure that this is a good idea? In gnome-shell code `makeProxyWrapper` and `loadInterfaceXML` are never in the constructor. It seems to me as this is done this way because these functions are blocking. > 4. What's the reason for line 15 `modules/util.js`? You can use `console.log()` without that condition. Same for line 22 in the same module. In my test setup I override `globalThis.logDebug` for custom log behavior, it does not seem possible to override `console.log`. For the same reason `globalThis.logTest` existed but it is not used anymore (and I already removed it).
> However, the `prefsObj` object is garbage collected when it goes out of scope after `fillPreferences` is called at `js/dbusServices/extensions/extensionPrefsDialog.js:36`. Oh, sorry, this is not true. Nevertheless I would appreciate clarification on the other points.
# 1 That's how GNOME Shell rebasing in unlock dialog. Ask that on GNOME Matrix channel and maybe someone comes with a solution. # 2 You shouldn't leave any properties filled with instances there. one alternative is to clean up on window close request but I guess making them local is much easier. # 3 Yes they are blocking but in GResource. It doesn't block shell process. Still, it should still be in the `ESDAware.constructor()`. #4 Ok, please remove `logTest()` if you don't use it.