Places opens in Disk Usage Analyzer in Ubuntu 13.04

Fixing "Places" Opening in Disk Usage Analyzer in Ubuntu

Are you experiencing the frustrating issue of your "Places" menu in Ubuntu launching the Disk Usage Analyzer (Baobab) instead of the file manager? This can be a common problem, especially after upgrading your Ubuntu version or tweaking system settings. This article provides several solutions to restore the correct behavior, ensuring your folders open as expected.

Understanding the Issue

The root cause of this problem lies in incorrect file associations. Ubuntu uses MIME types to determine which application should open a particular file or directory type. When the association for "inode/directory" is incorrectly linked to the Disk Usage Analyzer, it overrides the default file manager behavior.

Solutions to Restore Default Folder Behavior

Here are several approaches to fix this issue. Try them in order, as some solutions are more direct and might resolve the problem quickly.

1. Using xdg-mime (Recommended for Gnome Fallback Sessions)

This solution is particularly effective for users running the gnome-session-fallback desktop environment. It directly sets the default application for directories.

  1. Open a terminal.

  2. Run the following command:

    xdg-mime default nautilus.desktop inode/directory
    

    This command explicitly tells the system to use Nautilus (the default GNOME file manager) for opening directories.

The command xdg-mime default <file_manager>.desktop inode/directory works by setting the application to handle the opening of directories. It associates the inode/directory MIME type with nautilus.desktop, which is the configuration file for the Nautilus file manager. This tells the system to use Nautilus to open folders by default, correcting the issue where the Disk Usage Analyzer was being launched instead .

2. Editing the baobab.desktop File

This method involves modifying the Disk Usage Analyzer's desktop entry file to prevent it from claiming the "inode/directory" MIME type.

  1. Open a terminal.

  2. Open the baobab.desktop file with root privileges using your preferred text editor. For example:

    sudo nano /usr/share/applications/baobab.desktop
    
  3. Locate the line that starts with MimeType=.

  4. Remove inode/directory; from the list. The line should no longer include this entry.

  5. Save the file and exit the text editor.

  6. Update the desktop database:

    sudo update-desktop-database -q
    

This removes the Disk Usage Analyzer's association with directory handling.

3. Reconfiguring Nautilus

If Nautilus, the default file manager, is responsible, the solution might be to reconfigure the said file manager via:

  1. Open a terminal.

  2. Excute the command:

    sudo dpkg-reconfigure nautilus
    

4. Kubuntu Specific Solution

If you are running Kubuntu with KDE Plasma desktop, the File Associations settings can be easily configured to override the "inode/directory" associated application.

  1. Open "File Associations". You can search it using the program search bar. In case you do not find it, navigate to "System Settings" > "Applications".
  2. Expand "inode" and search for "directory".
  3. Move your desired application to the top of the "Application Preference Order". Dolphin should be there by default, but if you desire to use another one, you can configure it easily via editing the application itself.
  4. Ensure the "Command" of the application is correctly oriented to the program itself, alongside "%U" to properly pass it the directory used.

Important Considerations

  • Permissions: When editing system files, always use sudo to obtain root privileges. Incorrect permissions can prevent your changes from taking effect.
  • Backup: It's always a good idea to back up any configuration files before making changes, especially when using sudo. This allows you to easily revert to the original state if something goes wrong.
  • Desktop Environment: The specific steps might vary slightly depending on your desktop environment (GNOME, KDE, XFCE, etc.). The solutions above are primarily tailored for GNOME and KDE.
  • Sublime Text Interference: If you've previously configured Sublime Text as the default application for directories, this may conflict. The solution could involve reverting those Sublime Text-related configurations specifically.

Conclusion

By systematically applying these solutions, you should be able to resolve the issue of "Places" opening in the Disk Usage Analyzer in Ubuntu. Identifying the underlying cause, whether it's a MIME type association problem or a desktop environment configuration, is key to implementing the correct fix.

. . .