Gnome 3 change background script

I used a public domain perl script (by some Michael Moore) to change periodically the wallpaper under Gnome 2, here it is:
#!/usr/bin/perl -w
use strict;
use warnings;
my $searchPath = '~/wallpapers/';   # Set to the directory you want to have searched for photos
my $switchTime = 300;               # Edit to the number of seconds between photo switches
my @photos = `find $searchPath -type f | grep [jJ][pP][eE]*[gG]`;             
chomp(@photos);
my $photo;
while(1)
    $photo = $photos[rand($#photos)];
    `gconftool-2 --type string --set /desktop/gnome/background/picture_filename "$photo"`;
    sleep($switchTime);
Of course, it doesn 't work under Gnome 3, because of the gconftool line.
I understand it is done this way now:
              gsettings set org.gnome.desktop.background picture-uri "file:///home/user/background.jpg"
But my perl skills are quite limited and my attempts to modify the script to the new way have failed miserably.
Is here someone more skilled than me can give me some help with this thing??
It's not incredibly important but I really really liked the wallpaper timed changing.
Thanx in advance.

Why not use a XML file? check this out https://github.com/dzup/borednomore  you can either make  your own XML file or use one of those scripts, one is for gconf2tool (gnome 2) and the other for gsettings (gnome 3) its for ubuntu/debian, but i see no difference between the way you guys call gsettings in arch, looks the same to me in debian, you may try it and told me if it does, thanks.

Similar Messages

  • Change Background per Script

    I've got yet another problem. I want to write a script that changes my background each time a given timespan runs out.
    I use gsetting to change it. Strange thing is, outside of the script it works fine with...
    gsettings set org.gnome.desktop.background picture-uri "file:///home/thunderuser/Wallpaper/Applejack - Silhouette.png"
    ... but in the Script, Gnome seems to go to sleep or drink some beer or whatever. Point is, it does not do what it should. Here is the script.
    1 #!/bin/bash
    2
    3 #set -o errexit
    4
    5 TIMEOUT=10
    6 BGDIR=/home/thunderuser/Wallpaper
    7
    8 while :
    9 do
    10 for f in $BGDIR/*
    11 do
    12 echo "$f"
    13 gsettings set org.gnome.desktop.background picture-uri "file//$f"
    14 sleep $TIMEOUT
    15 done
    16 done
    Thanks in advance.

    Trilby wrote:file:// != file//  You're missing a colon.
    Wow. I will kill myself right now. That is really, really emberrasing. I even looked up the dconf-edior and should have noticed the :
    Thank you very much, it works like a charm now.

  • How to change background in GNOME

    I kinda of hate the GNOME developers for making me ask this, but here it goes.
    Is there a way to set the desktop background to an image located in a folder other than my home pictures folder?
    Specifically, I have a folder in my "Pictures" folder titled "Wallpapers".
    Thanks

    example
    gsettings set org.gnome.desktop.background picture-uri 'file:///home/alabala.jpg'

  • How to change background images in s:application

    hello!
    i want to make a webside by flex4 as  this web http://www.templatemonster.com/flash-cms-templates/29930.html
    But i don't know how to make change background images by click and make sound when load page.
    Can u help me ,please. sorry i write E not well.
    Thanks so much
    BUI THI PHUONG THANH- FROM VIETNAM

    Hi,
    please create a sink for your application inside that put your image.And apply that skin to your application on any click.
    Below is the code.
    Main Application
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:mx1="library://ns.adobe.com/flex/mx">
        <fx:Script>
            <![CDATA[
                protected function btn_click(evt:MouseEvent):void {
                    this.setStyle("skinClass", MySkinClass);
            ]]>
        </fx:Script>
        <s:Button label="Change BackGroundImage" click="btn_click(event);"/>
    </s:Application>
    MySkinClass
    <?xml version="1.0" encoding="utf-8"?>
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx">
        <!-- host component -->
        <fx:Metadata>
            [HostComponent("spark.components.supportClasses.SkinnableComponent")]
        </fx:Metadata>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <s:BitmapImage source="@Embed('image1.jpg')"  smooth="true" left="0" right="0"  top="0" bottom="0"  />
    </s:Skin>
    with Regards,
    Shardul Singh Bartwal

  • SAPSCRIPT: How change background color cell/table

    Hi!
    How can I change background color cell/table in Sapscript?
    Thanks very much!

    Hi ,
    Normally we use Scripts and smartforms for submitting the output to customers or for tax purpose  and so on,,in such case we wont submit in differnt color other than white and black,so formatting in other colors is not possible in Script and smartforms.
    Please let me know if have any issues on this.
    Thanks and regards,
    Rajeshwar

  • How to change the script event?!?

    Here I have a small form with two different parts...
    The first part is a table containing many checkboxes to be able to show whatever form you want to fill up..
    All of the checkboxes create a form into a table which each row represents the form to fill-up.
    When you click 1 checkbox, it adds a row to the table with some values needed for the form..
    In that form there is a chance to have 2 or 3 radiobuttons, depending on the checkedbox which each do something different..
    the 1st one hides a new table to fill up information (under the radiobuttons),
    the 2nd one shows up the new table with some values to show instructions into labels...
    the 3rd one shows up the new table with some other values to show different instructions into labels.. (This radiobutton is only in half of the forms, so it is hidden)
    those labels must be different for each checkbox chosen
    instead of making a huge script in my radiobutton change event, and writing all the different possibilites
    i'd rather create the script depending on the checkedbox the user have chosen...
    Right now I'm using something like : this.resolveNode("...radiobuttonList").event__change.script.value = "--_ Write all the new code here_--";
    After this line is written and everything is working... I show up a messageBox to see the result which is all correct..
    But when I'm clicking on the radiobuttons nothing is working at all...
    the only code working is the initial code written in the event
    Anyone have an idea if I'm missing something?!?
    Thanks!

    Actually this is not what i was looking for, I really need to change the script...
    e.g. I have a button in a expandable table and i want each buttons to have a different messagebox....
    when the button is created a new script is assigned to the event_click...
    This is what im looking for...
    Looks like LiveCycle Designer is not able to change the scripts events even though the property is there and is a "get" & "set"
    so I should be able to change script event.... but I think i need to reload/recreate the form by using the modified code...

  • Just uploaded iso7 , . . .hate it!  Can you change background colours?  How do you add a new item/activity to the schedule? In notes the font has changed, can I change it back and the link colour is now yellow instead of blue, can I change it?  Thanks

    Just uploaded iso7 , . . .hate it!  Can you change background colours?  How do you add a new item/activity to the schedule? In notes the font has changed, can I change it back and the link colour is now yellow instead of blue, can I change it?  Yellow on white is harder to read. Thanks

    Another question. How do you bookmark something.  It was so easy before, why did they change it?  Can I uninstall it?

  • How to change background color in mail messages?

    Capacity to change background colours seems to have been removed.  Has anyone found where to do this please???

    It's still available in Lion's version of Mail.
    Open a New Message window in Mail. Then select Show Fonts from the Format menu.
    In the Fonts screen, click the button for Document Color; a clor selection window will open. In that, choose the color you want for background.
    Note - if you do this before entering any text in the New Message, you can save it as a Stationery item, which means you can select it from the Stationery menu in the future, saving many steps.

  • How to change background color in AutoComplete window ?

    Is it possible to change background color in AutoComplete window ?

    Bob, A.Ankit, you're both chasing a ghost here.
    The screenshot shows an autocomplete enabled textbox with its dropdown list of autocomplete values to choose from. There is no property defining its backcolor. Not in the textbox nor in any class, neither any other baseclass nor _combobox of _base.vcx
    The only way to chnage that color is not recommended, via changing windows theme colors. That would effect any window and control.
    If you need another color even turning off themes won't help as VFP doesn't offer any property controlling that color, so you really would need to implement the autocomplete feature yourself, if you want the specify this backcolor.
    Bye, Olaf.
    Olaf Doschke - TMN Systemberatung GmbH http://www.tmn-systemberatung.de

  • How to change background color in online editor

    How to change background color in online editor

    Jeff,
    if you try to change all the plsql keywords to the same background color (that is not either white or black or blue) via the options panel in SQL Developer (Code Editor > PLSQL syntax colors), you will get the new background color in the worksheet only for the areas with plsql text, while the areas without any text will have the same background color as the base color scheme you started with. This means that there is no way to change the "general background" color via the options panel, but you have to use the same background color of one of the predefined color schemes.
    This seems to me a bug, but probably it's not considered high priority, so it will not be fixed for the time being.
    I would like to stress the fact that being able to change the color scheme of the development environment that you use every day about 8 hours a day can make quite a difference on your eyes at the end of the day.
    Thanks,
    Paolo

  • How to change background color in photoshop cs3

    how to change background color in photoshop cs3
    Please help me...

    Background for what? You need to explain better and be more specific.
    Mylenium

  • How to change background color of multilevel textbox in oracle form 6i

    hi
    How To Change background Color of the Text.
    In One Multilevel Block 10 Record is Display At a Time in a Text Box (Name is AMTt)
    This Text Box display , Buffer and Record Length is 10
    In Case Of Amount is Less 500 then Text Color Is Red(Or Any) and In Case Amount Is More 500 Then Color is Green (Or Any).
    Me Use This Code in PRE_RECORD EVENT
    TCMTL is Block name
    TCMTL_AMT is Text Box Name
    if :TCMTL.TCMTL_AMT >5000 then
         g_fun.msgbox('Values is more');
         Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b100');
    else
         g_fun.msgbox('Values is Less');
         Set_Item_Property('TCMTL_AMT' , BACKGROUND_COLOR, 'r50g100b10');
    end if;     
    but This Code Is Refer Only 10th Value and change color depend on value.
    so
    possible to Different color in One Block Text Box Then how?

    DECLARE
         cur_itm VARCHAR2(80);
         cur_block VARCHAR2(80) := Name_in('system.trigger_block') ;
         BEGIN
         cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
              cur_itm := cur_block||'.'||cur_itm;
              --:global.VISUAL_ATTRIBUTE:= 'BACKGROUND_COLOR';
              --:global.VISUAL_ATTRIBUTE:= get_item_property(cur_block||'.'||cur_itm ,Background_Color);
              IF :TCMTL.TCMTL_AMT >= 500 THEN
                             Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r50g100b100');
                   ELSE
                             Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'r5g100b10');
                   END IF;
                             cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
                   END LOOP;
                   next_record;
    END;
    this is my in that how to set a VISUAL_ATTRIBUTE, and where to set so get a background color of text and change

  • Change background in forms 10g?

    When we compile and run the form in forms 10g output is displayed. Can we change background? Can anybody help me to change the background in forms 10g?

    see you /forms/server/forms.conf file that contains the virtual directories declared
    # Virtual path mapping for Forms Java jar and class files (codebase)
    AliasMatch ^/forms90/java/(..*) "D:\Oracle9i/forms90/java/$1"
    # Virtual path for JInitiator downloadable executable and download page
    AliasMatch ^/forms90/jinitiator/(..*) "D:\Oracle9i/jinit/$1"
    # Virtual path for runform.htm (used to run a form for testing purposes)
    AliasMatch ^/forms90/html/(..*) "D:\Oracle9i/tools/web90/html/$1"
    # Virtual Path form images
    AliasMatch ^/forms90/icons/(..*) "D:\Oracle9i/CGENF61\ADMIN\ICONS\PC/$1"
    ...you can create as many virtual directories as you want.
    Francois

  • How To Track Changes to Scripts Made via UCCE AWS

    Hi there
    Does anyone know how to produce an audit trail/sql query which would display who had made changes to scripts or config, via the aw??
    I have a customer who has had unauthourised modifications made to some scripts which have caused operational difficulties and we need to find out how made these changes pronto.
    many thanks

    Hi,
    yes, there's a database table named Config_Message_Log. It contains all the information that might be useful in such cases: the date and time, the user's login name and what information (more precisely: which database table) has been changed. It must be noted, however, that the "what has been changed" is not stored in a human readable form, you need to extract it using the Log viewer functionality of icmdba tool (which is a friendly GUI alternative/wrapper to the dumpcfg command line tool).
    Issue the icmdba command on the command line of your AW machine. Expand Servers > [the server where a Logger resides]. Click [instancename]_sideA (or [instancename]_sideB). From the menu bar, select View > Log. A new window appears. Set the from and to dates to a desired value, then click View. It might take some time while a new window appears, containing the list of changes.
    Example output:
    [ 610672580481.0, Add, Nov 1 2011  7:49AM ]
    PID:                4172
    MachineName:        AWSA
    UserDomain:         IPCC
    UserName:           administrator
    ProcessName:        conicrList(upcc)
    SQLServerUserName:  DBO
    [ 610672580482.0, Delete, t_Agent_Team_Member, Nov 1 2011  7:49AM ]
    [1 of 3]
    AgentTeamID:        5000
    SkillTargetID:      5138
    ChangeStamp:        171
    [2 of 3]
    AgentTeamID:        5014
    SkillTargetID:      5385
    ChangeStamp:        83
    [3 of 3]
    AgentTeamID:        5020
    SkillTargetID:      5066
    ChangeStamp:        86
    This means on 1st November 2011 at 7:49 somebody with the IPCC\administrator login on the AWSA machine removed three agents (with SkillTargetID 5138, 5385 and 5066) from the Agent Team with AgentTeamID 5000.
    Script changes are not so easy to explain, however, since each save generates a new version of a script, you'll see a new record in the t_Script table. Feel free to post the output here, I might be able to help you or at least show you the right direction.
    It must be noted, however, that the Config_Message_Log table can be truncated (erased) with the icmdba tool too. So if the customer knows this, they might just perform an unauthorized change and then destroy all traces, unfortunately.
    G.
    P.S.: you can also use the dumpcfg tool from the command line, it's faster - just make sure you read the instructions (do dumpcfg /?) and redirect the output to a text file.

  • How to export PDF in Adobe Reader with changed background

    Hey Folks,
    I change background and text color by going to Preferences -> Accesebility and when I save the file with changed background it is still the old background. How to I save/export this PDF to have changed background?
    Thanks a lot!
    Krioni

    Adobe Acrobat.  A bit expensive just to change the document background...

Maybe you are looking for

  • Verizon e-mail server

    Emails to me from some people are bouncing with the message "Mail server for "verizon.net" unreachable for too long"  When the email is resent, it finally gets through, but this is a pain.  I talked to 2 different verizon techs and both say all my se

  • How can I rotate a clip, but then crop it normally?

    I am trying to use Final Cut Pro X to edit a video I shot with my iPhone 4.  In the video is a piece of paper.  The iPhone wasn't perfectly level when I shot the video, so the paper is skewed (well, rotated) a bit. After adding a small rotation, the

  • HOW TO UPGRADE OS BB 8520 TO NEWEST VERSIONS???

    Hello I have a BB 8520 with carrier at Vodafone RO and I want to upgrade my OS to newest versions. Now I have the version v4.6.1.272 I connect the device to my PC using the desktop software 6 and from the website I click on Update to OS 5.0, and it g

  • What is corrupting my photograph files?

    I have a file of saved jpeg pictures going back about 6 years. Many were created using mac os 9 and AdobePhotoDeluxe. But sure as fate, each time I open the file I find a few are unreadable. Norton Antivirus doesn't show a problem. I makes me wonder

  • Camera Fusion .. is it possible on Labview ?

    I am trying to take the simultaneous feed of two fire wire cameras and fuse them together. For example i want to cut half the frame of one camera and half the frame of the other camera and then fuse them together in such a way that if both the camera