0
点赞
收藏
分享

微信扫一扫

Memory augment is All You Need for image restoration 论文翻译

7dcac6528821 2024-04-29 阅读 41

文章目录


一、lpstat及cups安装

sudo yum update
sudo yum install cups

二、配置打印机

1.启动cups

sudo service cups start
## 开机启动
sudo systemctl enable cups

2.配置cups

1.打开cups的web访问


打开/etc/cups/cupsd.conf文件,检查以下部分:

   <Location />
   Order allow,deny
   Allow localhost
   </Location>

如果你想允许本地网络内的其他设备也能访问,你可以添加Allow @LOCAL,或者添加特定的IP地址。

如果进行了更改,请记得重新启动CUPS服务以应用新的配置:

sudo service cups restart

示例:
配置将允许本机和本地网络中的设备访问CUPS的Web界面。

    <Location />
    Order allow,deny
    Allow @LOCAL
    </Location>

    <Location /admin>
    Order allow,deny
    Allow @LOCAL
    </Location>

    <Location /admin/conf>
    Order allow,deny
    Allow @LOCAL
    </Location>

重启后访问,应该可以正常访问

3.配置打印机

1.打开浏览器,输入CUPS服务器地址访问web界面,地址一般是:http://localhost:631。这里的"localhost"代表当前机器,如果你的CUPS服务器在别的机器上,你需要把"localhost"替换为那台机器的IP地址或者主机名。

在这里插入图片描述

2.查看"CUPS for Administrators",然后选择"Adding Printers and Classes"。

在这里插入图片描述

3.选择"Add Printer"。你可能需要输入管理员的用户名和密码。

在这里插入图片描述

3.1如果没出现本地打印机,则需要更新驱动

4.你会看到一列可用设备,找到你的打印机并选中它,然后点击"Continue"。

在这里插入图片描述

5.输入打印机连接地址:socket://打印机的ip

在这里插入图片描述

6.输入打印机的名字、位置和描述,这些信息将帮助你将来识别这台打印机。点击"Continue"。

在这里插入图片描述

7.从下拉框中选择打印机的具体型号,然后点击"Add Printer"。

在这里插入图片描述
在这里插入图片描述

8.设定打印选项,如纸张大小等,然后点击"Set Default Options"。

在这里插入图片描述

9.打印测试

在这里插入图片描述

三、shell测试脚本

#!/bin/bash
read -p "imagePath: " pic
lp -d $(lpstat -d | cut -f2 -d':') $pic

给脚本可执行权限:

chmod 777 /usr/printer.sh
举报

相关推荐

0 条评论