Skip to content

u/BrokenCommander

In this archive from Jun 2016 to Nov 2022

4
posts
11
comments
0
media
91
score
1 saved before deletion

Okay, so turns out that the systemd service did work; I just must've gotten super unlucky. After some testing I've concluded that it doesn't always work, and that SIGTERM works better than SIGINT. So this is all you need (works for logout, shutdown and reboot):

[Unit]
Description=Kills processes gracefully
DefaultDependencies=no
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/usr/bin/pkill -SIGTERM chromium

[Install]
WantedBy=shutdown.target
20 points

Chromium doesn't ask, it just closes. But if I shutdown gedit for example, it does ask me if I would like to save any open files before closing. But even then, I can gracefully kill Chromium with pkill -2, I just haven't found a way to run that before shutdown yet.

13 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.