A little shell script to change wallpaper in Cinnamon
Copy the following script and modify it accordingly:
# Script variables
DIR="/home/linuxmint/Pictures" # Directory contains wallpaper
WALLPAPER=$(ls $DIR/*.png | shuf -n1) # File extension is set to *.png
echo $WALLPAPER # Debug
gsettings set org.cinnamon.desktop.background picture-uri "file:$WALLPAPER"
Save the script as wallpaper.sh, and set the file permission to 755.
Then you can run it from your terminal and start debugging.
Once you are happy with it, add it to your crontab (including DISPLAY=:0)
The one below runs every 5 minutes:
*/5 * * * * DISPLAY=:0 /home/linuxmint/script/wallpaper.sh
To debug, you can run the following commands directly:
gsettings set org.cinnamon.desktop.background picture-uri "file:/home/linuxmint/Pictures/snsd01.png"
gsettings get org.cinnamon.desktop.background picture-uri
Saturday, June 7, 2014
Saturday, April 12, 2014
An Aging Laptop
Released in June 2010 with an ATOM CPU Z540, VAIO P shows its age with Mate / Cinnamon desktop. At some point I planned to sell it out but after the announcement that Sony sold its VAIO division, I preferred to keep it and started looking for a lightweight, non Xfce Linux distro. Came across an article from LXF and then did a bit googling, I decided to give CrunchBang a try as it looks very promising with a simple desktop and a dark theme, a bit look like the old days of Linux Mint 5.
Download the 32-bit Waldorf for Modern PCs torrent and transfer the iso to a USB flash drive using USB image writer. The installation is straight forward and VAIO P displays everything correctly. The only problem I got was the LVM partitioning and poked around the menu for quite a while. In general the installation should finish everything in 10 minutes. Once CrunchBang starts, an interactive shell prompts and guides you through updates and packages installation.
Problem: Screen Flickers
The screen keeps flickering and the following errors are logged in /var/log/messages:
Apr 10 10:31:25 vpcp115kg kernel: [ 187.040067] [drm] GMBUS timed out, falling back to bit banging on pin 0 [gma500 gmbus disabled]
The fix is to install latest kernel using smxi, the kernel I am using is:
root@vpcp115kg:~# uname -a
Linux vpcp115kg 3.12-10.dmz.1-liquorix-686 #1 ZEN SMP PREEMPT Fri Feb 7 04:09:24 UTC 2014 i686 GNU/Linux
Problem: Audio playing too fast
When playing flac using VLC player or Audacious, the audio playing is too fast. This problem emerges from the liquorix kernels. With the default kernel Linux 3.2.0-4-686-pae the playback of audio is fine.
The fix is to append the following line to /etc/modprobe.d/alsa-base.conf
options snd-hda-intel position_fix=1
Reboot and then run the following commands:
rm -rf ~/.pulse*
< 30 seconds
From power up to Openbox login prompt it takes about 27.4 seconds from my stopwatch!