Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Does not change wallpaper on ArcoLinux Xfce anymore #121

Open
arcolinuxz opened this issue Jul 17, 2018 · 38 comments
Open

Does not change wallpaper on ArcoLinux Xfce anymore #121

arcolinuxz opened this issue Jul 17, 2018 · 38 comments
Milestone

Comments

@arcolinuxz
Copy link

ArcoLinux/ Arch Linux has this Xfce custom shortcut to set the wallpaper on Xfce for single monitor and dual monitor

nitrogen --save --set-zoom-fill --head=0 %f && nitrogen --set-zoom-fill --head=1 %f

I have been looking into it but can not seem to fix this.
This is what happens in the terminal

[erik@ArcoLinux Favorites]$ nitrogen --set-zoom-fill --save tb6ru.jpg 

(nitrogen:3828): GLib-GIO-ERROR **: 07:46:28.959: Settings schema 'org.gnome.desktop.background' does not contain a key named 'draw-background'
Trace/breakpoint trap (core dumped)

Like suggested in the title nitrogen did work in the past. Anything I can do to assist?

@daf
Copy link
Member

daf commented Jul 27, 2018

Hi @arcolinuxz - I thought we had fixed this issue, but it keeps popping up depending on user environments etc. Which version of Nitrogen are you running? I'm assuming it's Xfdesktop, which according to the current code path, shouldn't be attempting to set that flag at all. Can you xprop and click your desktop and paste the output please?

@daf
Copy link
Member

daf commented Jul 31, 2018

Ah, there's some unrelease commits in master that may have this fixed: f6a0690, or at the very least, won't crash anymore, not sure if it will set properly. If you have the means to try master, please do so and update here.

@daf daf added this to the 1.7 milestone Jul 31, 2018
@arcolinuxz
Copy link
Author

arcolinuxz commented Aug 30, 2018

This error is there with version 1.6.1-2 on Arch Linux.
When we install the git version on Arch Linux which is 1.6.1r306.d48ccb8-1 we do not get an error in the terminal BUT it does not set our wallpaper either on xfce. Same command as above.
Is the command correct?
nitrogen --set-zoom-fill --save tb6ru.jpg

@daf
Copy link
Member

daf commented Aug 30, 2018

Can you please paste the output of xprop -root as well as xprop followed by clicking what looks like the desktop window?

@arcolinuxz
Copy link
Author

Here it is : https://pastebin.com/Zjcq0REE

@arcolinuxz
Copy link
Author

can i help you any more?

@arcolinuxz
Copy link
Author

Can this help?
This is how variety sets the wallpaper
https://github.com/arcolinux/arcolinux-variety/blob/master/variety/scripts/set_wallpaper
Line 175

@daf
Copy link
Member

daf commented Aug 30, 2018

Looks like there are two separate issues for Nitrogen: it sees the NAUTILUS_DESKTOP_WINDOW_ID Atom set and says "yes, this is Nautilus!" and tries to set it via gsettings - this explains your initial issue with the draw-background.

The second issue is that while it has a pathway for detecting XFCE, it has no special handling for it - it's just trying to use the default X method, which must've been the way to do it at some point.

Thanks for the script, I'll look at adapting it.

@arcolinuxz
Copy link
Author

thanks - would be great if we can set our wallpaper again with a right mouse click (custom action in xfce in thunar)

@arcolinuxz
Copy link
Author

any progress on this issue?

@daf
Copy link
Member

daf commented Oct 6, 2018

@arcolinuxz I've pushed a new branch for XFCE support - appears to be working, multimonitor support too, on my local machine. If you can please try it, https://github.com/l3ib/nitrogen/tree/xfce.

I'll need to do more testing to make sure it handles other situations (single monitor, etc).

@arcolinuxz
Copy link
Author

Made some time to test this for you
[erik@ArcoLinux Desktoppr]$ nitrogen --save --set-zoom-fill --head=0 _145_-2018-09-04-1150.jpg && nitrogen --set-zoom-fill --head=1 _145_-2018-09-04-1150.jpg free(): invalid pointer Aborted (core dumped)
I am happy to report that setting a wallpaper is possibile again in xfce but just on the main screen. Screen 0 where the menu of xfce is. Not on screen 2.
What information do you need from me to be helpful?

@arcolinuxz
Copy link
Author

I can set both screens IF I use the nitrogen gui. Maybe that gives you a clue.

@daf
Copy link
Member

daf commented Oct 7, 2018

Thanks, that's helpful. I didn't test the command line, should likely be a simple fix. Will also need to test handling a single monitor or more complicated multimonitor setups (my work machine has three, I'll be back in on tuesday).

@daf
Copy link
Member

daf commented Oct 10, 2018

@arcolinuxz I can't reproduce the crash you're getting on the command line, sorry! If you're feeling adventurous you could ./configure --enable-debug && make clean && make, then use gdb:

gdb ./src/nitrogen
(gdb) run --save --set-zoom-fill --head=0 _145_-2018-09-04-1150.jpg

(after crash)
(gdb) bt
... paste this

I'm not totally happy with how the monitor detection works by just reading the configuration - laptop users or folks that change their display setups often will have ghost monitors in there, as I'm getting by simply disabling my screens via xrandr commands. I'll have to revise that method to cross correlate with info from Xinerama (since we laughably still don't have xrandr support).

@daf daf mentioned this issue Oct 31, 2018
@erikdubois
Copy link

Any progress on this issue - keeping track of things

@daf daf closed this as completed in #123 Nov 19, 2018
@daf
Copy link
Member

daf commented Nov 19, 2018

I'm pretty happy with the result in #123, if folks could test and report any issue either here or with new issues that would be great.

@erikdubois
Copy link

tested the latest version today

Setup
ArcoLinux Xfce with thunar custom actions with dual screen
left screen has xfce menu and panel - right screen empty - just wallpaper

Setting single screen custom action
nitrogen --save --set-zoom-fill --head=0 %f && nitrogen --set-zoom-fill --head=1 %f
left monitor changes wallpaper
right monitor does not change

Setting dual screen custom action (dual screen wallpapers)
nitrogen --save --set-zoom-fill %f
left monitor changes wallpaper
right monitor does not change
there is no zoom fill over the two screens
Partial success I would conclude.

With what code can we set also the second monitor

@daf
Copy link
Member

daf commented Dec 8, 2018

@erikdubois if you want it to span both screens, you need to use --head=-1 on the command line - -1 is the monitor "number" that means all screens.

@erikdubois
Copy link

This the code in the terminal.
Just one screen is set

[erik@ArcoLinux Desktoppr]$ nitrogen --save --set-zoom-fill --head=-1 1200_goldenfalls-1920.jpg 
free(): invalid pointer
Aborted (core dumped)

@daf
Copy link
Member

daf commented Dec 8, 2018

Thanks @erikdubois - could you please get a backtrace from this? (to do so: ./configure --enable-debug, make, gdb ./src/nitrogen, inside gdb run --save --set-zoom-fill --head=-1 /path/to/1200_goldenfalls-1920.jpg, then when it crashes, bt)

@daf daf reopened this Dec 8, 2018
@erikdubois
Copy link

gdb

This is the result

@erikdubois
Copy link

In the meantime I have been testing nitrogen-git from AUR 1.6.1r306.d48ccb8-1

@erikdubois
Copy link

That one seems to work already if you have one screen present.
May I suggest an official release if you feel it is ready for Arch Linux repo's.
It has been a while...

@daf
Copy link
Member

daf commented Dec 8, 2018

@erikdubois when you get that SIGABRT in gdb, issue the bt command (for a backtrace) - that'll give me a better idea why it's crashing there.

I think we are pretty close to a bugfix release but I'd like this to be fixed so we don't ship an immediate bug!

@arcolinuxz
Copy link
Author

(gdb) run --save --set-zoom-fill --head=-1 /home/erik/.config/variety/Downloaded/Desktoppr/1200_ohau-cliff-hawaii-trey-ratcliff.jpg 
Starting program: /home/erik/Desktop/nitrogen/src/nitrogen --save --set-zoom-fill --head=-1 /home/erik/.config/variety/Downloaded/Desktoppr/1200_ohau-cliff-hawaii-trey-ratcliff.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Detaching after fork from child process 22234]
free(): invalid pointer

Program received signal SIGABRT, Aborted.
0x00007ffff5b00d7f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff5b00d7f in raise () at /usr/lib/libc.so.6
#1  0x00007ffff5aeb672 in abort () at /usr/lib/libc.so.6
#2  0x00007ffff5b43878 in __libc_message () at /usr/lib/libc.so.6
#3  0x00007ffff5b4a18a in  () at /usr/lib/libc.so.6
#4  0x00007ffff5b4b97c in _int_free () at /usr/lib/libc.so.6
#5  0x0000555555574bbc in __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (this=0x5555556f5e00, __p=<optimized out>)
    at /usr/include/c++/8.2.1/ext/new_allocator.h:116
#6  0x0000555555574bbc in std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long)
    (__a=..., __n=<optimized out>, __p=<optimized out>)
    at /usr/include/c++/8.2.1/bits/alloc_traits.h:462
#7  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy(unsigned long)
    (__size=<optimized out>, this=0x5555556f5e00)
    at /usr/include/c++/8.2.1/bits/basic_string.h:226
#8  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() (this=0x5555556f5e00)
    at /usr/include/c++/8.2.1/bits/basic_string.h:221
#9  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
    (this=0x5555556f5e00, __in_chrg=<optimized out>)
    at /usr/include/c++/8.2.1/bits/basic_string.h:657
--Type <RET> for more, q to quit, c to continue without paging--

@arcolinuxz
Copy link
Author

Hope it helps

@daf
Copy link
Member

daf commented Dec 8, 2018 via email

@arcolinuxz
Copy link
Author

Program received signal SIGABRT, Aborted.
0x00007ffff5b00d7f in raise () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007ffff5b00d7f in raise () at /usr/lib/libc.so.6
#1  0x00007ffff5aeb672 in abort () at /usr/lib/libc.so.6
#2  0x00007ffff5b43878 in __libc_message () at /usr/lib/libc.so.6
#3  0x00007ffff5b4a18a in  () at /usr/lib/libc.so.6
#4  0x00007ffff5b4b97c in _int_free () at /usr/lib/libc.so.6
#5  0x0000555555574bbc in __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (this=0x5555556f5e00, __p=<optimized out>)
    at /usr/include/c++/8.2.1/ext/new_allocator.h:116
#6  0x0000555555574bbc in std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long)
    (__a=..., __n=<optimized out>, __p=<optimized out>)
    at /usr/include/c++/8.2.1/bits/alloc_traits.h:462
#7  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy(unsigned long)
    (__size=<optimized out>, this=0x5555556f5e00)
    at /usr/include/c++/8.2.1/bits/basic_string.h:226
#8  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose() (this=0x5555556f5e00)
    at /usr/include/c++/8.2.1/bits/basic_string.h:221
#9  0x0000555555574bbc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
    (this=0x5555556f5e00, __in_chrg=<optimized out>)
    at /usr/include/c++/8.2.1/bits/basic_string.h:657
--Type <RET> for more, q to quit, c to continue without paging--
#10 0x0000555555574bbc in SetBGXFCE::call_xfconf(Glib::ustring, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) (this=<optimized out>, disp=..., key=..., params=...)
    at SetBG.cc:1811
#11 0x00005555555820b1 in SetBGXFCE::set_bg(Glib::ustring&, Glib::ustring, SetBG::SetMode, Gdk::Color)
    (this=this@entry=0x5555556f41f0, disp=..., file=..., mode=mode@entry=SetBG::SET_ZOOM_FILL, bgcolor=...) at /usr/include/c++/8.2.1/bits/basic_string.h:252
#12 0x000055555557d34f in set_bg_once(Config*, SetBG*, Glib::ustring, int, SetBG::SetMode, bool, Gdk::Color, bool)
    (cfg=<optimized out>, bg_setter=0x5555556f41f0, path=..., head=-1, mode=SetBG::SET_ZOOM_FILL, save=<optimized out>, col=..., random=false) at main.cc:76
#13 0x000055555557b945 in main(int, char**)
    (argc=<optimized out>, argv=<optimized out>)
    at /usr/include/c++/8.2.1/bits/stl_map.h:1168

@daf
Copy link
Member

daf commented Dec 8, 2018 via email

@daf
Copy link
Member

daf commented Jan 16, 2019

I can't reproduce this on my machine, but took a guess at what it might be caused by, see 545376e - give it a shot when you get a chance, thank you!

@arcolinuxz
Copy link
Author

arcolinuxz commented Jan 17, 2019

Reopen please
Build today 17th january 2019 on this commit 545376e.
Build and installed myself from github. No issues noticed during build.

