[Resolved] How do I prevent a program from auto-starting?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

[Resolved] How do I prevent a program from auto-starting?

Post by tovian »

Someone recently wrote about "Anydesk" being a good replacement for TeamViewer so I installed it.
That's the kind of program I use ONLY on-demand... I DO NOT want it (Anydesk) running 24x7 in the background.

Anydesk autostarts when Linux or KDE starts, and the icon sits in the tray. I have looked in every location I know to look and cannot find a way to prevent the autostart. The app interface also does not give that option.

Does anyone know other places I can look to defeat this little critter? If not, I will uninstall it and never look back.

Thanks in advance !!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
Mute Ant

Re: How do I prevent a program from auto-starting?

Post by Mute Ant »

"... looked in every location I know to look..." An invitation for a stream of suggestions you have already tried? It sounds like a daemon, I would...

1) Try a ps -e to look for the running-in-the-background command, then look for a systemd service with that name.
...or...
2) Un-zip a copy of the debian package to see what it installs and where.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How do I prevent a program from auto-starting?

Post by Flemur »

tovian wrote: Thu May 24, 2018 4:53 pmThat's the kind of program I use ONLY on-demand... I DO NOT want it (Anydesk) running 24x7 in the background.
I feel your pain.

There should be a "Startup Applications" in your menu; if you're lucky, it'll be listed there.
Also check
~/.config/autostart
for *.desktop files.

Edit: to see the enabled services (Mint 18.x only):

Code: Select all

systemctl list-unit-files | grep enabled
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

Re: How do I prevent a program from auto-starting?

Post by tovian »

Flemur wrote: Thu May 24, 2018 8:26 pm There should be a "Startup Applications" in your menu; if you're lucky, it'll be listed there.
Also check
~/.config/autostart
for *.desktop files.
I had already checked those and found nothing. Also, I'm having the issue on an earlier version (pre-18). I have a feeling it's a service, I just haven't proved it yet. I know TeamViewer wants to run its service 24x7, but in Windows that's very easy to defeat.

THANKS for your input !!
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How do I prevent a program from auto-starting?

Post by Flemur »

tovian wrote: Fri May 25, 2018 4:17 pmI have a feeling it's a service, I just haven't proved it yet.
Didja check for the service?

Code: Select all

systemctl list-unit-files | grep enabled
Look thru the output for something related to "team viewer".
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
WharfRat

Re: How do I prevent a program from auto-starting?

Post by WharfRat »

Look in /etc/xdg/autostart/ for a file called anydesk.desktop
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How do I prevent a program from auto-starting?

Post by phd21 »

Hi tovian,

I just read your post and the good replies to it. Here are my thoughts on this as well.

I have both Anydesk and Teamviewer installed and like you I do not want them automatically starting with my system.

1.) Anydesk: I think WharfRat is on the right track. I disabled the anydesk autostart by moving their anydesk.desktop file to my documents folder from the autostart folder. They should have the option to not start it automatically.

type in the command below to see where the anydesk files are located on your system, then move the anydesk.desktop file from the autostart location to somewhere else or delete it.

Code: Select all

locate anydesk
2.) Teamviewer's default typical Linux installation installs an always running "teamviewerd" service daemon which can be turned off or disabled until you restart it (enable it) from the console terminal. OR, you can use their portable archive file without integrating it into your system which does not install the "teamviewerd" service (this is what I do now). There are slight differences in the two versions, but they both work perfectly.

See post below on Linux services
How to disable bluetooth at startup - Linux Mint Forums
viewtopic.php?f=47&t=268219&hilit=service
For using the TeamViewer archive (portable) version, Install the following QT dependency packages from the "Synaptic Package Manager (SPM)":
qml-module-qtquick-dialogs (5.5.1-1ubuntu1)
qml-module-qtquick-extras (5.5.1-1ubuntu1)
qml-module-qtquick-privatewidgets (5.5.1-1ubuntu1)
qtdeclarative5-dialogs-plugin (5.5.1-1ubuntu1)

Teamviewer 13 download 64-bit Linux archive install
https://download.teamviewer.com/downloa ... d64.tar.xz

Teamviewer 13 download 32-bit Linux archive install
https://download.teamviewer.com/downloa ... 386.tar.xz
If you have the typical Teamviewer installed from their Linux "deb" file and want to control the teamviewer service daemon:
First, find out exactly what your Teamviewer service is called (teamviewerd).

Code: Select all

sudo service --status-all
Then, there are 2 options for controlling the service:

Code: Select all

sudo service teamviewerd stop
*** or this permanently disables a service until you enable it again, even after restarting (rebooting).

Code: Select all

sudo systemctl disable teamviewerd.service


Hope this helps ...
Last edited by phd21 on Tue Jun 19, 2018 6:27 pm, edited 8 times in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
DAMIEN1307

Re: How do I prevent a program from auto-starting?

Post by DAMIEN1307 »

have you tried "bootup-manager" yet?...DAMIEN
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

Re: How do I prevent a program from auto-starting?

Post by tovian »

WharfRat wrote: Fri May 25, 2018 11:38 pmLook in /etc/xdg/autostart/ for a file called anydesk.desktop
Perfect !!! Found it; moved it; no more autostart. 8)

@phd21 - excellent information.

THANK YOU VERY MUCH to all who assisted !!!

:D :D
Last edited by tovian on Sat May 26, 2018 9:39 am, edited 1 time in total.
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: How do I prevent a program from auto-starting?

Post by phd21 »

Hi tovian,

You are welcome from all of us that replied...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Vlad4
Level 1
Level 1
Posts: 1
Joined: Tue Jul 23, 2019 4:29 am

Re: [Resolved] How do I prevent a program from auto-starting?

Post by Vlad4 »

sudo systemctl disable anydesk.service
rustleg
Level 2
Level 2
Posts: 73
Joined: Mon Sep 13, 2010 12:37 pm

Re: [Resolved] How do I prevent a program from auto-starting?

Post by rustleg »

Vlad4 wrote: Tue Jul 23, 2019 4:33 am sudo systemctl disable anydesk.service
Yes this does it, thanks. Removing /etc/xdg/autostart/anydesk.desktop doesn't work, it just gets put back. (not sure if that's exactly the filename cause it's gone permanently!)
Locked

Return to “Beginner Questions”