You are not logged in.

#1 2014-03-19 15:03:13

kubco2
Member
Registered: 2013-10-14
Posts: 24

[SOLVED] Save Krusader session on shutdown

Hello,

does someone know where can be problem?

I press power button to shutdown notebook, and Krusader state is not saved.
I  killed Krusader with SIGTERM and it saved session, but didnt with SIGKILL. But systemd sends SIGTERM first(read from shutdown screen output).

Thanks for help.

Last edited by kubco2 (2014-03-19 21:39:47)

Offline

#2 2014-03-19 15:51:39

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: [SOLVED] Save Krusader session on shutdown

Probably Krusader didn't react in time, and systemd sends a SIGKILL after a short timeout. Is your /home still mounted writeable on shutdown? If it's on a different partition, chances are it's not.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#3 2014-03-19 17:01:50

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: [SOLVED] Save Krusader session on shutdown

Home is even encrypted partition ... but I see umounts logs after SIGTERM/SIGKILL logs... How can I add pause before SIGKILL ....
I tried:
cat /etc/systemd/system/systemd-halt.service.d/halt.conf
[Service]
ExecStart=
ExecStart=/usr/bin/systemctl -s TERM halt
ExecStart=/usr/bin/sleep 5
ExecStart=/usr/bin/systemctl --force halt

Doesnt work. But it is probably wrong place.

Offline

#4 2014-03-19 20:18:44

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,954
Website

Re: [SOLVED] Save Krusader session on shutdown

AFAIK systemd remounts the partitions read-only, but I'm not sure of that. Google it. Still I think it is a bad idea to rely on shutdown for saving any settings. Why don't you just close Krusader before shutdown?


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#5 2014-03-19 21:26:42

kubco2
Member
Registered: 2013-10-14
Posts: 24

Re: [SOLVED] Save Krusader session on shutdown

I dont want save settings on shutdown, only session  .. mainly opened tabs. For example I clean up a tons of tabs, and then continue working. And when I restart PC I can clean again big_smile .... I start Krusader on startup and close it with shutdown ... For me it is like a desktop.

EDIT:
I ended up with this script:
/usr/lib/systemd/system-shutdown/krusader.sh

#!/bin/sh
mount /home -o remount,rw
pkill -TERM krusader
mount /home -o remount,ro

Now it works. Thanks for help.

Last edited by kubco2 (2014-03-19 21:37:55)

Offline

Board footer

Powered by FluxBB