Technology Tales

Adventures & experiences in contemporary technology

Making a custom button to hide or display the Google Toolbar in Firefox

27th February 2011

Adding more toolbars to Firefox is all very fine but they can take up space on the screen. Even with the big screens that many of us have these days, it’s still nice to be able to see more of what we use web browsers to visit: web pages. For the Web Developer extension’s toolbar, there is the Toggle Web Developer Toolbar plugin for showing and hiding the thing when so desired. As it happens, I keep it hidden until I need it and I fancied doing exactly the same thing with the Google Toolbar but found none. Instead, I happened on a tutorial that used the Custom Buttons plugin to define a custom button. That gives you an entry named Add new button… to the context menu that appears when you right-click on the main menu bar near the top of the Firefox window. When you select the that extra entry in the menu, you get the dialogue box that you see below.

Making a custom button to hide or display the Google Toolbar in Firefox

In there, that are some form fields that need filling. Button URL is an option without which you can do but I entered “Toggle Google Toolbar” into the Name field while also sourcing an image to be used on the button instead of the default (a Google logo, naturally…). The last step is to add the code below underneath the /*CODE*/ comment line, leaving the latter in place.

const toolbar = document.getElementById(“gtbToolbar”);
toolbar.collapsed = !toolbar.collapsed;

With all that completed, clicking on the OK button is all that’s needed to finish off the button definition. With that done, the next step is to add the button where you want it by right clicking on the top menu bar again and selecting the Customise… entry. From the list of buttons that appears, just pick the new one and drag it to where you want it to go. Then, you’re done with what might sound a roundabout away of putting in place a space saver but I can live with that.

Starting a fifth…

17th January 2011

It is hard to believe the passage of time sometimes but there are events that provide the occasional reminder. The fourth birthday of this outpost on the web is a but small representative of the genre. An initially frenetic posting rate slowed over time and new entries appear on here when there is something to share rather than trying to work to a schedule. That went by the wayside a good while ago…

Over the years, appearances have changed but the raison d’être remains: to share useful snippets regarding the digital technology that pervades this age. Sometimes, these are things that I need to store for my own future reference but there are others that I scarcely have seen elsewhere. Even with the power of Google or Bing, it can be hard to track down the knowledge that you need these days so that’s why I keep on adding to the collection of material that you find on here.

All in all, we seem to be in a time of major upheaval. During the past year, I had one of my own and the result was a change of job and place of work. However, there many more momentous ones than that with plenty to be seen in the world of technology. Digital photography is taken for granted nowadays and the next battle seems to be between DSLR’s and compact system cameras. Then, there’s the increasing mobility of computing and the increasingly clever packaging of diminutive yet powerful devices. It seems that everything is all change so that may bring me more things about which to write on here. 2011 may become an interesting if very challenging year ahead.

A look at Emacs

10th August 2010

It’s amazing what work can bring your way in terms of technology. For me, (GNU) Emacs Has proved to be such a thing recently. It may have been around since 1975, long before my adventures in computing ever started, in fact, but I am asking myself why I never really have used it much. There are vague recollections of my being aware of its existence in the early days of my using UNIX over a decade ago. Was it a shortcut card with loads of seemingly esoteric keyboard shortcuts and commands that put me off it back then? The truth may have been that I got bedazzled with the world of Microsoft Windows instead, and so began a distraction that lingered until very recently. As unlikely as it looks now, Word and Office would have been part of the allure of what some consider as the dark side these days. O how OpenOffice.org and their ilk have changed that state of affairs…

The unfortunate part of the Emacs story might be that its innovations were never taken up as conventions by mainstream computing. If its counterparts elsewhere used the same keyboard shortcuts, it would feel like learning such an unfamiliar tool. Still, it’s not as if there isn’t logic behind it because it will work both in a terminal session (where I may have met it for the first time) and a desktop application GUI. The latter is the easier to learn, and the menus list equivalent keyboard shortcuts for many of their entries, too. For a fuller experience though, I can recommend the online manual, and you can buy it in paper form too if you prefer.

One thing that I discovered recently is that external factors can sour the impressions of a piece of software. For instance, I was using a UNIX session where the keyboard mapping weren’t optimal. There’s nothing like unfamiliar behaviour for throwing you off track because you felt your usual habits were being obstructed. For instance, finding that a Backspace key is behaving like a Delete one is such an obstruction. It wasn’t the fault of Emacs, and I have found that using Ctrl+K (C-k in the documentation) to delete whole lines is invaluable.

Apart from keyboard mapping niggles, Emacs has to be respected as a powerful piece of software in its own right. It may not have the syntax highlighting capabilities of some, like gedit or NEdit for instance, but I have a hunch that a spot of Lisp programming would address that need. What you get instead is support for version control systems like RCS or CVS, along with integration with GDB for debugging programs written in a number of languages. Then, there are features like file management, email handling, newsgroup browsing, a calendar and calculator that make you wonder if they tried to turn a text editor into something like an operating system. With Google trying to use Chrome as the basis of one, it almost feels as is Emacs was ahead of its time, though that may have been more due to its needing to work within a UNIX shell in those far-off pre-GUI days. It really is saying something that it has stood the test of time when so much has fallen by the wayside. Like Vi, it looks as if the esteemable piece of software is showing no signs of going away just yet. Maybe it was well-designed in the beginning, and the thing certainly seems more than a text editor with its extras. Well, it has to offer a good reason for making its way into Linux too…

On web browsers for BlackBerry devices

8th August 2010

The browser with which my BlackBerry Curve 8520 came is called Web’n’Walk and, while it does have its limitations, it works well enough for much of what I want to do. Many of the sites that I want to visit while away from a PC have mobile versions that are sufficiently functionality for much of what I needed to do. Names like GMail, Google Reader, Met Office and National Rail come to mind here and the first two are regularly visited while on the move. They work well to provide what I need too. Nevertheless, one of the things that I have found with mobile web browsing is that I am less inclined to follow every link that might arouse my interest. Sluggish response times might have something to do with it but navigating the web on a small screen is more work too. Therefore, I have been taking a more functional approach to web usage on the move rather than the more expansive one that tends to happen on a desktop PC.

For those times when the default browser was not up to the task, I installed Opera Mini. It certainly has come in very useful for keeping an the Cheshire East bus tracker and looking at any websites without mobile versions for when I decide to look at such things. Downloading any of these does take time and there’s the reality of navigating a big page on a small screen. However, I have discovered that the browser has an annoying tendency to crash and it did it once while I was awaiting a bus. The usual solution, rightly or wrongly, has been to delete the thing and reinstall it again with the time and device restarts that entails. While I got away with it once, it seems to mean losing whatever bookmarks or favourites that you have set up too, a real nuisance. Because of this, I am not going to depend on it as much any more. Am I alone in experiencing this type of behaviour?

Because of Opera’s instability, I decided on seeking alternative approaches. One of these was to set up bookmarks for the aforementioned bus tracker on Web ‘n’ Web. What is delivered in the WAP version of the site and it’s not that user friendly at all. When it comes to selecting a bus stop to monitor, it asks for a stance number. Only for my nous, I wouldn’t have been able to find the ID’s that I needed. That’s not brilliant but I worked around it to make things work for me. The observation is one for those who design mobile versions of websites for public use.

Another development is the discovery of Bolt Browser and, so far, it seems a worthy alternative to Opera Mini too. There are times when it lives up to the promise of faster web page loading but that is dependent on the strength of the transmission signal. A trial with the Met Office website showed it to be capable though there were occasions when site navigation wasn’t as smooth as it could have been. Up to now, there have been no crashes like what happened to Opera Mini so it looks promising. If there is any criticism, it is that it took me a while to realise how to save favourites (or bookmarks). While the others that I have used have a button on the screen for doing so, Bolt needs you to use the application menu. Other than that, the software seems worthy of further exploration.

All in all, surfing the mobile remains an area of continued exploration for me. Having found my feet with it, I remain on the lookout for other web browsers for the BlackBerry platform. It is true that OS 6 features a Webkit-powered browser but I’m not buying another device to find out how good that is. What I am after are alternatives that work on the device that I have. Porting of Firefox’s mobile edition would be worthwhile but its availability seems to be limited to Nokia’s handsets for now. Only time will reveal where things are going.

Worth the attention?

21st July 2010

The latest edition of Web Designer has features and tutorials on modern trends one new ways to use fonts and typography in websites. One thing that’s at the heart of the attention is the @font-face CSS selector. It’s what allows you to break away from the limitations of whatever fonts your visitors might have on their PC’s to use something available remotely.

In principle, that sounds a great idea but there are caveats. The first of these is the support for the @font-face selector in the first place though the modern browsers that I have tried seem to do reasonably OK on this score. These include the latest versions of Firefox, Internet Explorer, Opera and Chrome. The new fonts may render OK but there’s a short delay in the full loading of a web page. With Firefox, the rendering seems to treat the process like an interleaved image so you may see fonts from your own PC before the remote ones come into place, a not too ideal situation in my opinion. Also, I have found that this is more noticeable on the Linux variant of the browser than its Windows counterpart. Loading a page that is predominantly text is another scenario where you’ll see the behaviour more clearly. Having a sizeable image file loading seems to make things less noticeable. Otherwise, you may see a short delay to the loading of a web page because the fonts have to be downloaded first. Opera is a particular offender here with IE8 loading things quite quickly and Chrome not being too bad either.

In the main, I have been using Google’s Fonts Directory but, in the interests of supposedly getting a better response, I tried using font files stored on a test web server only to discover that there was more of a lag with the fonts on the web server. While I do not know what Google has done with their set up, using their font delivery service appears to deliver better performance in my testing so it’ll be my choice for now. There’s Typekit too but I’ll be hanging onto to my money in the light of my recent experiences.

After my brush with remote font loading, I am inclined to wonder if the current hype about fonts applied using the @font-face directive is deserved until browsers get better and faster at loading them. As things stand, they may be better than before but the jury’s still out for me with Firefox’s rendering being a particular irritant. Of course, things can get better…

Exploring the mobile web

16th July 2010

With a change of job ahead of me, I decided to make my web usage a little more mobile. The result was the purchase of a Blackberry 8520 Curve on a T-Mobile pay-as-you-go tariff to complement my existing phone. Part of the attraction was having email on the move and a little web access too. On both accounts it hasn’t though GPRS isn’t the speediest for web browsing and you get to appreciating mobile versions of websites. It’s just as well that this website that you’re reading has a mobile version.

Hooking the Blackberry up to GMail was no problem once I had paid my dues and the necessary set up was done for me; it was only then that the required option was available through the set up screens. RIM’s own web browser may be no slouch when it comes to rendering websites but I put Opera Mini in place as well for those times when the default option could be bettered and they exist too. Speaking of RIM applications, there’s one for Twitter too though I added Übertwitter for sake of greater flexibility (it can handle more than one account at a time, for example). In addition, I have instated applications for WordPress and LinkedIn too and it was then that I stopped myself spending too much time in Blackberry App World. If I was of the Facebook persuasion, I might be interested in the default offering for that as well but I have learnt to contain myself.

Of course, there are limitations to the device’s capabilities with regards to email and web on the move. Long emails still need desktop access (messages can get truncated) and mobile unfriendly websites will take an age to load and explore; a small screen means much more finger work. After all, this is a small device so the observations aren’t really surprising; it’s just that I encounter the reality of life on a small screen now. Nevertheless, useful site like those from Google and the Met Office have a mobile variant though I’d like to see the latter including its rain radar as part of the package.

Speaking of life on a smaller scale, there’s the size of the keyboard to consider too. So far, I haven’t had much practice with it but I am unsure as how some craft longer blog entries with the the tiny keys. Then, there’s the ever-present threat of arm discomfort and RSI that you have to watch. For that reason, I’ll stick with use for an hour at a time rather than going mad altogether. Navigating around the screen using the tiny trackpad is something to which I am adjusting and it works well enough too so long as you’re not looking through long web pages or emails.

