Hi, i have several network shares mounted via smb4k. When mounted they are shown under “Fremdgeräte” in my left dolphin panel. Sadly, due to the length of the path, the most important information, the name of the share, doesn’t fit the panel without resizing it. Is there a way to hide the beginning of the path instead of the end of it?
Hi - I don’t have smb shares like that on my system, but, are you able to right-click and “Edit” those Places entries to give them more immediately descriptive names?
I’m able to do that for sftp network locations, so perhaps the same would work in this case?
For the other entries in that section i have the ability to edit and give new names. But for the entries made by smb4k there is only the ability to open the settings for the folder.
Ah, I see, thanks for showing that so clearly!
I’m not aware of a way to do that in that situation (other than using Dolphin/KIO to do the mounting), and it looks like the addition of a nickname feature, at least, has been added to the KDE Bugtracking System as a feature request: 464261 – CIFS shares mounts should be allowed to set a nickname like a KIO SMB share
In the absence of that, I wonder in general - would there be downsides to generally flipping the truncation order there and hiding the beginning instead of the end? For example, would there be some increased risk of going into the wrong filesystem and causing something catastrophic somehow?
I don’t intuitively see that being a negative, if you’re the one defining what’s mounted on the system anyway - but perhaps if someone has five different “Files” directories mounted five different ways, maybe they would use the beginning of the path? The merge request that created the current truncation was [PlacesPanel] Remove horizontal scrollbar (!233) · Merge requests · System / Dolphin · GitLab , and looks to have been done mostly thinking about local folders with long names.
What would folks think about, if possible, flipping it so that network paths (or maybe “Places labels starting with /”) get the start truncated, rather than the end?
Well at least in my case it would make perfect sense to flip it.
Alternatively there is also the possibility to make a hybrid solution.
Imagine the following path
/home/user/smb4k/longfilepath/tosomewhere/folder
you can truncate the beginning or the end
/home/user/smb4k…
…osomewhere/folder
OR do a mixture
/home/user/s…/folder
That way the last layer is shown and the beginning of the path
So I’m not the only one with this problem.
Don’t think it’s a Dolphin issue.
I gues the devellopers from smb4k should add an option to set a “Display name”
Sadly the SMB shares you make in Dolphin itself aren’t “system wide”.
Why?
Then we wouldn’t need smb4k anymore.
Dolphin itself alows to set short names.
Fixed it… with a workaround
Once added to dolpin, navigate to the networkshare /home/smb4k/
for my example I have “DISKSTATION” mounted.
Right click in in and select “Make new” > “Link to Places”
It will be added to Places.
Next, rightclick network group and mark it to hide it.
It will be greyed out.
Last step is to rightclick (not on an item) in the left panel and unmark “Show all items”
The network section/ long pathnames are invisible and your networkshare is in Locations.
“Link to Places”
That looks good for dolphin, the OP’s stated problem.
However, some softwares insist on resolving links, making inconveniently long path names, or with inconvenient characters. One can work around these path names using bind mounts. For example, I once used this entry in /etc/fstab
:
/mnt/btrfs_root/@home/.z/Zoho\040WorkDrive\040(Client\040Company\040Limited)/My\040Folders /home/john/z none bind,exec,x-systemd.requires=/home 0 0
so, to extend the example, what was
~/.z/Zoho WorkDrive (Client Company Limited)/My Folders/projects/name/site/overview.doc
became the more sane:
~/z/projects/name/site/overview.doc