The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

logout with Mod+Shift+e discards unsafed documents. How to avoid this?

asked 2014-08-01 21:22:06 +0000

maikel gravatar image

if i have i.e. an open and unsaved libre office document and close the window with Mod+Sift+q Libre Office asks me, if I want to save the document before closing. But this does not happen if I logout with Mod+Shift+e. the document is lost (if libre Office could not recover). How can I logout from i3 with clean closing of windows?

Thanks!

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2014-08-03 16:28:56 +0000

ANOKNUSA gravatar image

Don't rely on a machine to remind you not to throw your work away. Computers are stupid, and while they can be made to do some wonderful things, time spent trying to make them do someting smart might be better spent learning good work habits.

Every time you make a change to a document, save it. Full stop. Even if (for whatever reason) you don't save every single time you make a change you shouldn't give yourself the opportunity to forget that you have unsaved work. Avoid multitasking like the plague. It's pointless. Finish what's important and then move on to the next task.

edit flag offensive delete link more
1

answered 2014-08-03 19:03:38 +0000

maikel gravatar image

Sorry, I do not accept your answer as a good answer to my question. I would like it the way all desktop environments (Gnome, ...) do it. They close the window properly. It does not only concern to unsaved documents. Also, i.e. Firefox does not close a clean way. After logout and login to i3, firefox tells "Sorry, Firefox crashed...". I think this means, i3 kills all applications the hard way. Why? This is not usefull. I can not close all open windows with Mod+Shift+Q before logout. So does anyone have an idea why i3 is doing so or has someone a solution how to close all windows safely before logout?

edit flag offensive delete link more

Comments

Saying that you "can not close all open windows with Mod+Shift+Q before logout" is a bit overly absolute, don't you think? How many windows can you possibly have open? Many more than necessary, I'd wager.

ANOKNUSA gravatar imageANOKNUSA ( 2014-08-03 20:47:02 +0000 )edit
1

Do the things like you want. I asked if somebody knows a solution to the behavior that I would like.

maikel gravatar imagemaikel ( 2014-08-03 21:58:23 +0000 )edit

@maikel please use the comment function to respond to answers. Posting an answer should be reserved to answers to the original question

Adaephon gravatar imageAdaephon ( 2014-08-04 09:44:00 +0000 )edit

"I cannot close all open windows with Mod+shift+Q before logout". Is this not what you in fact do when using say Gnome Desktop etc - close the window by clicking the x button for each open window then logoff/shutdown. Mod+shift+E is killing X window server which effectively crashes open applications

Eireannach gravatar imageEireannach ( 2014-12-14 16:30:40 +0000 )edit
0

answered 2014-08-05 21:27:30 +0000

KJ44 gravatar image

To get Gnome Desktop Environment behaviour from i3 Window Manager I'd suggest experimenting with a script that calls 'gnome-session-save' or similar. It might "just work" but you might have to start various Gnome daemons and the like to get it all to work.

http://linuxg.net/shutdown-reboot-log...

If that won't fly, maybe try using DBUS to save files before shutting down i3wm?

edit flag offensive delete link more

Comments

Thanks for your answer. The i3 Mod+Shift+Q command does the right thing. In the user guide they say: for applications which support the WM_DELETE protocol, this will correctly close the application (saving any modifications). How can I send a WM_DELETE to specific windows with a bash script?

maikel gravatar imagemaikel ( 2014-08-06 07:51:30 +0000 )edit
KJ44 gravatar imageKJ44 ( 2014-08-06 20:51:51 +0000 )edit

wmctrl ... http://tomas.styblo.name/wmctrl/ ... probably.

KJ44 gravatar imageKJ44 ( 2014-08-06 20:53:24 +0000 )edit

Got it. I3 has already the solution. For a clean shutdown of i.e. firefox and a subsequent logout: i3-msg '[class="firefox"] kill; sleep 1; i3-msg 'exit'

maikel gravatar imagemaikel ( 2014-08-06 21:01:04 +0000 )edit

Question Tools

Stats

Asked: 2014-08-01 21:22:06 +0000

Seen: 532 times

Last updated: Aug 05 '14

Related questions