Linux: can't set wallpaper

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
djcj
Posts: 60
Joined: Wed Jan 08, 2014 3:37 pm

Linux: can't set wallpaper

Post by djcj »

This issue doesn't seem to be new: http://newsgroup.xnview.com/viewtopic.p ... er#p108215

When I had the console open while trying to save as wallpaper I couldn't find anything unusual. It just shows "####update menu####" after each try. I'm a bit curious how that's supposed to work anyway, since I assume that each desktop environment saves their wallpaper location in a different configuration file. Maybe the menu entry should be removed until someone had found a solution?

I'm using MATE desktop environment by the way.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: can't set wallpaper

Post by xnview »

yes not implemented for MATE desktop
Pierre.
djcj
Posts: 60
Joined: Wed Jan 08, 2014 3:37 pm

Re: Linux: can't set wallpaper

Post by djcj »

Which desktop environments does it actually support?
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Linux: can't set wallpaper

Post by xnview »

gnome, xfce, kde, fvwm
Pierre.
djcj
Posts: 60
Joined: Wed Jan 08, 2014 3:37 pm

Re: Linux: can't set wallpaper

Post by djcj »

I figured out how to set the wallpaper for MATE in console:

Code: Select all

gsettings set org.mate.background picture-filename /usr/share/backgrounds/linuxmint/default_background.jpg
To display it zoomed, stretched or whatever:

Code: Select all

gsettings set org.mate.background picture-options wallpaper
gsettings set org.mate.background picture-options zoom
gsettings set org.mate.background picture-options centered
gsettings set org.mate.background picture-options scaled
gsettings set org.mate.background picture-options stretched
gsettings set org.mate.background picture-options spanned
BirsebaTheMage
Posts: 1
Joined: Tue Nov 04, 2014 6:45 pm

Re: Linux: can't set wallpaper

Post by BirsebaTheMage »

Ubuntu, Unity not supported? Is there way around this? :|
djcj
Posts: 60
Joined: Wed Jan 08, 2014 3:37 pm

Re: Linux: can't set wallpaper

Post by djcj »

BirsebaTheMage wrote:Ubuntu, Unity not supported? Is there way around this? :|
On Unity it seems to be almost the same as in MATE:

Code: Select all

gsettings set org.gnome.desktop.background picture-uri /usr/share/backgrounds/linuxmint/default_background.jpg
I don't use Unity or Gnome so I can't test this. Can you confirm that this works for you?
Juebo
Posts: 1
Joined: Tue Apr 11, 2017 7:54 pm

Re: Linux: can't set wallpaper

Post by Juebo »

xnview wrote:gnome, xfce, kde, fvwm
Well, xfce is not supported at all (0.85)
I worked around this problem by calling a shell script "File - Open with - setwp" were "setwp" calls

Code: Select all

xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/$workspace/last-image -s $Out
were
$Out is path and name of the modified and rescaled wallpaper and
$workspace is then name of workspace ie workspace0

Active workspace can be asked with

Code: Select all

ws=$(xprop -root |grep "_NET_CURRENT_DESKTOP(CARDINAL)"|sed 's/[^0-9]*//')
$ws is 0 or 1 or something

Because the name "monitor0" changes from time to time (on notebooks it might be LVDS1) it would generaly be a good idea to handle this with a script.
manuel_songokuh
Posts: 65
Joined: Wed Aug 28, 2024 11:09 am

Re: Linux: can't set wallpaper

Post by manuel_songokuh »

xnview wrote: Mon Apr 07, 2014 9:57 am gnome, xfce, kde, fvwm
hi this Topic is important to be back here:
https://www.xnview.com/mantisbt/view.php?id=523


i did testing: linux KDE Plasma 5.27, not work "set a Wallpaper" so i can help you for KDE Plasma / Gnome:

but i suggest you (pierre) file original AAA.PNG makes it to copy and convert it in JPG : BBB.jpg (note: this important to convert it in JPG because maybe people can use file RAW so file is big.. so will can convert for wallpaper light file)

plus make it file hidden: .BBB.jpg (example)
now i write here script for command linux:

Code: Select all

first copy file and keep hide:
%u= select a File image will be set wallpaper

# # make it copy file image and make it file mode hidden
command= cp %u "$HOME/.xnviewmp-set-wallpaper.jpg"

for KDE plasma 5:
command= qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = "org.kde.image";d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");d.writeConfig("Image", "%u")}';


GNOME:
command= gsettings set org.gnome.desktop.background picture-uri "file://$HOME/.xnviewmp-set-wallpaper.jpg"
or if you want to place to user/config:
.xnviewmp-set-wallpaper.jpg to .config/xnviewmp/xnviewmp-set-wallpaper.jpg


i hope this fix will be helpful to Pierre xnviewmp
manuel_songokuh
Posts: 65
Joined: Wed Aug 28, 2024 11:09 am

Re: Linux: can't set wallpaper

Post by manuel_songokuh »

if want to add Lock screen for kde plasma:

Code: Select all

kwriteconfig5 --file ~/.config/kscreenlockerrc --group Greeter --group Wallpaper --group org.kde.image --group General --key Image "%u"
Post Reply