Archive for January, 2012

amixer in ubuntu


If you want to change the volume in Ubuntu 11.10 it seems that amixer
is kind of bugged when it comes to toggle (mute/unmute). When
toggling Master, it also mutes all the separate groups (Front,
headphone, PCM and so on), but when toggled again it only unmutes
Master, which leaves the rest muted…

I came across a nice workaround that i wanted to share. The solution
was written by Jim Hunziker on this page:

1) Make a with the following content:

#!/bin/bash CURRENT_STATE=`amixer get Master | egrep 'Playback.*?[o' | egrep -o '[o.+]'|head -n 1`if [[ $CURRENT_STATE == '[on]' ]]; then    amixer set Master muteelse   amixer set Master unmute   amixer set Front unmute   amixer set Headphone unmute   amixer set PCM unmutefi

2) chmod u+x

3) Bind it to some key (f.ex. XF86AudioMute) to run



Cutting bits from avi-file with ffmpeg/mencoder


I wanted to cut out two bits from an avi-file and then join them to
get one small file from a large file. I thought using ffmpeg would be
easy for this, but it turns out it might have a but with avi/wmv so I
ended up using mencoder instead.

The original try I did with ffmpeg was:
ffmpeg –ss 00:05:52 -t 00:00:11 -i bigfile.avi small_clip.avi
It looks like it wants to do what I want, since it makes a file where
the first 11 seconds are the ones I want, but then the sound
disappears and all of the rest of bigfile.avi is there (the video at

I could not find any solution for this on the interwebs, so I ended up
trying mencoder which worked:
mencoder -oac copy -ovc copy -ss 00:05:52 -endPos 00:00:11 bigfile.avi
-o small_clip.avi
I repeated the above for all the clips from bigfile.avi and then put
them together:
mencoder -oac copy -ovs copy -idx -o joined_clip.avi small_clip1.avi
small_clip2.avi and so on

Google Chrome and Kerberos


Just a short tip for those of you that use Google Chrome and want to
utilize Kerberos to login to sites:
You need to start Chrome with an extra command-line option. Why this
isn’t configurable inside Chrome is a mystery, but anyways – here is
the solution:
1) Make sure you have a kerberos ticket (check with klist or do a new kinit )
2) Start Chrome as this:
google-chrome –auth-server-whitelist=”domain”
domain can f.ex. be *

Voila, Kerberos-login works.

%d bloggers like this: