15AH, San Francisco

California, United States.

Send Your Mail At:

tianyingkejishe@sina.cn

Working Hours

Mon-Sat: 9.30am To 7.00pm

归档标题

Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et dolore feugait.

月度归档 11月 24, 2024

【Linux】打印机环境安装一

一、环境配置

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt install cups  #公共UNIX打印系统

二、驱动安装

sudo apt-get install hplip

三、打印机安装

hp-setup -i #第一个选0,第二个按p
xiaobao@armbian:~/software/shareprint$ hp-setup -i

HP Linux Imaging and Printing System (ver. 3.23.12)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


--------------------------------
| SELECT CONNECTION (I/O) TYPE |
--------------------------------

  Num       Connection  Description
            Type
  --------  ----------  ----------------------------------------------------------
  0*        usb         Universal Serial Bus (USB)
  1         net         Network/Ethernet/Wireless (direct connection or JetDirect)

Enter number 0...1 for connection type (q=quit, enter=usb*) ? 0

Using connection type: usb

Setting up device: hp:/usb/DeskJet_1110_series?serial=CN75J28090069Z



---------------------
| PRINT QUEUE SETUP |
---------------------


Please enter a name for this print queue (m=use model name:'DeskJet_1110'*, q=quit) ?
Using queue name: DeskJet_1110
Locating PPD file... Please wait.

Found PPD file: hplip:0/ppd/hplip/HP/hp-deskjet_1110_series.ppd
Description:

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/usb/DeskJet_1110_series?serial=CN75J28090069Z
Queue name: DeskJet_1110
PPD file: hplip:0/ppd/hplip/HP/hp-deskjet_1110_series.ppd
Location:
Information:


You do not have permission to add a printer. You need authentication.
Username: root
Password:


---------------------
| PRINTER TEST PAGE |
---------------------


Would you like to print a test page (y=yes*, n=no, q=quit) ? y

HP Linux Imaging and Printing System (ver. 3.23.12)
Testpage Print Utility ver. 6.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.


HP Linux Imaging and Printing System (ver. 3.23.12)
System Tray Status Service ver. 2.0

Copyright (c) 2001-18 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: No display found.
error: hp-systray requires Qt4 GUI and DBus support. Exiting.
warning: Unable to connect to dbus. Is hp-systray running?
Printing test page to printer DeskJet_1110...
请求 ID 为 DeskJet_1110-1 (1 个文件)
Test page has been sent to printer.

note: If an error occured, or the test page failed to print, refer to the HPLIP website
note: at: http://hplip.sourceforge.net for troubleshooting and support.


Done.

Done.

【摄像头】MT7628wifi摄像头使用说明

一、简介

wifi摄像头采用Linux系统,使用更灵活,功能更强大,采用ov5693传感器500万像素,高清自动聚焦。

二、接口定义

1、电源管脚

管脚1:DC5V 正极

管脚2:DC5V 正极

管脚3:GND 负极

2、串口管脚

管脚4:uart-rx

管脚5:uart-tx

管脚6:GND

3、网口管脚

管脚7:rx0-p

管脚8:rx0-n

管脚9:tx0-p

管脚10:tx0-n

三、应用软件

1、打开极光摄像头APP

2、点击“连接设备”

3、连接“RecologyPower”摄像头热点,返回主界面

4、点击镜头按键,观看视频

【Ubuntu】word转pdf

一、使用Unoconv工具

Unoconv是一个开源工具,用于将各种文档格式转换为PDF格式。可以使用以下命令安装:

$ sudo apt-get install unoconv

转换文件的命令如下:

$ unoconv -f pdf filename.doc

其中,filename.doc为待转换的Word文件名

使用Unoconv工具的优点是非常简单易用,但需要注意的是,该工具需要依赖OpenOffice或LibreOffice来实现转换,所以在使用前需要确保已经安装了相应的软件。

二、使用LibreOffice命令行工具

与Unoconv类似,LibreOffice也提供了一个命令行工具soffice,可以用于将各种文档格式转换为PDF格式。可以使用以下命令安装LibreOffice:

$ sudo apt-get install libreoffice

转换文件的命令如下:

$ soffice --convert-to pdf filename.doc

其中,filename.doc为待转换的Word文件名。

使用LibreOffice命令行工具的优点是它不依赖于其他软件,并且支持各种Office文档格式。但是转换速度可能会比其他工具慢一些。

三、使用Pandoc工具

Pandoc也是一个开源工具,可以将各种文档格式转换为PDF格式。可以使用以下命令安装Pandoc:

$ sudo apt-get install pandoc

转换文件的命令如下:

$ pandoc -s filename.doc -o filename.pdf

其中,filename.doc为待转换的Word文件名。

使用Pandoc工具的优点是它支持各种文档格式,并且可以自定义文档样式,转换后的PDF文件也会自动添加书签,方便查阅。但是需要注意的是,Pandoc工具并不是专门用于文档转换的,所以在转换复杂文档时可能会出现格式错误。

四、使用Liberation字体

在Word文件转换为PDF格式时,由于Linux和Windows系统的字体库不一样,可能导致PDF文档出现乱码或格式错误。为了解决这个问题,我们可以在Linux系统中安装Microsoft Office的字体Liberation字体,实现Linux和Windows字体的兼容。

安装Liberation字体的命令如下:

$ sudo apt-get install fonts-liberation

安装完毕后,我们就可以在Word文件转换成PDF文件时使用Liberation字体了。

五、小结

以上就是在Linux下实现Word文件转PDF的方法,我们可以根据需要选择不同的工具来实现转换,以满足我们的工作需求。同时,为了避免字体的兼容性问题,我们也可以安装Liberation字体来保证转换后的PDF文件格式正确。

linux 获取OS盘符的方法

在服务器测试中,对硬盘的测试有很多,有些测试用例需要我们写一下自动化的脚本,比如给服务器所有的盘施加压力,这个就需要我们把除了OS盘的所有盘遍历出来,下面介绍几种方法来筛选OS盘
我们知道,判断os 盘的方法一般是看其有没有boot分区,通常用两个指令来获取:lsblk和df -h 下面一次介绍一下这两种方法的写法

1、 lsblk 如图所示 带有boot 分区的就是OS盘

系统盘是sda

系统盘是nvme0n1

shell命令行:

lsblk -l  |grep -i boot -B 1 |grep -i disk |awk '{print $1}'

筛选除了OS外所有的盘符

lsblk -l  |grep -vw sda |grep -i disk |awk '{print $1}'
lsblk -l  |grep -vw nvme0n1 |grep -i disk |awk '{print $1}'

2、 df -h

系统盘是sda

shell命令行

df -h | awk '{print $1}' | grep -iE "/dev/sd" | sed 's/[0-9]//g' |sort -u |awk -F "/" {'print $NF'}

系统盘是nvme0n1

shell 命令行

 df -h | awk '{print $1}' | grep -iE "/dev/nvme" | sed 's/p[0-9]//g' |sort -u |awk -F "/" {'print $NF'}

对此可以写成一个小脚本来判断OS,代码如下:

#!/bin/bash
bootdisk=`df -h |grep -i boot | awk '{print $1}' | grep -iE "/dev/sd" | sed 's/[0-9]//g' |sort -u|awk -F "/" '{print $NF}'`
if  test -z "$bootdisk"
then
        bootdisk=`df -h |grep -i boot| awk '{print $1}' | grep -iE "/dev/nvme" | sed 's/p[0-9]*//g' |sort -u|awk -F "/" '{print $NF}'`
        echo "os disk os $bootdisk"
else
        echo "os disk is $bootdisk"
fi

运行结果如下图: