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

Document xsel and xclip as dependencies on Linux #4036

Open
dessant opened this issue Feb 26, 2016 · 16 comments
Open

Document xsel and xclip as dependencies on Linux #4036

dessant opened this issue Feb 26, 2016 · 16 comments

Comments

@dessant
Copy link
Contributor

dessant commented Feb 26, 2016

I could not find a reference about them in the docs.

Is a cut buffer provider critical? Couldn't we just skip the feature when these deps are not present?

if platform == 'linux':

@janssen
Copy link
Contributor

janssen commented Jul 7, 2016

What's more, kivy_options doesn't have a "cutbuffer" section, so you can't override it with an environment variable.

@stale
Copy link

stale bot commented Oct 7, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 7, 2017
@benelgiac
Copy link

Well, this still happens in kivy 1.10, at least for me so it probably should be solved

`[INFO ] [OSC ] using for socket
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'4.5.0 NVIDIA 28.1.0'>
[INFO ] [GL ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO ] [GL ] OpenGL renderer <b'NVIDIA Tegra X1 (nvgpu)/integrated'>
[INFO ] [GL ] OpenGL parsed version: 4, 5
[INFO ] [GL ] Shading version <b'4.50 NVIDIA'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Clipboard ] Provider: gtk3(['clipboard_dbusklipper'] ignored)
[CRITICAL] [Cutbuffer ] Unable to find any valuable Cutbuffer provider.
xclip - FileNotFoundError: [Errno 2] No such file or directory: 'xclip'
File "/usr/lib/python3/dist-packages/kivy/core/init.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python3/dist-packages/kivy/core/clipboard/clipboard_xclip.py", line 17, in
p = subprocess.Popen(['xclip', '-version'], stdout=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)

xsel - FileNotFoundError: [Errno 2] No such file or directory: 'xsel'
File "/usr/lib/python3/dist-packages/kivy/core/init.py", line 59, in core_select_lib
fromlist=[modulename], level=0)
File "/usr/lib/python3/dist-packages/kivy/core/clipboard/clipboard_xsel.py", line 16, in
p = subprocess.Popen(['xsel'], stdout=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
`

@dessant dessant removed the stale label May 13, 2018
@vkrntgtm
Copy link

I am working on Kivy==1.10.1 and python==3.6. Same problem. Can it be solved???

@GeorgeCiesinski
Copy link

Kivy==1.11.1, Python 3.7, and I am also experiencing this issue. Odd, doesn't seem to affect my app, but it is concerning to see these errors.

@AndiEcker
Copy link
Contributor

AndiEcker commented Jan 3, 2020

Same here on a fresh Ubuntu without the xsel/xclip apt-get packages. Didn't find any SDL package in the Ubuntu repos that mentions SDL clipboard support.

Kivy App Log (removed some irrelevant DEBUG message):

`[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/home/andi/.pyenv/versions/kivy_env/lib/python3.6/site-packages/kivy/init.py"
[INFO ] [Python ] v3.6.9 (default, Aug 28 2019, 15:54:20)
[GCC 7.4.0]
[INFO ] [Python ] Interpreter at "/home/andi/.pyenv/versions/kivy_env/bin/python"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[DEBUG ] [Window ] Ignored <egl_rpi> (import error)
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'3.0 Mesa 19.0.8'>
[INFO ] [GL ] OpenGL vendor <b'Intel Open Source Technology Center'>
[INFO ] [GL ] OpenGL renderer <b'Mesa DRI Intel(R) Ivybridge Mobile '>
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <b'1.30'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Text ] Provider: sdl2
[DEBUG ] [Base ] Create provider from mouse
[DEBUG ] [Base ] Create provider from probesysfs
[DEBUG ] [ProbeSysfs ] using probesysfs!
[DEBUG ] [ProbeSysfs ] found device: SynPS/2 Synaptics TouchPad at /dev/input/event8
[INFO ] [ProbeSysfs ] device match: /dev/input/event8
[INFO ] [MTD ] Read event from </dev/input/event8>
[INFO ] [Base ] Start application main loop
[INFO ] [GL ] NPOT texture support is available
[INFO ] [MTD ] </dev/input/event8> range position X is 1268 - 5674
[INFO ] [MTD ] </dev/input/event8> range position Y is 1098 - 4754
[INFO ] [MTD ] </dev/input/event8> range touch major is 0 - 0
[INFO ] [MTD ] </dev/input/event8> range touch minor is 0 - 0
[INFO ] [MTD ] </dev/input/event8> range pressure is 0 - 255
[INFO ] [MTD ] </dev/input/event8> axes invertion: X is 0, Y is 0
[INFO ] [MTD ] </dev/input/event8> rotation set to 0
[INFO ] [Clipboard ] Provider: sdl2(['clipboard_xclip', 'clipboard_xsel', 'clipboard_dbusklipper', 'clipboard_gtk3'] ignored)
[CRITICAL] [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': 'xclip'
File "/home/andi/.pyenv/versions/kivy_env/lib/python3.6/site-packages/kivy/core/init.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/home/andi/.pyenv/versions/kivy_env/lib/python3.6/site-packages/kivy/core/clipboard/clipboard_xclip.py", line 17, in
p = subprocess.Popen(['xclip', '-version'], stdout=subprocess.PIPE)
File "/home/andi/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/home/andi/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)

xsel - FileNotFoundError: [Errno 2] No such file or directory: 'xsel': 'xsel'
File "/home/andi/.pyenv/versions/kivy_env/lib/python3.6/site-packages/kivy/core/init.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/home/andi/.pyenv/versions/kivy_env/lib/python3.6/site-packages/kivy/core/clipboard/clipboard_xsel.py", line 16, in
p = subprocess.Popen(['xsel'], stdout=subprocess.PIPE)
File "/home/andi/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 729, in init
restore_signals, start_new_session)
File "/home/andi/.pyenv/versions/3.6.9/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
`

@osm3000
Copy link

osm3000 commented Apr 10, 2020

Same exact message for me as well

@jgirardet
Copy link

same thing. python 3.7 on kubuntu 19.10
also affects 2.0.0rc3

@elijahlau
Copy link

[INFO ] [Clipboard ] Provider: sdl2(['clipboard_xclip', 'clipboard_xsel', 'clipboard_dbusklipper', 'clipboard_gtk3'] ignored)
[CRITICAL] [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': 'xclip'
File "/home/eli/Desktop/guess/venv/lib/python3.7/site-packages/kivy/core/init.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/home/eli/Desktop/guess/venv/lib/python3.7/site-packages/kivy/core/clipboard/clipboard_xclip.py", line 17, in
p = subprocess.Popen(['xclip', '-version'], stdout=subprocess.PIPE)
File "/usr/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)

xsel - FileNotFoundError: [Errno 2] No such file or directory: 'xsel': 'xsel'
File "/home/eli/Desktop/guess/venv/lib/python3.7/site-packages/kivy/core/init.py", line 63, in core_select_lib
fromlist=[modulename], level=0)
File "/home/eli/Desktop/guess/venv/lib/python3.7/site-packages/kivy/core/clipboard/clipboard_xsel.py", line 16, in
p = subprocess.Popen(['xsel'], stdout=subprocess.PIPE)
File "/usr/lib/python3.7/subprocess.py", line 800, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)

same for me

@jgirardet
Copy link

fixed with apt -get install xclip
https://github.com/jgirardet/mydevoirs/blob/4bfb9bbaf547e06ccffd524effa3eab02a50109c/.github/workflows/test_and_build.yml#L39

@EliDutu
Copy link

EliDutu commented Sep 16, 2021

sudo apt-get install -y xclip
will fix it

@Shudh
Copy link

Shudh commented Feb 28, 2023

image
Well this still happens on

Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

@beauxq
Copy link

beauxq commented Apr 15, 2023

This is still an issue.

If kivy depends on xsel and xclip, that installation should happen automatically when someone does pip install kivy

@misl6
Copy link
Member

misl6 commented Apr 15, 2023

Hi @beauxq !

Cutbuffer is not essential, neither are xclip or xsel:

if CutBuffer:
Logger.info('CutBuffer: cut buffer support enabled')

Can you confirm that even if the critical error (which I agree is not great) is shown, the app works just fine?

@beauxq
Copy link

beauxq commented Apr 15, 2023

Yes, I see now. I had an app crash and I saw the xsel and xclip messages, and I thought they were related to the crash.
I see now that those messages are not related to the crash that I had.

@wileur
Copy link

wileur commented Mar 18, 2024

Workaround for pure wayland installations where xsel and xclip are not available at all, like Yocto/Poky on imx8mm:

# Create fake xsel to make Kivy error message go away
# Run as root, and make sure you don't already have xsel installed, as it will be overwritten
echo "#!/bin/bash" > /usr/bin/xsel
chmod +x /usr/bin/xsel

This creates an empty, executable script that gets rid of the error message. It doesn't solve the copy/paste Cutbuffer issue. But my embedded device has no need for cut and paste.

The point is that Kivy is looking for anything executable named xsel, and will be very happy as long as it is in the path.

For simplicity in Yocto I put this script in the /etc/rc.local but it is enough to create it once.

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

No branches or pull requests