You are not logged in.

#1 2022-04-15 05:51:47

jc65536
Member
Registered: 2021-07-02
Posts: 10

Mysterious cap_%d file

I have an empty file named cap_%d that appears in my home directory from time to time. Anyone know what causes this file to be created?

Offline

#2 2022-04-15 08:32:16

dogknowsnx
Guest

Re: Mysterious cap_%d file

No idea where this file comes from, either, but you could implement something like:

#!/bin/sh

inotifywait --monitor --event create $HOME | while read; do
notify-send --expire-time=5000 'It happened again!'
done &

in your $HOME in order to be notified whenever a file gets created - maybe that'll help track the "perpetrator" down smile
(You need 'libnotify' and 'inotify-tools' installed for that)

EDIT: Edited the script to be more human-readable

Last edited by dogknowsnx (2022-04-15 09:32:43)

#3 2023-09-22 05:57:52

Managor
Member
Registered: 2023-09-22
Posts: 2

Re: Mysterious cap_%d file

Alright. I found the cause. The file appears if you open Kamoso.

Offline

#4 2023-09-22 11:28:25

loqs
Member
Registered: 2014-03-06
Posts: 18,796

Re: Mysterious cap_%d file

Can you reproduce the issue with:

/usr/bin/kamoso

If not that would indicate the issue is in whatever is starting kamoso rather than kamoso itself.

Offline

#5 2023-09-23 06:51:34

Managor
Member
Registered: 2023-09-22
Posts: 2

Re: Mysterious cap_%d file

Yes. Happens when I launch it directly. I don't know what the middleware that launches kamoso would even be.

Offline

#6 2023-09-23 12:02:08

loqs
Member
Registered: 2014-03-06
Posts: 18,796

Re: Mysterious cap_%d file

https://www.reddit.com/r/linuxquestions … untu_2204/ would suggest the issue is not limited to kamoso which would explain why the string cap_ is not found in the kamoso source.
It is found in the dependency gst-plugins-bad [1].

[1] https://gitlab.freedesktop.org/gstreame … in2.c#L225

Offline

#7 2023-10-04 18:28:17

ntony
Member
Registered: 2010-11-17
Posts: 32

Re: Mysterious cap_%d file

I have the same file appears in my home directory occasionally. This has been very long time. I followed the hint from the community and created a `auditd` rule to monitor the creation of this empty `cap_%d`. And found that it's created by Gnome app - Cheese.

I can reproduce it by executing Cheese using CLI or from application menu. I have the audit logs which show that the cap_%d empty file was created by Cheese.

And yes, Cheese calls GStreamer.

Last edited by ntony (2023-10-04 18:30:55)

Offline

#8 2023-10-04 18:31:10

loqs
Member
Registered: 2014-03-06
Posts: 18,796

Re: Mysterious cap_%d file

cheese like kamoso depends on gst-plugins-bad.
Edit:
The following changes disable camerabin2 in the current gstreamer PKGBUILD and also disables a test that does not check if camerabin2 has been disabled but requires it:

diff --git a/PKGBUILD b/PKGBUILD
index f4cce88..66ce9af 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -88,6 +88,8 @@ prepare() {
 
   # Disable broken tests
   git apply -3 ../0001-HACK-meson-Disable-broken-tests.patch
+
+  sed -i '/viewfinderbin.c/d' subprojects/gst-plugins-bad/tests/check/meson.build
 }
 
 build() {
@@ -120,6 +122,7 @@ build() {
     -D gst-plugins-base:tremor=disabled
     -D gst-plugins-good:rpicamsrc=disabled
     -D gst-plugins-bad:amfcodec=disabled
+    -D gst-plugins-bad:camerabin2=disabled
     -D gst-plugins-bad:directfb=disabled
     -D gst-plugins-bad:directshow=disabled
     -D gst-plugins-bad:directsound=disabled
@@ -236,7 +239,6 @@ package_gst-plugins-bad-libs() {
     usr/lib/gstreamer-1.0/libgstautoconvert.so
     usr/lib/gstreamer-1.0/libgstbayer.so
     usr/lib/gstreamer-1.0/libgstbluez.so
-    usr/lib/gstreamer-1.0/libgstcamerabin.so
     usr/lib/gstreamer-1.0/libgstcodecalpha.so
     usr/lib/gstreamer-1.0/libgstcodectimestamper.so
     usr/lib/gstreamer-1.0/libgstcoloreffects.so

Last edited by loqs (2023-10-04 19:13:16)

Offline

#9 2026-02-14 04:26:45

%%%%%%
Member
Registered: 2026-02-14
Posts: 1

Re: Mysterious cap_%d file

This happens to me too... It seems this file is only created when Cheese encounters an error while streaming video from a camera. In my case, this can be replicated by using the camera somewhere else when I launch Cheese. Cheese displays an error saying "There was an error playing video from the webcam", and immediately creates the cap_%d file.

Offline

#10 2026-02-14 08:40:36

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,334
Website

Re: Mysterious cap_%d file


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB