Brain Dump

A place to store my random thoughts and anything else I might find useful.

Changing default Documents path in Kubuntu Hardy

Posted by mzanfardino on September 19, 2008

Since I started working with kubuntu 8.04.1 (hardy) with KDE 3.5.9 I have been irked that the default path to my documents folder has been changed from “documents” to “Documents”. I realize to some this might seem a trivial change, but when you work from the command line (cli) as I do, you find that a change in capitalization for such a frequently used folder can slow you down. As a result I have wanted to change my configuration to use “documents” but found that simply adding the documents directory was not enough. Several applications, such as System Menu (found in the applet panel) and Dolphin still point to Documents.

While doing some research I followed the trail from System Menu. First I found that the directories available from System Menu are derived from /usr/share/apps/systemview by way of .desktop files. Looking at documents.desktop reveals that the path is set by kio_system_documenthelper, which in turn is a script located in /usr/bin that relies on kde-config to return $document_path.

Okay, so it appears that there is a path that must be changed on a user level. Looking at System Settings (systemsettings) -> About Me -> Paths reveals three user paths that can be changed: Desktop, Autostart, and Documents. Simple right? Just change the path in Documents to point to documents instead of Documents. Wrong. Making this change and applying it is not enough. After a relog (and later a reboot) the path appears to remain set to it’s default of Documents.

What you say? How can this be? And how can I make this change permanent? It seems that there is another file that needs to be edited before these changes can be made permanent. Located in /etc/xdg is the file user-dirs.defaults. This file must be changed to reflect the new path as well. It appears there is some mechanism which I do not understand that reads the values from user-dirs.defaults and overwrites any changes made by the user in systemsettings (note: using kcontrol instead of systemsettings behaves in the same manner).

The good news? Simply change /etc/xdg/user-dirs.defaults to reflect whatever path you choose for documents. Once this has been done you can user systemsettings (or kcontrol) to change the path and this time the change will be made permanent.

NOTE: As with Documents, the Desktop path can also be changed as documented above.

Mark Zanfardino

Advertisements

One Response to “Changing default Documents path in Kubuntu Hardy”

  1. Kourtney said

    We’re a bunch of volunteers and starting a new scheme in our
    community. Your website offered us with helpful information to work on. You
    have done a formidable job and our whole group shall be grateful to you.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: