Building XFCE from Git

I recently tried to build an XFCE package using the git source (because I wanted to apply a patch).  Something I couldn’t find except in an ancient mailing list archive, was that you frequently need to pass either autogen or configure “–enable-maintainer-mode”, I passed it to both just to be safe.  Have fun building xfce.

Advertisements

Pogoplug & Autofs

Autofs is able to mount drives over sshfs on the fly. This allows you to seamlessly use a drive that you’re accessing over a local network or even over an ocean.

Pogoplug is a new dropbox-like cloud storage solution. Interestingly, and unlike dropbox, they do not work by mirroring data on your local disks. This means that the storage space offered is truly additive. Much like sshfs.

So I was of course curious if I could have autofs mount pogoplug seamlessly on access. Now I’m not sure how stable the connection is, so perhaps it would be better advised to do this once at login and not worry about it. But, anyways, a pseudo working solution (it seems to hang the first time it’s accessed, but a ctrl+c will return to the terminal and it will be mounted). It would be a huge help if someone could help me figure out that last niggle.

I attempted to keep user credentials separate from the script, and currently this banks on them being stored in ~/.ssh/pogouser & ~/.ssh/pogopass.

My auto.master:
#/etc/auto.master
/mnt/pogoplug /etc/auto.pogoplugfs --timeout=300,--ghost,nodev,nosuid

my auto.pogoplugfs:
username -fstype=fuse,nonempty,rw :/usr/local/bin/pogoplug_wrapper

And finally pogoplug_wrapper, you need to put pogoplugfs in your path. I put it in /usr/local/bin. This does some minimal logging to ~/.cache/pogoplugfs.log. You can comment out any of those lines if you’re not interested.
#!/bin/bash
#pogoplug_wrapper

mkdir -p $1
mountuser=`basename $1`
mountuserhome=$(getent passwd $mountuser | cut -d: -f6)
cd $mountuserhome/.cache
echo "$mountuser:$mountuserhome" >> pogoplugfs.log
uid=`id -u $mountuser`
gid=`id -g $mountuser`
echo "" >> $mountuserhome/.cache/pogoplugfs.log
date >> $mountuserhome/.cache/pogoplugfs.log
chown $uid:$gid $1
chmod 755 $1
pogouser=`head -n 1 $mountuserhome/.ssh/pogouser`
pogopass=`head -n 1 $mountuserhome/.ssh/pogopass`
mountcommand="pogoplugfs --mountpoint $1 --user $pogouser --password $pogopass --fuseopts $3"
echo "$mountcommand" >> $mountuserhome/.cache/pogoplugfs.log
sudo -u $mountuser $mountcommand &
sleep 3 # give the command time to finish
exit 0

Ubuntu1 as a Dropbox Alternative

Dropbox was certainly the first to make it big in the cloud sharing space.  But for many users their service imposes some limitations:

  • only 2gb of space
  • shared files count against all users with whom they are shared
  • can be temperamental with phones

Ubuntu1 at least fares better in these categories…

  • 5gb of space (5.5 if you sign up using a referral link…)
  • shared files count against the quota of only the owner
  • works well with my phone (which is by far the most important phone… right?)

So, sign up, give it a try, let me know how it goes… Ubuntu1.  The real killer feature would be if you could share to users of the other application, but I think that’s a pipe dream for the near future.

Flash Videos Appear Blue

From: http://askubuntu.com/questions/117127/flash-video-appears-blue

This is caused by a bug in the new Flash version that Adobe refuses to fix. There also is a bugreport on Launchpad that discusses this (LP: #967091). The bug only appears when you use the NVidia binary drivers and have libvdpau installed. A quick fix is adding some extra settings to the Flash configuration.

sudo mkdir /etc/adobe

echo -e “EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true” | sudo tee /etc/adobe/mms.cfg > /dev/null

This fixes the problem while still having VDPAU hardware accelleration. Unfortunately there probably won’t be a new Flash version to fix this without this manual config-hack because the Flash version that introduced this bug is also the last Flash version Adobe will ever release for Linux.

 

Posted in Tech. Tags: , , , , . 1 Comment »

Building shotwell from source

git clone git://git.yorba.org/gexiv2
git clone git://yorba.org/shotwell

cd gexiv2
./configure
make
sudo make install
cd ../shotwell
export VALAC=valac-0.16
make
# lots of text scrolls
sudo make install

Making and applying patches

This is actually something quite simple, so simple in fact that there is not much documentation for it. Anyways, to make the patch:

diff -urN file.orig file.modified > file.patch

then to turn a copy of file.orig into file.modified

patch file.orig file.patch

And then file.orig is updated to match file.modified.

Update: Or you could just git.

Grep for a tab Character

Need to grep for a tab in a file, but don’t know how to do it. Here’s one plan, say I wanted to grep for the number 1 followed by a tab…

grep -E "1`echo -e '\t'`" file.txt

So I’m actually using echo to print the tab special character into my grep string before the shell passes it on to grep. If this makes sense to you it’s time to start worrying…