https://bugs.kde.org/show_bug.cgi?id=445082

            Bug ID: 445082
           Summary: user-places.xbel is not updated after change of user
                    name / change of user home location
           Product: frameworks-kcoreaddons
           Version: 5.76.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: mp...@kde.org
          Reporter: kje...@kilhavn.no
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

Created attachment 143283
  --> https://bugs.kde.org/attachment.cgi?id=143283&action=edit
Part of the Dolphin window showing the error message (in Norwegian) that
appears

SUMMARY
I got a new laptop with openSUSE pre-installed (yes!) - but the user name was
"user".
I asked Google how I could rename the user and found the usermod commands to
rename the user and change the user's home directory.
Everything worked fine until I pressed the "Home" button in Dolphin's Places
panel. I then got the error message in the attached screenshot, which referred
to the previous home directory location /home/user.

I checked the System Settings to see if the locations were incorrect, but they
were not - and the "Home" folder icon on the desktop worked as expected. 
However, in the file ~/.local/share/user-places.xbel the "Home" bookmark is
stored as href="file:///home/user"  - and all the default places for my home
directory refer to /home/user

I have never renamed a user before during the 20 years I have used Linux, so I
am setting the severity to minor. It would be nice to have it solved, but it's
something most people will never encounter.
I can think of at least three distinctly different solutions:
1) Execute a script on initialization (KWin startup?) to synchronize the
'bookmarks' with locations from System Settings
2) Don't store the full path, use ~/ to refer to the home directory and add
(library?) code to get the full path when 'places' are requested - that
approach would be beneficial also for places added by users
3) Don't store the location for these bookmarks at all, get it from system
settings and store only the "Hide" option's value

STEPS TO REPRODUCE
1. Rename the login user and update the user's home directory name/location
2. Start a KDE (Plasma Desktop) session
3. Open Dolphin
4. Click on 'Home' in the Places panel

I have not tested, but I expect the same result can be achieved by changing the
user's home directory location, e.g. changing the home directory of user
"chameleon" to "/home/tux"

OBSERVED RESULT
Dolphin does not display the home directory and issues the error message "The
file or directory [old_home_directory] does not exist".

EXPECTED RESULT
Dolphin displays the files and folders in the home directory

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Leap 15.3
KDE Plasma Version: 5.18.6
KDE Frameworks Version: 5.76.0
Qt Version: 5.12.7

ADDITIONAL INFORMATION
None

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to