Page 1 of 1

Linux: can't set wallpaper

Posted: Thu Apr 03, 2014 3:12 pm
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.

Re: Linux: can't set wallpaper

Posted: Fri Apr 04, 2014 11:12 am
by xnview
yes not implemented for MATE desktop

Re: Linux: can't set wallpaper

Posted: Mon Apr 07, 2014 6:35 am
by djcj
Which desktop environments does it actually support?

Re: Linux: can't set wallpaper

Posted: Mon Apr 07, 2014 9:57 am
by xnview
gnome, xfce, kde, fvwm

Re: Linux: can't set wallpaper

Posted: Fri Aug 15, 2014 12:39 am
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

Re: Linux: can't set wallpaper

Posted: Tue Nov 04, 2014 6:48 pm
by BirsebaTheMage
Ubuntu, Unity not supported? Is there way around this? :|

Re: Linux: can't set wallpaper

Posted: Thu Jan 01, 2015 3:04 pm
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?

Re: Linux: can't set wallpaper

Posted: Tue Apr 11, 2017 8:23 pm
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.

Re: Linux: can't set wallpaper

Posted: Sat Sep 14, 2024 8:32 pm
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

Re: Linux: can't set wallpaper

Posted: Sat Sep 14, 2024 8:37 pm
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"