INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MC 31.0.83 - NAS SMB Share Access for Auto-Import  (Read 1282 times)

Gerhold156

  • Recent member
  • *
  • Posts: 6
MC 31.0.83 - NAS SMB Share Access for Auto-Import
« on: November 24, 2023, 08:41:56 am »

I recently switched over to Linux, I've been using Strawberry to play my music and I'm thinking of upgrading to MC.

My distro details:
Operating System: Kubuntu 23.10
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.10
Kernel Version: 6.5.0-13-generic (64-bit)

When I choose a folder for auto-import from which to import my music, a file manager window appears but I cannot access my NAS SMB shares from it. There is no "remote" option in the location tree.
The shares are accessible via my file manager (Dolphin) and via Strawberry. I didn't configure anything in those programs yet I have access via remote>network>shared folders(SMB).

How do I access the SMB shares with MC on my system?

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72446
  • Where did I put my teeth?
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #1 on: November 24, 2023, 08:54:08 am »

Isn't there a browse button?
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2663
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #2 on: November 24, 2023, 08:58:50 am »

I don't use KDE but typically if a share is accessed via a Linux file manager it will mount the share (sometimes transparently) for you, after which you'll just need to point MC to the mounted location. Usually it will be in /run/media/username/share_name or something like that.

If this is a more permanent situation then you may want to mount the share automatically at boot using /etc/fstab so that you don't need to access the share with the file manager first.

The mount command for SMB is something like: mount -t cifs //[server-ip]/[share-path] /[mount-point]

First create a mount point, if you need to pass credentials then create a credentials file with the proper info, then add an entry to fstab:

Code: [Select]
sudo mkdir /mnt/nas
echo "username=gerhold\npassword=sharepassword\ndomain=WORKGROUP" > ~/.smbcreds
chmod 600 ~/.smbcreds
echo "//nas /mnt/nas cifs uid=0,credentials=/home/gerhold/.smbcreds,iocharset=utf8,noperm,nofail 0 0" | sudo tee -a /etc/fstab

The share should then automatically mount at boot.
Logged

Gerhold156

  • Recent member
  • *
  • Posts: 6
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #3 on: November 24, 2023, 04:44:52 pm »

Isn't there a browse button?

There is but I can only browse the local file system. There is no "remote-network" section which is what I use to access the SMB in the system file manager and Strawberry.
Logged

Gerhold156

  • Recent member
  • *
  • Posts: 6
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #4 on: November 24, 2023, 05:02:42 pm »

I don't use KDE but typically if a share is accessed via a Linux file manager it will mount the share (sometimes transparently) for you, after which you'll just need to point MC to the mounted location. Usually it will be in /run/media/username/share_name or something like that.

If this is a more permanent situation then you may want to mount the share automatically at boot using /etc/fstab so that you don't need to access the share with the file manager first.

The mount command for SMB is something like: mount -t cifs //[server-ip]/[share-path] /[mount-point]

First create a mount point, if you need to pass credentials then create a credentials file with the proper info, then add an entry to fstab:


Accessing the SMB share first in the system file manager does not make it accessible in MC.

The fstab entry works but why does MC require this when the system file manager and other apps (Strawberry, VLC, Brave, etc) do not? 

Actually, I have yet to install any other app with file I/O that can't access my NAS directly.

Will this be resolved in MC32?
Logged

max096

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 363
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #5 on: November 25, 2023, 09:20:00 pm »

Accessing the SMB share first in the system file manager does not make it accessible in MC.

The fstab entry works but why does MC require this when the system file manager and other apps (Strawberry, VLC, Brave, etc) do not? 

Actually, I have yet to install any other app with file I/O that can't access my NAS directly.

Will this be resolved in MC32?

Ultimately, this is also something that DE devs (gnome, kde, etc.) could make a lot better too. Editing fstab is not a very accessible / obvious if you arenīt too familiar with linux. Maybe, some day.

