Pages

Saturday, November 15, 2008

Quick Actions in Nautilus

Nautilus-actions lets you add programs to the Nautilus context menu (it comes up when you right-click on a file or folder).


You can get it via synaptic, or the command:

sudo apt-get install nautilus-actions

Once it's installed, bring up the gui from the command line by typing:

nautilus-actions-config


To add a program to the contect menu:

Click on +Add

  • For label, put in the name of the program you're adding
  • For path, inter whatever you would type at the command line to start the program
  • For parameters, enter any parameters you want to run the program with (see the manual for the program)

Go to the Conditions tab to select when you want the program to show up on the context menu.   For instance, if the program you're adding only works on individual files, check "Files only."

Wednesday, October 29, 2008

More Space in Firefox

My wife started using an eee for work. It's cool, but but there's one big (or small) inherent limitation: screen size. It's really hard to use some applications on a tiny screen.

Since browsers do just about everything now -- and even more once you start using a netbook computer -- making space on Firefox is crucial.

There's a lot you can do, but it's usually a trade off between convenience and screen space.


Space-saving Themes
The quick, comprehensive way to get more space is with a space-saving theme.

Classic Compact
Classic Compact is, well, the classic compact theme for Firefox. If gives you everything you have on your regular theme, but smaller. It can look a little squished, but that's because it makes all of the elements as big as possible within a smaller space. I liked it so much on the eee that I've started using it on my laptop, which has a 13" screen. Why not?

Classic Compact Options lets you tweak Classic Compact. Some tweaks are just cosmetic, but merging you menu bar into one button saves space.

Other Compact Themes
iFox Smooth, zblack and Littlefox do the same thing, but look a little different.

Tweaking Firefox
If you're committed to keeping your regular theme, you can tweak that for space. In fact, there are a few options you can choose without adding extensions.

Fullscreen
Push F11. It puts Firefox into full screen mode. Lots of room. Putting your cursor near the top of the screen gets you the tabs and Bookmark Toolbar back. Hitting F11 again restores your normal screen.

Hide Toolbars
Firefox usually has three toolbars across the top:
  • Menubar
  • Navigation Toolbar
  • Bookmark Toolbar

And then there may be other toolbars added by extensions, like Web developer. You can get rid of toolbars.

View > Toolbars

Just uncheck the toolbars you can live without.

Remember that the Bookmark Toolbar is convenient, but you can almost as easily use the Bookmarks menu item.

Thin the Navigation Toolbar
If you need the navigation bar, but want to make it thinner:

View > Toolbars > Customize > Show: Icons > Check "Use small icons"

More space with very little loss of convenience.

Compact Menu2
This one's a little tricky. Compact Menu2 literally replaces your menu bar with a small, blue globe icon. It adds an option to hide the Menu Toolbar to View > Toolbars. That means you can hide the menu toolbar, but still have access to the menu items via the icon.

Clicking on the icon drops down a menu with the items that are usually on the menu bar (or those of them you chose to include).

Once you've installed the extension, go to:

View > Toolbars >Customize

Under "Select the menus you want to see in the Compact Menu" check the menu items you want. I chose all of them -- since the Compact version is a drop-down menu, it doesn't seem to matter much.

Then you find the small, blue globe icon in the icon area and drag it to whatever toolbar you want.

Literally replacing the menu bar has some interesting results. For instance, if you drag the icon to the Menu Toolbar it will replace all of the menu items, but what you'll have is the icon on the menu toolbar, which won't save you any space.

If you put it on the Navigation Toolbar, then you can hide the Menubar, but still have easy access to all of the menu options.

If you happen to hide the Menubar before you drag the icon somewhere, you'll lose access to the menu items -- including View which is the item you need to get the Menubar back. Of course only an idiot would do that. Fortunately I happen to know how to fix it. Find an empty part of the Navigation Toolbar (just to the right of the address bar works) and right click. That will bring up the toolbar menu and you just click the box by Menubar.

Tiny Menu does the same thing, but I haven't tried it.

Sunday, October 19, 2008

Google Bookmarks in Firefox

Using your Google Bookmarks is a lot more convenient with some Firefox add-ons.

If you haven't tried them, Google Bookmarks are always available online as part of your Google account. They're also integrated into Google Notes. That makes them handy for citing stuff you grab from the web.

The Firefox extensions let you keep your Google Bookmarks as handy as regular bookmarks in your browser. I've tried three third-party extensions as well as the official Google Bookmark button. They're all usesul.

Folders? Subfolders?
The third-party extensions enhance what Google offers by adding folders and subfolders.

Google Bookmarks doesn't do folders -- it does labels (or tags). Initially Gmail only offered tags too, but the big G bowed to public pressure and switched to folders. The extensions do that same thing for bookmarks by adding a virtual folders system.

I say virtual because, when you're using the extension to browse your bookmarks, it looks for all the world like they're in folders and subfolders. But if you go the the regular Google Bookmarks site you don't see folders -- you just see labels. Some labels are just: Label. Other labels are Label/Sublabel. The extensions turn the Label/Sublabel into folders and subfolder.

Deng Google Bookmarks
Deng Google Bookmarks puts the Google Favorite star on your menu bar with a drop-down menu. Clicking it drops down all of your Google Bookmarks, plus links for managing, adding, reloading your bookmarks, and going to your Google Bookmarks page.

The bookmarks drop down as folders. Putting your cursor on one of the folders either reveals the bookmarks in the folder, or reveals subfolders, or both.

The Deng options panel lets you enter your Gmail address and password so it can log in to get your bookmarks.

GBookmarks
GBookmarks puts a dropdown menu on the Firefox menu bar and drops down your bookmarks in folders and subfolders, just like Deng.

Once you put in your Gmail address and password, you can select an option to have GBookmarks log into your bookmarks account as soon as you open Firefox. Otherwise it logs in the first time you click on the menu.

You can also have GBookmarks your bookmarks by date or title, and you can use the extension to import your Firefox bookmarks into Google.

Gmarks
Gmarks is the slickest and most adaptable of the extensions. At first glance, it looks like pure Google Bookmarks. When you click on the Gmarks menu, it drops down a list of your bookmarks by label. Some of the labels have "nested" labels within them. It's the Folder/Subfolder deal using Google terminology.

When you add a bookmark, it offers you the standard Google options: label and notes. To add a bookmark with a nested label, you put the label in this format: Label>Sublabel.

It's Organize Bookmarks box lets you change the name, change the url and add or delete a label. It doesn't offer virtual folders and subfolders, it gives you Google Bookmarks with labels the way Google intended.

Gmarks options menu lets you sort your bookmarks three ways:
  • Title
  • Date
  • Number of visits to a site
It pulls the number of times you've visited a site from your Firefox history.

You can make a list of labels you don't want to show up on the dropdown menu. You can also make a default label that's applied to unlabeled bookmarks. Or, more accurately, bookmarks that would have been unlabeled were it not for the unlabeled bookmark label. Gmail also lets you select any key to open up a Search Bookmarks bar. Once you've selected a key, you just tap it twice and the search bar pop open.

Display options let you put at the top of your list labels for the most recent and most used bookmarks. The bookmarks show up as nested labels.

Sunday, October 05, 2008

Ubuntu Keyboard Problem

Lost the use of my Shift keys -- both of them. The odd thing is that Caps Lock still worked fine. Turned out to be a Compiz issue. Went to:
System > Preferences > Appearance > Visual Effects
Selected "None" and both Shift keys started working again. (Notice the appropriate use of capital letters). It's not an elegant solution because I'm living without Compiz (but surviving). If you'd like to keep Compiz and the use of your Shift keys, take a look at this. I haven't tried it yet.

If neither of those things work, you can try this.

Saturday, October 04, 2008

No Room to Move

Here's a strange problem. I moved the panel that I usually have at the top of my screen to the left side of the screen and couldn't move it back. The panel is the bar across the top (or wherever) that holds menus, icons, the date, etc. Moving it panel is usually easy. So easy that I moved it by accident. You just grab an empty spot on the panel and drag it to where you want it. If you can.

With the panel on the left side of the screen there wasn't enough room for all of the items I have on it. Some of the icons disappeared. It turned out they were just so scrunched up that they overlapped. I click on Applications to get the drop down menu and Firefox opened. Turns out the Firefox icon was under the "cati" of Applications. Tomboy was under the "A" and OpenOffice was in between. To get the drop-down menu I had to click on the very end of the word. More amusing than irritating, until I tried to move the panel back to the top of the screen.

There was no empty space on the panel to grab it. I moved the cursor in minute increments between items and never found a gap.

Here's the solution: edit the xml file that holds the panel configuration.

Open:

Home (Select View > Show Hidden Files) > .gconf > apps > panels > toplevels > %gconf.xml.

You can open it with the text editor. If you want to do it from the command line:

sudo gedit /home/.gconf/panels/toplevels/%gconf.xml

Find this entry:

bottom

Change the stringvalue "bottom" to "top", or whatever is appropriate, save the file and restart X with Ctrl + Alt + Backspace.

While you're getting to %gconf.xml you notice all of the other xml files that control the panels if you want to mess around with them.

Saturday, July 19, 2008

Extending Firefox

One of the great advantages of Firefox as a web browser is the way you can customize it. You can change the way it looks, you can open it with different profiles and you can add functions.

The new functions come in the form of Add-ons. Add-ons can be extensions or plug-ins. You don't really have to know the difference, but they're not the same.

Extensions and Plug-ins
Plug-ins add some new process to Firefox, like the ability to run Java code or play Flash videos. The plug-in is usually a program that can run on it's own; the plug-in just lets it operate from within Firefox. You often add add-ons when a website suggests it. For instance a page will say "You need the Flash Player to watch the video." It will usually offer you a link to the plug-in.

Extensions add to Firefox itself. You seek them out because there's something you want Firefox to do, or do more quickly or conveniently. Extensions let you do pretty much everything you can imagine -- and some things that I, at least, hadn't imagined.

Extensions change the way tabs work, add tools for easily downloading files, and let you write blog entries right from your browser.

Finding Add-ons
You can search through thousands of add-ons and try as many as you want.

A good place to start is Firefox's own add-ons site. Search or browse until you find something you'd like to try.

Adding Add-ons
Make sure it works on your operating system and your version of Firefox. The add on page will usually detect you operating system and tell you if the add-on won't work. Your version of Firefox is rarely a problem unless it's really old or brand new.

If it's that old, consider updating it. If it's that new (or a beta) you might have to wait a few weeks. A lot of developers wait until a new browser is out of development before rewriting their add-ons. And sometimes it just takes them a while to get around to it. Developing Firefox extensions is often a hobby.

The add-on page will have a green button that says Add to Firefox. Click on it. The Software Installation window will open.

It will warn you about possibly malicious add-ons (I've never had a problem with an add-on from the Firefox site). On the bottom right the Install button will be grayed-out for a few seconds. It's to give you time to change your mind. (If I'm not mistaken, there's an extension that will eliminate the wait for adding extensions).

When you can, click Install. Usually you'll have to exit Firefox and reload it before the extension will be available. Some extensions need a bit of setup. You can do that with:

Tools > Add-ons

Pick the extension and click on Preferences. This is the same box you use to disable or get rid of extensions.

Disabling is handy in two cases. One, if an extension is irritating you. Most don't do anything until you use them, but some can be intrusive, like ones that highlight words on web pages and pop up boxes. You might also want to disable extensions if Firefox gets buggy. Some extensions can conflict and cause problems. You can figure it out by disabling extensions one at a time until the problem goes away.

For the most part, though, extensions work flawlessly. They do exactly what the developer promised, they make browsing easier and more convenient, and they're regularly upgraded to add new functions.

Sunday, January 20, 2008

Dependency Hell

A software dependency isn't like a drug dependency -- it doesn't mean you can't survive without a software fix. It can actually be a lot worse. A software dependency is when one program -- the one you need -- depends on another program -- one you probably don't know exists.

Dependency Distress
You load the software you need, but it doesn't work. Turns out it can't work without help from some other program. Worst case? It takes you forever and a day to figure out what elusive bit of code your program needs to operate, then you start the process of finding and installing it. Then you find out that the code on which the program you need depended on has a dependency of its own.

And somewhere along the line you discover that one of these "dependencies" is actually a specific version of some obscure bit of code, not the one you found.

This is called dependency hell. And that's a complement to the devil. Like most circles of software hell, this one started out as a way of making things easier.

Any substantial program is made up of a bunch if different processes. Some of those processes are used over and over in lots of different programs. It doesn't make sense to rewrite those common processes for every new program, instead programmers just drop in a link to an existing bit of code. These frequently-used bits of code, when they're organized into a group, are commonly called libraries.

DLL Hell®
Microsoft tried to fight its way out of dependency hell by creating a system called DLL, for dynamic link libraries. With DLLs, Microsoft was able to escape the dependency circle of software hell and -- this is innovative -- create a new circle called "DLL Hell." I capitalized it because I like to think of it as proprietary: Microsoft invented this particular circle and, as far as I know, owns the rights to it.

In short, DLL became a Hell because the little bits of code in the library could change without changing the overall library. Why's that bad? You install some new software, it replaces the old DLL with a newer, slightly changed, DLL and gets to work. That's fine, for a while.

When you try to use some other program, it calls on the DLL it's always relied on, finds that the bit of code it needs has changed, and returns an error message: something about not being able to find a required DLL file. After much anguish, you reinstall the program and replace the newer DLL with the older one. Now your old program works fine but ....

Yeah, that's why they call it hell. Makes rolling a rock up a hill forever seem almost pleasant.

Cycles, Chains, Trees and other Metaphors of Dependency
Once you're in a circle of hell, you find it has its own subdivisions. Dependency hell is no different. Some dependencies are circular and continue along a curve until they wind up trying to reuse a bit of code that's busy because they're already using it. The problem is as awkward as that sentence describing it.

Some dependencies seem to trace backward along a line that ultimately leads to a guy sitting on a rock with an abacus -- or maybe even an inchoate idea of what an abacus could be.

Some dependencies branch off endlessly as if Escher had designed a tree.

For those of us who aren't archaeologists or theologians of software hell, the result is fairly consistent: our computer won't work and we're late with the report/tax return/homework/online reservation and it's going to ruin our career/life/chance of getting into Harvard/date.

Moving toward Stasis
One way to avoid dependency hell is an increasingly-affordable form of purgatory. Think back to DLL Hell. The problem there is the first "D." It stands for "dynamic" and it means that the library can change independently of the software that uses it. That's efficient because you don't constantly have to change one (library or software) every time you change the other, and because you don't have to repeat all of those reusable bits of code. It's inefficient because it doesn't work, for the reasons stated above.

The solution? SLL, for static linked library. I don't think it's really called that, but it describes the solution reasonably well. You install a library of commonly-used code and a bunch of programs link to it -- but statically. The library doesn't go away as long as any other software is using it, and the software never links to a different library.

That avoids all the cost of linking to changed libraries that won't work with various versions of software. It comes at the cost of having to keep additional libraries on your computer. But hard drives are getting bigger and cheaper at the same time and it's a small price to pay for a way out of hell.

sudo apt-get God
I'd like to tell you that's Latin for "God helps those who are just trying to finish a report/tax return/homework/online reservation so they can have a decent career/life (outside of prison)/chance of getting into Harvard/date." But it's not.

In fact, it's not even Latin. Or English, as far as i can tell. It's the way some versions of Linux try (pretty successfully) to keep us out of dependency hell.

It started with Debian, an early easy-to-use version of Linux that has branched off into, among other 'distros" Ubuntu, the Linux I use. From a user's point of view, it starts with a program called apt-get.

To install a program in Ubuntu, you type into the terminal: sudo apt-get install [name of the program]. The "sudo" part gets you permission to make changes to the operating system; "apt-get install" instructs your computer to get the program and its dependencies and install them; "name of the program" says what to get and install.

The key to making this all work dependency-wise is something that's slightly behind the scenes. Before you can use apt-get, you have to tell it, in a general sense, where to get it. The where, in this case, is a place called a repository.