Click here to Skip to main content
Click here to Skip to main content

Ubuntu: File Managers

, 29 Dec 2013
Rate this:
Please Sign up or sign in to vote.
I am continuing to use Ubuntu as my primary desktop and I am loving it(I still use Windows desktop. It has it’s advantages). As I get used to the environment, I am always looking to mimic familiar options from Windows. This time around I was looking to find out about adding applications to Con

I am continuing to use Ubuntu as my primary desktop and I am loving it(I still use Windows desktop. It has it’s advantages). As I get used to the environment, I am always looking to mimic familiar options from Windows. This time around I was looking to find out about adding applications to Context menu in Ubuntu. Like always, I stumbled on something bigger – File Manager(s).

Earlier I posted about Linux architecture and how different layers of the Operating System can be replaced/added. If you read that post, you will see how I struggled with Unity Desktop that came with Ubuntu 12.04  and eventually learned to replace it with Gnome desktop. Apparently, each desktop has it’s own flavor of File Manager and then some.

If you are coming from the Windows world (like I did), here are some terminologies for you. What we call Windows in Windows Operating System (like Windows XP) is really the Desktop. We saw earlier there are many different Desktops including Gnome, KDE, Unity etc. The Desktops have several parts and one of them is a File Manager. This is called Windows Explorer (it used to be called File Manager in versions before Windows 95). There are choices for Explorer, but I’ve not seen many people replacing the Windows Explorer with another.

In Ubuntu (for that matter entire *nix [Unix, Linux]) world, everything is customizable and/or replaceable. I was able to replace my troubled Unity desktop with Gnome desktop and overcome some issues earlier. When I started researching on Context Menus, I stumbled on Nautilus package, which is the default File Manager in Gnome. Since Ubuntu 12.04 didn’t support Gnome desktop natively, it didn’t install Nautilus either. It had a File Manager called Thunar instead. And, when I installed Gnome, unknowingly, I had also opted for Nautilus, default file manager for Gnome. Apparently, there are at least 20 different File Managers available. See this blog.

This site has a nice picture of the Linux Architecture.

In Gnome Desktop, you get to File Manager by clicking on Places menu on top.

Workspace 1_057Fig 1: Menu to reach File Manager

Screenshot from 2013-01-06 19:06:37Fig 2: Nautilus File Manager

So what about Context Menu?
Coming back to adding context menu, it’s done using Nautilus Actions.I had to install it first. (This you could do it in Ubuntu Software Center or use apt-get command). Once you installed it, you can add context menu items as shown below:

Nautilus Actions ConfigurationFig 3: Nautilus Actions Configuration

And of course, after changing the context menu you need to reload the Nautilus File Manager. To do this, you can type the below command:

<code>killall nautilus</code>

This kills all processes associated with the particular program (here nautilus). For Windows users, this is like going to Windows Task Manager and doing “End Program”. See here for more on killall. Incidentally, they also talk about killing nautilus!!

Running KDiff3 from Context Menu
The program I was trying to add to context menu was KDiff3 (it’s a great diff utility, try it, if you haven’t already. I use it on Windows as well). Nautilus Actions allows you to add programs to the context menu. I select 2 files to be compared and right click to select and open KDiff3 and voilà! KDiff3 opens and diff’s the files automatically!

Nautilus Context MenuFig 4: Nautilus Context Menu

kdiff3_074Fig 5: Kdiff3 From Context Menu

References

  1. http://www.tuxarena.com/2011/06/20-file-managers-for-ubuntu/
  2. http://www.techdrivein.com/2010/05/what-is-nautilus-elementary-and-how-to.html
  3. https://live.gnome.org/Nautilus/Screenshots
  4. http://www.tellmeaboutlinux.com/content/linux-architecture
  5. http://en.wikipedia.org/wiki/File_manager
  6. http://askubuntu.com/questions/88480/adding-extra-options-to-right-click-menu
  7. http://www.omgubuntu.co.uk/2011/12/how-to-add-actions-emblem-support-back-to-nautilus-in-ubuntu-11-10/
  8. http://www.linfo.org/killall.html

Filed under: *nix, CodeProject, Misc Tagged: diff, File Managers, Nautilus, Ubuntu

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Sam Varadarajan
Software Developer (Senior) City of Los Angeles
United States United States
Originally a Physics major, fell in love with Microprocessors and switched to Computer Science 20+ years ago. Since then, dabbled in various languages including, PowerBuilder, Oracle, Java, C, C++, Perl, Python etc. Constantly striving for quality and performance too.
 
I try to help fellow developers with technology as a way of "giving back to the community". Blogging became a natural extension of that effort. Still learning to perfect that art. If one new programmer out there benefits from this blog, my time and effort are fully worth it.
 
The underlying theme in my blogs is power and beauty of programming (and technology in general). A well written program gives me the sense of awe you get when you look at a man made wonder like Angkor Wat. You experience poetry, art, mystique, power all at once. A program and the troubleshooting that ensues also gives you a feeling you get while reading a mystery novel!
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 30 Dec 2013
Article Copyright 2013 by Sam Varadarajan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid