Xfmedia Question

Brian J. Tarricone bjt23 at cornell.edu
Fri Jun 29 00:36:48 CEST 2007


tomw at videotron.ca wrote:
> This is the script I wrote .... 
>
> #!/bin/bash
> #Enables file open / browsing functionality in Xfmedia.
> #Called from Thunar
> #Date 28/JUN/2007
>
> XFMEDIA=`ps -e | grep -i xfmedia | awk '{ print $1 }'`
> echo $XFMEDIA
>   
xfmedia-remote --ping should work fine here.
> TRACK = `echo $1 | sed 's/\ /\\\&/g'`
>
> if [ -z "$VMWARE" ]; then
>     xfmedia $TRACK
> else
>     xfmedia-remote -a $TRACK
> fi
>
> The script fails when the path / file name has a blank space in it.
>   
Just enclose the name in double quotes:
xfmedia-remote -a "$TRACK"

    -brian




More information about the Xfce mailing list