Page 3 of 3

Re: Disabling anydesk autostart on sysvinit

Posted: Sun Oct 31, 2021 8:23 am
by fehlix
Update:

Disable / Enable anydesk startup

During installation with MX Package Installer some error/warning message show up,when installing anydesk.
The installation will proceed anyway
One reason for warnings is missing fix with the init-script provided.
Manually fix anydesk init script this way, to avoid further complains:
# fix anydesk init-script after installation

Code: Select all

sudo sed -i  '/^# Required-St/s:$dbus:dbus:' $(readlink -e /etc/init.d/anydesk)
In order to avoid automatic starting of anydesk service:

Disable anydesk startup

* Disable startup of anydesk 'global' service
# SysV-init

Code: Select all

sudo update-rc.d -f anydesk remove
# systemd

Code: Select all

sudo systemctl disable anydesk
* Disable startup of anydesk 'local' service - disable autostart

Code: Select all

printf '[Desktop Entry]\nHidden=true\n' | tee ~/.config/autostart/anydesk_global_tray.desktop

In order to re-enable automatic starting of anydesk service:

Enable anydesk startup

* Enable startup of anydesk 'global' service
# SysV-init

Code: Select all

sudo update-rc.d anydesk defaults
# systemd

Code: Select all

sudo systemctl enable anydesk
* Check anydesk startup service is enabled
# SysV-init

Code: Select all

sudo sysv-rc-conf --list anydesk
anydesk 0:off 1:off 2:on 3:on 4:on 5:on 6:off
# systemd

Code: Select all

sudo systemctl is-enabled anydesk
* Enable startup of anydesk 'local' service - enable autostart

Code: Select all

rm ~/.config/autostart/anydesk_global_tray.desktop
HTH
:puppy:

Re: Disabling anydesk autostart on sysvinit

Posted: Sun Oct 31, 2021 10:05 am
by yyy
I gave these 2 commands, as you wrote, and anydesk does not autostart anymore.

Code: Select all

sudo sed -i  '/^# Required-St/s:$dbus:dbus:' $(readlink -e /etc/init.d/anydesk)
sudo update-rc.d -f anydesk remove
Before that, I was entering only the second one, and anydesk keeped on auto starting.
Thank you!

Re: Disabling anydesk autostart on sysvinit

Posted: Sun Oct 31, 2021 11:01 am
by fehlix
yyy wrote: Sun Oct 31, 2021 10:05 am I gave these 2 commands, as you wrote, and anydesk does not autostart anymore.

Code: Select all

sudo sed -i  '/^# Required-St/s:$dbus:dbus:' $(readlink -e /etc/init.d/anydesk)
sudo update-rc.d -f anydesk remove
Before that, I was entering only the second one, and anydesk keeped on auto starting.
Thank you!
In my tests with a freshly installed MX-21 KDE, it was required in addtition to those to:

* Disable startup of anydesk 'local' service - disable autostart

Code: Select all

printf '[Desktop Entry]\nHidden=true\n' | tee ~/.config/autostart/anydesk_global_tray.desktop
in order to stop anydesk from startup. Testet when booted with both SysV-init and systemd.

Re: Disabling anydesk autostart on sysvinit

Posted: Wed Nov 03, 2021 11:28 am
by yyy
I am using MX 21 KDE as well. I may have given the command you refer to earlier, in order to fix the problem. I am not sure. Anyway, now it works as I want. Thank you for your help!

Re: Disabling anydesk autostart on sysvinit

Posted: Tue Nov 30, 2021 1:19 pm
by yyy
I tested again, in a fresh MX 21 Xfce install, and fehlix is right: all these 3 commands are required:

Code: Select all

sudo sed -i  '/^# Required-St/s:$dbus:dbus:' $(readlink -e /etc/init.d/anydesk)
sudo update-rc.d -f anydesk remove
printf '[Desktop Entry]\nHidden=true\n' | tee ~/.config/autostart/anydesk_global_tray.desktop