Skip to navigation

java: command not found

November 3rd, 2007

/usr/bin/java was gone after I did something Java-related (updated it? removed and installed a new version?), so I got:

java: command not found

The solution was doing what it says in /usr/share/doc/sun-java6-bin/README.alternatives
Seriously, this is one of these things why Linux is not ready for people who don’t like fiddling with computers. Why can’t the Java installation automatically run this with sensible values? Experienced users can still change it manually.

Where to install Drupal themes and modules

November 1st, 2007

In your drupal root directory, you have a directory modules and a directory themes. Turns out this is not where you want to install additional modules and themes. Instead, put them into (below the drupal root directory) sites/all/modules and sites/all/themes respectively (create directories if needed).

Mouseless browsing

October 26th, 2007

Some things I do to use the mouse less when browsing.

  1. Use Firefox shortcuts (just google for a list).
  2. I’ve installed the mouseless browsing (MLB) Firefox extension. Every link in a page gets tagged with an ID. Type that ID, then hit ENTER. (For me, this works using “Find as you type” in the Firefox preferences).
  3. I’ve set up some Firefox smart keywords for quick searching from the location bar.
  4. I’ve installed the CustomizeGoogle extension to Firefox. Amongst other things, you can set it to “Give the searchbar focus”. This means that if you can immediately modify you search.
  5. I already have Greasemonkey installed. This lets you modify websites using browser-based JavaScript. From userscripts.org, an online repository of user scripts, I’ve downloaded Google Search Box AccessKey. Now, on any Google search page, hitting the access key and the letter “s” puts the cursor in the search box.
  6. The “access key” differs by browser. Generally, for Firefox under Linux, it is the ALT key. For me, it is apparently ALT+Shift, which is just as well, since I’m using ALT already for loads of XFCE shortcuts. It’s generally a great idea, and some websites have set it server-side for quick navigation to important links. I’ve now implemented it for this blog. Hitting your access key and “s” will put the cursor in the search box. From there, you can either search, or tab-navigate directly down the list of links along the right hand sidebar.
  7. Generally, I try to navigate using the tab key. A big problem is that it is often hard to see which link has focus, or even whether the location bar or the main window have focus. In about:config, filter for “focus”, and set browser.display.focus_background_color and browser.display.focus_text_color. I’ve set the background color to #a2e88b and the foreground color to black. That’s helpful, but doesn’t show up on some elements, such as images. In Greasemonkey, I’ve set up Bright Focus (for buttons, links and textboxes). This gives a border, which also shows up around images and the like. I don’t like the default color, so I set it to be 2px #66CC00. This is also available as a script for the Firefox Stylish extension.
  8. In the same spirit, I’ve added this to my userChrome.js:
    /* give urlbar background color when it has focus */
    #urlbar[focused="true"] { background-color:#A2E88B !important; }
    
    /* change focus rings around acitve tabs  */
    .tabbrowser-tabs > tab:focus .tab-middle {
      -moz-outline: solid 2px #66CC00 !important;
    }
  9. Finally, I’ve set up my home page to be a local page containing a handful of frequently visited sites, so I can just load my home page and then quickly navigate to them.

Getting suspend back after upgrade to Xfce 4.4

October 11th, 2007

Suspend used to work fine out of the box for me. The Xfce logout menu showed a suspend button, and that’s what I used. After manually upgrading Dapper to Xfce 4.4.1, that button is gone, and I cannot get it back.

Now, I finally found the command tha suspends the machine when run from the terminal/ commandline :

sudo pmi action suspend

This works fine again, even though it shows a few error messages in the output. I’ve now created a script:

#!/bin/sh

gksudo pmi action suspend

and bound this to a key shortcut using the Xfce keyboard settings GUI.

Closing the lid and opening the lid brings the laptop back up.

Xfce: Show menu and windowlist using keyboard shortcut

October 11th, 2007

I was looking for this for a long time: the commands that bring up the Xfce menu, the Xfce windowlist and shift focus to the Verve (Xfce panel mini commandline), so that I can bind them to keyboard shortcuts.

They are, respectively, xfdesktop -menu, xfdesktop -windowlist, and verve-focus.

I had to reinstall verve to get verve-focus, and since I’m running the less-than-bleeding edge Dapper, I had to do what this guy did, add a newer repository first.