Run command on startup

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
arimakidd
Level 2
Level 2
Posts: 66
Joined: Thu Nov 02, 2017 11:37 pm

Run command on startup

Post by arimakidd » Sun Sep 15, 2019 5:59 pm

I want to run the command on startup:
sudo rmmod uvcvideo
How should I do this? Put it in the boot sequence or place it profile.d? What should I do, how can I get this command to run on boot up?

User avatar
Pjotr
Level 21
Level 21
Posts: 13756
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Run command on startup

Post by Pjotr » Sun Sep 15, 2019 6:03 pm

arimakidd wrote:
Sun Sep 15, 2019 5:59 pm
I want to run the command on startup:
sudo rmmod uvcvideo
How should I do this? Put it in the boot sequence or place it profile.d? What should I do, how can I get this command to run on boot up?
Why not simply blacklist that module? Much easier and failsafe. :mrgreen:

Something like:

Code: Select all

echo "blacklist uvcvideo" | sudo tee /etc/modprobe.d/blacklist-uvcvideo.conf
.... followed by a reboot.

If you ever wish to remove it from the blacklist:

Code: Select all

sudo rm -v /etc/modprobe.d/blacklist-uvcvideo.conf
Reboot.
Last edited by Pjotr on Sun Sep 15, 2019 6:09 pm, edited 1 time in total.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

arimakidd
Level 2
Level 2
Posts: 66
Joined: Thu Nov 02, 2017 11:37 pm

Re: Run command on startup

Post by arimakidd » Sun Sep 15, 2019 6:09 pm

Cause that's permanent. I don't want it permanently disabled. I just want it off until I have an important Skype or something similar. Issuing the command all the time after boot up is getting annoying. So whenever I really need it, I just
sudo modprobe uvcvideo

User avatar
Pjotr
Level 21
Level 21
Posts: 13756
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Run command on startup

Post by Pjotr » Sun Sep 15, 2019 6:13 pm

arimakidd wrote:
Sun Sep 15, 2019 6:09 pm
Cause that's permanent. I don't want it permanently disabled. I just want it off until I have an important Skype or something similar. Issuing the command all the time after boot up is getting annoying. So whenever I really need it, I just
sudo modprobe uvcvideo
Well, that should work even if it's blacklisted. The blacklist should only prevent it from being loaded automatically. The terminal command modprobe should have priority.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

arimakidd
Level 2
Level 2
Posts: 66
Joined: Thu Nov 02, 2017 11:37 pm

Re: Run command on startup

Post by arimakidd » Sun Sep 15, 2019 6:13 pm

Wow. Okay. Sound good. I'll give it a go then.

arimakidd
Level 2
Level 2
Posts: 66
Joined: Thu Nov 02, 2017 11:37 pm

Re: Run command on startup

Post by arimakidd » Sun Sep 15, 2019 6:24 pm

Works like a charm. Thanks. Solved.

Post Reply

Return to “Installation & Boot”