Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

libc.so.6: version `GLIBC_2.34' not found (required by /var/run/host/bin/xprop) #12

Closed
tux-ware opened this issue May 10, 2022 · 4 comments

Comments

@tux-ware
Copy link

tux-ware commented May 10, 2022

Hello @bluesabre : )

All the commands listed below work in both "GNOME on Xorg" as well as in a default "Wayland" session on Fedora 36.

I wrote a couple of one-liner scripts to start GIMP with a dark bar and a VLC with Adwaita-Dark style, complemented by dark GTK bar on top : ) I experimented with xprop and xdotool, because Darkbar flatpak did not work for me. I hope you will find a way to integrate it, so we can use Darkbar flatpak with both Xorg and Wayland sessions on Fedora and other distros : )

Below are the notes from my experiments.

Cheers!

I have installed Darkbar on Fedora 36 via elementary flatpak repo.

[dave@fedora ~]$ flatpak list | grep -i darkbar
Darkbar	com.github.bluesabre.darkbar		stable	repo	system

When I launch Darkbar from terminal, it starts, but I am getting multiple "libc.so.6: version `GLIBC_2.34' not found..." messages:

[dave@fedora ~]$ flatpak run com.github.bluesabre.darkbar
Gtk-Message: 14:44:01.242: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:44:01.242: Failed to load module "pk-gtk-module"
Gtk-Message: 14:44:01.243: Failed to load module "canberra-gtk-module"
Gtk-Message: 14:44:01.243: Failed to load module "pk-gtk-module"
/var/run/host/bin/xprop: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /var/run/host/bin/xprop)
/var/run/host/bin/xprop: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /var/run/host/bin/xprop)
/var/run/host/bin/xprop: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /var/run/host/bin/xprop)

I have glibc-2.35 installed, as well as xprop and other x-related tools:

[dave@fedora ~]$ dnf info glibc.x86_64 | head
Last metadata expiration check: 0:00:43 ago on Tue 10 May 2022 03:15:57 PM CEST.
Installed Packages
Name         : glibc
Version      : 2.35
Release      : 5.fc36
Architecture : x86_64
Size         : 6.9 M
Source       : glibc-2.35-5.fc36.src.rpm
Repository   : @System
From repo    : updates-testing

[dave@fedora ~]$ which xdotool xprop xwininfo
/usr/bin/xdotool
/usr/bin/xprop
/usr/bin/xwininfo

I wanted to have my GIMP with a dark bar at the top, so I started to experiment with xprop:

# below commands will wait for pointing and clicking some window with a mouse
xprop  -f _GTK_THEME_VARIANT 8u  -set _GTK_THEME_VARIANT  dark
xprop  -f _GTK_THEME_VARIANT 8u  -set _GTK_THEME_VARIANT  light

The xprop command can set various properties directly (without mouse), based on the window-id or window-name. It did not work for me with the -name option though, so I tried with -id option, and it worked as expected:

# xwininfo will wait for pointing and clicking some window with a mouse
xwininfo
xwininfo      | grep 'id: ' | cut -d' ' -f4
xwininfo -int | grep 'id: ' | cut -d' ' -f4

# xdotool can find window ID without using the mouse
xdotool search --onlyvisible --class gimp
xdotool search --onlyvisible --name "GNU Image Manipulation Program" 

Once I had a way to find window ID with xdotool, I combined it with xprop:

xprop  -f _GTK_THEME_VARIANT 8u  -id $( xdotool search --onlyvisible --class gimp )  -set _GTK_THEME_VARIANT  dark
xprop  -f _GTK_THEME_VARIANT 8u  -id $( xdotool search --onlyvisible --class gimp )  -set _GTK_THEME_VARIANT  light

xprop  -f _GTK_THEME_VARIANT 8u  -id $( xdotool search --onlyvisible --name "GNU Image Manipulation Program" )  -set _GTK_THEME_VARIANT  dark
xprop  -f _GTK_THEME_VARIANT 8u  -id $( xdotool search --onlyvisible --name "GNU Image Manipulation Program" )  -set _GTK_THEME_VARIANT  light

The above commands need to run after the GIMP has started. On my laptop it starts in under 2 seconds, so I wrote a one-liner:

# start GIMP in the background (&), get the main window ID and set _GTK_THEME_VARIANT with xprop command

gimp  &  sleep 2  &&  ID=$( xdotool search --onlyvisible --class gimp )  &&  xprop  -f _GTK_THEME_VARIANT 8u  -id $ID  -set _GTK_THEME_VARIANT  dark

gimp  &  sleep 2  &&  ID=$( xdotool search --onlyvisible --name "GNU Image Manipulation Program" )  &&  xprop  -f _GTK_THEME_VARIANT 8u  -id $ID  -set _GTK_THEME_VARIANT  dark

You can run VLC in a similar fashion, but as it starts almost instantly, it is enough to use the --sync option and skip sleeping:

# sudo dnf install adwaita-qt5 (provides Adwaita-Dark style)

QT_STYLE_OVERRIDE=Adwaita-Dark  vlc  &  ID=$( xdotool search --sync --onlyvisible --class vlc )  &&  xprop  -f _GTK_THEME_VARIANT 8u  -id $ID  -set _GTK_THEME_VARIANT  dark

QT_STYLE_OVERRIDE=Adwaita-Dark  vlc  &  ID=$( xdotool search --sync --onlyvisible --name "VLC media player" )  &&  xprop  -f _GTK_THEME_VARIANT 8u  -id $ID  -set _GTK_THEME_VARIANT  dark
@bluesabre
Copy link
Owner

Thanks for this! I'll experiment with it and see if I can get it working.

@bluesabre
Copy link
Owner

It's coming along nicely! Right now it's working sometimes (and crashing more than anything), but I should be able to clean that up in the next few days.

#13

https://www.youtube.com/watch?v=Wf8v02X2btM

@bluesabre
Copy link
Owner

The branch is now working completely without crashing. Thanks for the tips on adding Wayland support! I've got a bit more work to do to ensure that support carries over to Wayland, but this is otherwise done.

@bluesabre
Copy link
Owner

GLIBC_2.34 error fixed and Wayland support added in main!

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

No branches or pull requests

2 participants