[问题]有没有办法更改print screen键所触发的程序[搞定了]

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
pwsxp
帖子: 76
注册时间: 2007-09-19 22:30
来自: Shanghai

[问题]有没有办法更改print screen键所触发的程序[搞定了]

#1

帖子 pwsxp » 2007-10-09 22:59

默认按print screen键会弹出gnome的“抓图”程序,我想能不能改成Ksnapshot?
上次由 pwsxp 在 2007-10-10 23:10,总共编辑 1 次。
头像
roylez
帖子: 1928
注册时间: 2005-10-04 10:59
来自: 上海

#2

帖子 roylez » 2007-10-09 23:12

xbindkeys可以用来给程序帮定快捷键。

安装好了xbindkeys之后,你可以在命令行下输入

代码: 全选

xindkeys -k
然后你按下一个你想定义的键,你将会看到

Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"NoCommand"
m:0x0 + c:160
NoSymbol

将最后三行复制到 ~/.xbindkeysrc ,NoCommand字样需要替换为你要执行的命令。
弄个dropbox空间来备份文件或者做私人代码服务器
配置:[url]git://github.com/roylez/dotfiles.git[/url]
主页:http://roylez.heroku.com
各种稀奇玩意儿:http://dooloo.info
ltkun
帖子: 1340
注册时间: 2006-01-10 19:09

#3

帖子 ltkun » 2007-10-10 7:37

系统设置里面好象见有设定的
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#4

帖子 eexpress » 2007-10-10 8:35

gconf里面有吧。而且gsnapshot也有。而且截图的软件太多了。比这好的多了。
● 鸣学
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#5

帖子 eexpress » 2007-10-10 8:35

gconf里面有吧。而且gsnapshot也有。而且截图的软件太多了。比这好的多了。
● 鸣学
头像
xhy
帖子: 3916
注册时间: 2005-12-28 1:16
系统: Ubuntu 12.10 X64
来自: 火星

#6

帖子 xhy » 2007-10-10 9:37

scrot不错 我觉得
目前负债150多万
ltkun
帖子: 1340
注册时间: 2006-01-10 19:09

#7

帖子 ltkun » 2007-10-10 9:41

我用import
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#8

帖子 BigSnake.NET » 2007-10-10 13:00

scrot
可以延时
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#9

帖子 eexpress » 2007-10-10 13:53

哪个不能延时
● 鸣学
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#10

帖子 BigSnake.NET » 2007-10-10 13:56

eexpress 写了:哪个不能延时
我没说其他不能
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
头像
BigSnake.NET
帖子: 12522
注册时间: 2006-07-02 11:16
来自: 廣州
联系:

#11

帖子 BigSnake.NET » 2007-10-10 13:56

eexpress 写了:哪个不能延时
我没说其他不能
^_^ ~~~
要理解递归,首先要理解递归。

地球人都知道,理论上,理论跟实际是没有差别的,但实际上,理论跟实际的差别是相当大滴。
pwsxp
帖子: 76
注册时间: 2007-09-19 22:30
来自: Shanghai

#12

帖子 pwsxp » 2007-10-10 23:03

除了装xbindkeys,在系统哪里可以找到?在gconf里改哪里?我还是没找到
还有,我怎么知道,或者怎么找,怎么了解按了print screen后程序发生了什么,比如是不是有个什么配置文件写着类似printScreen=gnome-screenshot...之类的?
pwsxp
帖子: 76
注册时间: 2007-09-19 22:30
来自: Shanghai

#13

帖子 pwsxp » 2007-10-10 23:12

又查了一下,解决了,因为默认系统工具隐藏了配置编辑器
在google上搜了一下http://ubuntuforums.org/archive/index.php/t-502001.html
Once the required utilities are installed, the screenshot command needs to be assigned to the PrintScreen key. To do this, start the configuration-editor utility by going to applications->system tools->configuration editor. Then, scroll down the left pane to /apps/metacity/global_keybindings and click on this item. Look in the right pane for run_command_screenshot and, if necessary, change the value of this item to Print.
Back in the left pane scroll down just one key and click on keybinding_commands. In the right pane, change the value of command_screenshot to:

scrot -q 75 '/home/username/screenshots/%m.%d.%y at %H.%M.%S.png'
只是改动的地方是/apps/compiz/general/allscreens/options/下的command_window_screenshot 和 command_screenshot, 我改成ksnapshot -c 和 ksnapshot
回复