Thursday, 19 January 2012

making uzbl-tabbed open a link in a new tab (not a new window)

If like me you gravitate towards minimal applications, check out the uzbl web browser. It's based on webkit, supports Java, Flash, CSS, Javascript, etc and has full keyboard control. Added to this, it is fully configurable - it has a standard ASCII config file. This page shows the default keybindings.

uzbl is a godsend to those of us who are too lazy (or busy) to take their hands away from the keyboard to reach for the pesky mouse.

To install:

sudo apt-get install uzbl

I'm running uzbl-tabbed (which comes as part of the uzbl package). As the name suggests, this supports tabs. However, I was scratching my head trying to work out how to open a new link in a new tab, rather than a new window.

The answer is simplicity itself (once you know of course :-). Fire up your favourite editor and point it at ~/.config/uzbl/config. Then, make sure you have an entry like this:

@on_event   NEW_WINDOW     event NEW_TAB %s

Now, any request to open a new window actually gets remapped to opening a new tab.
So, I can type "fL" (which would normally open a link in a new window), type the number of the link I want and have the link opened in a new tab!

Tip: Make sure your uzbl config files doesn't contain any other "@on_event NEW_WINDOW ..." entries are they are all honoured!

5 comments:

  1. This is very helpful. Thanks so much. Any idea of how one can print websites using this browser?

    ReplyDelete
  2. Nice Post, Thanks for your very useful information... I will bookmark for next reference.

    ReplyDelete
  3. I really liked this part of the article, with a nice and interesting topics have helped a lot of people who do not challenge things people should know... you need more publicize this so many people who know about it are rare for people to know this, Success for you.. ....

    ReplyDelete
  4. I really liked this part of the article, with a nice and interesting topics have helped a lot of people who do not challenge things people should know... you need more publicize this so many people who know about it are rare for people to know this, Success for you.. ....

    ReplyDelete
  5. I know where I'm going and I know the truth, and I don't have to be what you want me to be. I'm free to be what I want.Thankyou i really love it

    ReplyDelete