l3ib / nitrogen

Background browser and setter for X windows.
http://projects.l3ib.org/nitrogen
GNU General Public License v2.0
360 stars 38 forks source link

Does not change wallpaper on ArcoLinux Xfce anymore #121

Open arcolinuxz opened 6 years ago

arcolinuxz commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Ah, there's some unrelease commits in master that may have this fixed: f6a0690b5154dfa650b463b39e96893be6c27a83, 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.

arcolinuxz commented 6 years ago

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 commented 6 years ago

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

arcolinuxz commented 6 years ago

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

arcolinuxz commented 6 years ago

can i help you any more?

arcolinuxz commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

arcolinuxz commented 6 years ago

any progress on this issue?

daf commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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

daf commented 6 years ago

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 commented 6 years ago

@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).

erikdubois commented 5 years ago

Any progress on this issue - keeping track of things

daf commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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)

erikdubois commented 5 years ago

gdb

This is the result

erikdubois commented 5 years ago

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

erikdubois commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago
(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 commented 5 years ago

Hope it helps

daf commented 5 years ago

Hit Return for more of the stack please!

On Sat, Dec 8, 2018, 1:22 PM arcolinuxz <notifications@github.com wrote:

Hope it helps

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/l3ib/nitrogen/issues/121#issuecomment-445479340, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN9a6OzMVrvgUgwx6zu2DFlNWjTrDx2ks5u3ANjgaJpZM4VSOFM .

arcolinuxz commented 5 years ago
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 commented 5 years ago

Great, thanks!

On Sat, Dec 8, 2018, 1:37 PM arcolinuxz <notifications@github.com wrote:

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::deallocate(char*, unsigned long) (this=0x5555556f5e00, p=)

at /usr/include/c++/8.2.1/ext/new_allocator.h:116

6 0x0000555555574bbc in std::allocator_traits<std::allocator >::deallocate(std::allocator&, 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, std::allocator >::_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, std::allocator >::_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, std::allocator >::~basic_string()

(this=0x5555556f5e00, __in_chrg=<optimized out>)
at /usr/include/c++/8.2.1/bits/basic_string.h:657

--Type 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, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&) (this=, 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

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/l3ib/nitrogen/issues/121#issuecomment-445480373, or mute the thread https://github.com/notifications/unsubscribe-auth/AAN9a53xxNiouGsQI8htxQfUBWW6vIEhks5u3AbegaJpZM4VSOFM .

daf commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

arcolinuxz commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Any progress on this issue?

zoeleu commented 3 years ago

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  ()