Opera Tab Count in Conky (for Linux)

Have you ever wanted to keep an eye on the number of tabs that you have open in Opera? Now you can very easily!

Check Out The Script!

I came across a link a while back (sorry, I can’t remember who posted this) for a script in windows that fetches the window count from Opera’s autosave.win file (this file stores your currently open windows and tabs so it can restore them if Opera crashes or for the next time you open Opera).

If you’re using Windows, you can probably do something with this script, though I have not tested it yet.

If you’re using Linux then you can take advantage of a script that I wrote and I’ll tell you how below.

  1. Open a text editor and copy the 10 lines of script from the following page:
    http://kyleabaker.pastebin.com/HngpxisB
  2. Save this file anywhere you would like to. I saved mine as “opera-tab-count.sh” on my desktop for testing, but it should work fine from any directory.
  3. Right click on the file you created and select “Properties -> Permissions -> Execute = True“. This allows the script file to run.
  4. Now you can open up a terminal window and find out how many tabs you have open by using the following command:
    $ ./.opera-tab-count.sh

Add This To Conky!

One of the main reasons that I wrote this script is to start showing more Opera stats on my desktop via Conky which I wrote about a while back!

Opera tab count as it will appear in Conky!

If you’re interested in displaying some stats via Conky then all you have to do to get what I’ve got is:

  1. Move the “opera-tab-count.sh” file that you’ve saved from the steps above into your Home directory.
  2. Rename your “opera-tab-count.sh” file to “.opera-tab-count.sh” (notice the leading period). This makes it a hidden file in the future so it won’t waste space in your file browser unless you choose to view Hidden files via “View menu -> Show Hidden Files”.
  3. Add the following lines to your “.conkyrc” file (located in your root directory)
    ${color orange}OPERA ${hr 2}$color
    Opera currently has ${exec ./.opera-tab-count.sh} tabs open
  4. Save your “.conkyrc” file and launch Conky or wait for it to refresh with your update!

If you did everything correctly then you should see something similar to what the image above.

I do plan to add more stats to this soon and will probably post a link to my script when I’m done, so keep an eye out!

*You Mac users may be able to modify this to work with Mac as well. 😉

UPDATE 1 (2010-05-04):
If you want to use my latest update with more details, create a file named “.opera-stats.sh” that is executable and stored in your Home directory (old: with the script from here) with the script that fearphage has updated here. Now add two lines (or edit the two you added from above) to your “.conkyrc” file:
${color orange}OPERA ${hr 2}$color
${exec ./.opera-stats.sh}

..that should give you the following:

Opera Stats v0.1 in Conky

Linux: Two Scripts to Help Debug Opera

Are you an Opera user and a Linux user at the same time? If so, then you could genuinely help Opera by sending in bug reports and specifically crash reports.

I’ve put a could of tools together for you in the form of scripts. If the idea of scripts scares you, then don’t worry. I’ve explained how to use them in the INSTALL.txt file that is in the zip archives for each tool.

They are really easy to use and can make your life much easier!

If you find that these scripts could be improved and/or extended, feel free to make changes yourself and/or pass them my way so we can all benefit from them!

Opera: Kill Freeze – The first tool is a script that will stop Opera when it’s frozen and, if you are using Opera 10+, prompt you with a crash log report so you can explain how it happened.

Opera: Crash Report Details – This tool will generate a text file on your desktop with some technical specifics that you should copy and paste along with your bug report. This information can greatly help with finding a bug and reproducing it so that it can be eliminated.

Do you have or know of similar tools? Let me know about them and post them in the comments!

Crash logging Opera with Inspector IIXII for Linux, Part 2

Following up with an update to my original post, I’ve brought an easier way for you to make use of Inspector every single time you open Opera.

In a nutshell, I’ve written a script that launches Opera and then attaches Inspector to the process id. There is a setup script that will make some necessary changes and create a shortcut on your Desktop for you that opens Opera and Inspector for you easily!

If you want to find out more about the Opera + Inspector Launcher or download it for yourself just head over to the info/download page.

If you have any questions and/or suggestions, just leave them in the comments here or on the Launcher page.

