How to change desktop background on Mate with a command?How do I change the desktop background from command line?The gsettings command line tool doesn't change the backgroundHow to make Greeter/Login Wallpaper Match Desktop WallpaperHow to execute gsettings within a snap package confinementChrome remote desktop breaks MATE desktop on Ubuntu MATE!How to change Mate panel background type from bash?

Who is the controller of an Aura when the creature it enchants is stolen?

5yrs old being bossy... Is this too much or tolerable at this age?

Using only one terminal, can I interrupt a process that's hung on very early Unix versions?

Upgrade new bike to 11 speed or downgrade trainers wheel to 8 speed

Can salted butter be used to make lemon curd?

Was Jumanji intended to be a co-op game?

Modeling in pure math

Finishing pre-cooked prime rib, day-of?

Is one spouse responsible if other failed to file taxes

What is a Brown Bag Seminar?

Java OOP Temperature Converter

What range of heights are allowed for wall receptacles?

Why did a decent number of London constituencies vote to Leave?

Description of attributes beyond 5

"Government transplant" been tried? At what scale, and what were the results?

How can communicating in human language with an unconscious alien species be treated as an attack?

Why wasn't Officer Angela Lopez questioned when she killed a suspect?

What is the purpose of Translation field in form display mode?

Why my vim doesn't support hex color code?

How to prevent humanity from using alien spaceships and technology exclusively?

As a DM, what are important changes to the play caused by Detect Magic no longer being a cantrip in 5e?

How scammy are cashback sites?

How can I smoothly transition between two UV maps?

I filled the crucial gap; co-authors did the rest–who should be first author?



How to change desktop background on Mate with a command?


How do I change the desktop background from command line?The gsettings command line tool doesn't change the backgroundHow to make Greeter/Login Wallpaper Match Desktop WallpaperHow to execute gsettings within a snap package confinementChrome remote desktop breaks MATE desktop on Ubuntu MATE!How to change Mate panel background type from bash?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









2


















I have just installed Mate DE on Ubuntu 16.10. I want to change my desktop background automatically after each login. On LXDE this was done easily with immediate effect (sleep just for autoload after desktop is loaded) with the next command:



bash -c 'sleep 5; pcmanfm -w "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"'


This is, of course, not working on Mate. I get this error:



Desktop manager is not active.


The only solutions I get for Mate involve mateconftool-2, which I do not have installed and it looks like it is deprecated. It should be replaced by something else, probably gconftool-2 or gsettings.



Just replacing the following mateconftool-2 command by gconftool-2 (this is from a few forums' posts I've read) does nothing:



mateconftool-2 -t string -s /desktop/mate/background/picture_filename $(find ~/Pictures/Wallpapers -type f | shuf -n1)


The gsettings command is accepted, but doesn't change the actual picture:



gsettings set org.gnome.desktop.background picture-uri "file://$(find ~/Pictures/Wallpapers -type f | shuf -n1)"


Although I can see it has changed the value:



myusername@mypcname:~$ gsettings get org.gnome.desktop.background picture-uri 'file:///home/myusername/Pictures/Wallpapers/Horex-VR6-Cafe-Racer-33-LTD-2014-1920x1080-001.jpg'


How do I get it working?