To bring this piece to a close, the new gadget has been finding uses and I don’t plan on leaving it idle after paying over £150 for it. Apart from acting as an expensive calculator, it has already travelled abroad with me with roaming not being a problem; I may have failed to get it to work with hotel broadband but there was EDGE availability to keep things connected together. All in all, the device is earning its keep and teaching me a few things about mobile handheld computing with my main website in process of being made more mobile compatible with the front page and the photo gallery gaining versions for handheld devices after the same was done for the outdoors blog earlier this year (might make the design look more like the rest of the site though). Without something on which to do some real testing, that idea may not have become reality like it is. It may be no desktop substitute but that’s never to say that these devices may never get near that situation. After all, there was a time when no one could imagine the same for laptop PC’s and we all know what has happened with them.

You always can install things yourself…

26th November 2009

With Linux distributions offering you everything on a plate, there is a temptation to stick with what they offer rather than taking things into your own hands. For example, Debian’s infrequent stable releases and the fact that they don’t seem to change software versions throughout the lifetime of such a release means that things such as browser versions are fixed for the purposes of stability; Lenny has stuck with Firefox 3.06 and called it Iceweasel for some unknown reason. However, I soon got to grabbing a tarball for 3.5 and popped its contents into /opt where the self-contained package worked without a hitch. The same modus operandii was used to get in Eclipse PDT and that applied to Ubuntu too until buttons stopped working, forcing a jumping of ship to Netbeans. Of course, you could make a mess when veering away from what is in a distribution but that should be good enough reason not to get carried away with software additions. With the availability of DEB packages for things like Adobe Reader, RealPlayer, VirtualBox, Google Chrome and Opera, keeping things clean isn’t so hard. Your mileage may vary when it comes to how well things work out for you but I have only ever had the occasional problem anyway.

What reminded me of this was a recent irritation with the OpenOffice package included in Ubuntu 9.10 whereby spell checking wasn’t working. While there were thoughts about is situ fixes like additional dictionary installations, I ended up plumping for what could be called the lazy option: grabbing a tarball full of DEB packages from the OpenOffice website and extracting its contents into /tmp and, once the URE package was in place, installing from there using the command:

dpkg -i o*

To get application shortcuts added to the main menu, it was a matter of diving into the appropriate subfolder and installing from the GNOME desktop extension package. Of course, Ubuntu’s OpenOffice variant was removed as part of all this but, if you wanted to live a little more dangerously, the external installation goes into /opt so there shouldn’t be too much of a conflict anyway. In any case, the DIY route got me the spell checking in OpenOffice Writer that I needed so all was well and another Ubuntu rough edge eradicated from my life, for now anyway.

So you just need a web browser?

21st November 2009

When Google announced that it was working on an operating system, it was bound to result in a frisson of excitement. However, a peek at the preview edition that has been doing the rounds confirms that Chrome OS is a very different beast from those operating systems to which we are accustomed. The first thing that you notice is that it only starts up the Chrome web browser. In this, it is like a Windows terminal server session that opens just one application. Of course, in Google’s case, that one piece of software is the gateway to its usual collection of productivity software like GMail, Calendar, Docs & Spreadsheets and more. Then, there are offerings from others too with Microsoft just beginning to come into the fray to join Adobe and many more. As far as I can tell, all files are stored remotely and I reckon that adding the possibility of local storage and management of those local files would be a useful enhancement.

With Chrome OS, Google’s general strategy starts to make sense. First create a raft of web applications, follow them up with a browser and then knock up an operating system. It just goes to show that Google Labs doesn’t just churn out stuff for fun but that there is a serious point to their endeavours. In fact, you could say that they sucked us in to a point along the way. Speaking for myself, I may not entrust all of my files to storage in the cloud but I am perfectly happy to entrust all of my personal email activity to GMail. It’s the widespread availability and platform independence that has done it for me. For others spread between one place and another, the attractions of Google’s other web apps cannot be understated. Maybe, that’s why they are not the only players in the field either.

With the rise of mobile computing, that portability is the opportunity that Google is trying to use to its advantage. For example, mobile phones are being used for things now that would have been unthinkable a few years back. Then, there’s the netbook revolution started by Asus with its Eee PC. All of this is creating an ever internet connected bunch of people so have devices that connect straight to the web like they would with Chrome OS has to be a smart move. Some may decry the idea that Chrome OS is going to be available on a device only basis but I suppose they have to make money from this too; search can only pay for so much and they have experience with Android too.

There have been some who wondered about Google’s activities killing off Linux and giving Windows a good run for its money; Chrome OS seems to be a very different animal to either of these. It looks as if it is a tool for those on the move, an appliance rather than the pure multipurpose tools that operating systems usually are. If there is a symbol of what an operating system usually means for me, it’s the ability to start with a bare desktop and decide what to do next. Transparency is another plus point and the Linux command line had that in spades. For those who view PC’s purely as means to get things done, such interests are peripheral and it is for these that the likes of Chrome OS has been created. In other word, the Linux community need to keep an eye on what Google is doing but should not take fright because there are other things that Linux always will have as unique selling points. The same sort of thing applies to Windows too but Microsoft’s near stranglehold on the enterprise market will take a lot of loosening, perhaps keeping Chrome OS in the consumer arena. Counterpoints to that include the use GMail for enterprise email by some companies and the increasing footprint of web-based applications, even bespoke ones, in business computing. In fact, it’s the latter than can be blamed for any tardiness in Internet Explorer development. In summary, Chrome OS is a new type of thing rather than a replacement for what’s already there. We may find that co-existence is how things turn out but it means for Linux in the netbook market is another matter. Only time will tell on that one.

A faster Firefox?

9th October 2009

I have been having problems with Firefox being sluggish so I resorted to a Lifehacker tip to see if that helped. It was a matter of opening up the Error Console from the Tols menu and entering the following long line into the command bar and hitting the evaluate button:

Components.classes[“@mozilla.org/browser/nav-history-service;1”].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL(“VACUUM”);

It did the track once or twice but its database hoovering claims are on trial as far as I am concerned. Keeping an eye on what’s eating system resources will be on the menu too, especially after seeing what my brief foray with Ubuntu One was doing. A move to Google Chrome cannot be ruled out of the question either.

Using the Windows Command Line for Security Administration

24th July 2009

While there are point and click tools for the job, being able to set up new user groups, attaching them to folders and assign uses to them using the command line has major advantages when there are a number to be set up and logs of execution can be retained too. In light of this, it seems a shame that terse documentation along with its being hard to rack down answers to any questions using Google, or whatever happens to be your search engine of choice, makes it less easy to discern what commands need to be run. This is where a book would help but the whole experience is in direct contrast to the community of information providers that is the Linux user community, with Ubuntu being a particular shining example. Saying that, the Windows help system is not so bad once you can track down what you need. For instance, knowing that you need commands like CACLS and NET LOCALGROUP, the ones that have been doing the back work for me, it offers useful information quickly enough. To illustrate the usefulness of the aforementioned commands, here are a few scenarios.

Creating a new group:

net localgroup [name of new group] /comment:”[more verbose description of new group]” /add

Add a group to a folder:

cacls [folder address] /t /e /p [name of group]

The /t switch gets cacls to apply changes to the ACL for the specified folder and all its subfolders, recursive action in other words, while the /e specifies ACL editing rather than its replacement and /p induces replacement of permissions for a given user or group. Using :n, :f, :c or :r directly after the name of a specified user or group assigns no, full, change (write) or read access, respectively. Replacing /p with /r revokes access and leaving off the :n/:f/:c/:r will remove the group or user from the folder.

Add a user to a group:

net localgroup [name of group] [user name (with domain name if on a network)] /add

In addition to NET LOCALGROUP, there is also NET GROUP for wider network operations, something that I don’t have cause to do. Casting the thinking net even wider, I suspect that VB scripting and its ability to tweak the Windows Management Interface might offer more functionality than what is above (PowerShell also comes to mind while we are on the subject) but I am sharing what has been helping me and it can be hard to find if you don’t know where to look.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.