DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 29th October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 37
Default 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
Reply With Quote
  #2   (View Single Post)  
Old 29th October 2023
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

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.
Reply With Quote
  #3   (View Single Post)  
Old 30th October 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 37
Default

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.
Reply With Quote
  #4   (View Single Post)  
Old 30th October 2023
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bitchy Nerd Elitist
 
Join Date: Dec 2015
Location: London
Posts: 467
Default

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.
Reply With Quote
  #5   (View Single Post)  
Old 2nd November 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 37
Default

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
I can't execute sndioctl server.device=1 after I run these commands because 1[-1] invalid value:
Code:
# rcctl set sndiod flags -f rsnd/0
# rcctl restart sndiod
How to go back to previous?

Last edited by unicorn; 2nd November 2023 at 05:32 AM.
Reply With Quote
  #6   (View Single Post)  
Old 2nd November 2023
unicorn unicorn is offline
Port Guard
 
Join Date: Apr 2020
Posts: 37
Default

sound back again after I run these command:
Code:
# rcctl set sndiod flags -f rsnd/0 -F rsnd/1
# rcctl restart sndiod
Reply With Quote
  #7   (View Single Post)  
Old 2nd November 2023
rufwoof rufwoof is offline
Port Guard
 
Join Date: Nov 2023
Posts: 25
Default

man mixerctl

/etc/mixerctl.conf:

outputs.master=255

sets the system wide level, similar to sndioctl output.level=1
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 01:15 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick