Blog background
The author has always wanted to understand how to use the Print
command under Linux?
Direct Print hello. TXT
will report an error
Error: no "print" mailcap rules found for type "text/plain"
Specific operation
ubuntu@139:~/temp $ cat /etc/mailcap | egrep print
application/x-troff-man; /usr/bin/nroff -mandoc -Tutf8; copiousoutput; print=/usr/bin/nroff -mandoc -Tutf8 | print text/plain:-
text/troff; /usr/bin/nroff -mandoc -Tutf8; copiousoutput; print=/usr/bin/nroff -mandoc -Tutf8 | print text/plain:-
text/plain; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; print=cat %s; needsterminal
application/x-tar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
application/x-gtar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
application/x-ustar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
ubuntu@139:~/temp $ ls
hello hi.txt
ubuntu@139:~/temp $ cat hi.txt
hello
ubuntu@139:~/temp $ print hi.txt
hello
This is the situation after I edit the mailcap file. Pay attention to this line
text/plain; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; print=cat %s; needsterminal
That is, just add a print command rule after text/plain, which is so simple.
Read More:
- No devices detected Fatal server error no screens found
- linux Ubuntu Error: No command ‘setenv‘ found
- print(size_t) Format (You Need to Know)
- [Solved] configure: error: no acceptable C compiler found in $PATH
- [Solved] ERROR: No matching distribution found for tkinter
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”
- [Solved] Raspberry Pi Error: VNC error “No configured security type is supported by 3.3 VNC Viewer“
- /usr/bin/ssh-copy-id: ERROR: No identities found [How to Solve]
- [Solved] configure:error:no acceptable C compiler found in $PATH
- Sublime text 3 compiles and executes C/C++ programs directly
- [Solved] ubuntu Run jupyter Error: print(‘Error in generated code:‘, file=sys.stderr) SyntaxError: invalid syntax
- C#: How to get the value or text value of the select drop-down list
- [Solved] Error: Connection activation failed: No suitable device found for this connection.
- [Solved] KVM Failed to Startup Error: error: Network not found: no network with matching name ‘default‘
- scp Command: Unable to negotiate with xxx.xx.xx.xx port 22: no matching cipher found.
- Linux Error: CMake Error in CMakeLists.txt: No CMAKE_CXX_COMPILER could be found.
- [Solved] ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
- [Solved] Centos7 Error: gcc: configure: error: in build‘: configure: error: no acceptable C compiler found in $PATH
- [Solved] ImportError:lib***.so–cannot open shared object file: No such…(pycharm/clion Error but shell No Error)
- [Solved] Linux gcc Compile Error: unknown type name ‘bool‘