12 August 2013

492. Briefly: fixing no sound when playing youtube videos in chrome, iceweasel/firefox

Not sure what caused this, but I suddenly had no sound when playing flash videos in the browser.

Playing flv files using e.g. mplayer works fine. I'm using pulseaudio, and have an ~/.asoundrc file:
pcm.!default.type pulse
ctl.!default.type pulse

alsamixer is working fine and the channels are unmuted.

The solution:
I moved ~/.macromedia to ~/.xmacromedia as suggested at the end of this post: https://bbs.archlinux.org/viewtopic.php?id=134892.

Didn't even need to restart the browser -- suddenly everything worked.

The question is why is there a ~/.macromedia folder, and what does it do? Might have a look into that at some later point.

07 August 2013

491. Compiling ECCE v7.0 (on debian)

See here for more information about what's new:
http://ecce.pnl.gov/using/releasenotes.shtml

Building ECCE 7.0 is done in the same way as previous versions:
http://verahill.blogspot.com.au/2013/01/325-compiling-ecce-64-on-debian-testing.html

While ECCE is distributed as binaries as well, only a 32 bit version is available. To run on 32 bit linux you need to compile your own copy.

See here for Fedora 18 and here for Scientific Linux 6.3. Note that you no longer need to fix the GetOpts issue -- that's already fixed in the new version.

To add new basis sets, read scripts/gbs.README in the ecce source directory, or in apps/scripts/gbs.REAME in the installation directory.

Anyway, building on debian wheezy is simple:
First go to http://ecce.pnl.gov/using/download.shtml and give
sudo apt-get install bzip2 build-essential autoconf libtool ant pkg-config gtk+-2.0-dev libxt-dev csh gfortran openjdk-6-jdk python-dev libjpeg-dev imagemagick xterm
mkdir ~/tmp
cd ~/tmp
tar xvf ecce-v7.0-src.tar.bz2
cd ecce-v7.0/
export ECCE_HOME=`pwd`
cd build/
./build_ecce
Checking prerequisites for building ECCE... If any of the following tools aren't found or aren't the right version, hit -c at the prompt and either find or install the tool before re-running this script. The whereis command is useful for finding tools not in your path. Found gcc in: /usr/bin/gcc ECCE requires gcc 3.2.x or 4.x.x This version: gcc (Debian 4.7.2-5) 4.7.2 [..]. Found java in: /usr/bin/java ECCE requires java 1.5.x or 1.6.x This version: java version "1.7.0_25" Hit return if this java is OK... Found javac in: /usr/bin/javac ECCE requires javac to be the same version as java above This version: javac 1.7.0_25 [..] Found xterm in: /usr/bin/xterm Hit return if xterm was found... The /home/verahill/tmp/ecce/ecce-v7.0/scripts/sysdir script identifies the build platform directory as: Because this value is no platform-specific parent directory will be created for ECCE executables, libraries, etc. This works fine unless your site needs support for multiple platforms. Finished checking prerequisites for building ECCE. Do you want to skip these checks for future build_ecce invocations (y/n)? Y

If you're having issues with e.g. mismatching java and javac versions, use e.g.
sudo update-alternatives --config javac 
to correct it.

If you hit Y at the last question, when you re-run ./build_ecce you'll then start building:
./build_ecce
Xerces built
./build_ecce
Mesa OpenGL built
./build_ecce
wxWidgets built
./build_ecce
running build_ext wxPython built
./build_ecce
Apache HTTP server built
./build_ecce
Copying JMS server distribution jms_server.tar.bz2 Making server tar file ecce_server.tar Copying WebHelp tar file eccewebhelp.tar.bz2 Making combined tar file ecce.v7.0.tar Copying NWChem distribution Concatenating install script and combined tar file ecce.v7.0.tar create_ecce_bin finished ECCE built and distribution created in /home/verahill/tmp/ecce-v7.0
You can now install ~/tmp/ecce-v7.0/install_ecce.v7.0.csh as shown in this post: http://verahill.blogspot.com.au/2013/08/487-version-70-of-ecce-out-now.html

03 August 2013

490. WACOM CTH-470 -- Bamboo Pen and Touch on Debian

This drawing tablet works out of the box on my system. I am using a custom 3.8.5-ck kernel, but as far as I know it should work on debian wheezy and above.

Anyway, plug it in and you're up and running. If you use your fingers it'll work like a regular touchpad (i.e. movement is relative to the previous location) whereas if you use the stylus the movement is absolute. You can use the GNOME 3 wacom app to change the setting:


 If you want to annotate a pdf during a presentation you can use e.g. Xournal:
Set to One page, hit F11 for presentation mode, and zoom in using CTRL +.
 To make the yellow eraser tip work for erasing, go to Options and select Eraser Tip.


 You can now draw

You can compare my hand-writing on paper vs using the tablet. Neither is particularly flattering for someone in their mid-thirties...

You can then erase
Note how there are no tool boxes in the images above. You can set the fullscreen view by editing the ~/.xournal/config file -- first generate the file by hitting Options/Save Preferences. Next, edit it and change the interface_fullscreen variable.

I like
interface_fullscreen=drawarea pen_toolbar
which looks like this:

Finally, to disable touch input during a presentation do this:

First get your device name
xsetwacom --list devices
Wacom Bamboo 16FG 4x5 Pen stylus id: 10 type: STYLUS Wacom Bamboo 16FG 4x5 Finger touch id: 11 type: TOUCH Wacom Bamboo 16FG 4x5 Pen eraser id: 15 type: ERASER Wacom Bamboo 16FG 4x5 Finger pad id: 16 type: PAD

 sudo vim /usr/bin/toggle_touch
#!/bin/bash ## Get the "Device name" or ID number ## for touch from 'xsetwacom list dev' DEVICE="Wacom Bamboo 16FG 4x5 Finger touch" TOUCH_STATE=`xsetwacom get "$DEVICE" touch` if [ "$TOUCH_STATE" == "on" ] then echo "Touch is ON, turning OFF." xsetwacom set "$DEVICE" touch off else echo "Touch is OFF, turning ON." xsetwacom set "$DEVICE" touch on fi
sudo chmod +x /usr/bin/toggle_touch

You can the do
me@niobium:~$ toggle_touch 
Touch is ON, turning OFF.
me@niobium:~$ toggle_touch 
Touch is OFF, turning ON

All I need to figure out now is how to get Xournal to interpret my presenter button in a way that makes it forward one slide per press, instead of half a slide.