SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-02-08 15:11:09

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

smixer-wrapper : simplest CLI for smixer

On my PCs I often had the following problem with the sound set to 0 using ALSA we still hear the sound! Therefore I looked for another mixer. I found smixer.  In another discussion (HP Pavilion Volume Buttons) one speaks of aumix and I give my opinion.

Now, I use smixer, with my own script which is a kind of simplified interface for smixer.

I will detail how to install smixer, it is not hard:

wget http://centerclick.org/programs/smixer/smixer1.0.4.tgz -O smixer.tgz
tar -xvf smixer.tgz
cd smixer
make
sudo make install

Verify that smixer is in the PATH:

which smixer

Now, you can install smixer-wrapper, for example, in ~/bin:

cd ~/bin
wget http://88.174.112.74/share/debian/smixer-wrapper.tar -O smixer-wrapper.tar
tar -xvf smixer-wrapper.tar
rm -v *.tar

verify that the script works, type:

smixer-wrapper

should display usage :

Usage: smixer-wrapper {raise|lower|mute|toggle|status|help}
  raise    Increase the Master volume 5%
  lower    Decrease the Master volume 5%
  mute     Mute the Master volume
  toggle   Toggle the Master volume
  status   Print out the current mixer settings, then exit
  help     Show this message and exit

test using the various options… if it works you can change your rc.xml…

Billets en français (including few examples of rc.xml):
smixer : small mixer ? oss mixer ?
smixer-wrapper : simple CLI pour smixer

Last edited by ~HP (2010-02-08 15:18:19)

Offline

Help fund CrunchBang, donate to the project!

#2 2010-02-08 19:24:29

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

Thank you for this. When attempting to install smixer I get this error:

root@Ermac:/home/nka/smixer# make
gcc -O2 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wwrite-strings -Wall  -c -o src/smixer.o src/smixer.c
make: gcc: Command not found
make: *** [src/smixer.o] Error 127

Would you mind posting your smixer entries in rc.xml? There are two examples of rc.xml entries in the 1st link you provided. Which one did you use? Also, did you at anything to autostart.sh to ensure that the settings stick after you reboot?

Last edited by nabilalk (2010-02-08 19:31:16)


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#3 2010-02-08 20:38:37

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

nabilalk wrote:

I get this error:

make: gcc: Command not found
make: *** [src/smixer.o] Error 127

You must install gcc in order to compile:

sudo apt-get install gcc
nabilalk wrote:

Would you mind posting your smixer entries in rc.xml?

   <keybind key="XF86AudioLowerVolume">
     <action name="Execute">
       <execute>~/bin/smixer-wrapper lower</execute>
     </action>
   </keybind>
   <keybind key="XF86AudioRaiseVolume">
     <action name="Execute">
       <execute>~/bin/smixer-wrapper raise</execute>
     </action>
   </keybind>
   <keybind key="XF86AudioMute">
     <action name="Execute">
       <execute>~/bin/smixer-wrapper toggle</execute>
     </action>
   </keybind>

If yoou install smixer-wrapper in ~/bin, as explained above ; but I think it is not necessary to specify the full path.

nabilalk wrote:

Also, did you at anything to autostart.sh to ensure that the settings stick after you reboot?

install smixer and smixer-wrapper (my script), it's done… what else? big_smile

Offline

#4 2010-02-08 22:39:04

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

I installed gcc as suggested and received this error upon executing "sudo make install"

root@Ermac:/home/nka/smixer# sudo make install
install -o root -g root -m 0755 smixer /usr/local/bin/smixer
install -o root -g root -m 0644 man/smixer.1 /usr/local/man/man1/smixer.1
install: cannot create regular file `/usr/local/man/man1/smixer.1': No such file or directory
make: *** [install] Error 1

What do I need to do to get this to work?


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#5 2010-02-08 23:11:28

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

try:

which smixer

as suggested above…

the response should be:

/usr/local/bin/smixer

warning, from make, applies only to install the manpage installation that failed, not the whole installation.

Offline

#6 2010-02-08 23:16:20

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

~HP wrote:

try:

which smixer

as suggested above…

the response should be:

/usr/local/bin/smixer

warning, from make, applies only to install the manpage installation that failed, not the whole installation.

which smixer gives the desired response. However, after then installing smixer as suggested "now, you can install smixer-wrapper, for example, in ~/bin:" and running "smixer-wrapper", I get this error:

root@Ermac:/home/nka# which smixer
/usr/local/bin/smixer
root@Ermac:/home/nka# cd ~/bin
bash: cd: /root/bin: No such file or directory
root@Ermac:/home/nka# wget http://88.174.112.74/share/debian/smixer-wrapper.tar -O smixer-wrapper.tar
--2010-02-08 15:13:10--  http://88.174.112.74/share/debian/smixer-wrapper.tar
Connecting to 88.174.112.74:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://blogosx.homeunix.org/share/debian/smixer-wrapper.tar [following]
--2010-02-08 15:13:10--  http://blogosx.homeunix.org/share/debian/smixer-wrapper.tar
Resolving blogosx.homeunix.org... 88.174.112.74
Reusing existing connection to 88.174.112.74:80.
HTTP request sent, awaiting response... 200 OK
Length: 10240 (10K) [application/octet-stream]
Saving to: `smixer-wrapper.tar'

100%[============================>] 10,240      35.9K/s   in 0.3s    

2010-02-08 15:13:11 (35.9 KB/s) - `smixer-wrapper.tar' saved [10240/10240]

root@Ermac:/home/nka# tar -xvf smixer-wrapper.tar
smixer-wrapper
root@Ermac:/home/nka# rm -v *.tar
removed `smixer-wrapper.tar'
root@Ermac:/home/nka# smixer-wrapper
smixer-wrapper: command not found
root@Ermac:/home/nka# wget http://centerclick.org/programs/smixer/smixer1.0.4.tgz -O smixer.tgz
--2010-02-08 15:13:44--  http://centerclick.org/programs/smixer/smixer1.0.4.tgz
Resolving centerclick.org... 66.114.92.10
Connecting to centerclick.org|66.114.92.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11245 (11K) [application/x-tar]
Saving to: `smixer.tgz'

100%[============================>] 11,245      47.5K/s   in 0.2s    

2010-02-08 15:13:45 (47.5 KB/s) - `smixer.tgz' saved [11245/11245]

root@Ermac:/home/nka# tar -xvf smixer.tgz
smixer/src/smixer.c
smixer/Makefile
smixer/smixer.conf
smixer/README
smixer/COPYING
smixer/man/smixer.1
root@Ermac:/home/nka# cd smixer
root@Ermac:/home/nka/smixer# make
make: Nothing to be done for `all'.
root@Ermac:/home/nka/smixer# sudo make install
install -o root -g root -m 0755 smixer /usr/local/bin/smixer
install -o root -g root -m 0644 man/smixer.1 /usr/local/man/man1/smixer.1
install: cannot create regular file `/usr/local/man/man1/smixer.1': No such file or directory
make: *** [install] Error 1
root@Ermac:/home/nka/smixer#

#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#7 2010-02-08 23:24:16

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

nabilalk wrote:
root@Ermac:/home/nka# which smixer

What are you doing as root user?

Are you looking for trouble? hmm

Type:

exit

If you are still logged as root… and after type:

whoami

to verify you are again nabilalk or anything else, but not root user!

After, redo the whole manipulations, to install smixer-wrapper:

cd ~/bin
wget [url]http://88.174.112.74/share/debian/smixer-wrapper.tar[/url] -O smixer-wrapper.tar
tar -xvf smixer-wrapper.tar
rm -v *.tar

Finally, type:

smixer-wrapper

to check that everything is ok! I'll be fine wink… the worst is over!

Offline

#8 2010-02-09 02:47:07

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

Lol, yes I am looking for trouble ;-)

Same error with normal user priviledges:

nka@Ermac:~/bin/smixer$ sudo make install
[sudo] password for nka: 
install -o root -g root -m 0755 smixer /usr/local/bin/smixer
install -o root -g root -m 0644 man/smixer.1 /usr/local/man/man1/smixer.1
install: cannot create regular file `/usr/local/man/man1/smixer.1': No such file or directory
make: *** [install] Error 1
nka@Ermac:~/bin/smixer$

#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#9 2010-02-09 06:14:56

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

It's ok… about installing smixer… next step, now.

Offline

#10 2010-02-09 06:51:27

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

~HP wrote:

It's ok… about installing smixer… next step, now.

Ok, I got the desired output after "smixer-wrapper". Now do I just add the required entries to rc.xml and reboot?


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#11 2010-02-09 08:26:33

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

nabilalk wrote:

Now do I just […] reboot?

No need to reboot… execute:

openbox --reconfigure

It should work… smile

Offline

#12 2010-02-09 09:34:27

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

~HP wrote:
nabilalk wrote:

Now do I just […] reboot?

No need to reboot… execute:

openbox --reconfigure

It should work… smile

Great. How do I disable amixer and swith to smixer? I can disable the amixer from services, but do I need to do anything else? Thanks for all of your help.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#13 2010-02-09 10:24:11

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

I don't disable amixer… but why not?

Nothing else to do… well done, thanks to you.

Offline

#14 2010-02-09 10:45:59

nabilalk
#! Die Hard
From: U.S.A.
Registered: 2009-01-28
Posts: 531

Re: smixer-wrapper : simplest CLI for smixer

~HP wrote:

I don't disable amixer… but why not?

Nothing else to do… well done, thanks to you.

lol, well now. I'm glad that my pain has helped to further things along ;-) The argument that you made for smixer was that it does not use a service like aumixer. Since amixer also runs as a service, I can see a need to disable that. Hopefully my troubles with the smixer install will help others who wish to install in the future.


#! 10 “Statler” r20110207 32-bit & Openbox

Offline

#15 2010-02-09 18:52:02

~HP
#! CrunchBanger
From: Elsaß (fr_FR)
Registered: 2010-01-01
Posts: 187
Website

Re: smixer-wrapper : simplest CLI for smixer

nabilalk wrote:
~HP wrote:

I don't disable amixer… but why not? […]

The argument that you made for smixer was that it does not use a service like aumixer. Since amixer also runs as a service […].

# service --status-all | sort
 [ ? ]  acpi-support
 [ ? ]  alsa-utils
 [ ? ]  apmd
 [ ? ]  apport
 [ ? ]  binfmt-support
 [ ? ]  bootlogs.sh
 [ ? ]  bootmisc.sh
 [ ? ]  checkfs.sh
 [ ? ]  checkroot.sh
 [ ? ]  console-setup
 [ ? ]  cron
 [ ? ]  dns-clean
 [ ? ]  etc-setserial
 [ ? ]  fancontrol
 [ ? ]  glibc.sh
 [ ? ]  hddtemp
 [ ? ]  hostname.sh
 [ ? ]  hotkey-setup
 [ ? ]  hwclock.sh
 [ ? ]  irda-setup
 [ ? ]  irda-utils
 [ ? ]  jackd
 [ ? ]  keyboard-setup
 [ ? ]  killprocs
 [ ? ]  linux-restricted-modules-common
 [ ? ]  linuxlogo
 [ ? ]  lm-sensors
 [ ? ]  lpd
 [ ? ]  module-init-tools
 [ ? ]  mountall-bootclean.sh
 [ ? ]  mountall.sh
 [ ? ]  mountdevsubfs.sh
 [ ? ]  mountkernfs.sh
 [ ? ]  mountnfs-bootclean.sh
 [ ? ]  mountnfs.sh
 [ ? ]  mountoverflowtmp
 [ ? ]  mtab.sh
 [ ? ]  networking
 [ ? ]  ondemand
 [ ? ]  openafs-client
 [ ? ]  openntpd
 [ ? ]  pcmciautils
 [ ? ]  pdnsd
 [ ? ]  policykit
 [ ? ]  pppd-dns
 [ ? ]  preload
 [ ? ]  procps
 [ ? ]  rc.local
 [ ? ]  readahead
 [ ? ]  readahead-desktop
 [ ? ]  resolvconf
 [ ? ]  rmnologin
 [ ? ]  saned
 [ ? ]  screen-cleanup
 [ ? ]  sendsigs
 [ ? ]  setserial
 [ ? ]  stop-bootlogd
 [ ? ]  stop-bootlogd-single
 [ ? ]  stop-readahead
 [ ? ]  timidity
 [ ? ]  transmission-daemon
 [ ? ]  ubiquity
 [ ? ]  udev
 [ ? ]  udev-finish
 [ ? ]  ufw
 [ ? ]  umountfs
 [ ? ]  umountnfs.sh
 [ ? ]  umountroot
 [ ? ]  urandom
 [ ? ]  usplash
 [ ? ]  virtualbox-ose
 [ ? ]  wicd
 [ ? ]  wpa-ifupdown
 [ + ]  acpid
 [ + ]  apache2
 [ - ]  apparmor
 [ + ]  atd
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  bootlogd
 [ - ]  casper
 [ + ]  clamav-freshclam
 [ + ]  cups
 [ + ]  dbus
 [ - ]  dkms_autoinstaller
 [ - ]  exim4
 [ + ]  gdm
 [ + ]  hal
 [ + ]  klogd
 [ - ]  laptop-mode
 [ - ]  NetworkManager
 [ - ]  postfix
 [ - ]  pulseaudio
 [ - ]  rsync
 [ + ]  sysklogd
 [ + ]  system-tools-backends
 [ - ]  x11-common

Where is alsamixer? Is really alsamixer a service? No, in my opinion!

Last edited by ~HP (2010-02-09 18:55:27)

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo