Posté par kregory le 08 mars 2009 à 17:02. En réponse au message gconftool wallpaper. Évalué à 1.
export DISPLAY=0 while read line ; do echo $line | grep -vqe "^#" if [ $? -eq 0 ]; then export $line; fi done < ~/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-$DISPLAY
Posté par kregory le 08 mars 2009 à 16:31. En réponse au message gconftool wallpaper. Évalué à 1.
Posté par kregory le 07 mars 2009 à 20:22. En réponse au message gconftool wallpaper. Évalué à 1.
#!/bin/bash #set -x export WALL_DIR='/data/Photos/' export TMP_FILE=`mktemp` #find ${WALL_DIR} -type f -name "*jpg" | nl -s: -n rz > ${TMP_FILE} find ${WALL_DIR} -type f | grep -v "/_" | nl -s: -n rz > ${TMP_FILE} NB=`wc -l ${TMP_FILE} | cut -d' ' -f1` let num=$RANDOM%$NB wallpaper=`grep -e "^0*$num:" ${TMP_FILE} | cut -d: -f2-` file "$wallpaper"|grep -qi image if [ $? -eq 0 ]; then /usr/bin/gconftool-2 -t sting --set /desktop/gnome/background/picture_filename "${wallpaper}" /usr/bin/gconftool-2 -t sting --set /desktop/gnome/background/picture_options "scaled" fi rm ${TMP_FILE}
[^] # Re: path
Posté par kregory . En réponse au message gconftool wallpaper. Évalué à 1.
export DISPLAY=0
while read line ; do
echo $line | grep -vqe "^#"
if [ $? -eq 0 ]; then export $line; fi
done < ~/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-$DISPLAY
[^] # Re: path
Posté par kregory . En réponse au message gconftool wallpaper. Évalué à 1.
Mais j'ai trouvé
merci
https://bugs.launchpad.net/ubuntu/+source/gconf/+bug/285937
[^] # Re: path
Posté par kregory . En réponse au message gconftool wallpaper. Évalué à 1.
#!/bin/bash
#set -x
export WALL_DIR='/data/Photos/'
export TMP_FILE=`mktemp`
#find ${WALL_DIR} -type f -name "*jpg" | nl -s: -n rz > ${TMP_FILE}
find ${WALL_DIR} -type f | grep -v "/_" | nl -s: -n rz > ${TMP_FILE}
NB=`wc -l ${TMP_FILE} | cut -d' ' -f1`
let num=$RANDOM%$NB
wallpaper=`grep -e "^0*$num:" ${TMP_FILE} | cut -d: -f2-`
file "$wallpaper"|grep -qi image
if [ $? -eq 0 ]; then
/usr/bin/gconftool-2 -t sting --set /desktop/gnome/background/picture_filename "${wallpaper}"
/usr/bin/gconftool-2 -t sting --set /desktop/gnome/background/picture_options "scaled"
fi
rm ${TMP_FILE}