LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-18-2004, 04:04 PM   #1
xri
Member
 
Registered: Aug 2002
Distribution: Archlinux, Garuda Linux
Posts: 283
Blog Entries: 11

Rep: Reputation: 41
Adding web shortcuts to Konqueror


Running a Google search by Alt F2 and then gg: [key words] is fantastic.

I would like to add new web shortcuts to Konqueror with my favorite web sites, for search purposes. I found a web page showing how to do it for Google Linux, but that is all.

Somewhere I read it has something to do with CGI scripts.


Could you please clue me in or send me a friendly link?
 
Old 12-18-2004, 06:20 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
What your looking for is in the Settings for Konq, under Web ShortCuts, ( its also available through the Control Centre, under Internet & Network->Web Browser, Web Shortcuts )

Theirs no coding at all just three input strings. Take a look at gg and others, to see exactly what to put. You'll also see that Konq already comes with lots already set for you.
 
Old 12-20-2004, 09:11 AM   #3
xri
Member
 
Registered: Aug 2002
Distribution: Archlinux, Garuda Linux
Posts: 283

Original Poster
Blog Entries: 11

Rep: Reputation: 41
Thanks for answering, leonscape.

My question was based precisely on the option you mentioned (Internet & Network->Web Browser, Web Shortcuts ). I had edited some of the shortcuts . For instance, instead of "dict" to call the Merriam-Webster search, I set "dic".

However, I noticed that the third string (the one related to the website) does not only contain the web address, but also some additional variables, which seem necessary to run the search. I cannot show more examples right now (I'm not at my Linux box), but I'll get into this more in depth later, and let you know what I find (just for the sake of other naive users like me).


Cheers
 
Old 12-20-2004, 09:46 AM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Ahh you mean stuff like

http://www.google.com/search?q=\{@}&ie=UTF-8&oe=UTF-8

If you type a seach into google you'll see exactly where this is from. Its simply the URL that google uses for a search. The \{@} is replaced by the text of the search so

google:hello

becomes

http://www.google.com/search?q=hello&ie=UTF-8&oe=UTF-8

So lets say I want to set up Merriam-Webster, I go to the site, and type in a simple search like hello, then look at the URL it creates...

http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=hello&x=0&y=0

I simply replace hello with \{@} and put it into the shortcuts as dic, and voila it all works.

If you notice theirs an additional x & y component that isn't found in the shortcut provided by dict. This has been removed as its a bit of extra fluff not actually need for the search to work.
 
Old 12-21-2004, 02:37 AM   #5
xri
Member
 
Registered: Aug 2002
Distribution: Archlinux, Garuda Linux
Posts: 283

Original Poster
Blog Entries: 11

Rep: Reputation: 41
Very nice. I love this environment.

I already used your recipee to add a few more sites, and it works great !

However, with Linux Questions, the story is different:

After running the usual web search with the word "virus", the location shown is:

http://www.linuxquestions.org/questi...der=descending

I can't see the word "virus" but, taking a wild guess, I assume it is the string that comes after "searchid", that is "3199601". So, I replace those digits with the expression \{@} on the web shortcut I'm building.

However, when I use the shortcut to search for "virus" again, I get a "no match" message, and this time the location shown is:

http://www.linuxquestions.org/questi...der=descending

This differs from the one obtained previously just on the string corresponding to "searchid".

Any further observations on this particular case (I'd love to have a shortcut for this site)?
 
Old 12-21-2004, 02:13 PM   #6
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
For this site the normal search uses a id rather than the search string, which makes it hard to create a search through a web shortcut. There is a google search for this site ( which I think would work), but you have to be a contributing member to use it.

You could use google to search by adding &as_sitesearch=linuxquestions.org to the google command to make

http://www.google.com/search?q=\{@}&ie=UTF-8&oe=UTF-8&as_sitesearch=linuxquestions.org
 
Old 12-23-2004, 12:19 PM   #7
xri
Member
 
Registered: Aug 2002
Distribution: Archlinux, Garuda Linux
Posts: 283

Original Poster
Blog Entries: 11

Rep: Reputation: 41
Actually, the string extracted from the Google shortcut did not work, but the one extracted from the Google Advanced Search did work, after changing the parameter "as_sitesearch" to www.linuxquestions.org, just as you suggested.

It gives results from Linux Questions in Goggle format though, but it's good enough for the time being. In any case, the whole CGI scripting looks like an interesting thing to look at in the future.

Thanks again!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Shortcuts Xios Linux - Software 3 02-08-2005 05:09 PM
adding shortcuts to menu jwijesundra Linux - Newbie 1 01-17-2005 07:23 AM
Konqueror shortcuts? bruno buys Linux - Software 1 08-15-2004 12:24 PM
shortcuts in konqueror for complete .com Address AMD64 Linux - Software 3 03-23-2004 05:24 PM
adding shortcuts for command line hamish Linux - Newbie 6 02-05-2004 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration