KDE allows the Autostart of Programs, for AKREGATOR I’m using a script based on this posting.
Works fine. What surprises me: KDE obviously does not allow to AutoShutdown a program before shutdown the system. In case of AKREGATOR, I have this issue:
-
By default, having new messages, there is an icon in the system section of the control bar, that I can click on to open AKREGATOR. Clicking on the X in the window bar closes the window, but AKREGATOR remains active to fetch new messages. This is fine!
-
If I enter $ reboot
in the console or reboot by startmenu, the system restarts as desired and AKREGATOR is started via System Settings > AutoStart
. Also fine!
-
But: Now the icon in the system section of the control bar is not clickable. Based on a comment, I could reproduce, that the reason for this is because AKREGATOR was not closed properly.
-
To restore the default behavior, the following procedure need to be performed:
- Right-click on the icon
- Click > Configure > Show icon in system tray > NO > Apply
- Show icon in system tray > YES OK.
-
Or I always have to remember to deactivate AKREGATOR by File > Exit
.
In order to avoid this, I’d like to have a solution (script?) to shutdown AKREGATOR before reboot.
don’t use reboot
on the command line… do you get the same result if you choose shutdown from the GUI?
you could write a script to kill the the AKREGATOR process, or use one of its command line switches to cleanly close the session, before you issue the reboot
command.
you can make an alias for the script and call it reboot
if you want
Thank you @skyfishgoo,
do you get the same result if you choose shutdown from the GUI?
Yes, exactly the same issue.
Could you please provide an example for this (what do you mean with command line switch in this context?) and explain, where to store this. Is this related to systemd /usr/lib/systemd/shttps://stackoverflow.com/questions/38003969ystem-shutdown/
?
there are probably a dozen ways to make this work, but my simple approach would be to do
akregator --help
and study the command line switches (options) to see if anything presents itself
for instance that link you posted says one of the switches is akregator --hide-mainwindow
so i’m sure there are others that may be of help shutting it down correctly…. perhaps there is a state file that needs to be saved that is not being saved by your distro, or not being read properly at startup.
barring that, i would study man kill
to create a command line call that would shut down the application in the safest way possible, that will perhaps give better results.
wrap all those commands into a text file that has
#!/bin/bash
on the first line and be sure to change the properties in dolphin to make it executable.
then you can place it anywhere in your path, i keep all my scripts in a directory that i made called ~/bin
or some ppl use ~/.local/bin
since many shells will add those directories to your $PATH
automagically, if they exist.
but you could really put them anywhere you like as long as you ensure your $PATH
statement includes the directory.
making an alias is even easier, there are lots of guides on line for how to do it.