You are not logged in.

#1 2015-01-25 00:25:58

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

[Solved] KDE/Dolphin: pass smb://user:password@host to program?

Edit: The best solution seems to mount shares via fstab after all. Using noauto mount option, one can then follow instructions here and mount the shares when one is on the network where they are available. That approach also takes care of "hanging" upon disconnecting from WLAN or on shutdown, because the shares are unmounted before the connection goes down.

Original post below.

==================

smbclient is installed, mpv-git compiled with libsmbclient support.

Following problem:

I have a smb share I can access fine with dolphin, this share has several files. Double-clicking them should open them with the program of my choice - it does not.
When I copy the link and put it in a terminal, it shows up as

"smb://user@host/path/file.mkv"

passing this link to mpv fails after it attempts to connect to the share and fails. Changing the above to

"smb://user:password@host/path/file.mkv"

authenticates and runs fine.

Question: how do I make dolphin pass the password as well? The password is stored in the wallet.

Last edited by Soukyuu (2015-01-28 00:05:28)


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#2 2015-01-26 15:46:34

mzneverdies
Member
Registered: 2012-02-04
Posts: 147

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

Not sure about this, but I think only applications that use kio-slaves will be able to access those files through dolphin.
Try another type of file, for example, a pdf, open it with okular to check if it works, and then try opening the same url with any other non-qt/kde based viewer, if it fails, my point stands. If it still works, no idea smile

Offline

#3 2015-01-26 16:25:47

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

Well, yeah, gwenview is able to open those files. I guess mounting it as a cifs is the only solution then?


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#4 2015-01-27 06:20:19

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

I added my samba shares to my fstab and dolphin opens the files like they were on just another partition (which, I guess, they are...).

//Server/Shares       /mnt/Shares  cifs  guest,uid=1000,comment=systemd.automount,iocharset=utf8                                 0 0
//Server/Homes        /mnt/Homes   cifs  credentials=/home/me/.smbcredentials,comment=systemd.automount,iocharset=utf8,sec=ntlm  0 0

Offline

#5 2015-01-27 12:27:45

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

The problem wou- *attempts to slap the bug on the screen only to realized it's a gif* ahem, would be, if the share isn't present (server down, pc at other location etc).
I'm seeing a "nofail" option for fstab, but is there a more elegant "on demand mount" solution? Maybe something like attempting to remount when (W)LAN is connected?


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#6 2015-01-27 13:37:15

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

'noauto' should only try to mount the shares when dolphin is opened. I don't know for sure, this is a desktop.

*now you have two bugs, doing synchronized figure-eights

Last edited by Buddlespit (2015-01-27 14:43:44)

Offline

#7 2015-01-27 15:18:15

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

Well, noauto works in the way that the shares are mounted only when I click on the device entry on the dolphin sidebar. If I merely enter the folder, it's empty. Any way to make it mount it once I enter the folder, not the device entry?

Also, I had to add "users" to be able to mount the shares. And upon shutdown, it sits there for 1:30 with "a stopping job is running for <share name>". What's with that?


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#8 2015-01-27 18:25:40

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

Ok, so after a lot of reading around, I'm now mounting the shares using the NetworkManager-dispatcher.service. I've added instructions on how to get it to run depending on the network you are connected to here.

Not marking the thread as solved, as there doesn't seem to be a solution using KIO-slaves.


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#9 2015-01-27 21:54:33

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

Soukyuu wrote:

Ok, so after a lot of reading around, I'm now mounting the shares using the NetworkManager-dispatcher.service. I've added instructions on how to get it to run depending on the network you are connected to here.

Not marking the thread as solved, as there doesn't seem to be a solution using KIO-slaves.

No, there may not be a solution to the way you connect via kio-slaves, but the NetworkManager solution appears to be somewhat more elegant than trying to make the square peg fit the round hole. Personally, I think you solved it.

Offline

#10 2015-01-28 00:02:35

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: [Solved] KDE/Dolphin: pass smb://user:password@host to program?

I guess you're right. I marked it as solved now and edited the solution above.


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

Board footer

Powered by FluxBB