如何在Debian Stretch 下使用Axidraw绘图机器人

  • 内容
  • ....
  • 相关

前段时间一直在折腾一台很老的笔记本电脑,Sony VGN-S38GP。详见:Sony S38GP Debian 系统安装NVIDIA Go 6200驱动 ,Debian系统在多年前的笔记本上表现得很好,为了让这台老鸡能够与Axidraw绘图机器人配合使用,我又经过了一番折腾,记录过程如下:

Debian Stretch 安装inkscape

Inkscape是一个开源的绘图和绘画工具,类似于CorelDraw、Illustrator、Xara X和Photoshop。它被广泛用于所有形式的操作系统。它包含了许多特性,比如Cairo渲染显示和PNG导出、c++代码转换、跨平台的WMF和EMF导入导出等。

默认情况下Debian9安装过程中会默认安装inkscape0.92版本,但因为一些特殊原因,我在安装完后将它卸载了,只好重新安装了。在开始安装之前,使用nano命令打开sources.list来添加repo,输入以下内容后保存。

root@debian:~# nano /etc/apt/sources.list
deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main

然后运行apt update更新源元件。

root@debian:~# apt update
Ign:1 http://deb.debian.org/debian stable InRelease
Get:2 http://ftp.debian.org/debian stretch-backports InRelease [91.8 kB]
Hit:3 http://deb.debian.org/debian stable-updates InRelease
Get:4 http://deb.debian.org/debian-security stable/updates InRelease [62.9 kB]       
Get:5 http://ftp.debian.org/debian stretch-backports/main Sources [86.5 kB]
Get:6 http://ftp.debian.org/debian stretch-backports/main amd64 Packages [137 kB]              
Hit:7 http://deb.debian.org/debian stable Release      
Get:8 http://ftp.debian.org/debian stretch-backports/main Translation-en [71.9 kB]
Get:10 http://deb.debian.org/debian-security stable/updates/main Sources [60.9 kB]                 
Get:11 http://deb.debian.org/debian-security stable/updates/main amd64 Packages [155 kB]
Get:12 http://deb.debian.org/debian-security stable/updates/main Translation-en [70.1 kB]
Fetched 736 kB in 2s (337 kB/s)                               
Reading package lists... Done
root@debian:~#

接下来,通过运行命令来安装Inkscape包。

root@debian:~# apt-get install inkscape
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  dia | dia-gnome libsvg-perl libxml-xql-perl pstoedit python-uniconvertor
The following NEW packages will be installed:
  inkscape
0 upgraded, 1 newly installed, 0 to remove and 33 not upgraded.
Need to get 0 B/17.2 MB of archives.
After this operation, 133 MB of additional disk space will be used.
Selecting previously unselected package inkscape.
(Reading database ... 197745 files and directories currently installed.)
Preparing to unpack .../inkscape_0.92.1-1_amd64.deb ...
Unpacking inkscape (0.92.1-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Processing triggers for hicolor-icon-theme (0.15-1) ...
Setting up inkscape (0.92.1-1) ...
root@debian:~#

Inkscape的安装就完成了。

为inkscape添加Axidraw扩展

要让inkscap支持Axidraw绘图机器人,需要添加相应的扩展插件。插件地址: https://github.com/evil-mad/axidraw ,我们需要的扩展文件如下图:

inkscape添加Axidraw扩展
inkscape Axidraw插件

在下载使用前,我们还需要选择对应的正式发行版本才行。

 inkscape Axidraw插件 发行版
inkscape Axidraw插件 发行版

进入正式发行版本列表后,我们可以看到最新发行版为

最新发行版
最新发行版

仔细阅读相关的安装说明,你会发现在Debian下使用应下载哪个包,同时应该怎么去安装的具体说明。

linux axidraw 安装方法
linux axidraw 安装方法

从说明可以知道,在Debian中使用我们需要的是axidraw_v253r3.zip这个包,我们需要做的是:

1、下载 axidraw_v253r3.zip解压;

2、打开inkscape,在“Edit”菜单下,选择“Preferences”,找到“System”,再定位到“User extensions”,这里的路径就是inkscape的扩展插件目录;

3、使用cp命令将解压的文件全部复制到找到的扩展插件目录即可;

4、为了当前用户能使用USB端口,需要添加当前debian用户到 dialout 用户组,命令“ sudo usermod -a -G dialout <当前用户名> ” 。

5、重启inkscape,在“扩展”菜单就可以看到Axidraw的选项了。

关于Axidraw的其他内容,请查阅: 仿制 Axidraw 绘图机