当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 9 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 要取得剪贴板的内容
帖子发表于 : 2007-04-10 10:07 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
shell如何取得ctrl-c到剪贴板的文字,似乎是cutbuffer0-7中间的内容?


_________________
● 鸣学


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2007-04-10 14:13 
头像

注册: 2005-10-25 11:15
帖子: 1016
送出感谢: 0 次
接收感谢: 1
代码:
$ apt-cache show xclip
Package: xclip
Priority: optional
Section: universe/x11
Installed-Size: 72
Maintainer: Baruch Even <baruch@debian.org>
Architecture: i386
Version: 0.08-6
Depends: libc6 (>= 2.4-1), libice6, libsm6, libx11-6, libxext6, libxmu6, libxt6
Filename: pool/universe/x/xclip/xclip_0.08-6_i386.deb
Size: 16028
MD5sum: 458b3496396a7c6989afaa7aa79955a0
SHA1: 68a16193d7684f61adff0490cb4294bd753cbbbc
SHA256: 22c3c3a12b8cc55826d13f67a818bed99992f9a4e8d9adf5d11c91b987ab97be
Description: command line interface to X selections
 xclip is a command line utility that is designed to run on any system with an
 X11 implementation. It provides an interface to X selections ("the clipboard")
 from the command line. It can read data from standard in or a file and place
 it in an X selection for pasting into other X applications. xclip can also
 print an X selection to standard out, which can then be redirected to a file
 or another program.
 .
 Homepage: http://people.debian.org/~kims/xclip/
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu


_________________
hreiser@oakland:~$ killall -9 wife
police@oakland:~$ sudo find / -user hreiser
court@oakland:~$ sudo mv /home/hreiser /jail/
court@oakland:~$ sudo usermod -d /jail/hreiser -s "/usr/sbin/chroot /jail/" hreiser


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2007-04-10 15:35 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
这个是选择的文字啊。不是ctrl-c的啊。我浏览器里面复制一个链接,用右键菜单。是要这种


_________________
● 鸣学


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2007-04-10 16:29 
头像

注册: 2006-10-31 14:41
帖子: 146
送出感谢: 0 次
接收感谢: 0 次
粘贴?偶这里用 ctrl + shift + v。


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2007-04-10 16:31 
头像

注册: 2006-10-31 14:41
帖子: 146
送出感谢: 0 次
接收感谢: 0 次
sorry,答非所问。


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2007-04-10 21:31 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
i got it. wahaha

代码:
xsel --clipboard


_________________
● 鸣学


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2007-04-10 21:32 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
引用:
Selecting text
There are some handy mouse shortcuts for selecting text. As normal a left mouse button drag, selects text but some apps also allow the right mouse button to extend the selection. I.E. you can click or drag the right button to define the extent of the selection. Also in general double clicking selects a word, while triple clicking selects a line (try it now).
Once text is selected X has 2 "clipboards" to put it in. The "selection buffer" and the "clipboard".
The selection buffer
This buffer is updated automatically when you select any text, and is generally the handiest buffer to use, as you can paste from it by clicking the middle mouse button at the required destination. I.E. by clicking the scroll button, or if you only have 2 mouse buttons you can click both simultaneously to emulate the middle mouse button.
The clipboard
This works much like the windows equivalent. In general apps use the same keys as in windows to control it. I.E. CtrlInsert or Ctrlc for copy, and ShiftInsert or Ctrlv for paste etc. These key combinations may conflict with the app so for example gnome-terminal uses ShiftCtrlc and ShiftCtrlv instead, so more generally one can select copy,cut,paste from the edit menu.
Buffer storage
Note it's the X application itself that maintains the storage for what it "puts" on the buffers, which makes a lot of sense when you think about it, especially considering X's network transparency. But that means when you close the application the content of the clipboard and selection buffer are lost.

You can get around this behaviour by using an external application to manage the storage for the clipboard, the standard one being xclipboard. Note this is the reason why it's awkward to get a command line program to paste to the clipboard. It has to fork and run until no longer required (someone else pastes to the clipboard). Search for xsel for an example of this.


_________________
● 鸣学


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2007-04-10 21:35 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
http://www.jwz.org/doc/x-cut-and-paste.html


_________________
● 鸣学


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2007-04-11 10:28 

注册: 2007-02-25 16:56
帖子: 1261
送出感谢: 0 次
接收感谢: 0 次
这个比windows先进多了。。。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 9 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译