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

OCRDesktop does not work on Wayland #8

Open
francescotissera1211 opened this issue Jul 26, 2023 · 7 comments
Open

OCRDesktop does not work on Wayland #8

francescotissera1211 opened this issue Jul 26, 2023 · 7 comments

Comments

@francescotissera1211
Copy link

Tested this on ArchLinux with kde Plasma 5.27.6, wayland session.
OCRDesktop does not work under Wayland.

Steps to reproduce:

  1. log in to a Wayland session.
  2. open a terminal and try the command: "ocrdesktop"
  3. the command will throw an error that I can't copy paste for some reason, but you'll get it none the less.

Expected results: OCRDesktop should work under Wayland as well, giving the user more flexibility of choice when it comes to display server.

Actual results: the program does not work under Wayland at all.

@ayushh2k
Copy link

ayushh2k commented Sep 8, 2023

(ocrdesktop:164631): Wnck-WARNING **: 16:55:54.496: libwnck is designed to work in X11 only, no valid display found [1] 164631 segmentation fault (core dumped) ocrdesktop

This is the error message

@chrys87
Copy link
Owner

chrys87 commented Sep 8, 2023

Howdy,

for wayward does currently no API equivalent to libwnck exist. Its used to get window size and position.

you might want to try -d parameter, it dors screenshot the ehole desktop instead the current window, so libwnck is not involved there. You might get better results in fullscreen the window you wanna OCR first.

cheers chrys

@ayushh2k
Copy link

ayushh2k commented Sep 8, 2023

is it possible to feed ocrdesktop a region of the screen using slurp, that might resolve the window size and position problem

@chrys87
Copy link
Owner

chrys87 commented Sep 8, 2023

Howdy,

sure, you can pass almost any image file or pdf using -f filename parameter

ocrdesktop -f /home/user/screenshot.png

but you can’t interact with the window then using the mouse emulation. OCRdesktop know than the imagedata of the window but not where it is located on screen.

@chrys87
Copy link
Owner

chrys87 commented Sep 8, 2023

Well if you find a way to get the window position, i can add a parameter to pass this values to OCRdesktop and activate mouse emulation with this information to be able to emulate clicks on right position.

@chrys87
Copy link
Owner

chrys87 commented Oct 21, 2024

well, in the meantime pipewire comes into plan. maybe we can resolve this issue asking pipewire for the screen content.

@ayushh2k
Copy link

sure, i've been using normcap recently and it does the job for wayland

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

3 participants