w23 / obs-kmsgrab

"Zero-copy" Linux screen capture plugin for OBS that uses libdrm and dmabuf
GNU General Public License v2.0
77 stars 13 forks source link

Can't create unix socket without 777 permission #11

Open scaledteam opened 3 years ago

scaledteam commented 3 years ago

Can't create unix socket without 777 permission in /usr/local/share/obs/obs-plugins/linux-kmsgrab/ folder.

w23 commented 3 years ago

Ah yes, we need to figure out a better path for socket.

scaledteam commented 3 years ago

obs-vkcapture uses this path "/tmp/obs-vkcapture.sock", and author also mentioned "$XDG_RUNTIME_DIR/obs-vkcapture.socket". But i don't sure about better socket location too, i'm new in unix sockets.

https://github.com/nowrep/obs-vkcapture/blob/3806d838a629884203c871602a817b2d9b8699ab/src/vkcapture.c#L76 https://github.com/nowrep/obs-vkcapture/issues/13#issuecomment-860911846

w23 commented 3 years ago

But i don't sure about better socket location too, i'm new in unix sockets.

Me too :D

Something something XDG, freedesktop docs, etc. It should be a secure location only visible to current user, as this is a fairly security sensitive thing.

adryd325 commented 2 years ago

seems like most other user specific sockets are in /run/user/1000 which is $XDG_RUNTIME_DIR

xnqs commented 2 years ago

Yeah, my fork actually does that and it works really well. Do note, though, that it uses an older, working version of the plugin that has implicit EGL dependency, and doesn't use the built-in OBS implementation.