Month: June 2014

Fast and Easy Access to Network Shares – Enter the Gigolo

Mounting a Windows or other OS drive across a network can be a challenge in Ubuntu. Samba is great but it certainly takes a bit of getting used to. If you´re in a hurry it can be a bit cumbersome and fiddly to set up. If the need to have the connection to the other OS is a short-lived one, there is even less incentive to go through the whole rigmarole to get the connection set up.

Gigolo is a great utility that has saved me time as well as finger and brain-ache on more than one occasion. It is available in the Software Centre.

To use it is very straightforward. Firing up the software brings up the main window.

Gigolo Main Window
Gigolo Main Window

Click on the Connect icon and complete the details for your connection in the Connect to Server dialog. Pick the appropriate type of connection from the Service type drop-down menu and the fields that are required in order to complete the connection are displayed. These fields differ from connection type to connection type. The ones that appear when you select a Samba share are shown below.

Connect to Server Menu
Connect to Server Menu

Provide the required information as appropriate for your connection, and then click the Connect button. If one is required you will be asked for a password. The Connect to Server dialog closes and you are returned to the main Gigolo window. You should have en entry in the main window representing your connection.

You can double-click it to open a file browser window on your Samba share, or highlight it and click the terminal icon in the toolbar to open a terminal window on your shared resource.

Gigolo With Active Connection
Gigolo With Active Connection

You can also create bookmarks in Gigolo so that you don’t need to re-enter the details of a connection that you wish to re-use, and you can select to have the shared resource automatically connected each time your system is restarted.

Tags : , ,

Setting File Associations at the Command Line

I use Freemind, the FOSS mind-mapping software, as a thought capture and organisation tool. When I upgraded to Trusty Tahr 14.04 I forgot to re-install Freemind. I subsequently tried to open an existing mindmap file (a Freemind file with an extension of .mm) but it opened in gEdit, the default Ubuntu test editor.

Realising I hadn’t put Freemind back onto my desktop since the upgrade, I fired up the Software centre and installed Freemind. I double-clicked the .mm file again but it still opened in gEdit.

OK, looked like I needed to set the default application for the .mm file type. I right-clicked the .mm file and highlighted Open With in the context menu. Darn – Freemind wasn’t listed in the daughter menu.

Next step was to select the Other Application… option from the context menu. This allows you to select the default program from a list of installed applications. But Freemind wasn’t listed there either!

I did a bit of reading and found the mimeopen command, which saved the day.

I opened a terminal window, cd’d to the folder with the .mm file and executed:

mimeopen -d FirstOrderLogic.mm

I was presented with a text mode menu in the terminal:

Please choose a default application for files of type application/x-freemind

1) FreeMind (freemind)
2) LibreOffice Writer (libreoffice-writer)
3) Geany (geany)
4) gedit (gedit)
5) Other…

use application #

That was great – Freemind was listed in the menu. I entered the digit 1 as my response and pressed enter. Freemind was then fired up automatically and the file loaded.

From that point onwards the association between Freemind and .mm files was established, and double-clicking any .mm files invoked Freemind to correctly launch and open the target file.

Even if Freemind hadn’t been listed in the mimeopen menu, I could have used option 5 and then specified the application I wanted to use by name. In my case this would have been:

freemind %f

Where the %f represents a token which is replaced at run time by the name of the file on which you have double-clicked.

Tags : , ,