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
kevtardis
Posts: 14
Joined: Thu Jun 07, 2018 3:26 pm

Re: Disabling anydesk autostart on sysvinit

#11 Post by kevtardis »

Perfect - that did it.

Thanks andyprough!

User avatar
quantumalchemy
Posts: 3
Joined: Thu Sep 23, 2021 10:25 am

Re: Disabling anydesk autostart on sysvinit

#12 Post by quantumalchemy »

On ..
update-rc.d anydesk disable
I Get ->
insserv: warning: current start runlevel(s) (empty) of script `anydesk' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `anydesk' overrides LSB defaults (0 1 6).
Failed to disable unit, unit anydesk.service does not exist

this thing (anydesk) is Crazy!
lots of solutions none work .. running on latest ver of mx (4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
using - anydesk - install / repo info here:
http://deb.anydesk.com/howto.html?_ga=2 ... 1632166372

And No way of stopping this thing..
anydesk --stop-service - No go
service anydesk stop - No go

service anydesk status shows (-) not running but:
anydesk --get-status - shows "online"
** Only way to stop this thing is to -->
pkill -f "anydesk"
kill -9 #

Then it Hangs when you try and restart with --> anydesk --service
** I also gave the appimage a go for host and client (thinking what the hell .. sounded like a good idea)
works on my MX laptop
But not on MX (same ver) and same hardware on remote host --> complains about missing libraries .. YeeeeSH!
Anyone have a clue on a real working solution?
Thanks!

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

Re: Disabling anydesk autostart on sysvinit

#13 Post by fehlix »

quantumalchemy wrote: Thu Sep 23, 2021 10:44 am Anyone have a clue on a real working solution?
The solution was already provided within this thread.
Now here an update:

How to install and disable andesk startup service in MX Linux.

Installing the downloaded deb from anydesk directly did not work in the past, so we added some tweaks to make installation and uninstall work in MX Linux.

Installation:
Open MX Package Installer (MXPI), type into search field anydesk, mark anydesk for installation and click install.

Disable startup servcice:
With booted sys-V-init do just this:

Code: Select all

sudo update-rc.d anydesk remove
The removal of an autostart entry within session and startup, as shown in my last post, seems not be needed anymore, b/c anydesk when start as service, will now initiate the user/session startup through dbus.

For any detailed question, one would accept posting "QSI" (Quick System Info)
HTH
+++EDIT+++: adjusted some typos...

User avatar
quantumalchemy
Posts: 3
Joined: Thu Sep 23, 2021 10:25 am

Re: Disabling anydesk autostart on sysvinit

#14 Post by quantumalchemy »

Thanks for the info on mx-packageinstaller tweeks so it will run
seems to be a catch 22 .. cant ssh and run mx-packageinstaller (errors)
-- anyway to install a package using mx-packageinstaller (repo) via ssh ?

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

Re: Disabling anydesk autostart on sysvinit

#15 Post by fehlix »

quantumalchemy wrote: Thu Sep 23, 2021 12:15 pm Thanks for the info on mx-packageinstaller tweeks so it will run
seems to be a catch 22 .. cant ssh and run mx-packageinstaller (errors)
-- anyway to install a package using mx-packageinstaller (repo) via ssh ?
if ssh is just terminal, not sure whether a terminal only install with mx-packageinstaller is prepared.
But assume a proper ssh-tunneled x-session would do, at least I don't see a reason why not.

User avatar
quantumalchemy
Posts: 3
Joined: Thu Sep 23, 2021 10:25 am

Re: Disabling anydesk autostart on sysvinit

#16 Post by quantumalchemy »

using ssh -X (ssh-tunneled x-session)

command shown in mx >>
su-to-root -X -c mx-packageinstaller
==== AUTHENTICATING FOR org.mxlinux.mx-pkexec ===
Authentication is required to run this application
Authenticating as: root
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.

jec@jec:~
TRY 2
[sudo] password for user:
X11 connection rejected because of wrong authentication.
qt.qpa.screen: QXcbConnection: Could not connect to display localhost:10.0
Could not connect to any X display.

TRY 3 >> just ->
$ mx-packageinstaller
==== AUTHENTICATING FOR org.mxlinux.mx-pkexec ===
Authentication is required to run this application
Authenticating as: root
Password: (pw for root)
$
** (process:12206): ERROR **: 12:33:04.220: Got unexpected EOF while reading from controlling terminal.
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
/usr/bin/mx-pkexec: line 73: 12206 Trace/breakpoint trap pkexec /usr/bin/mx-pkexec "${@}"
-bash: oot: command not found

not looking good .. seems you need to be using the gui only to access?

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

Re: Disabling anydesk autostart on sysvinit

#17 Post by fehlix »

quantumalchemy wrote: Thu Sep 23, 2021 12:39 pm using ssh -X (ssh-tunneled x-session)

command shown in mx >>
su-to-root -X -c mx-packageinstaller
==== AUTHENTICATING FOR org.mxlinux.mx-pkexec ===
Authentication is required to run this application
Authenticating as: root
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized
This incident has been reported.

jec@jec:~
TRY 2
[sudo] password for user:
X11 connection rejected because of wrong authentication.
qt.qpa.screen: QXcbConnection: Could not connect to display localhost:10.0
Could not connect to any X display.

TRY 3 >> just ->
$ mx-packageinstaller
==== AUTHENTICATING FOR org.mxlinux.mx-pkexec ===
Authentication is required to run this application
Authenticating as: root
Password: (pw for root)
$
** (process:12206): ERROR **: 12:33:04.220: Got unexpected EOF while reading from controlling terminal.
polkit-agent-helper-1: pam_authenticate failed: Authentication failure
/usr/bin/mx-pkexec: line 73: 12206 Trace/breakpoint trap pkexec /usr/bin/mx-pkexec "${@}"
-bash: oot: command not found

not looking good .. seems you need to be using the gui only to access?
Gui only was tested. ssh-tunneled X-session probably something to look into.

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

Re: Disabling anydesk autostart on sysvinit

#18 Post by yyy »

fehlix wrote: Thu Sep 23, 2021 11:43 am
Disable startup servcice:
With booted sys-V-init do just this:

Code: Select all

sudo update-rc.d anydesk remove
The removal of an autostart entry within session and startup, as shown in my last post, seems not be needed anymore, b/c anydesk when start as service, will now initiate the user/session startup through dbus.
Does this work in MX 21 KDE? Because I get the error:
"insserv: warning: could not find all dependencies for $dbus"

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

Re: Disabling anydesk autostart on sysvinit

#19 Post by fehlix »

yyy wrote: Sat Oct 30, 2021 9:12 am Does this work in MX 21 KDE? Because I get the error:
"insserv: warning: could not find all dependencies for $dbus"
Seems those warnings do not have any other implications.
The reason seems to be within the provided init-script of anydesk package as they use a not defined facility name "$dbus" instead of "dbus".
You can manually fix it this way:

Code: Select all

sudo sed -i '/^# Required-St/s:$dbus:dbus:' /etc/init.d/anydesk 
Not sure it's worth to fix the provided anydesk deb-package,
as warnings are kind of "info for the package developer to fix something" - means for normal user: to be ignored.
:puppy:

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

Re: Disabling anydesk autostart on sysvinit

#20 Post by yyy »

I see, thank you for the explanation. But anydesk keeps on autostarting on startup!

Post Reply

Return to “Tips & Tricks by users”