Issues with SMB Share
I'm unable to preview media content such as photos, videos and documents such as pdfs and word documents over an smb share.
49 Replies
I'm also unable to play videos over smb using haruna or vlc
Works fine using a windows client, I'm able to view PDFs and play videos
The only documents I can view properly on bazzite are small things like text and markdown files
not all applications support this in the same way they do on windows because the smb path implementation is different depending on DEs
the best way to do this (and have almost all programs support it) would be to mount the share into a folder using something like fstab
credentials file can contain the username and password in this format
NOTE: haruna managed to play my music files with the path
smb://192.168.10.22/storage/Music/file.mp3
when i opened from dolphin, but pdfs did not work in okular.
this is a per application issuecan i sidestep this if i just use nfs? i'm fine wth just hosting smb for the windows clients and nfs for the linux devices
ok wait i can get video playback working using haruna if i use a local connection instead of through tailscale
but yeah pdfs through okular still don't work
Not if it is the application not supporting how the de does protocols.
Gnome kinda works around this using gvfs and does a temp local mount for you.
Kde uses a completely different way (not sure exactly what they do, I just noticed when opening remote files in gnome, the file would have a local path through gvfs)
"Say NO to fstab
solutions... " - By @©TriMoon™ 😉
These fine How-To's might be interesting read for both of you:
- https://forum.manjaro.org/t/root-tip-how-to-systemd-mount-unit-samples/1191/1#smb-network-share-14 (Section: SMB network shares)
- https://forum.manjaro.org/t/root-tip-how-to-use-systemd-to-mount-any-device/1185
It's MUCH safer to use systemd-units instead of fidling with fstab
...
- Because if you make a mistake, only that mount will fail, but your system will stay bootable...
- Plus you can have automount/dismount when not used, which is not possible with fstab
configs.
🖖Manjaro Linux Forum
[root tip] [How To] Use systemd to mount ANY device
Difficulty: ★☆☆☆☆ Disk device recognition Manjaro uses udev (see Arch Wiki) to load devices at boot time. The loading of devices is arbitrary and therefore you cannot predict which device will be available at a given path. But static device names do exist and you can assign specific locations to your device and thus ensure e.g. scripts will wo...
Manjaro Linux Forum
[root tip] [How To] systemd mount unit samples
Difficulty: ★★☆☆☆ Example mount units for systemd The examples here are a supplement to the guide on systemd mount units ⚠ Remember to remove the comments placed in the units - they are not writing for copy-paste but as examples. (comments is text beginning with a #) [root tip] [How To] Use systemd to mount ANY device Only use an automoun...
I might just switch to gnome lol
Everything functions well using it
this works but it creates two mounts
i'm guessing this is cause of how bazzite works?
because of symlinks
you can hide one of them
right click --> hide
hmm, the mount works but it's not automounting so i have to run sudo mount -a for the mount to actually work
i get this error if it helps with anything
guess you will have to make a systemd unit for the mount then
welp
lemme figure out how to do that
will have to be a system unit not a user unit based on that error, at least thats my guess
i'm using usb tethering from a phone for my internet connection and it doesn't actually activate the ethernet connection until i unlock the phone
that might be why
ah that might do it too
so when i login it doesn't have network access
bit unsure since i dont have a smb mount on boot
i tried doing a login script through kde for sudo mount -a but it didn't work
i'll see if i can figure out a systemd unit
trying to mount to /mnt says that there's too many levels of symlinks
i'll try mount to my home directory
try mount to /var/mnt
oki, i had the same issue trying to mount to /home/(myuser)/share
i'll try that now
same error mounting there as well it seems 😢
actually no
new information
a bad_network_name and cifs_mount failed w/return code = -2
i get the same bad_network name regardless of if i use tailscale or local ip so i can probably rule that out
but you are able to mount it with sudo right? using something like
sudo mount -t cifs
yup
mounting it manually or through fstab works
cant really help trying things out as im at the countryside with just my phone atm until saturday
no sweat
enjoy what ur up to
a friend suggested for me to use sshfs and it works fairly well so far
i'll see if i can try getting automounting working with sshfs
see what i wrote in https://discord.com/channels/1072614816579063828/1206413112643948555/1206947902514266223 above ☝️ 👆, it has links to how-to's
It involves creating a mount unit first followed by an automount unit that activates the mount unit when needed...
I did try that but I ran into some errors with that as well
if you would share what errors you got at what step, i might be able to help...
Because that functionality is not related to any Linux version, it is something that should work on all versions that use systemd as process manager..
This screenshot I sent earlier
Share the contents of the unit file(s) using
systemctl cat
I am currently in the process of reinstalling bazzite 💀
Lemme see if I can find the mount file
I don't have access to it ATM oof
You can paste it here as text using 3 backticks ` on their own line before and after the pasted text, when you have time...
Maybe this morning
Anytime will do, no hurry..
But it's important to provide the output of
systemctl cat <unitnamehere>.{auto,}mount
, it will provide me with multiple essential info at once..i think this is close to what it was
i can try it on my laptop ig and see if it has the same issue
The output of that command will provide info on name/place you put the unit AND contents and any drop-ins which might alter the functionality etc...
So not just a paste of what you used
Computers sometimes bark on a comma usage instead of a period, this is same kind...
alrighty
I'm honestly fine with mounting in fstab but it doesn't automount on boot
It needs me to Sudo mount -a every boot for it to actually show my stuff
ok as a thought you made some mistakes, first one(s) that popup in my mind are:
1. Unit name is wrong. (it should be same as the mount-point.) (You need to use
5. IIRC you need to use the IP address of the remote host instead of it's single-name hostname in the SMB share name. Due to DNS resolving of that name.
6. DON'T use any
systemd-escape --path
to generate the unit name properly)
2. When mounting under your homedir, it will get mounted as root
and thus not give you access as a user to that directory.
3. /home
is actually a symlink to /var/home
on uBlue type of OS's like Bazzite, so you need to use /var/home
instead..
4. TimeoutSecs=
is something that needs to be used in a .automount
unit, not a .mount
unit...[Install]
section in the .mount
unit if you intend to use automount. (if you had enabled the mount unit already first disable it before removing that section)Well I'll take that into account and redo it when I can today
But it is nearly 2am and I've got a lecture in 5 hours 😭
See the example for SMB mounts in that forum post i linked...
I'll let you know what happens when I wake up
np, take your time, there are plenty of days to fiddle 😉
When you start fiddling with this, it's best to start with a working mount unit (without an
[Install]
section), the automount functionality can be simply added later which needs to be a separate unit file anyhow...
We will be using systemctl start/stop
to activate/deactive the mount while changing the unit file as needed.
PS: I personally never use the Where=
parameter in the mount unit, which allows it to be renamed to mount in a different location.