Disabling anydesk autostart on sysvinit

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
fehlix
Developer
Posts: 12602
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabling anydesk autostart on sysvinit

#21 Post 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:

User avatar
yyy
Posts: 25
Joined: Tue Mar 03, 2020 7:02 am

Re: Disabling anydesk autostart on sysvinit

#22 Post 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!

User avatar
fehlix
Developer
Posts: 12602
Joined: Wed Apr 11, 2018 5:09 pm

Re: Disabling anydesk autostart on sysvinit

#23 Post 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.

User avatar
yyy
Posts: 25
Joined: Tue Mar 03, 2020 7:02 am

Re: Disabling anydesk autostart on sysvinit

#24 Post 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!

User avatar
yyy
Posts: 25
Joined: Tue Mar 03, 2020 7:02 am

Re: Disabling anydesk autostart on sysvinit

#25 Post 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

Post Reply

Return to “Tips & Tricks by users”