`[erik@ArcoLinux Extra]$ nitrogen --save --set-zoom-fill 110.jpg

(nitrogen:9579): GLib-GIO-ERROR **: 14:42:35.629: Settings schema 'org.gnome.desktop.background' does not contain a key named 'draw-background'
Trace/breakpoint trap (core dumped)
`

I am on ArcoLinux Xfce.

@arcolinuxz
Copy link
Author

I am going to check what happens if I am on ArcoLinuxB Gnome

@arcolinuxz
Copy link
Author

on gnome it works we get the same error BUT the wallpaper changes
`[erik@ArcoLinuxB arcolinux]$ nitrogen --save --set-zoom-fill --head=0 marco_arco_wallpaper_009-1920x1080.jpg

(nitrogen:6529): GLib-GIO-ERROR **: 15:06:13.631: Settings schema 'org.gnome.desktop.background' does not contain a key named 'draw-background'
Trace/breakpoint trap (core dumped)
[erik@ArcoLinuxB arcolinux]$
`

@arcolinuxz
Copy link
Author

This is the correct setting to have the same file on both screen (not stretched)

nitrogen --save --set-zoom --head=0 marco_arco_wallpaper_009-1920x1080.jpg && nitrogen --set-zoom --head=1 marco_arco_wallpaper_009-1920x1080.jpg

@arcolinuxz
Copy link
Author

I noticed we still have this issue open on our to-do list.
Can we set the wallpaper already on Xfce?
Did anything change?
Can I test anything.

@erikdubois
Copy link

Any progress on this issue?

@zoeleu
Copy link

zoeleu commented Jun 4, 2021

Same issue on vanilla Arch here.

(nitrogen:826737): GLib-GIO-ERROR **: 13:54:09.167: Settings schema 'org.gnome.desktop.background' does not contain a key named 'draw-background'

Thread 1 "nitrogen" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7eb9ba8 in g_log_structured_array ()
   from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0  0x00007ffff7eb9ba8 in g_log_structured_array ()
    at /usr/lib/libglib-2.0.so.0
#1  0x00007ffff7eb9e76 in g_log_default_handler ()
    at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff7ebb2b9 in g_logv () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff7ebb560 in g_log () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6eb9bd2 in  () at /usr/lib/libgio-2.0.so.0
#5  0x00007ffff6ebbbf1 in g_settings_set_value ()
    at /usr/lib/libgio-2.0.so.0
#6  0x000055555557ac75 in  ()
#7  0x000055555557e1bc in  ()
#8  0x0000555555591226 in  ()
#9  0x0000555555591e59 in  ()
#10 0x0000555555585dcd in  ()
#11 0x00007ffff7b8d043 in  () at /usr/lib/libgtkmm-2.4.so.1
#12 0x00007ffff7d5cddf in g_closure_invoke ()
    at /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff7d861d8 in  () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff7d79cad in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
#15 0x00007ffff7d7a210 in g_signal_emit ()
    at /usr/lib/libgobject-2.0.so.0
#16 0x00007ffff6843d0f in  () at /usr/lib/libgtk-x11-2.0.so.0
#17 0x00007ffff68670a8 in  () at /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007ffff7d5cddf in g_closure_invoke ()
    at /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff7d859cb in  () at /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff7d792db in g_signal_emit_valist ()
    at /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff7d7a210 in g_signal_emit ()
    at /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff698c275 in  () at /usr/lib/libgtk-x11-2.0.so.0
#23 0x00007ffff68656d6 in gtk_propagate_event ()
    at /usr/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff6865b4b in gtk_main_do_event ()
    at /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007ffff7e023be in  () at /usr/lib/libgdk-x11-2.0.so.0
#26 0x00007ffff7eb302c in g_main_context_dispatch ()
    at /usr/lib/libglib-2.0.so.0
#27 0x00007ffff7f06b59 in  () at /usr/lib/libglib-2.0.so.0
#28 0x00007ffff7eb2593 in g_main_loop_run ()
    at /usr/lib/libglib-2.0.so.0
#29 0x00007ffff68649fe in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#30 0x0000555555578781 in  ()
#31 0x00007ffff7096b25 in __libc_start_main () at /usr/lib/libc.so.6
#32 0x00005555555796fe in  ()

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants