User Tools

Site Tools


linux:linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux:linux [2017/06/07 17:21]
cipibad
linux:linux [2017/06/07 17:22] (current)
cipibad
Line 106: Line 106:
 </​code>​ </​code>​
  - create /​home/​ionescu/​bin/​jabra.sh file  - create /​home/​ionescu/​bin/​jabra.sh file
 +<​code>​
 +#!/bin/sh
  
 +PULSE_SERVER="​unix:/​run/​user/​`id -u`/​pulse/​native"​
 +
 +SINK_NAME="​alsa_output.usb-GN_Audio_A_S_Jabra_EVOLVE_30_II_0002AD72CD6E07-00.analog-stereo"​
 +
 +SINK_LIST_CMD="​pactl --server $PULSE_SERVER list sinks"
 +
 +nSinks=`$SINK_LIST_CMD | grep "Name: $SINK_NAME"​ | wc -l`
 +tries=0
 +MAX_TRIES=10
 +
 +while [ $nSinks -ne 1 -a $tries -lt $MAX_TRIES ]; do
 +    nSinks=`$SINK_LIST_CMD | grep "Name: $SINK_NAME"​ | wc -l`
 +    tries=$((tries+1))
 +    sleep 1
 +done
 +
 +pactl --server "​$PULSE_SERVER"​ set-default-sink alsa_output.usb-GN_Audio_A_S_Jabra_EVOLVE_30_II_0002AD72CD6E07-00
 +.analog-stereo
 +</​code>​
 + - make the two new files executable
 +<​code>​
 +$ chmod +x /​home/​ionescu/​bin/​jabra.sh /​home/​ionescu/​bin/​jabra_wrapper.sh
 +</​code>​
 + - double check and adapt to your environment (username/​sink name/etc.)
linux/linux.1496845319.txt.gz ยท Last modified: 2017/06/07 17:21 by cipibad