Page 1 of 1

Bookworm Pup64 VLC media player access files issue

Posted: Tue Jun 18, 2024 5:01 am
by BlueKnyght

Hi! I just moved to BookwormPup from FossaPup, then I installed VLC. When playing media files with VLC, I found out, that if the file is in /root or /home/spot, it played well. But, if I tried opening a file from other mounted partitions in VLC, it wouldn't play and reporting "Permission denied!" error. While built-in media players, like MPV and Celluloid, are able to open and play them, even if they are in other mounted partitions. Can somebody check this out? This never happened before in Fossapup.


Re: Bookworm Pup64 VLC media player access files issue

Posted: Tue Jun 18, 2024 4:56 pm
by bigpup

How exactly did you install VLC?

Seems like you have it running as spot, which will limit file locations to the /home/spot/ directory.


Re: Bookworm Pup64 VLC media player access files issue

Posted: Tue Jun 18, 2024 5:11 pm
by fredx181
bigpup wrote: Tue Jun 18, 2024 4:56 pm

How exactly did you install VLC?

Seems like you have it running as spot, which will limit file locations to the /home/spot/ directory.

That's bad, unacceptable, if it can play only files from /home/spot/ :thumbdown:


Re: Bookworm Pup64 VLC media player access files issue

Posted: Wed Jun 19, 2024 1:31 am
by radky

@BlueKnyght

Since VLC may complain when launched as root in Puppy Linux, the bdrv (APT/Synaptic) of BW64 installs VLC as restricted user spot.

Although VLC is not my preferred media player, I tried the following:

1 - Fresh frugal install of BW64
2 - Ran the following in a terminal

app update && app install vlc

This installed VLC 3.0.21 which runs (vlc.bin) as spot (confirmed in TaskManager).

I played media files successfully from /mnt/home (mounted partitions outside of pupsave) and also from external SD and USB drives. Maybe I missed something in your report, but there were no 'permission' errors for me.

In your duplicate post (in the main forum thread of BW64) OscarTalks suggested his VLC pet which is adjusted to run as root in BW64. That would be another option for you.

Maybe other forum members will also reply.


Re: Bookworm Pup64 VLC media player access files issue

Posted: Wed Jun 19, 2024 4:14 am
by rockedge

I just install VLC then modify it with a hack to allow VLC to run as root. Then there are no file access problems.
in a terminal:

Code: Select all

sed -i 's/geteuid/getppid/' /usr/local/bin/vlc

Next time VLC updates this will have to be applied again, otherwise just once will do the trick


Re: Bookworm Pup64 VLC media player access files issue

Posted: Wed Jun 19, 2024 8:49 am
by MochiMoppel
radky wrote: Wed Jun 19, 2024 1:31 am

I played media files successfully from /mnt/home (mounted partitions outside of pupsave)

Confirmed, but I'm unable to play media files copied to /root or even /home/spot when I try to start the files via the right-click menu of ROX-Filer:

Code: Select all

[00007fe648298b80] gl gl: Initialized libplacebo v4.208.0 (API v208)
 Failed to open VDPAU backend libvdpau_r300.so: cannot open shared object file: No such file or directory

or when I drag&drop the files from ROX-Filer to VLC:

Code: Select all

 [00007f4580013040] filesystem stream error: cannot open file /root/spot/big_buck_bunny_720p_1mb.mkv (Permission denied)

However no such error when opening the files via VLC's "Open" menu or via Fsearch's "Open with" menu. Something is fishy with ROX-Filer. For many file formats like .mp3 or .mp4 there is no VLC link in ROX-Filer's right-click menu, however for matroska videos (.mkv) there is :roll:

[EDIT] I found a (partial) answer to the question, why VLC often doesn't show up in ROX-Filer's right-click menu
Example: An mp3 audio file has a mime declaration of 'audio/mpeg'
ROX-Filer consults the file /usr/share/applications/mimeinfo.cache for determining a suitable application for this mime type.
In /usr/share/applications/mimeinfo.cache I found in line 195

Code: Select all

audio/mpeg=deadbeef.desktop;easytag.desktop;io.github.celluloid_player.Celluloid.desktop;mpv.desktop;pmediainfo.desktop;smplayer.desktop;smplayer_enqueue.desktop

No VLC, but in line 197:

Code: Select all

audio/mpeg=vlc.desktop

So what happens is that ROX-Filer picks up the list from line 195 and then ignores line 197.
When I add vlc.desktop to the list in line 195, VLC shows up in the ROX-Filer right click menu.

Responsible for fetching mime types from all .desktop files and eventually creating /usr/share/applications/mimeinfo.cache is the tool update-desktop-database. When I deleted contents of mimeinfo.cache and ran update-desktop-database, the same double entries audio/mpeg= were created, ready to confuse ROX-Filer :(


Re: Bookworm Pup64 VLC media player access files issue

Posted: Wed Jun 19, 2024 9:43 am
by mikewalsh

@BlueKnyght :- Hallo.....and :welcome: to the "kennels".

For myself, where media players are concerned I take the same view as m'colleague bigpup does much of the time. I know it runs contrary to conventional wisdom, but.....don't update for the sake of it (because you feel you absolutely MUST have the very newest version). If it works, then leave it the hell alone. Why try to "fix" it when it is already working? :roll:

You could try the portable version of VLC3 I put together a while back. No, it's not the very newest version - aside from the browsers, very few of the portables actually are! - but it's had the 'root fix' applied (as detailed above by rockedge), can be run from absolutely anywhere in the system (because it's self-contained), and has no problems with playing files from anywhere.

This is v3.0.11.1. I have NO idea what the current, up-to-date build is; I don't take much notice of such stuff. It's entirely your choice; try it, or not.....as you please.

You can find it here, if interested:-

https://mega.nz/file/GTYCwCiL#2gUbN9yjN ... Koz6JGx_RI

  • Download

  • Unzip

  • Move the portable anywhere you like - outside the save IS preferable

  • Click to enter

  • Click 'LAUNCH' to fire it up...

May work for you; may not. Your call.

Mike. ;)


Re: Bookworm Pup64 VLC media player access files issue

Posted: Wed Jun 19, 2024 11:36 pm
by radky
MochiMoppel wrote: Wed Jun 19, 2024 8:49 am
radky wrote: Wed Jun 19, 2024 1:31 am

I played media files successfully from /mnt/home (mounted partitions outside of pupsave)

Confirmed, but I'm unable to play media files copied to /root or even /home/spot when I try to start the files via the right-click menu of ROX-Filer:

Code: Select all

[00007fe648298b80] gl gl: Initialized libplacebo v4.208.0 (API v208)
 Failed to open VDPAU backend libvdpau_r300.so: cannot open shared object file: No such file or directory

or when I drag&drop the files from ROX-Filer to VLC:

Code: Select all

 [00007f4580013040] filesystem stream error: cannot open file /root/spot/big_buck_bunny_720p_1mb.mkv (Permission denied)

However no such error when opening the files via VLC's "Open" menu or via Fsearch's "Open with" menu. Something is fishy with ROX-Filer. For many file formats like .mp3 or .mp4 there is no VLC link in ROX-Filer's right-click menu, however for matroska videos (.mkv) there is...

@MochiMoppel

Please see the following link:

https://unix.stackexchange.com/question ... -correctly

It seems the incorrect entries observed in /usr/share/applications/mimeinfo.cache are the result of failed or incomplete sorting of items in the mimeinfo.cache precursor as defined by line 38 in /usr/bin/update-desktop-database.

As advised in the above link, prepending LC_COLLATE=C to line 38 corrects the sorting error:

LC_COLLATE=C sort "$path1/mimeinfo.cache.pre" | \

With the above adjustment, installing VLC by APT (as restricted user spot) works OK for me.

I can play media via (1) the VLC Menu, (2) ROX right-click and (3) drag-and-drop from ROX to VLC.

Additionally, there are no 'permission' errors when media files are located outside the savefile (/mnt/home or external SD/USB drives).

Maybe @dimkr could also reply if this small modification to update-desktop-database is a proper fix.


Re: Bookworm Pup64 VLC media player access files issue

Posted: Thu Jun 20, 2024 1:59 am
by MochiMoppel

@radky
I "solved" it by renaming vlc.desktop to avlc.desktop, which puts "VLC media player" at first place in the ROX right-click list and doesn't produce sorting errors.
But of course that's not a proper solution. LC_COLLATE=C works better.


Re: Bookworm Pup64 VLC media player access files issue

Posted: Thu Jun 20, 2024 6:56 am
by dimkr

What is /root/spot? If it's a symlink to /home/spot then spot can't follow it because it can't view /root. If you're running an application that runs as spot, you should go to /home/spot and try to open files from there.

AFAIK all xdg-mime stuff is irrelevant here because ROX-Filer is an odd creature with its own MIME type to default handler mappings (it doesn't use mimeapps.list, etc' like any other file manager).


Re: Bookworm Pup64 VLC media player access files issue

Posted: Thu Jun 20, 2024 8:40 am
by MochiMoppel
dimkr wrote: Thu Jun 20, 2024 6:56 am

AFAIK all xdg-mime stuff is irrelevant here because ROX-Filer is an odd creature with its own MIME type to default handler mappings (it doesn't use mimeapps.list, etc' like any other file manager).

ROX does use /usr/share/applications/mimeapps.list, but only if it can't find a handler defined in its own MIME-types directory. If there is one, the ROX handler takes precedence. ROX ignores other locations for mimeapps.list as defined by xdg


Re: Bookworm Pup64 VLC media player access files issue

Posted: Thu Jun 20, 2024 12:59 pm
by mikewalsh
dimkr wrote: Thu Jun 20, 2024 6:56 am

What is /root/spot? If it's a symlink to /home/spot then spot can't follow it because it can't view /root. If you're running an application that runs as spot, you should go to /home/spot and try to open files from there.

@dimkr :-

I get round that by re-creating the /root/spot-to-/home/spot symlink, along with assigning spot:spot ownership to the symlink itself. It then follows the link nicely; anything I put in /root/spot, I have a wee script in there to reassign spot:spot ownership to anything recently added....and 'spot' can 'see' it. I can't speak for anyone else, of course, but it works for me...

Probably a scruffy - and unnecessary - 'hack', I know, but it's one of the first things I do with any new Puppy. Makes life a lot easier further down the line.......and if you use my Spot2Root utility:-

viewtopic.php?t=6542

....it changes file ownership in both directions anyway, moving both into AND out of 'spot'.

Mike. ;)


Re: Bookworm Pup64 VLC media player access files issue

Posted: Thu Jun 20, 2024 3:25 pm
by dimkr

@mikewalsh That won't work in BookwormPup64 thanks to https://github.com/puppylinux-woof-CE/woof-CE/pull/3419, you'll need to disable this sandboxing by deleting /usr/bin/spot-sandbox. Otherwise, spot can't access /root even if it's owned by spot and 777. (If I'm wrong, it's a super serious bug in this security feature)