Opera 10: Remove ‘Click to activate’ on flash in Linux!

I’ve been working with d.i.z. as he’s found a way to hex edit Opera binaries to disable the “Click to activate” feature that Opera has implemented on flash items. I won’t get into the details of why they implemented this myself, but I’ll just quote from the post that d.i.z. made about this topic.

Some background:
Eolas (E) is a company that patented a certain way of interacting with embedded objects on web pages. This is why in Opera, you sometimes have to click (for example) a flash player to “activate” it before it can actually be controlled. That sucks.

Opera is the only browser that I know of, that currently have this annoying system in place. IE had it, but it reached to a pocket full of money to buy a license from E.

Other (open source) browsers don’t implement this mechanism because E was kind enough to commit not to pursue legal actions against open source browsers that are violating its patent. Why? I guess because it wouldn’t really be able to enforce that anyway. Builds without this future would pop up everywhere in no-time.

Now that you understand a little bit about what is going on and the feature that you can remove, I have to tell you the bad news. So far we’ve only had time to patch Windows builds and most Intel Linux and Linux x86_64 builds.

If you’re looking for the Windows patch files then head on over to d.i.z.’s blog post and grab the download there as I will not be maintaining that one.

If you’re looking for the Linux patches, then you’re at the right spot!

I’ve managed to write three script files that will do everything you want! You will only need to use one of them if you only want to patch your version. The files are as follows:

  1. Patch script
    This script obviously patches your Opera file to remove the “Click to activate” feature. You only need to run this one if you just want to remove that and forget about it. Running it more than once will not affect the file as the hex search will no longer match after being patched, so that is why it will fail if the file has already been patched.

    To use this script, run the following commands in the terminal:

    chmod +x ./click-to-activate-removal-opera-10.sh
    sudo ./click-to-activate-removal-opera-10.sh
  2. Switch between patched Opera and unpatched Opera script
    This file will, as it says, rename your patched file and unpatched file accordingly so that each time you run it you will be able to alternate back and forth between patched and unpatched versions. This will no longer work if you remove your unpatched version which is created and saved originally by the Patch script above.

    To use this script, run the following commands in the terminal:

    chmod +x ./click-to-activate-removal-opera-10-swap-patched-unpatched.sh
    sudo ./click-to-activate-removal-opera-10-swap-patched-unpatched.sh
  3. Patch removal script
    This script is a clean-up tool. If you decide for some reason that you don’t want the patch anymore and want to remove it completely, then run this script. It will delete the patched file, so switching between patched and unpatched will no longer be possible until you reapply the Patch script.

    To use this script, run the following commands in the terminal:

    chmod +x ./click-to-activate-removal-opera-10-unpatcher.sh
    sudo ./click-to-activate-removal-opera-10-unpatcher.sh

Please make sure that you have completely closed Opera before running any of these three scripts.

After using any of the above scripts, you are free to delete the script. You can always grab it again here if you wish, just make sure to bookmark this page!

The example usage commands that I posted are correct for Ubuntu/Debian. I’m not sure how they compare across distributions, but just make sure to make the script executable and then run the script with root privileges.

I’m sure you noticed that the file names are very long. You can feel free to rename them to anything you want to. They run independently of the file name. I just named them very descriptively to help myself keep them sorted and maintainable. 😉

As usual, if you wish to use any of these scripts then you understand that I am not responsible for any damages done to your computer (even if it explodes 😛 ) and you accept the responsibility on yourself to deal with any results, good or bad.

If you experience any problems with these files then please let me know in the comments. Notice that these only work so far for Intel Linux builds and Linux x86_64 (64-bit), so don’t waste your time with other builds unless you want to help extend the scripts!

Also, please notice that currently this Patch script does not work for the Intel Linux builds that were compiled with GCC 2.95, but hopefully it will be supported soon. If you’re using a build other than this that is Intel Linux or Linux x86_64 then please let me know the version you downloaded so I can look into it!

I extend a special thanks to d.i.z. for making this hex edit hack possible and helping me form these scripts in the first place!

Enjoy!