I donīt think every app providing itīs own smb client (or way to access mount) is really a good solution, personally. Seems easier to me to change thing around when the programs are unaware where the data is really coming from. Say you had your music on an HDD mounted to /mnt/music. Now you buy a NAS later. You can now mount your network share to /mnt/music, copy the data and thats that. You donīt have to fiddle with any of the individual apps that might have used that mount. Everything is still where it always was as far as they are concerned. Youīd also mount the same thing multiple times if every app mounts it individually (that part isnīt really a huge deal though).

If people want that feature, sure maybe they can implement it. Just giving you my reasons why I never even attempt to look if a program is able to do that by itself.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #6 on: November 26, 2023, 11:29:09 am »

So I think I've got an idea of what might be going on here.  For OP, MC doesn't implement it's own file browser for Linux, it just uses the system file picker.  I'm on Gnome not on KDE, and when I try to browse files in MC it uses the GTK file picker that most other programs use on my system when browsing for files (firefox and Calibre both use the same GTK file picker for example).  When I mount a network location using my file manager (not via fstab) the network location appears in the file manager (files or nautilus), but not in the GTK file picker that almost all other programs use on Gnome.  So for me MC uses the GTK file picker, and I see no network locations, but that's also true for most other programs I use on Gnome (i.e. firefox and calibre both also do not see the network locations because they're using the same filepicker).  VLC is an exception, it seems to use the QT file picker that KDE uses rather than the GTK file picker, which makes sense as I think it's a QT-based program.

Here's what I wonder:  obviously KDE has it's own QT-based filepicker that, based on OP's report, other apps on KDE are using (i.e. OP sees network locations in other apps.).  Is the issue just that MC is using the GTK file picker rather than the QT one on OP's system?  OP, does your MC file browse window look like the attached image (or a white background version with the same layout)? 

If so it's not really an issue that JRiver can fix exactly, the GTK file picker is a general Linux file picker that many, many Linux programs use.  It might be possible, if the devs wanted to, to support multiple file pickers (I've seen some programs that seem to use different pickers in Gnome and KDE), but that seems like a fair bit of work.

TL;DR- I suspect that the issue may not be anything the JRiver devs have done or can do; they may have just picked one of the two most widely used file picker frameworks and the one they picked happens to not include network locations at the moment.  Of course I may be barking up the wrong tree, but I had a hunch.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #7 on: November 27, 2023, 01:41:53 pm »

MC uses xdg-open. xdg-open depends on desktop settings for the file browser.
The file browser has options depending on which one is being used with regards to showing network devices.
The network devices are not automounted and MC will not even try to automount them which is why you need to add an fstab entry for SMB/CIFS and NFS shares.
Logged

Gerhold156

  • Recent member
  • *
  • Posts: 6
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #8 on: December 01, 2023, 05:40:50 pm »

Here's what I wonder:  obviously KDE has it's own QT-based filepicker that, based on OP's report, other apps on KDE are using (i.e. OP sees network locations in other apps.).  Is the issue just that MC is using the GTK file picker rather than the QT one on OP's system?  OP, does your MC file browse window look like the attached image (or a white background version with the same layout)? 

Yes. It's the same as all the other browse windows in other programs but without the remote/network options.
Logged

Gerhold156

  • Recent member
  • *
  • Posts: 6
Re: MC 31.0.83 - NAS SMB Share Access for Auto-Import
« Reply #9 on: December 01, 2023, 05:54:03 pm »

MC uses xdg-open. xdg-open depends on desktop settings for the file browser.
The file browser has options depending on which one is being used with regards to showing network devices.
The network devices are not automounted and MC will not even try to automount them which is why you need to add an fstab entry for SMB/CIFS and NFS shares.

Why can I access my network via the file browser window of all the other programs on my Kubuntu system, without fstab entries or modifying any "options"?  This is something I intuitively expect to be able to do with MC "out of the box", as with any other program using a file browser.
Logged
Pages: [1]   Go Up