LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-12-2010, 05:23 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Change GNOME wallpaper through a script or a command?


So here is my GNOME background config file:

less .gconf/desktop/gnome/background/%gconf.xml
Code:
<?xml version="1.0"?>
<gconf>
        <entry name="primary_color" mtime="1249674695" type="string">
                <stringvalue>#6666baba0000</stringvalue>
        </entry>
        <entry name="secondary_color" mtime="1249674695" type="string">
                <stringvalue>#6666baba0000</stringvalue>
        </entry>
        <entry name="picture_filename" mtime="1249674695" type="string">
                <stringvalue>/usr/share/images/desktop-base/desktop-background</stringvalue>
        </entry>
        <entry name="color_shading_type" mtime="1249674695" type="string">
                <stringvalue>solid</stringvalue>
        </entry>
        <entry name="picture_options" mtime="1249674695" type="string">
                <stringvalue>zoom</stringvalue>
        </entry>
</gconf>
Now I have a wallpaper which is stored at:
/usr/share/images/desktop/wallpapers/My-WallPaper.jpg

and I would like to edit the %gconf.xml file to use the above wallpaper:
Code:
<stringvalue>/usr/share/images/desktop/wallpapers/My-WallPaper.jpg</stringvalue>
I know that sed, awk or perl can be used to achieve this but not sure how to do it. Reading the sed one liner did not help.

Thanks.
 
Old 03-12-2010, 05:42 PM   #2
lwasserm
Member
 
Registered: Mar 2008
Location: Baltimore Md
Distribution: ubuntu
Posts: 184

Rep: Reputation: 41
I'm not very proficient with the syntax, you'll have to read the man page for that, but there is a command line tool named gconftool or sometimes gconftool-2 that can be used to manipulate keys and values in the gnome configuration database.
 
Old 03-12-2010, 06:04 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
I think I know about the gconftool but I was looking to use something other than that. But thanks anyways...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] a script to change wallpaper sumeet inani Linux - Newbie 58 03-06-2010 08:18 AM
Can't change wallpaper w/ openbox / how to change mousespeed johnnyxxxcakes Linux - Newbie 14 05-24-2009 07:11 PM
Wallpaper change via command line ? uncle-c Linux - Newbie 2 05-16-2007 02:40 PM
How to change a GNOME panel icon from command line? General Programming 0 03-19-2007 06:22 PM
Change kde theme & wallpaper from command line or start scripts? JHuizingh Linux - Software 2 12-11-2003 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration