How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi on?

All Gurus once were Newbies
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. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
pepperminty
Level 5
Level 5
Posts: 973
Joined: Thu Jun 23, 2011 10:51 pm

How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi on?

Post by pepperminty »

Every time I power on my computer, I'd like to start it with volume on mute and with wireless turned off. How can I do that?

Or, when I power off my computer, how can I get Mint to auto-mute and turn off wifi before it completely shuts down?

I'm on Cinnamon 20.
Last edited by pepperminty on Tue Oct 27, 2020 9:49 pm, edited 2 times in total.
Pepper-Mint-Patty
Level 4
Level 4
Posts: 458
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How can I always start computer with volume on mute and wireless turned off?

Post by Pepper-Mint-Patty »

I suppose if you go menu/pref/network change the slide its off until turned on again.
Same if you go to sound/ settings.
And you could try the function keys.
Language is a virus.
19.2 Cinn + latest kernel + Nemo 4.2.3
User avatar
pepperminty
Level 5
Level 5
Posts: 973
Joined: Thu Jun 23, 2011 10:51 pm

Re: How can I always start computer with volume on mute and wireless turned off?

Post by pepperminty »

Pepper-Mint-Patty wrote:
Mon Oct 26, 2020 3:22 pm
I suppose if you go menu/pref/network change the slide its off until turned on again.
Same if you go to sound/ settings.
And you could try the function keys.
Sorry for not being clear.
I wanted my computer to automatically start on mute with wifi off. This means that I don't want to have to manually set these things by myself.
Pepper-Mint-Patty
Level 4
Level 4
Posts: 458
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi

Post by Pepper-Mint-Patty »

you have to do it once, it will be off after reboot.
Language is a virus.
19.2 Cinn + latest kernel + Nemo 4.2.3
User avatar
pepperminty
Level 5
Level 5
Posts: 973
Joined: Thu Jun 23, 2011 10:51 pm

Re: How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi

Post by pepperminty »

And what if after that ”once”, I have the volume up and Wi-Fi on?
User avatar
MrEen
Level 22
Level 22
Posts: 15117
Joined: Mon Jun 12, 2017 8:39 pm

Re: How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi

Post by MrEen »

Autostart Applications might be able to do this. I can't help with the WiFi setting, but the audio will probably work with this command:

Code: Select all

bash -c "pacmd set-sink-mute 0 1"
We might need to tinker with that, or we could add a similar line to /etc/pulse/default.pa to do the same thing.
Pepper-Mint-Patty
Level 4
Level 4
Posts: 458
Joined: Fri Dec 20, 2019 4:54 pm
Location: Royston Vasey

Re: How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi

Post by Pepper-Mint-Patty »

pepperminty wrote:
Mon Oct 26, 2020 4:19 pm
And what if after that ”once”, I have the volume up and Wi-Fi on?
Then your having different hardware then i have. :wink:
Language is a virus.
19.2 Cinn + latest kernel + Nemo 4.2.3
Welcome
Level 5
Level 5
Posts: 580
Joined: Wed Aug 19, 2020 11:38 am

Re: How can I always start Mint with volume on mute and wireless off, even I powered off computer with volume up & wifi

Post by Welcome »

MrEen wrote:
Mon Oct 26, 2020 4:19 pm
Autostart Applications might be able to do this. I can't help with the WiFi setting, but the audio will probably work with this command:

Code: Select all

bash -c "pacmd set-sink-mute 0 1"
We might need to tinker with that, or we could add a similar line to /etc/pulse/default.pa to do the same thing.
For the WiFi setting, probably something like:

Code: Select all

bash -c "nmcli radio wifi off"
I haven't tested this, so it might need some tinkering, too.

Might need a loop to wait untili nmcli is accepting commands. For example (not what OP specifically wants):

Code: Select all

#!/bin/sh
#
# Automatically try to connect to 'MyWiFi' when WiFi is enabled
#

# the output of nmcli should be in English
LC_ALL=C

# loop for a while until NetworkManager is accepting commands
while [ "$(nmcli -t -f WIFI,STATE g)" = 'enabled:disconnected' ]
do
    nmcli con up id "MyWiFi"
    sleep 5
done

exit 0

# eof

Post Reply

Return to “Newbie Questions”