Hi All,
I’d like to add a <preuninstall> to the tde.pm that checks to see if TDE is the currently running desktop. On the theory it’d suck if someone un-installed a desktop while in that desktop...
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
Thank you, Michael
Anno domini 2020 Thu, 12 Nov 13:19:12 -0600 Michael via tde-users scripsit:
Hi All,
I’d like to add a <preuninstall> to the tde.pm that checks to see if TDE is the currently running desktop. On the theory it’d suck if someone un-installed a desktop while in that desktop...
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
if [ ! -z "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
Thank you, Michael ____________________________________________________ tde-users mailing list -- users@trinitydesktop.org To unsubscribe send an email to users-leave@trinitydesktop.org Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@trinitydeskto...
On Thursday 12 November 2020 01:44:00 pm Dr. Nikolaus Klepp wrote:
Anno domini 2020 Thu, 12 Nov 13:19:12 -0600 Michael via tde-users scripsit:
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
if [ ! -z "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
Thank you Nik!,
Is there any difference to using?:
if [ "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
It seems to work the same, but I ask ‘cause there a tons of hidden ‘gotchas’ that aren’t ever really documented.
Best, Michael
Ref: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html [ -z STRING ] True of the length if "STRING" is zero. [ -n STRING ] or [ STRING ] True if the length of "STRING" is non-zero.
Anno domini 2020 Thu, 12 Nov 14:46:43 -0600 Michael via tde-users scripsit:
On Thursday 12 November 2020 01:44:00 pm Dr. Nikolaus Klepp wrote:
Anno domini 2020 Thu, 12 Nov 13:19:12 -0600 Michael via tde-users scripsit:
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
if [ ! -z "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
Thank you Nik!,
Is there any difference to using?:
if [ "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
It seems to work the same, but I ask ‘cause there a tons of hidden ‘gotchas’ that aren’t ever really documented.
this will also work:
if pidof twin > /dev/null; then echo "TDE RUNNING"; fi if pidof twin; then echo "TDE RUNNING"; fi ...
But everyody has his/her coding habits :)
Best, Michael
Ref: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html [ -z STRING ] True of the length if "STRING" is zero. [ -n STRING ] or [ STRING ] True if the length of "STRING" is non-zero. ____________________________________________________ tde-users mailing list -- users@trinitydesktop.org To unsubscribe send an email to users-leave@trinitydesktop.org Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@trinitydeskto...
On Thu, 12 Nov 2020 22:22:24 +0100 "Dr. Nikolaus Klepp" office@klepp.biz wrote:
Anno domini 2020 Thu, 12 Nov 14:46:43 -0600 Michael via tde-users scripsit:
On Thursday 12 November 2020 01:44:00 pm Dr. Nikolaus Klepp wrote:
Anno domini 2020 Thu, 12 Nov 13:19:12 -0600 Michael via tde-users scripsit:
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
if [ ! -z "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
Thank you Nik!,
Is there any difference to using?:
if [ "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
It seems to work the same, but I ask ‘cause there a tons of hidden ‘gotchas’ that aren’t ever really documented.
this will also work:
if pidof twin > /dev/null; then echo "TDE RUNNING"; fi if pidof twin; then echo "TDE RUNNING"; fi ...
But everyody has his/her coding habits :)
The catch is, it's theoretically possible to run TDE with a different window manager. So twin may not be the best process to test for. Maybe dcopserver? Or tdeinit, or ksmserver?
E. Liddell
On Thursday 12 November 2020 06:36:49 pm E. Liddell wrote:
On Thu, 12 Nov 2020 22:22:24 +0100
"Dr. Nikolaus Klepp" office@klepp.biz wrote:
Anno domini 2020 Thu, 12 Nov 14:46:43 -0600
Michael via tde-users scripsit:
On Thursday 12 November 2020 01:44:00 pm Dr. Nikolaus Klepp wrote:
Anno domini 2020 Thu, 12 Nov 13:19:12 -0600
Michael via tde-users scripsit:
Would one of the TDE dev’s be so kind as to point me in the right direction on how to do that (the uninstall process runs as sudo)?
if [ ! -z "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
Thank you Nik!,
Is there any difference to using?:
if [ "$(pidof twin)" ]; then echo "TDE RUNNING"; fi
It seems to work the same, but I ask ‘cause there a tons of hidden ‘gotchas’ that aren’t ever really documented.
this will also work:
if pidof twin > /dev/null; then echo "TDE RUNNING"; fi if pidof twin; then echo "TDE RUNNING"; fi ...
But everyody has his/her coding habits :)
The catch is, it's theoretically possible to run TDE with a different window manager. So twin may not be the best process to test for. Maybe dcopserver? Or tdeinit, or ksmserver?
Thanks E.!,
tdeinit - TDE process launcher tdeinit is a process launcher similar to init used for booting UNIX. tdeinit is used to start all other TDE programs.
Unless some other dev says different I'll use tdeinit.
Best, Michael