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;
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
add a comment
|
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
add a comment
|
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
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
command-line wallpaper ubuntu-mate
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
add a comment
|
add a comment
|
2 Answers
2
active
oldest
votes
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]
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
add a comment
|
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.
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
add a comment
|
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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]
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
add a comment
|
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]
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
add a comment
|
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]
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]
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
add a comment
|
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
add a comment
|
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.
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
add a comment
|
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.
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
add a comment
|
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.
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.
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
add a comment
|
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
add a comment
|
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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