Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, June 3, 2011

Background on Ubuntu

Recently, I installed Ubuntu on my machine. I have a folder called climbingwallpapers in

/usr/share/backgrounds/

with all kinds of background pictures. Anyway, I wanted to have a bunch of desktop background that changes from time to time. I notice that there is an xml file that does this in one of the default installation folder with images.

I'm sure there is an easier way to come up with the xml file for the backgrounds in my folder.
But I didn't bother to google. Just wrote this short script....and ran it. If you would like to use it, I've attached it here. Just make the necessary changes and run it like...

$ python generatedesktoptheme.py > background-1.xml

the script is below...
#!/usr/bin/env python
import os
import re

transition = '5.0'
duration = '300'
count = 0
firstfile = ''
ffrom = ''
path = '/usr/share/backgrounds/climbingwallpaper/'

print "<background>"
print " <starttime>"
print " <year>2009</year>"
print " <month>08</month>"
print " <day>04</day>"
print " <hour>00</hour>"
print " <minute>00</minute>"
print " <second>00</second>"
print " </starttime>"
print "<!-- This animation will start at midnight. -->"

for f in os.listdir(path):
if re.search("\.jpg|\.gif", f):
count+=1
if count == 1:
firstfile = f
else:
continue

f = path+f
if ffrom == '':
ffrom = f
print " <static>"
print " <duration>"+duration+"</duration>"
print " <file>"+f+"</file>"
print " </static>"
else:
print " <transition>"
print " <duration>" +transition+"</duration>"
print " <from>"+ffrom+"</from>"
print " <to>"+f+"</to>"
print " </transition>"
ffrom = f
print " <static>"
print " <duration>"+duration+"</duration>"
print " <file>"+f+"</file>"
print " </static>"

print " <transition>"
print " <duration>"+transition+"</duration>"
print " <from>"+ffrom+"</from>"
print " <to>"+path+firstfile+"</to>"
print " </transition>"
print "</background>"

Sunday, May 1, 2011

Debian Wheezy/Sid/testing

Hi,

I rarely blogged here - since most of the time I wasn't using Debian, but it's derived work - Ubuntu. Now that I'm getting bored facing the workable and hardly to break distro, I dare myself to use Debian Testing for my Dell D430 laptop.

The installation isn't taking so much pain, but the first problem that I met is my keyboard and my mouse weren't worked even during the GDM session. I managed to use its rescue DVD and get  the shell works. Later I installed gpm and walla, it's worked.

I hanged at #debian but the communities suggested udev to be backdated(meaning, since I am using Testing distro, it will break, and don't complain, use Stable instead). However prior to trying udev workaround, gpm IS the answer and it's working. Experience does solve this problem.

Actually I installed OpenSuse 11.4 before.. since I want to open my opinion to other distro as well. But I keep breaking my machine, and does not get my binaries straight away.. meaning it lacking software compared to Debian based.

Debian however, lacking Kamoso, a webcam software that I chose to record. (actually I'm using ffmpeg to, but ffmpeg does not show real time video, I don't want to spend my time write another script just for that).

So still, Ubuntu IS the most relaxing distro for desktop as for me, as for now.
Trolls are welcomed.