scrot-0.8

简介: 相关库下载地址:         www.sunfreeware.com/programlistsparc10.html tar -zxvf scrot-0.8.tar.gzcd scrot-0.

 

相关库下载地址
         www.sunfreeware.com/programlistsparc10.html

tar -zxvf scrot-0.8.tar.gz
cd scrot-0.8
./configure --prefix=/soft/scrot
有如下错误:
checking for giblib - version >= 1.2.3... no
*** The giblib-config script installed by giblib could not be found
*** If giblib was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GIBLIB_CONFIG environment variable to the
*** full path to giblib-config.
configure: error: Cannot find giblib: Is giblib-config in the path?

根据提示错误,装giblib:
tar -zvxf giblib-1.2.4.tar.gz
cd giblib-1.2.4

./configure --prefix=/soft/scrot
有如下错误checking for imlib2 - version >= 1.0.0... no
*** The imlib2-config script installed by imlib2 could not be found
*** If imlib2 was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the IMLIB2_CONFIG environment variable to the
*** full path to imlib2-config.
configure: error: Cannot find imlib2: Is imlib2-config in the path?

根据提示错误,装imlib2:
tar zxvf imlib2-1.4.2.tar.gz
cd imlib2-1.4.2

./configure --prefix=/soft/scrot
make 
make install
成功

export PATH=/soft/scrot/bin:$PATH
cd ..
cd giblib-1.2.4
./configure --prefix=/soft/scrot
make & make install

cd scrot-0.8
./configure --prefix=/soft/scrot
make & make  install

成功。

但在运行scrot时出错:
cd /soft/scrot/bin
[m@localhost bin]$ ./scrot
./scrot: error while loading shared libraries: libgiblib.so.1: cannot open shared object file: No such file or directory

但是确实有libgiblib.so.1这个文件,用find命令查到在/soft/scrot/lib下
用如下命令:
echo "/soft/scrot/lib" >> /etc/ld.so.conf
ldconfig(更新ld.so.cache)

也可以这样:
[m@localhost server]$ cat /etc/ld.so.conf
include ld.so.conf.d/*.conf

我就找到了ld.so.conf.d文件夹下面,参考其中的一个文件,写了个
scrot.conf,内容如下:
/soft/scrot/lib
ldconfig
这就可以运行scrot这个不错的截图工具了!

有关参数:

  1. 抓取桌面:scrot desktop.png,该命令将当前的整个桌面抓取下来,并保存为 desktop.png 文件。可以在当前的目录中找到此图像文件。
  2. 抓取窗口:scrot -bs window.png,选项 b 使 scrot 在抓取窗口时一同将外边框抓取下来,而 s 选项则让用户选择所要抓取的是何窗口。
  3. 抓取区域:scrot -s rectangle.png,在执行此命令后,使用鼠标拖曳的矩形区域将被 scrot 抓取下来。

高级使用

对于普通的抓取使用 scrot 的基础便足以应付了。但在某些特殊情况之下,使用 scrot 抓取图像需要讲究一些技巧。

  1. 延时抓取:scrot -cd 10 menu.png,此命令中的 d 选项用于延时抓取图像,其后的 10 代表延时 10 秒;前面的选项 c 显示倒计时。在抓取菜单或是命令提示时,该技巧将充分展示其魔力。
  2. 生成缩图:scrot -t 50% thumb.png,这个命令在抓取图像的同时生成该图像的缩略图。选项 t 将打开此功能,其后的 50% 为原图的缩放百分比。
  3. 更改品质:scrot -q 70 quality.jpg,此命令中的 q 选项用于更改所抓图像的品质,其数值介于 1-100 之间,默认为 75。数值越大,意味着图像品质越高;同时,图像的压缩率也就越低,占用空间越大。
  4. 操作抓图:scrot action.png -e 'mv $f ~/images/',该命令将抓取的图像移动到 ~/images/ 目录。显然,操作图像的功能由 e 选项开启,其中的 $f 代表原图的路径/文件名。
下面是方便截图的一个脚本,放在/usr/local/bin下,在方便的地方建个快捷方式,一单击即可进入截图状态
#!/bin/bash
# 注意下面的“+”号要紧接着%Y。(我之前没注意到这点,哎,截了半天也没截出东西
/soft/scrot/bin/scrot -s /home/用户名/picture/`date -d yesterday 
+%Y-%m-%d-%H-%M-%S`.jpg
http://blog.chinaunix.net/uid-26952974-id-3201420.html
 
linux也有截图软件。scrot。同样能截屏和鼠标截取。  
只要yum源没有问题的话,直接yum install scrot就能安装好了。 
在终端里敲入scrot即可截屏了,图片保存在当前目录下。 
scrot -s即可鼠标截屏。 
可以新建个文件,里面键入如下内容,则可以双击来截屏了。 
scrot -s -e 'mv $f ~/screenshots/'
 
http://freecode.com/
 
  download
http://linuxbrit.co.uk/downloads/scrot-0.8-1.i386.rpm
http://linuxbrit.co.uk/downloads/scrot-0.8.tar.gz
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
相关文章
|
7月前
|
安全 Java API
原子类型AtomicLong用法探究
AtomicLong 是 Java 提供的一个原子长整型类,提供了对长整型数据的原子性操作。在多线程环境下,AtomicLong 可以确保对长整型数据的操作是线程安全的。
|
索引 Python
全解析!9个处理Excel的Python库,到底哪个最好用?
全解析!9个处理Excel的Python库,到底哪个最好用?
3903 0
全解析!9个处理Excel的Python库,到底哪个最好用?
|
Ubuntu Unix Linux
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
|
9月前
|
分布式计算 Hadoop 大数据
Hadoop生态系统中的安全性与权限管理:Kerberos和Apache Ranger的应用
Hadoop生态系统中的安全性与权限管理:Kerberos和Apache Ranger的应用
|
9月前
|
数据库 微服务
AT与XA的区别
关于AT与XA的区别
213 0
|
安全 物联网 Linux
QNX、Linux、Android、wince各有什么优劣?
QNX、Linux、Android、wince各有什么优劣?
QNX、Linux、Android、wince各有什么优劣?
|
内存技术
驱动开发:DKOM 实现进程隐藏
DKOM 就是直接内核对象操作技术,我们所有的操作都会被系统记录在内存中,而驱动进程隐藏的做旧就是操作进程的EPROCESS结构与线程的ETHREAD结构、链表,要实现进程的隐藏我们只需要将某个进程中的信息,在系统EPROCESS链表中摘除即可实现进程隐藏。
359 0
|
前端开发 Java Python
python html转png
日常开发过程中,html可以画出非常好看的效果图,但是很多第三方工具并不支持直接展示html,这就需要通过一些第三方工具将html转换为png。很多第三方jar包在做转换的时候,经常出现转化后因为部分css标签不支持,图片效果错位的情况。本文演示一种python html2image包转换图片的案例。
4893 1
python html转png
|
SQL 存储 关系型数据库
Python Web开发(四):从零开始创建数据库和表
Python Web开发(四):从零开始创建数据库和表
451 0