Describe the bug
Script fails to create the files that the terminal output says it did
To Reproduce
Steps to reproduce the behavior:
- Run
./OCR4Linux.sh
- Select any language
- No text went to clipboard
Expected behavior
No clipboard result. Ignore the The script has finished successfully. as it clearly is a default output and the script didn't check for errors properly. Actually, it didn't let me select the area to screenshot
Screenshots
Here's the terminal output instead:
[rinna@latitudee5440 ~/Desktop/OCR4Linux] (main)$ chmod +x OCR4Linux.sh
[rinna@latitudee5440 ~/Desktop/OCR4Linux] (main)$ ./OCR4Linux.sh
[2025-12-09 18:16:37] Checking required files and directories...
[2025-12-09 18:16:37] Fetching available languages for OCR selection...
[2025-12-09 18:16:40] Selected ALL languages: ara+eng+jpn+jpn_vert+osd
Error: HYPRLAND_INSTANCE_SIGNATURE not set! (is hyprland running?)
[2025-12-09 18:16:41] Screenshot saved to /home/rinna/Pictures/screenshots/screenshot_09122025_181637.jpg
Error: File '/home/rinna/Pictures/screenshots/screenshot_09122025_181637.jpg' not found
[2025-12-09 18:16:45] Text extraction completed successfully
./OCR4Linux.sh: line 235: /home/rinna/.config/OCR4Linux/output_text.txt: No such file or directory
opening db: please store something first
extracting id: input not prefixed with id
rm: cannot remove '/home/rinna/.config/OCR4Linux/output_text.txt': No such file or directory
[2025-12-09 18:16:45] The extracted text has been copied to the clipboard.
[2025-12-09 18:16:45] The script has finished successfully.
[2025-12-09 18:16:45] =====================================================================================================
Additional context
I checked my file manager for /home/rinna/Pictures/screenshots/screenshot_09122025_181637.jpg and /home/rinna/.config/OCR4Linux/output_text.txt and those indeed did not exist.
Describe the bug
Script fails to create the files that the terminal output says it did
To Reproduce
Steps to reproduce the behavior:
./OCR4Linux.shExpected behavior
No clipboard result. Ignore the
The script has finished successfully.as it clearly is a default output and the script didn't check for errors properly. Actually, it didn't let me select the area to screenshotScreenshots
Here's the terminal output instead:
Additional context
I checked my file manager for
/home/rinna/Pictures/screenshots/screenshot_09122025_181637.jpgand/home/rinna/.config/OCR4Linux/output_text.txtand those indeed did not exist.