Cutbuffer: How to setup when no X11 installed on Linux

61 views
Skip to first unread message

Mauricio Vidal

unread,
Sep 13, 2022, 3:14:23 PM9/13/22
to Kivy users support
Hi all:

There are several messages here and GitHubs issues regarding the exception raised when xclip / xsel are not installed on Linux. It seems it is just a matter of installing those, like mentioned here: https://github.com/kivy/kivy/issues/4036 

However, in my case, my Linux does not have X11/Wayland installed. I have built my Linux with `buildroot` and I rely on SDL2 as a window provider.

While I don't understand most of Kivy's source code, I have found this: https://github.com/kivy/kivy/blob/master/kivy/core/clipboard/clipboard_sdl2.py,  but to me it is not clear that xclip, xsel and others are dropped for the linux platform when sdl2 is present.

Should be SDL2 clipboard be used at least when xclip/xsel are not present in Linux? How should I prevent Kivy from considering xclip/xsel when those are not present?

These are excerpts of the logs I get when my device starts running:

Sep 10 09:47:36 192.168.2.41 Text: Provider: sdl2(['text_pango'] ignored)
Sep 10 09:47:36 192.168.2.41 Window: Provider: sdl2
Sep 10 09:47:36 192.168.2.41 GL: Using the "OpenGL ES 2" graphics system
Sep 10 09:47:36 192.168.2.41 GL: Backend used <sdl2>
Sep 10 09:47:36 192.168.2.41 GL: OpenGL version <b'OpenGL ES 3.1 Mesa 21.3.8'>
Sep 10 09:47:36 192.168.2.41 GL: OpenGL vendor <b'Intel Open Source Technology Center'>
Sep 10 09:47:36 192.168.2.41 GL: OpenGL renderer <b'Mesa DRI Intel(R) HD Graphics (CHV)'>
Sep 10 09:47:36 192.168.2.41 GL: OpenGL parsed version: 3, 1
Sep 10 09:47:36 192.168.2.41 GL: Shading version <b'OpenGL ES GLSL ES 3.10'>
Sep 10 09:47:36 192.168.2.41 GL: Texture max size <16384>
Sep 10 09:47:36 192.168.2.41 GL: Texture max units <32>
Sep 10 09:47:36 192.168.2.41 Window: auto add sdl2 input provider
Sep 10 09:47:36 192.168.2.41 Window: virtual keyboard allowed, single mode, docked
Sep 10 09:47:42 192.168.2.41 Loading Splash screen
Sep 10 09:47:42 192.168.2.41 GL: NPOT texture support is available
Sep 10 09:47:42 192.168.2.41 Splash screen has been presented to the user
Sep 10 09:47:42 192.168.2.41 Screens loading has started
Sep 10 09:47:53 192.168.2.41 Screens loading has concluded

And this is for a moment later, when the exception is raised:

Sep 10 09:49:39 192.168.2.41 Clipboard: Provider: sdl2(['clipboard_xclip', 'clipboard_xsel', 'clipboard_dbusklipper', 'clipboard_gtk3'] ignored)
Sep 10 09:49:39 192.168.2.41 Cutbuffer: Unable to find any valuable Cutbuffer provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
xclip - FileNotFoundError: [Errno 2] No such file or directory: 'xclip'
File "/usr/lib/python3.10/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
File "<frozen importlib._bootstrap>", line 1129, in __import__
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 849, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/kivy/core/clipboard/clipboard_xclip.py", line 17, in <module>
File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child

xsel - FileNotFoundError: [Errno 2] No such file or directory: 'xsel'
File "/usr/lib/python3.10/site-packages/kivy/core/__init__.py", line 59, in core_select_lib
File "<frozen importlib._bootstrap>", line 1129, in __import__
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 849, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/kivy/core/clipboard/clipboard_xsel.py", line 16, in <module>
File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child


Reply all
Reply to author
Forward
0 new messages