aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-07-08 08:20:10 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-07-08 08:20:10 -0400
commit96d8a03c886e67291aff4973582c96f4ba2a4955 (patch)
treeea83a438f67f3bf2319203964b2f882e7c4f0732
parentMerge pull request #621 from Fred-Barclay/proposed (diff)
downloadfirejail-96d8a03c886e67291aff4973582c96f4ba2a4955.tar.gz
firejail-96d8a03c886e67291aff4973582c96f4ba2a4955.tar.zst
firejail-96d8a03c886e67291aff4973582c96f4ba2a4955.zip
pulseaudio fix
-rw-r--r--src/firejail/pulseaudio.c20
-rw-r--r--todo25
2 files changed, 40 insertions, 5 deletions
diff --git a/src/firejail/pulseaudio.c b/src/firejail/pulseaudio.c
index 767aaab09..908ef1d25 100644
--- a/src/firejail/pulseaudio.c
+++ b/src/firejail/pulseaudio.c
@@ -56,13 +56,27 @@ void pulseaudio_disable(void) {
56 // blacklist user config directory 56 // blacklist user config directory
57 disable_file(cfg.homedir, ".config/pulse"); 57 disable_file(cfg.homedir, ".config/pulse");
58 58
59
60 // blacklist pulseaudio socket in XDG_RUNTIME_DIR
61 char *name = getenv("XDG_RUNTIME_DIR");
62 if (name)
63 disable_file(name, "pulse/native");
64
65 // try the default location anyway
66 char *path;
67 if (asprintf(&path, "/run/user/%d", getuid()) == -1)
68 errExit("asprintf");
69 disable_file(path, "pulse/native");
70 free(path);
71
72
73
59 // blacklist any pulse* file in /tmp directory 74 // blacklist any pulse* file in /tmp directory
60 DIR *dir; 75 DIR *dir;
61 if (!(dir = opendir("/tmp"))) { 76 if (!(dir = opendir("/tmp"))) {
62 // sleep 2 seconds and try again 77 // sleep 2 seconds and try again
63 sleep(2); 78 sleep(2);
64 if (!(dir = opendir("/tmp"))) { 79 if (!(dir = opendir("/tmp"))) {
65 fprintf(stderr, "Warning: cannot open /tmp directory. PulseAudio sockets are not disabled\n");
66 return; 80 return;
67 } 81 }
68 } 82 }
@@ -76,10 +90,6 @@ void pulseaudio_disable(void) {
76 90
77 closedir(dir); 91 closedir(dir);
78 92
79 // blacklist XDG_RUNTIME_DIR
80 char *name = getenv("XDG_RUNTIME_DIR");
81 if (name)
82 disable_file(name, "pulse/native");
83} 93}
84 94
85 95
diff --git a/todo b/todo
index 3cfea559a..20d4418ec 100644
--- a/todo
+++ b/todo
@@ -139,3 +139,28 @@ Parent is shutting down, bye...
139 /dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44 139 /dev/snd/pcmC2D1 -> /dev/adsp2 -> minor 12+32 = 44
140 140
141 141
14217. test 3d acceleration
143
144$ lspci -nn | grep VGA
145
146# apt-get install mesa-utils
147
148$ glxinfo | grep rendering
149
150The output should be:
151
152direct rendering: Yes
153
154$ glxinfo | grep "renderer string"
155
156OpenGL renderer string: Gallium 0.4 on AMD KAVERI
157
158
159glxgears stuck to 60fps may be due to VSync signal synchronization.
160To disable Vsync
161
162$ vblank_mode=0 glxgears
163
16418. Add nosound in all profiles with private-dev (including server.profile)
165test hedgewars!
166