On Saturday 21 June 2003 23:28, Helge Deller wrote: > A few people have asked me, what those "roaming user fixes" are all about. > Please let me try to explain the current problem. > > All KDE applications use the functions readEntry()/writeEntry() to store > values into configuration files under ~/.kde/share/config. > Mostly this is no problem, but as soon as hardcoded paths are stored, the > application is bound to the given path and you might run into problems > later. > > Let's take as example the addressbook configuration file > (~/.kde/share/config/kabcrc): > > [Resource_E9zrABCiHc] > FileName=/home/deller/.kde/share/apps/kabc/std.vcf > > This means, that as long as my home directory is /home/deller, I'll have no > problems at all. But as soon as e.g. the system administrator changes (and > copies) my home directory to e.g. /mnt/homes/deller, this path is wrong and > I won't be able to access my addressbook any longer without reconfiguration > of kaddressbook and all other apps which use similiar absolute paths in > their configuration files. Esp. on workstations attached to big networks > and with user home directories on NFS such situations might happen more > often and the solution is pretty simple: > > [Resource_E9zrABCiHc] > FileName=$HOME/.kde/share/apps/kabc/std.vcf > > In this case, calling readPathEntry() instead of readEntry() will > automatically expand $HOME to the full home directory path, and > writePathEntry(/home/deller/.kde/share/apps/kabc/std.vcf) will store the > string $HOME instead of "/home/deller" in the config file. > This forth-and-back conversion happens absolutely transparent to the > application and no other changes other than changing the necessary > readEntry()/writeEntry() calls to the corresponding > readPathEntry()/writePathEntry() calls are needed. The applications > themself will use and see at runtime the current home directory only. > writePathEntry() and readPathEntry() will change strings which contain the > user's current home directory only. Other values are not changed and the > functions will behave exactly as readEntry()/writeEntry() in this case. > > One nice benefit of this change is of course, that you now will be able to > copy your current & favorite KDE configuration (icons, default paths, > font-configuration,...) directly to your best friend by just directly > copying the .kde subdirectory :-) > > Best regards, > Helge > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe << Just want to know your thoughts about all other files/directories which are placed in $HOME. Some of them are user defined (2), some of them are system generated (1) like "recent files" Examples: for (1) kuickshowrc:DocDirectory=/home/gassauer kuickshowrc:CurrentDirectory=file:/home/gassauer/bilder/fg/ for (2) kwordrc:backup path=/home/gassauer/backup/ -- cu ferdinand http://www.goesing.at >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<