7

I keep typing as into chromium's address bar and hitting return, thinking it would take me to askubuntu.com.

Is there a way for me to alias it to askubuntu.com, so I stop wasting time closing the tab, opening a new one and typing in askubuntu.com before hitting enter?

0

3 Answers 3

8

In Chromium, go to chrome://settings/browser (this is the same as Wrench icon -> Preferences) . In Search, click on "Manage Search Engines". Add a new search engine, with details as follows:

2
  • 1
    I think the URL would be better as askubuntu.com/search?q=%s Nov 5, 2011 at 15:31
  • 2
    That would not solve the problem. The requirement is that entering 'as' and pressing Enter should go to askubuntu.com . If the URL is askubuntu.com/search?q=%s , that does not happen, instead entering 'as' and pressing Enter does a Google search.
    – Prateek
    Nov 5, 2011 at 15:54
3

Alternatively there is a Bookmark Keyword extension, that provides a similar functionality.

After installing, add a bookmark to http://askubuntu.com with the title [as] Ask Ubuntu.

Now it is possible to use the keyword between the square brackets to invoke the bookmark in the address bar. The detailed process is documented on the extension's web page.

As an example, to invoke askubuntu.com you have to type:

kwTABasEnter

(It requires 2 extra key presses, but I think it is a good tradeoff between maintenance and usability. And for an added bonus there are commands that can be appended to keywords to modify the opening process. Eg.: as:t will open the page on a new tab.)

0

If you want this to take effect to the whole of your computer, you need to edit the /etc/hosts file alias for that:

64.34.119.12 as # askubuntu.com

To edit the file, type in gksu gedit /etc/hosts in the terminal

4
  • And so where is this hosts file?
    – jonallard
    Nov 5, 2011 at 13:01
  • 2
    That IP takes you to stackoverflow. :P
    – jrg
    Nov 5, 2011 at 13:01
  • @jonallard, the hosts file is in the etc folder of the file system. You need to tick Show Hidden Files in the File Manager (Nautilus) View Menu in order to see it. You need to open the file with the command gksudo gedit /etc/hosts in order to edit the hosts file. Nov 5, 2011 at 13:18
  • 2
    That won't work, because your browser would then send a request for Host as instead of Host askubuntu.com. The web server is likely to not respond, send a 404, or (what happens here) return data for a different website hosted on the same machine. Nov 5, 2011 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .