Wednesday, September 12, 2012

Watchtower Library disappears from Ubuntu Unity bar

***   Update for Ubuntu 64 bit users below   ***

I noticed a bug for Wine applications and the Unity side bar found in Ubuntu 12.04.

If you use Unity, you might have had this problem too.

Wine applications for some reason do not want to stay in the Unity sidebar. After several reboots I noticed every time the Watchtower Library Icon I had put there just disappeared after reboot.

My solution was to use a program called alacarte. You can get alacarte by looking in the Ubuntu Software Center for it, or by typing: sudo apt-get install alacarte in the terminal.

In alacarte, first you click on the category you want to add your new menu entry in. I chose "other" simply because none of the pre-defined category options really fits with the Watchtower Library.

You can choose "new menu" and make a new category if you want. Since my goal was simply to get the icon to stay put on the Unity bar, other worked fine for this.

click to enlarge picture

I then clicked inside the other category menu entries to make sure alacarte registered me as making changes in that category. I then clicked on the button marked 'new item'.

I got a box that looked like this:

click to enlarge picture

Inside that box, in the name field i put "Watchtower Library 2011" (without the quote marks, of coarse)

Then in the Command field I put this command:

wine /home/denny/.wine/drive_c/Program\ Files/Watchtower/Watchtower\ Library\ 2011/E/wtlibrary.exe

This command will change for every person. My account name for Ubuntu is denny. If your account name where oscar for instance, then you would want it to look like this:

wine /home/oscar/.wine/drive_c/Program\ Files/Watchtower/Watchtower\ Library\ 2011/E/wtlibrary.exe.

I then changed my icon by clicking on the icon button on the left of the new item window. Usually this looks like a springboard.

Once I did this, I was prompted with a file prompt box, and I had to tell alacarte where the icon I wanted was.

Here's what that box looks like:

click to enlarge picture

Once all that is done, I hit ok, and closed out alacarte.

Now when you look for Watchtower Library in the search box at the top of the Unity bar, you will see 2 entries for it. The one made by you, and the one made by Wine.

The one made by you will not have the "Watchtower Library 2011 - English" name, it will simply be what you named it. If you followed my lead, it will be called "Watchtower Library 2011".

Here's my example:

click to enlarge picture
Once you drag the proper icon (or menu entry, whatever you want to call this) to the Unity bar (and it seats itself) it will be there no matter how many times you reboot.

As a side note, this will need to be changed every year. It will be rather simple, just go back into alacarte, and edit your menu entry in "other" or whatever category you installed it in.

The change will look like this once you uninstall the 2011 library and install the 2012 library:

wine /home/denny/.wine/drive_c/Program\ Files/Watchtower/Watchtower\ Library\ 2012/E/wtlibrary.exe

*Remember, replace "denny" with your username, unless your username is denny. :)

This change should be the same for recurring years, i.e. 2013, 2014, etc... That is unless the brothers make a serious change as to how the library is stored in the /home/(username here)/.wine/ directory.

I hope this has been of help to you, if you have any questions, feel free to comment here, or email me at dennygoot@gmail.com
-Denny

***   Update for Ubuntu 64 bit users   ***

I found out, by accident, that my little wine command above only works for 32 bit version of Ubuntu.

Here is my 64 bit correction:

wine /home/denny/.wine/drive_c/Program\ Files\ (x86)/Watchtower/Watchtower\ Library\ 2011/E/wtlibrary.exe

Again, you have to swap "denny" for your username. I.E., if your username is susan, it will look like this:

wine /home/susan/.wine/drive_c/Program\ Files\ (x86)/Watchtower/Watchtower\ Library\ 2011/E/wtlibrary.exe

The only change is that Program\ Files\ now says Program\ Files\ (x86).

Without this, you will NOT get wine running the Watchtower Library in your alacarte menu entry.

-Denny

Monday, September 3, 2012

How to add your console apps to the menu

I noticed while looking over app choices people make, that console apps get ignored a lot because there is no Unity, Gnome, XFCE or LXDE menu entry for them.

If you have to open terminal and remember what to type, people aren't interested in using them, it seems.

I did some digging a few years back and have been using Terminator as my terminal emulator.

One of the great features with Terminator is you can pass it complicated instructions.

I am going to show you how I made easy to use menu entries with Terminator and the menu entry program Alacarte.

One of the first menu entries I made was for the program IRSSI.

To do this I needed to make an entry using Alacarte.

In Alacarte, I first clicked on the category that I wanted my app to be in. In this case "Internet" seemed the best choice.

Then I clicked the "New Item" button. This button will have a + symbol next to it.

As the picture shows below, you then have to add the name of the item and the command.

Click this picture to enlarge it.
The name for this item is simple enough, since my command logged me directly into freenode with my nick and password, I call it Freenode.

I could just start IRSSI, in which I would call the item IRSSI. The name of the item is entirely up to you.

Once you give the item a name, you can change the icon if you wish by clicking on the current icon's picture. In the picture above, it is a road cone.

Here is where Terminator comes in handy. There are 2 options here. If I just wanted to start IRSSI from the menu item I am creating, i can use the command: terminator -e irssi.

But I want it to go to the server irc.freenode.org, and to log me in with my registered nick and password.

So here is where the second option for terminator is so useful. The command to do all of this is: terminator -x irssi --connect=irc.freenode.org --nick=(add your nick here) --password=(add you password)

The -x option (or flag, as some call it) for Terminator allows me to pass a complex command with it's options to Terminator.

Once I have put all of this in the "command" section and hit Ok button (not shown in the picture above because the item was already created) then I now have a menu entry in Unity, Gnome, XFCE or LXDE that will launch my terminal, run IRSSI, and log me into freenode with my registered nick and password.

All of that done by choosing the menu entry I created now, Instead of having to open the terminal and remember all of that off the top of my head or dig around for an automated script I made earlier.

I personally use this option to make MOC my media player, to open my gmail with links, and a few other things I wanted at my fingertips.

Thanks to Terminator, and this wonderful option, you can automate just about any console work you have.

And thanks to Alacarte, you can put that automation into a menu option for ease of use by yourself and those who use your system.

I hope you found this little tutorial I made useful. I use my Freenode menu entry and my MOC menu entry daily.