[opensuse-factory] Messages from scripts
Hi I have a backup script that runs on "logout" that tends to run while the splash screen is displayed, is there anyway in Plasma that i can post some progress messages onto the splash screen image as my script runs? If not, are there any plans to allow this? regards Ian -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 6. August 2015, 11:25:09 schrieb ianseeks:
I have a backup script that runs on "logout" that tends to run while the splash screen is displayed
Which splash screen do you mean here? plymouth? I.e. is the script running _after_ the plasma session is closed?
is there anyway in Plasma that i can post some progress messages onto the splash screen image as my script runs? If not, are there any plans to allow this?
And how should this work? Plasma has nothing to do with the splash screen, and doesn't even know that it exists. You could try to use kdialog in your script or open an xterm/konsole window, but that only works if your script runs before the session is closed of course. It might be possible to display messages on the plymouth splash screen (I'm not sure, but the "display-message" option sounds promising), have a look at "man plymouth". But if your script is to be run during system shutdown, why don't you just start it in /etc/init.d/halt.local or similar then? "echo"s would go to the system log then, or the text console. Otherwise you probably have a race condition anyway. The script would probably just get killed if it doesn't finish in time before the system is shutdown. Or am I misunderstanding something here? Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday 06 Aug 2015 13:33:36 Wolfgang Bauer wrote:
Am Donnerstag, 6. August 2015, 11:25:09 schrieb ianseeks:
I have a backup script that runs on "logout" that tends to run while the splash screen is displayed
Which splash screen do you mean here? plymouth? I.e. is the script running _after_ the plasma session is closed? Once the desktop disappears, there is an image displayed before it reaches the login screen.
is there anyway in Plasma that i can post some progress messages onto the splash screen image as my script runs? If not, are there any plans to allow this?
And how should this work? Plasma has nothing to do with the splash screen, and doesn't even know that it exists.
no idea, thats what i was hoping to find out. I don't know when Plasma ends and KDM starts and if there is anything inbetween.
You could try to use kdialog in your script or open an xterm/konsole window, but that only works if your script runs before the session is closed of course.
I'm not sure at what point it runs exactly but its a script configured at "Shutdown" (i'm sure that should be "Logout", shutdown is techie speak) in systemsetting5/Startup and shutdown. I wouldn't want it to open another window, I thought it would be better to be part of a logout process.
It might be possible to display messages on the plymouth splash screen (I'm not sure, but the "display-message" option sounds promising), have a look at "man plymouth".
i'll give that a try
But if your script is to be run during system shutdown, why don't you just start it in /etc/init.d/halt.local or similar then? "echo"s would go to the system log then, or the text console. No, its something i run each time a user logs out thats why i find the "Shutdown" definition in the configuration in systemsettings5 wrong. I would hope (i've not checked) that if i selected "Shutdown" from the menu before logging out, it would run my logout script to completion first.
Otherwise you probably have a race condition anyway. The script would probably just get killed if it doesn't finish in time before the system is shutdown.
Or am I misunderstanding something here? I don't thinks so but confusion does get created by systemsettings5 defining user logout as "Shutdown"
Kind Regards, Wolfgang
Thanks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 6. August 2015, 14:12:34 schrieb ianseeks:
On Thursday 06 Aug 2015 13:33:36 Wolfgang Bauer wrote:
Am Donnerstag, 6. August 2015, 11:25:09 schrieb ianseeks:
I have a backup script that runs on "logout" that tends to run while the splash screen is displayed
Which splash screen do you mean here? plymouth? I.e. is the script running _after_ the plasma session is closed?
Once the desktop disappears, there is an image displayed before it reaches the login screen.
So when you are indeed logging out, not shutting down? There is *no* splash screen in that case. Plasma runs the "shutdown" scripts and quits. Then kdm takes over and displays the login greeter again.
is there anyway in Plasma that i can post some progress messages onto the splash screen image as my script runs? If not, are there any plans to allow this?
And how should this work? Plasma has nothing to do with the splash screen, and doesn't even know that it exists.
no idea, thats what i was hoping to find out. I don't know when Plasma ends and KDM starts and if there is anything inbetween.
There is nothing inbetween.
You could try to use kdialog in your script or open an xterm/konsole window, but that only works if your script runs before the session is closed of course.
I'm not sure at what point it runs exactly but its a script configured at "Shutdown" (i'm sure that should be "Logout", shutdown is techie speak) in systemsetting5/Startup and shutdown.
As I already wrote some time ago, the script is run when the Plasma session is shut down. Also, "logout" would have exactly the same problem: would you expect to run your script when you shutdown the system then instead of just logging out? For Plasma it doesn't matter whether you logout, shutdown, or reboot. Plasma quits, it shuts itself down. What is done to the system afterwards is a different story...
I wouldn't want it to open another window, I thought it would be better to be part of a logout process.
Well, you'd have to. There's nothing else where you could display a message.
It might be possible to display messages on the plymouth splash screen (I'm not sure, but the "display-message" option sounds promising), have a look at "man plymouth".
i'll give that a try
Won't help in this case. plymouth only displays its splash screen on boot and halt/shutdown of the system.
But if your script is to be run during system shutdown, why don't you just start it in /etc/init.d/halt.local or similar then? "echo"s would go to the system log then, or the text console.
No, its something i run each time a user logs out thats why i find the "Shutdown" definition in the configuration in systemsettings5 wrong. I would hope (i've not checked) that if i selected "Shutdown" from the menu before logging out, it would run my logout script to completion first.
Hm? If you select "Shutdown", it will logout as well and shutdown/poweroff the whole system afterwards. Plasma5 will behave exactly the same regarding the shutdown script though.
Or am I misunderstanding something here?
I don't thinks so but confusion does get created by systemsettings5 defining user logout as "Shutdown"
No, IMHO the confusion was created by you wanting to display messages at the "splash screen"... ;-) Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 6. August 2015, 14:12:34 schrieb ianseeks:
On Thursday 06 Aug 2015 13:33:36 Wolfgang Bauer wrote:
Am Donnerstag, 6. August 2015, 11:25:09 schrieb ianseeks:
I have a backup script that runs on "logout" that tends to run while the splash screen is displayed
Which splash screen do you mean here? plymouth? I.e. is the script running _after_ the plasma session is closed?
Once the desktop disappears, there is an image displayed before it reaches the login screen.
So when you are indeed logging out, not shutting down? There is *no* splash screen in that case. Plasma runs the "shutdown" scripts and quits. Then kdm takes over and displays the login greeter again.
is there anyway in Plasma that i can post some progress messages onto the splash screen image as my script runs? If not, are there any plans to allow this?
And how should this work? Plasma has nothing to do with the splash screen, and doesn't even know that it exists.
no idea, thats what i was hoping to find out. I don't know when Plasma ends and KDM starts and if there is anything inbetween.
There is nothing inbetween.
You could try to use kdialog in your script or open an xterm/konsole window, but that only works if your script runs before the session is closed of course.
I'm not sure at what point it runs exactly but its a script configured at "Shutdown" (i'm sure that should be "Logout", shutdown is techie speak) in systemsetting5/Startup and shutdown.
As I already wrote some time ago, the script is run when the Plasma session is shut down. Also, "logout" would have exactly the same problem: would you expect to run your script when you shutdown the system then instead of just logging out?
For Plasma it doesn't matter whether you logout, shutdown, or reboot. Plasma quits, it shuts itself down. What is done to the system afterwards is a different story...
I wouldn't want it to open another window, I thought it would be better to be part of a logout process.
Well, you'd have to. There's nothing else where you could display a message. yes, I get that now. But i was throwing the idea out there that there should be a space in the logout process to allow for this sort of action. If you are allowing scripts to be run at logout, would it be an idea to allow the result to be shown in some way? Having to log back in to check the result of a
On Thursday 06 Aug 2015 15:36:47 Wolfgang Bauer wrote: script, in my case a backup script, seems wrong. Maybe its too complicated to do, i don't know.
It might be possible to display messages on the plymouth splash screen (I'm not sure, but the "display-message" option sounds promising), have a look at "man plymouth".
i'll give that a try
Won't help in this case. plymouth only displays its splash screen on boot and halt/shutdown of the system.
But if your script is to be run during system shutdown, why don't you just start it in /etc/init.d/halt.local or similar then? "echo"s would go to the system log then, or the text console.
No, its something i run each time a user logs out thats why i find the "Shutdown" definition in the configuration in systemsettings5 wrong. I would hope (i've not checked) that if i selected "Shutdown" from the menu before logging out, it would run my logout script to completion first.
Hm? If you select "Shutdown", it will logout as well and shutdown/poweroff the whole system afterwards. Plasma5 will behave exactly the same regarding the shutdown script though. Thats great.
Or am I misunderstanding something here?
I don't thinks so but confusion does get created by systemsettings5 defining user logout as "Shutdown"
But i still think i am correct - it should be "Logout" in "systemsettings5/Startup and Shutdown" where you choose when to run your script and not "Shutdown". Shutdown, as a single word, has always meant to me to turn the machine off unless its qualified with with what is to be shutdown e.g. the service, session etc. Using the incorrect terminology causes confusion as it has shown. I will log it as "bug/wish".
No, IMHO the confusion was created by you wanting to display messages at the "splash screen"... ;-)
Probably, its actually the same image that is displayed as a background to the kdm login which appears before the kdm login dialog gets displayed.
Kind Regards, Wolfgang
Thanks for your help. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 6. August 2015, 16:01:15 schrieb ianseeks:
If you are allowing scripts to be run at logout, would it be an idea to allow the result to be shown in some way? Having to log back in to check the result of a script, in my case a backup script, seems wrong. Maybe its too complicated to do, i don't know.
Again, you can run kdialog/xdialog I suppose, or an xterm/konsole. Or, you could probably use the standard desktop notifications, but at the point that your script runs plasma might have shutdown already and might not be able to display them any more. No idea, you'd have to try. The simplest way is to use the "notify-send" command that's part of the package "libnotify-tools". But a notification definitely won't block/delay the logout, so you'd have to do that yourself (via sleep e.g.) to be actually able to read the message.
No, IMHO the confusion was created by you wanting to display messages at the "splash screen"... ;-)
Probably, its actually the same image that is displayed as a background to the kdm login which appears before the kdm login dialog gets displayed.
And it's also the same image that's used as wallpaper in KDE by default, or as background of the lock screen, or as splash screen during boot/shutdown. That's what they call "consistent branding" I suppose... ;-) Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday 06 Aug 2015 20:17:53 Wolfgang Bauer wrote:
Am Donnerstag, 6. August 2015, 16:01:15 schrieb ianseeks:
If you are allowing scripts to be run at logout, would it be an idea to allow the result to be shown in some way? Having to log back in to check the result of a script, in my case a backup script, seems wrong. Maybe its too complicated to do, i don't know.
Again, you can run kdialog/xdialog I suppose, or an xterm/konsole.
Or, you could probably use the standard desktop notifications, but at the point that your script runs plasma might have shutdown already and might not be able to display them any more. No idea, you'd have to try.
Is there a case for the logout process not to finish completely until all user defined logout processes have completed?
The simplest way is to use the "notify-send" command that's part of the package "libnotify-tools".
But a notification definitely won't block/delay the logout, so you'd have to do that yourself (via sleep e.g.) to be actually able to read the message.
Thanks, i'll look into that. Sounds like a solution if I can get it to work.
No, IMHO the confusion was created by you wanting to display messages at the "splash screen"... ;-)
Probably, its actually the same image that is displayed as a background to the kdm login which appears before the kdm login dialog gets displayed.
And it's also the same image that's used as wallpaper in KDE by default, or as background of the lock screen, or as splash screen during boot/shutdown. That's what they call "consistent branding" I suppose... ;-) Seems totally sensible
Kind Regards, Wolfgang
Thanks -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Freitag, 7. August 2015, 10:42:14 schrieb ianseeks:
On Thursday 06 Aug 2015 20:17:53 Wolfgang Bauer wrote:
Again, you can run kdialog/xdialog I suppose, or an xterm/konsole.
Or, you could probably use the standard desktop notifications, but at the point that your script runs plasma might have shutdown already and might not be able to display them any more. No idea, you'd have to try.
Is there a case for the logout process not to finish completely until all user defined logout processes have completed?
Well, I had a look at the startkde script meanwhile: The startkde script signals KDE to quit, and then runs all shutdown scripts (I suppose that's what you mean with "user defined logout processes"?) and then quits itself afterwards. So, the logout itself is postponed until all shutdown scripts return, the X session keeps running (but not Plasma/KWin or any other application). This also implies that notify-send will not work: there is no desktop any more that would display the notification. But I tried a few things, and kdialog does work. You can e.g. display a message with "kdialog --error Hello!". A dialog window displaying the message will appear (without window decorations as kwin has quit already), and the logout will only continue when you press OK. Also, kdialog's "passive popups" work: "kdialog --passivepopup Hello! 10" will display the message ("Hello!" in this case) for 10 seconds (the period is the number that's been passed), and then continue the logout. That's probably exactly what you are looking for I suppose. For more information, run "kdialog --help". Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wednesday 12 Aug 2015 17:40:15 Wolfgang Bauer wrote:
Am Freitag, 7. August 2015, 10:42:14 schrieb ianseeks:
On Thursday 06 Aug 2015 20:17:53 Wolfgang Bauer wrote:
Again, you can run kdialog/xdialog I suppose, or an xterm/konsole.
Or, you could probably use the standard desktop notifications, but at the point that your script runs plasma might have shutdown already and might not be able to display them any more. No idea, you'd have to try.
Is there a case for the logout process not to finish completely until all user defined logout processes have completed?
Well, I had a look at the startkde script meanwhile: The startkde script signals KDE to quit, and then runs all shutdown scripts (I suppose that's what you mean with "user defined logout processes"?) and then quits itself afterwards.
So, the logout itself is postponed until all shutdown scripts return, the X session keeps running (but not Plasma/KWin or any other application).
I was thinking of, if possible, getting the scripts to run before Plasma/Kwin stopped running so it could allow the user to get back to the desktop if the running logout process was written to allow it.
This also implies that notify-send will not work: there is no desktop any more that would display the notification.
But I tried a few things, and kdialog does work. You can e.g. display a message with "kdialog --error Hello!". A dialog window displaying the message will appear (without window decorations as kwin has quit already), and the logout will only continue when you press OK.
Also, kdialog's "passive popups" work: "kdialog --passivepopup Hello! 10" will display the message ("Hello!" in this case) for 10 seconds (the period is the number that's been passed), and then continue the logout. That's probably exactly what you are looking for I suppose.
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
For more information, run "kdialog --help".
Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Mittwoch, 12. August 2015, 17:19:12 schrieb ianseeks:
I was thinking of, if possible, getting the scripts to run before Plasma/Kwin stopped running so it could allow the user to get back to the desktop if the running logout process was written to allow it.
No, that's not possible. At the moment your script is run, everything (except X itself) is shut down already. You could maybe run "startkde" in your script though to start a new Plasma session, but be careful to not enter an endless loop... ;-) (this will call your script on logout again)
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
Hm? The passive popup contains the error, no? How can it be in the top left corner then? Or do you mean it's in the top left corner of the popup? Well, kdialog does support standard HTML tags too (including CSS), e.g.: kdialog --passivepopup "<p align=center>Hello</p>" Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wednesday 12 August 2015 19:44:06 Wolfgang Bauer wrote:
Am Mittwoch, 12. August 2015, 17:19:12 schrieb ianseeks: [...]
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
Hm? The passive popup contains the error, no? How can it be in the top left corner then? Or do you mean it's in the top left corner of the popup?
No windowanager, thus the dialog is placed at 0,0 Kind regards, Stefan -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 work: +49 2405 49936-424 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 13. August 2015, 02:01:35 schrieb Stefan Bruens:
On Wednesday 12 August 2015 19:44:06 Wolfgang Bauer wrote:
Am Mittwoch, 12. August 2015, 17:19:12 schrieb ianseeks: [...]
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
Hm? The passive popup contains the error, no? How can it be in the top left corner then? Or do you mean it's in the top left corner of the popup?
No windowanager, thus the dialog is placed at 0,0
Hm, the dialog is centered on the display here, despite the fact that no window manager is running. I was using the (not yet released) KF5 based version though. I now tried with KDE4's kdialog and the dialog is indeed in the top-left corner. But I mainly asked because I didn't understand what he was talking about exactly. Re-reading the paragraph again, it seems "error" does indeed mean the dialog, not the error message that's displayed in the popup. I don't think there's a solution then. Kdialog does have a "--geometry" option (like all KDE applications), but it doesn't seem to have the desired effect... But if the passive popups work as desired, that's no problem anyway I suppose. Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thursday 13 Aug 2015 09:11:51 Wolfgang Bauer wrote:
Am Donnerstag, 13. August 2015, 02:01:35 schrieb Stefan Bruens:
On Wednesday 12 August 2015 19:44:06 Wolfgang Bauer wrote:
Am Mittwoch, 12. August 2015, 17:19:12 schrieb ianseeks: [...]
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
Hm? The passive popup contains the error, no? How can it be in the top left corner then? Or do you mean it's in the top left corner of the popup?
No windowanager, thus the dialog is placed at 0,0
Hm, the dialog is centered on the display here, despite the fact that no window manager is running. I was using the (not yet released) KF5 based version though. I now tried with KDE4's kdialog and the dialog is indeed in the top-left corner.
But I mainly asked because I didn't understand what he was talking about exactly. Re-reading the paragraph again, it seems "error" does indeed mean the dialog, not the error message that's displayed in the popup.
Yes, correct. Sorry, i should have said kdialog --error.
I don't think there's a solution then. Kdialog does have a "--geometry" option (like all KDE applications), but it doesn't seem to have the desired effect...
But if the passive popups work as desired, that's no problem anyway I suppose.
Kind Regards, Wolfgang
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wednesday 12 Aug 2015 19:44:06 Wolfgang Bauer wrote:
Am Mittwoch, 12. August 2015, 17:19:12 schrieb ianseeks:
I was thinking of, if possible, getting the scripts to run before Plasma/Kwin stopped running so it could allow the user to get back to the desktop if the running logout process was written to allow it.
No, that's not possible. At the moment your script is run, everything (except X itself) is shut down already.
yes, i understand that is how it is now, i was just putting forward an idea to change it. I thought it might be a useful idea for the office environment (rather than home) to allow the admin to enforce whatever logout policy they want to implement e.g. an app that stops the logout if they haven't done their timesheet :o).
You could maybe run "startkde" in your script though to start a new Plasma session, but be careful to not enter an endless loop... ;-) (this will call your script on logout again)
Thanks, thats great. The passivepopup works nicely to allow me to monitor progress and the error can halt the process if the script fails in any way. I just need to find a way to centre the error as it gets displayed in the top left corner but the passivepopups are in the centre of the display.
Hm? The passive popup contains the error, no? How can it be in the top left corner then? No, its the kdialog --error that puts the message in the corner - i can live with that as hopefully it should be a rare occurrence
Or do you mean it's in the top left corner of the popup?
Well, kdialog does support standard HTML tags too (including CSS), e.g.: kdialog --passivepopup "<p align=center>Hello</p>" I'm happy with the kdialog --passivepopup
Kind Regards, Wolfgang thanks. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-08-13 09:45, ianseeks wrote:
On Wednesday 12 Aug 2015 19:44:06 Wolfgang Bauer wrote:
No, that's not possible. At the moment your script is run, everything (except X itself) is shut down already.
yes, i understand that is how it is now, i was just putting forward an idea to change it. I thought it might be a useful idea for the office environment (rather than home) to allow the admin to enforce whatever logout policy they want to implement e.g. an app that stops the logout if they haven't done their timesheet :o).
That should be done much earlier. I have this seen several years ago, in Windows, not in kde, so I can not even say if it is possible. It is the kind of thing that when you want to log out tells applications, and these tell you that there are unsaved files and whether you want to save them, or abort log out. The applications might block logout. A comment: your software is adding "[Bulk]" each time to the subject line: Subject: Re: [Bulk] Re: [Bulk] Re: [Bulk] Re: [opensuse-factory] Messages from scripts I had to edit it and remove some. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlXMhTIACgkQja8UbcUWM1zlTQD/dPknGLFELEjyHN9lYkaYs1ux +oEqKlGQj1hWarsgM98A/1F4IpH1/vc34gOdfqTBF7jSrpxVLjOFTNyrR8VP46VZ =wAGK -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2015-08-13 09:45, ianseeks wrote:
On Wednesday 12 Aug 2015 19:44:06 Wolfgang Bauer wrote:
No, that's not possible. At the moment your script is run, everything (except X itself) is shut down already.
yes, i understand that is how it is now, i was just putting forward an idea to change it. I thought it might be a useful idea for the office environment (rather than home) to allow the admin to enforce whatever logout policy they want to implement e.g. an app that stops the logout if they haven't done their timesheet :o).
That should be done much earlier. I have this seen several years ago, in Windows, not in kde, so I can not even say if it is possible. It is the kind of thing that when you want to log out tells applications, and these tell you that there are unsaved files and whether you want to save them, or abort log out. The applications might block logout. I assumed the logout process sent a terminate command of some sort to running apps so they could close down cleanly.
A comment: your software is adding "[Bulk]" each time to the subject line:
Subject: Re: [Bulk] Re: [Bulk] Re: [Bulk] Re: [opensuse-factory] Messages from scripts
I had to edit it and remove some.
On Thursday 13 Aug 2015 13:53:22 Carlos E. R. wrote: thanks. I've no idea whats causing that. i'm sending using kmail and its a yahoo.co.uk account. I've just removed it from the subject of this email so i wonder how it will appear in the list.
-- Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith))
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2015-08-13 18:05, ianseeks wrote:
On Thursday 13 Aug 2015 13:53:22 Carlos E. R. wrote:
That should be done much earlier. I have this seen several years ago, in Windows, not in kde, so I can not even say if it is possible. It is the kind of thing that when you want to log out tells applications, and these tell you that there are unsaved files and whether you want to save them, or abort log out. The applications might block logout. I assumed the logout process sent a terminate command of some sort to running apps so they could close down cleanly.
Yes. And applications can respond that the system must not close now, I think, to abort. I'm going from memory, I could be wrong. Linux desktops must have a similar mechanism. Once found, it is a matter of writing a specific application that runs a script that instant, and waits. That's assuming that the sequence can wait for ever: maybe if there is no response for some time, the application is simply killed.
A comment: your software is adding "[Bulk]" each time to the subject line:
Subject: Re: [Bulk] Re: [Bulk] Re: [Bulk] Re: [opensuse-factory] Messages from scripts
I had to edit it and remove some. thanks. I've no idea whats causing that. i'm sending using kmail and its a yahoo.co.uk account. I've just removed it from the subject of this email so i wonder how it will appear in the list.
This time it is not there. It could be your mail account server. :-? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Am Donnerstag, 13. August 2015, 20:48:31 schrieb Carlos E. R.:
Yes. And applications can respond that the system must not close now, I think, to abort. I'm going from memory, I could be wrong.
Linux desktops must have a similar mechanism. Once found, it is a matter of writing a specific application that runs a script that instant, and waits.
That's actually part of Xorg's session management protocol I think. But as mentioned, when those "shutdown scripts" are run, Plasma and all Applications have already quit and the session is already terminated. It probably would be possible to have an application running that registers with the session management, and then aborts the logout if asked to quit. But that wouldn't prevent other applications from being closed I think. I haven't really studied all details about the session management yet, though...
A comment: your software is adding "[Bulk]" each time to the subject line:
Subject: Re: [Bulk] Re: [Bulk] Re: [Bulk] Re: [opensuse-factory] Messages from scripts
I had to edit it and remove some.
thanks. I've no idea whats causing that. i'm sending using kmail and its a yahoo.co.uk account. I've just removed it from the subject of this email so i wonder how it will appear in the list.
This time it is not there. It could be your mail account server. :-?
Probably something like that. I'm using KMail as well and my mails don't have it... ;-) Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-08-14 15:59, Wolfgang Bauer wrote:
Am Donnerstag, 13. August 2015, 20:48:31 schrieb Carlos E. R.:
Yes. And applications can respond that the system must not close now, I think, to abort. I'm going from memory, I could be wrong.
Linux desktops must have a similar mechanism. Once found, it is a matter of writing a specific application that runs a script that instant, and waits.
That's actually part of Xorg's session management protocol I think.
But as mentioned, when those "shutdown scripts" are run, Plasma and all Applications have already quit and the session is already terminated.
Not at the point I suggest. At the point I suggest, an application, such as LibreOffice, can say that there are unsaved files and block logout. The user gets a dialog, and on "cancel", you get back to the full desktop. That is, all applications are asked whether it is OK to close. Not forced to exit.
It probably would be possible to have an application running that registers with the session management, and then aborts the logout if asked to quit. But that wouldn't prevent other applications from being closed I think.
Yes, exactly. This is my suggestion. :-)
I haven't really studied all details about the session management yet, though...
Me neither. I studied this in Windows, ages ago, but not in Linux. There it is done by something they call "event messages". Applications run continuous loop to fetch a message, then handle it. A message can be a mouse click, menu choice, window resize, close, etc. There are probably thousands of message types. I wouldn't know where to read about this in Linux... - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlXN/LMACgkQja8UbcUWM1xhngEAh59wfEwEIBinkFMm2zQsdsN5 PAZP8j+Ocq+bwfkMvTsBAIpkf0WYkca61tOrwqRP+GzIC9HGkuknEwJJbERDVI96 =5w7K -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Freitag, 14. August 2015, 16:35:31 schrieb Carlos E. R.:
On 2015-08-14 15:59, Wolfgang Bauer wrote:
Am Donnerstag, 13. August 2015, 20:48:31 schrieb Carlos E. R.:
Yes. And applications can respond that the system must not close now, I think, to abort. I'm going from memory, I could be wrong.
Linux desktops must have a similar mechanism. Once found, it is a matter of writing a specific application that runs a script that instant, and waits.
That's actually part of Xorg's session management protocol I think.
But as mentioned, when those "shutdown scripts" are run, Plasma and all Applications have already quit and the session is already terminated.
Not at the point I suggest. At the point I suggest, an application, such as LibreOffice, can say that there are unsaved files and block logout. The user gets a dialog, and on "cancel", you get back to the full desktop.
That is, all applications are asked whether it is OK to close. Not forced to exit.
Yes, that's what I was talking about. That's session management, and that's part of Xorg itself I think, at least some aspects. http://www.x.org/wiki/X11R6/#index8h4 Of course applications have to support that though. Otherwise they probably will just be closed/killed unconditionally. But even if one application blocks the logout, other applications might/will have been closed already. And the shutdown script that ianseeks uses is called later, when the session and all applications are already closed.
I haven't really studied all details about the session management yet, though...
Me neither. I studied this in Windows, ages ago, but not in Linux. There it is done by something they call "event messages". Applications run continuous loop to fetch a message, then handle it. A message can be a mouse click, menu choice, window resize, close, etc. There are probably thousands of message types.
I wouldn't know where to read about this in Linux...
Somewhere at http://www.x.org/wiki/ or http://freedesktop.org probably. Kind Regards, Wolfgang -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-08-14 17:03, Wolfgang Bauer wrote:
Am Freitag, 14. August 2015, 16:35:31 schrieb Carlos E. R.:
But even if one application blocks the logout, other applications might/will have been closed already.
Yes.
And the shutdown script that ianseeks uses is called later, when the session and all applications are already closed.
Yes, but my idea is to write an application that hooks on the logout sequence, and that it runs the backup script then.
I wouldn't know where to read about this in Linux...
Somewhere at http://www.x.org/wiki/ or http://freedesktop.org probably.
Perhaps. But wikis and manuals are not the thing; rather a book or howto. Anyway, I'm not in a hurry to find out, just curious. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlXOB3cACgkQja8UbcUWM1xoewD/U5V6tO1lUoLyXSx+2nyIUI3L yE5dDs96Bwh+pcGLYugBAIa8VybBZgjDn3jX/ZFMJCpzsbQkVjj9smUUCFXhdYBW =k9dN -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 2015-08-14 at 17:21 +0200, Carlos E. R. wrote:
On 2015-08-14 17:03, Wolfgang Bauer wrote:
Am Freitag, 14. August 2015, 16:35:31 schrieb Carlos E. R.:
And the shutdown script that ianseeks uses is called later, when the session and all applications are already closed.
Yes, but my idea is to write an application that hooks on the logout sequence, and that it runs the backup script then.
I wouldn't know where to read about this in Linux...
Somewhere at http://www.x.org/wiki/ or http://freedesktop.org probably.
Perhaps. But wikis and manuals are not the thing; rather a book or howto. Anyway, I'm not in a hurry to find out, just curious.
http://www.freedesktop.org/wiki/Software/systemd/inhibit/ is a wiki page, but it's structured a bit like a howto. Maybe that'll be useful. -- Hans Petter -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2015-08-15 12:50, Hans Petter Jansson wrote:
On Fri, 2015-08-14 at 17:21 +0200, Carlos E. R. wrote:
http://www.freedesktop.org/wiki/Software/systemd/inhibit/ is a wiki page, but it's structured a bit like a howto. Maybe that'll be useful.
Interesting, thanks. :-) However, it does not catch log out from session. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlXPNHAACgkQja8UbcUWM1z6lQD7B20gGcauFtJ1qwEVelUX3//P WylQh0NS4c3WuHZQC1gBAJ/qQU5XpaOWVfJMYWKFDJxeJbRR6Fht/dCUYOlUW/ky =YJn6 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Sat, 2015-08-15 at 14:45 +0200, Carlos E. R. wrote:
On 2015-08-15 12:50, Hans Petter Jansson wrote:
http://www.freedesktop.org/wiki/Software/systemd/inhibit/ is a wiki page, but it's structured a bit like a howto. Maybe that'll be useful.
Interesting, thanks. :-)
However, it does not catch log out from session.
You can do that with the gnome-session inhibitor API mentioned in the last paragraph on that page. In fact, it looks like someone already wrote something similar to what you want: https://github.com/backloop/gendsession It's GNOME-specific, but I think KDE has similar mechanisms in KSMServer. Perhaps you could take a look at its D-Bus API and adapt the script above. -- Hans Petter -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (5)
-
Carlos E. R.
-
Hans Petter Jansson
-
ianseeks
-
Stefan Bruens
-
Wolfgang Bauer