Thursday, July 31, 2014

Playing Audio on RPi

If omxplayer's auto-detection of the correct audio output device fails, you can force output over hdmi with:

$ omxplayer -o hdmi example.mp3

or you can force output over the headphone jack with:

$ omxplayer -o local example.mp3

To troubleshoot the sound module::
$ lsmod | grep snd_bcm2835
$ sudo modprobe snd_bcm2835

To load the sound module automatic:
cd /etc
sudo vi modules

# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be
# loaded at boot time, one per line. Lines beginning with "#" are
# ignored. Parameters can be specified after the module name.


By default the output is set to automatically select the default audio interface (HDMI if available otherwise analog). You can force it to use a specific interface using :
$ amixer cset numid=3 n

Where <n> is the required interface : 0=auto, 1=analog, 2=hdmi. To force the Raspberry Pi to use the analog output :
$ amixer cset numid=3 1

To play a WAV file using aplay:
$ aplay police_s.wav

To play an MP3 file using mpg123:
$ sudo apt-get -y install mpg321
$ mpg321 bubbling_water_1.mp3
$ mpg321 -g 50 bubbling_water_1.mp3     # [ volume 50% ]

To play a MP3 file using Imxplayer:
$ sudo apt-get -y install omxplayer
$ omxplayer bubbling_water_1.mp3

The plus (+) and minus (-) keys can be used to adjust the volume of the playback.

Friday, July 25, 2014

rundll32 + javascript + calc

Got this from a friend.

rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";document.write("\74script language=jscript.encode>"+(new%20ActiveXObject("WScript.Shell")).Run("calc.exe")+"\74/script>")

start calc.exe

Google Chrome Silent Installer at TechNet

Just found a Google Chrome silent installer (36.0.1985.125) today. Yes, it is at Microsoft TechNet.

Google Chrome at TechNet

Wednesday, July 16, 2014

Shutdown, Restart, Logoff, and Hibernate Remote Windows PC

Shutdown Remote PC
Shutdown.exe -s

Restart Remote PC
Shutdown.exe -r

Logout Remote PC
Shutdown.exe -l

Hibernate Remote PC
Shutdown.exe  /h