|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
volume
I have to run these commands every time I start OpenBSD. I want them to be executed automatically every time I start OpenBSD, so I added them both to /etc/rc.conf.local and .cshrc but neither works. How to make them work?
Code:
sndioctl output.level=1 sndioctl server.device=1 |
|
||||
Try adding the lines to the end of ~/.profile or ~/.login instead. Use the former if you still have ksh set as the login shell and the latter if you've switched to csh for both interactive and login shells.
I don't think /etc/rc.conf.local will work because the commands would be run as root rather than your user and ~/.cshrc will only be read if an interactive shell is opened. You could also use ~/.xsession to run the commands when the graphical desktop is started by xenodm(1): https://man.openbsd.org/xenodm#SESSION_PROGRAM Last edited by Head_on_a_Stick; 29th October 2023 at 12:25 PM. |
|
|||
I added them to my home directory .profile, but only the second command works. The first command works after I added it to the root directory .profile, Thanks.
Last edited by unicorn; 30th October 2023 at 12:46 AM. |
|
||||
If both commands work for your normal user then they shouldn't need to be in root's directory.
See https://www.openbsd.org/faq/faq13.html#default for other ways to set the default output device. |
|
|||
there's no sound after I run those commands and server.device=1 disappear from sndioctl output:
Code:
# rcctl set sndiod flags -f rsnd/1 # rcctl restart sndiod Code:
# rcctl set sndiod flags -f rsnd/0 # rcctl restart sndiod Last edited by unicorn; 2nd November 2023 at 05:32 AM. |
|
|||
sound back again after I run these command:
Code:
# rcctl set sndiod flags -f rsnd/0 -F rsnd/1 # rcctl restart sndiod |
|
|||
man mixerctl
/etc/mixerctl.conf: outputs.master=255 sets the system wide level, similar to sndioctl output.level=1 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Noob questions, volume I] | hd77 | OpenBSD General | 13 | 16th January 2022 06:10 PM |
how to make volume louder? | brudan | OpenBSD General | 9 | 7th February 2019 07:06 PM |
/usr/local volume full | hrsetrdr | OpenBSD General | 14 | 2nd January 2019 11:26 PM |
MS DOS volume labels? | bigearsbilly | FreeBSD General | 2 | 1st April 2009 10:50 PM |
mplayer volume cannot increase. | bsdnewbie999 | OpenBSD General | 3 | 19th June 2008 03:16 PM |