Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

There is a very elegant solution to use shortkeys to search the internet (or translate on Google Translation etc) a text selected in a text editor/viewer, but that solution does not seem to work in programs installed under Wine, like Notepad and Office 2007.

I wander what the cause might be and whether there is a way to make it work.

(I created this question to bring this into spotlight, but in the end it may be closed as duplicate of the other one, and its answers migrated there. So, in case you feel like closing this, please wait until an accepted answer is posted, or even better try to answer it - here or there.)


Edit after IgnitE's comments:

  • A problem is that a text selected in a wine application it is not directly available outside wine. That might make unusable the script in the linked answer, which involves xclip (and that is clearly outside Wine).

  • Wine is a Linux program. I use libreoffice and office2007 for translating, writing and editing texts and want to be able to use shortcuts to search selected text in search engines or to translate it quickly in the same way. it saves me a lot of time and am already able to do it in libreoffice.

  • Why not writing a wine script? winetricks is nothing but that

share|improve this question
1  
I don't think it's possible out of the box. Have a look at wiki.winehq.org/CopyAndPaste –  IgnitE Feb 20 '13 at 13:28
1  
I mean that, if you select any text in some wine application, it's not directly available outside wine. Also solution, you provided is making me search inside wine. –  IgnitE Feb 20 '13 at 14:20
    
It's turning out to be more interesting than I thought! –  IgnitE Feb 20 '13 at 15:18
    
@IgnitE: sorry for not noticing later: you said: solution, you provided is making me search inside wine. what is the solution you are reffering to? you mean the answer below on PDFXchange? in my case it opens my default Ubuntu browser, Firefox. It is an instance of a Wine text viewer from which selected text is searched outside Wine. –  cipricus Feb 20 '13 at 16:24
1  
So my guess is, PDFXchange is copying the text to clipboard, which is available outside wine! I just said that the selected text is not available outside wine. –  IgnitE Feb 20 '13 at 22:18

1 Answer 1

up vote 1 down vote accepted

This is a limited and incomplete answer, but maybe useful.

A program that runs under Wine and can search as required in the question is PDF-Xchange Viewer. The feature is part of this excellent program, only that it is not done by shortkey, but from the context menu.

So, selecting a text:

enter image description here

(the menu is already customized)

To add new options:

enter image description here

enter image description here

In this way the default Ubuntu web browser opens as expected.

(It is an example of text selected in a Wine program and searched outside Wine.)

share|improve this answer
    
the question asks for shortkeys, but i post this for reference, especially that i found the solution that works in the native text editors/viewers while asking for a context-menu search (askubuntu.com/q/216770/47206) –  cipricus Feb 22 '13 at 12:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.