termshot
termshot copied to clipboard
failed to enable RAW mode for stdin inappropriate ioctl for device
Docker File
FROM ubuntu
RUN wget https://github.com/homeport/termshot/releases/download/v0.2.2/termshot_0.2.2_linux_amd64.tar.gz
RUN tar -xf termshot_0.2.2_linux_amd64.tar.gz
RUN chmod +x termshot
RUN cp termshot /usr/bin COPY run.py run.py
CMD ["python3","run.py"]
run.py -
import os os.system("termshot -c -- ls") os.system("ls -lah")
Interesting. So far, I have no idea what that could be. Have to give it a try, so thanks for providing the environment.
I am facing the same issue. Environment - Arch, node application with typescript I face this error only when I try to execute termshot through an application and not directly through the terminal
I am curious, I had some ideas with regards to this issue, but no lead and sadly not enough time yet to fully dive into it. For sure, it is about the internal handling on the input stream that termshot
tries to parse to identify the SGRs I need for the colors. @Mannan-Goyal Could you explain how you execute termshot
. Is is like a command call like using the os/exec
package or similar?
I have tried using the exec/spawn methods that are included in the inbuilt 'child_process' package and I have also tried using the shelljs package also but I got the same error with all of them.
I'm facing this issue when launching termshot from crontab.
I can reproduce it now, I think:
$ termshot cat <<<'hello'
╭ failed to enable RAW mode for stdin
│ inappropriate ioctl for device
╵
Issue got closed with the merge of the PR. There will be a new release. Please let me know whether this fixed the issue for you.