share|improve this question

































    2


















    I have just installed Mate DE on Ubuntu 16.10. I want to change my desktop background automatically after each login. On LXDE this was done easily with immediate effect (sleep just for autoload after desktop is loaded) with the next command:



    bash -c 'sleep 5; pcmanfm -w "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"'


    This is, of course, not working on Mate. I get this error:



    Desktop manager is not active.


    The only solutions I get for Mate involve mateconftool-2, which I do not have installed and it looks like it is deprecated. It should be replaced by something else, probably gconftool-2 or gsettings.



    Just replacing the following mateconftool-2 command by gconftool-2 (this is from a few forums' posts I've read) does nothing:



    mateconftool-2 -t string -s /desktop/mate/background/picture_filename $(find ~/Pictures/Wallpapers -type f | shuf -n1)


    The gsettings command is accepted, but doesn't change the actual picture:



    gsettings set org.gnome.desktop.background picture-uri "file://$(find ~/Pictures/Wallpapers -type f | shuf -n1)"


    Although I can see it has changed the value:



    myusername@mypcname:~$ gsettings get org.gnome.desktop.background picture-uri 'file:///home/myusername/Pictures/Wallpapers/Horex-VR6-Cafe-Racer-33-LTD-2014-1920x1080-001.jpg'


    How do I get it working?










    share|improve this question





























      2













      2









      2


      2






      I have just installed Mate DE on Ubuntu 16.10. I want to change my desktop background automatically after each login. On LXDE this was done easily with immediate effect (sleep just for autoload after desktop is loaded) with the next command:



      bash -c 'sleep 5; pcmanfm -w "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"'


      This is, of course, not working on Mate. I get this error:



      Desktop manager is not active.


      The only solutions I get for Mate involve mateconftool-2, which I do not have installed and it looks like it is deprecated. It should be replaced by something else, probably gconftool-2 or gsettings.



      Just replacing the following mateconftool-2 command by gconftool-2 (this is from a few forums' posts I've read) does nothing:



      mateconftool-2 -t string -s /desktop/mate/background/picture_filename $(find ~/Pictures/Wallpapers -type f | shuf -n1)


      The gsettings command is accepted, but doesn't change the actual picture:



      gsettings set org.gnome.desktop.background picture-uri "file://$(find ~/Pictures/Wallpapers -type f | shuf -n1)"


      Although I can see it has changed the value:



      myusername@mypcname:~$ gsettings get org.gnome.desktop.background picture-uri 'file:///home/myusername/Pictures/Wallpapers/Horex-VR6-Cafe-Racer-33-LTD-2014-1920x1080-001.jpg'


      How do I get it working?










      share|improve this question
















      I have just installed Mate DE on Ubuntu 16.10. I want to change my desktop background automatically after each login. On LXDE this was done easily with immediate effect (sleep just for autoload after desktop is loaded) with the next command:



      bash -c 'sleep 5; pcmanfm -w "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"'


      This is, of course, not working on Mate. I get this error:



      Desktop manager is not active.


      The only solutions I get for Mate involve mateconftool-2, which I do not have installed and it looks like it is deprecated. It should be replaced by something else, probably gconftool-2 or gsettings.



      Just replacing the following mateconftool-2 command by gconftool-2 (this is from a few forums' posts I've read) does nothing:



      mateconftool-2 -t string -s /desktop/mate/background/picture_filename $(find ~/Pictures/Wallpapers -type f | shuf -n1)


      The gsettings command is accepted, but doesn't change the actual picture:



      gsettings set org.gnome.desktop.background picture-uri "file://$(find ~/Pictures/Wallpapers -type f | shuf -n1)"


      Although I can see it has changed the value:



      myusername@mypcname:~$ gsettings get org.gnome.desktop.background picture-uri 'file:///home/myusername/Pictures/Wallpapers/Horex-VR6-Cafe-Racer-33-LTD-2014-1920x1080-001.jpg'


      How do I get it working?







      command-line wallpaper ubuntu-mate






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 2 at 8:11









      user3140225

      2,7104 gold badges12 silver badges24 bronze badges




      2,7104 gold badges12 silver badges24 bronze badges










      asked Jan 1 '17 at 14:42









      uldicsuldics

      231 silver badge6 bronze badges




      231 silver badge6 bronze badges























          2 Answers
          2






          active

          oldest

          votes


















          0



















          You can do something like that



          #!/bin/bash

          # images directory
          rep="/home/bernard/Images/FdsEcran"

          # Create image list from directory
          liste=("$rep/"*)

          # Compute the number of images
          nbre=$#liste[@]

          # Random select
          selection=$(($RANDOM % $nbre))

          # Image loading
          gsettings set org.mate.background picture-filename $liste[$selection]





          share|improve this answer



























          • Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

            – uldics
            Nov 4 at 19:55











          • Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

            – uldics
            Nov 16 at 18:38



















          5



















          You can use the dconf tool for this.



          For example:



          dconf write /org/mate/desktop/background/picture-filename "'PATH-TO-JPEG'"


          Note the quoting for the image filename/path. dconf expects a string so needs the single quotes, and your shell will need the double quotes to keep the single quotes.






          share|improve this answer



























          • works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

            – Alan Franzoni
            Oct 1 '18 at 11:49












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );














          draft saved

          draft discarded
















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f866777%2fhow-to-change-desktop-background-on-mate-with-a-command%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown


























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0



















          You can do something like that



          #!/bin/bash

          # images directory
          rep="/home/bernard/Images/FdsEcran"

          # Create image list from directory
          liste=("$rep/"*)

          # Compute the number of images
          nbre=$#liste[@]

          # Random select
          selection=$(($RANDOM % $nbre))

          # Image loading
          gsettings set org.mate.background picture-filename $liste[$selection]





          share|improve this answer



























          • Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

            – uldics
            Nov 4 at 19:55











          • Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

            – uldics
            Nov 16 at 18:38
















          0



















          You can do something like that



          #!/bin/bash

          # images directory
          rep="/home/bernard/Images/FdsEcran"

          # Create image list from directory
          liste=("$rep/"*)

          # Compute the number of images
          nbre=$#liste[@]

          # Random select
          selection=$(($RANDOM % $nbre))

          # Image loading
          gsettings set org.mate.background picture-filename $liste[$selection]





          share|improve this answer



























          • Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

            – uldics
            Nov 4 at 19:55











          • Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

            – uldics
            Nov 16 at 18:38














          0















          0











          0









          You can do something like that



          #!/bin/bash

          # images directory
          rep="/home/bernard/Images/FdsEcran"

          # Create image list from directory
          liste=("$rep/"*)

          # Compute the number of images
          nbre=$#liste[@]

          # Random select
          selection=$(($RANDOM % $nbre))

          # Image loading
          gsettings set org.mate.background picture-filename $liste[$selection]





          share|improve this answer
















          You can do something like that



          #!/bin/bash

          # images directory
          rep="/home/bernard/Images/FdsEcran"

          # Create image list from directory
          liste=("$rep/"*)

          # Compute the number of images
          nbre=$#liste[@]

          # Random select
          selection=$(($RANDOM % $nbre))

          # Image loading
          gsettings set org.mate.background picture-filename $liste[$selection]






          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Nov 3 at 15:33









          Marc Vanhoomissen

          1,0342 gold badges12 silver badges22 bronze badges




          1,0342 gold badges12 silver badges22 bronze badges










          answered Nov 3 at 13:30









          BernardBernard

          16




          16















          • Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

            – uldics
            Nov 4 at 19:55











          • Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

            – uldics
            Nov 16 at 18:38


















          • Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

            – uldics
            Nov 4 at 19:55











          • Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

            – uldics
            Nov 16 at 18:38

















          Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

          – uldics
          Nov 4 at 19:55





          Excellent! Thanks, this worked, both the Mate location and object in there were wrong for me before. This works now: gsettings set org.mate.background picture-filename "$(find ~/Pictures/Wallpapers -type f | shuf -n1)"

          – uldics
          Nov 4 at 19:55













          Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

          – uldics
          Nov 16 at 18:38






          Hmm, on Ubuntu 19.10 this actually only works when put in a terminal, but not from Mate autostart or from Mate panel Custom Application Launcher - it just changes to blue background, as if file not found. Any suggestions? Do I have a problem with those weird parentheses, or some environment variable must be set?

          – uldics
          Nov 16 at 18:38














          5



















          You can use the dconf tool for this.



          For example:



          dconf write /org/mate/desktop/background/picture-filename "'PATH-TO-JPEG'"


          Note the quoting for the image filename/path. dconf expects a string so needs the single quotes, and your shell will need the double quotes to keep the single quotes.






          share|improve this answer



























          • works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

            – Alan Franzoni
            Oct 1 '18 at 11:49















          5



















          You can use the dconf tool for this.



          For example:



          dconf write /org/mate/desktop/background/picture-filename "'PATH-TO-JPEG'"


          Note the quoting for the image filename/path. dconf expects a string so needs the single quotes, and your shell will need the double quotes to keep the single quotes.






          share|improve this answer



























          • works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

            – Alan Franzoni
            Oct 1 '18 at 11:49













          5















          5











          5









          You can use the dconf tool for this.



          For example:



          dconf write /org/mate/desktop/background/picture-filename "'PATH-TO-JPEG'"


          Note the quoting for the image filename/path. dconf expects a string so needs the single quotes, and your shell will need the double quotes to keep the single quotes.






          share|improve this answer
















          You can use the dconf tool for this.



          For example:



          dconf write /org/mate/desktop/background/picture-filename "'PATH-TO-JPEG'"


          Note the quoting for the image filename/path. dconf expects a string so needs the single quotes, and your shell will need the double quotes to keep the single quotes.







          share|improve this answer















          share|improve this answer




          share|improve this answer








          edited Oct 2 at 8:12









          user3140225

          2,7104 gold badges12 silver badges24 bronze badges




          2,7104 gold badges12 silver badges24 bronze badges










          answered Jul 25 '18 at 11:58









          TinkerTinker

          1511 silver badge3 bronze badges




          1511 silver badge3 bronze badges















          • works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

            – Alan Franzoni
            Oct 1 '18 at 11:49

















          • works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

            – Alan Franzoni
            Oct 1 '18 at 11:49
















          works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

          – Alan Franzoni
          Oct 1 '18 at 11:49





          works fine. please note the quoting in PATH-TO-JPEG: you need single-quotes (dconf syntax, I suppose) enclosed in double quotes (for bash).

          – Alan Franzoni
          Oct 1 '18 at 11:49


















          draft saved

          draft discarded















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f866777%2fhow-to-change-desktop-background-on-mate-with-a-command%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown









          Popular posts from this blog

          Tamil (spriik) Luke uk diar | Nawigatjuun

          Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

          Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?