Bug 308569 - dolphin does not start in current users directory
Summary: dolphin does not start in current users directory
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 2.1
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: Mark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-17 18:14 UTC by illumilore
Modified: 2012-10-31 21:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description illumilore 2012-10-17 18:14:31 UTC
When launching dolphin from menu>system> dolphin, it opens with a default url for a home directory that does not exist, instead of the current user.

Reproducible: Always
Comment 1 Frank Reininghaus 2012-10-18 10:33:22 UTC
Thanks for the report. 

What is the 'default URL', which you can probably see in the location bar?
What happens if you open Dolphin from Konsole or with the Alt+F2 dialog?
What is the 'Home folder' configured in the Dolphin settings?
Comment 2 Jekyll Wu 2012-10-20 00:48:19 UTC
wait for information requested in comment #1. 

Maybe attaching screenshots would describe the problem better.
Comment 3 illumilore 2012-10-20 01:28:30 UTC
The bug seems to be because I switched users and imported a bunch of settings to the new user, as far as I can tell. If so, then dolphin should instead use ~/ instead of setting that to /home/user/ so the same config can be used between different users? Like how bash's default is ~/
Comment 4 Mark 2012-10-30 19:21:49 UTC
That is a configuration thing that you can change already. I'm guessing you simply copied your dolphin configuration from another user. 

In dolphin go to Settings -> Configure Dolphin -> Startup
There you see a field called "Location:". Change that to your liking.

Closing this as invalid since it is :)
Comment 5 Christoph Feck 2012-10-30 21:27:47 UTC
The problem here is that Dolphin expands the tilde. Trying to set "~/" as a startup location will save "file://home/<name>" to the configuration, making it impossible to prepare a config file for multiple users.
Comment 6 Mark 2012-10-30 21:37:09 UTC
(In reply to comment #5)
> The problem here is that Dolphin expands the tilde. Trying to set "~/" as a
> startup location will save "file://home/<name>" to the configuration, making
> it impossible to prepare a config file for multiple users.

Actually, no. I just tried that and dolphin indeed expands it. However, you can set the tilde in the actual config file .kde4/share/config/dolphinrc (HomeUrl=~) which will be the users home folder. That will work, even for multiple users, but the tilde sign will be replaced by the actual users home folder when the user enters the dolphin settings. I don't think that is an issue since the config file is then specific for that user anyway.

So yeah, rolling it out to multiple users should be fine i guess.
Comment 7 Frank Reininghaus 2012-10-30 21:46:44 UTC
Sorry for not joining the discussion earlier. I think that this *is* a bug. From dolphin_generalsettings.kcfg:

<entry name="HomeUrl" type="String">
    <label>Home URL</label>
    <default code="true">QDir::homePath()</default>
</entry>

When starting with a clean dolphinrc (no HomeUrl entry), QDir::homePath() is evaluated, which should be fine for every user. However, if the settings dialog is opened and closed without making any changes and then Dolphin is closed, an entry

HomeUrl=file:///home/users_home_folder

is generated. This looks like a bug to me - if the default setting is unchanged, no entry should be generated in dolphinrc. I consider this a rather minor problem compared with many other bugs we have in the database, but if there is a good way to fix this in KConfig (or if we are using KConfig incorrectly), we should not close this.
Comment 8 Mark 2012-10-30 22:04:15 UTC
Right oke, going to look into this now and fix it. Having the code open already :)
Comment 10 Frank Reininghaus 2012-10-31 21:51:56 UTC
Git commit f84c4267edb0a8dde796d744f3338633cc81e572 by Frank Reininghaus.
Committed on 31/10/2012 at 22:43.
Pushed by freininghaus into branch 'KDE/4.9'.

Only store the HomeUrl in dolphinrc if it is not the user's home folder

This fixes the problem that copying the dolphinrc from another user
results in Dolphin starting up in a folder that might wither not be
accessible or not exist at all.
FIXED-IN: 4.9.3

M  +2    -1    dolphin/src/settings/dolphin_generalsettings.kcfg

http://commits.kde.org/kde-baseapps/f84c4267edb0a8dde796d744f3338633cc81e572