From: Christopher Arndt <chris.arndt@we...> - 2002-09-16 14:02:19
Michael Montagne <michael@...> schrieb am 16.09.02 02:36:45:
> All you'd really need is access to the "clipboard". Wherever that text
> is stored that you've highlighted that allows you to "paste" it with a
> middle-click. Can python get to that string. Pass that to Galeon (or
> whatever) and your done. Easy?
Yes python can get to that string but you'll need a X-windows capable module like pygtk or wxPython. Getting the PRIMARY selection under X programatically is not alltogether trivial.
Better to use existing commandline tools that can access the X selection (NOT the clipboard like e.g. 'xclipboard') and print it to stdout. I use such a tool at home, but can't remember the name right now. I'll have a look this evening.
Using this I have a browser button on the ROX panel that starts either starts a new browser or opens a new browser window. If there is some text in the primary X selection (e.g. you selected some text in a terminal window) it is passed on the commandline to the new browser instance (window).
The advantage over gnome-terminal and alikes is, that this works with every program where you can select text (tell you'r friend to try _this_ on windows!)
Hope that helps, Chris
Jetzt testen fur 1 Euro! Ihr All-in-one-Paket!
From: Christopher Arndt <chris.arndt@we...> - 2002-09-16 18:17:28
On Mon, 16 Sep 2002, Christopher Arndt wrote:
> Michael Montagne <michael@...> schrieb am 16.09.02 02:36:45:
> Better to use existing commandline tools that can access the X selection
> (NOT the clipboard like e.g. 'xclipboard') and print it to stdout. I use
> such a tool at home, but can't remember the name right now. I'll have a
> look this evening.
The too I use is simply called "window" and can be found at:
A ROX wrapper called "Browser" that makes use of this litte program can be
found in my Wrappers package at:
http://www.chrisarndt.de/software/rox/ (bottom of page)
Reality always seems harsher in the early morning.
Christopher Arndt [t] +49 (0)69-46994293
system administration [w] http://www.chrisarndt.de
& linux training [e] chris.arndt@...