2023/02/19 09:52
把昨天的打印机配置方法整理一下,然后把MacMini上的打印机删除掉,最后在这里的AlamLinux上的打印机开启Air Print。
参考文献:https://www.linuxbabe.com/redhat/cups-print-server-centos-8-bounjour-ipp-samba-airprint
dnf install cups
vi /etc/cups/cupsd.conf
# Listen localhost:631
Port 631
Browsing On
<Location />
Order allow,deny
Allow @LOCAL
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# 安装HP打印机打印支持
dnf install hplip
# dnf install gutenprint-cups
访问:http://172.25.25.150:631/设置打印机
# 设置默认打印机
lpstat -p -d
# 打印文件
lp file.txt
AirPrint目前也设置成功,虽然可以选择双面,但是只有单面的时候可以打印成功。
参考文章中让使用python2,但是实际操作时使用python3也可以正常运行,并能成功添加服务文件。简单记录下操作
wget https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
dnf install gcc python3-devel cups-devel redhat-rpm-config
pip install cups pycups
./airprint-generate.py -d /etc/avahi/services/
ls /etc/avahi/services/
systemctl restart avahi-daemon
就是每次打印照片都需要按一下OK
,稍微有一点麻烦,可能还是纸盒没有能选好。但是不知道选哪个了……
每次都按OK的问题也解决掉了,是过多的设置了纸盒,80g的纸也还是用PLAIN即可,不然每次都要选择。
然后记录下命令行启动虚拟机的脚本:
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start "C:\Users\ZhuangBin.FLASHIELD\Documents\Virtual Machines\AlmaLinux9\AlmaLinux9.vmx" nogui
2023年02月19日