File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,23 +194,12 @@ PULSECFG
194194 done
195195 unset _pa_try
196196
197- # Configurar Claude Code sandbox para contenedores Docker
198- # enableWeakerNestedSandbox evita "bwrap: Can't mount proc" en contenedores sin user namespaces
199- if ! grep -q '"enableWeakerNestedSandbox"' "$HOME/.claude/settings.json" 2>/dev/null; then
200- python3 - <<'PY' 2>/dev/null || true
201- import json, os
202- path = os.path.expanduser('~/.claude/settings.json')
203- d = {}
204- try:
205- with open(path) as f:
206- d = json.load(f)
207- except Exception:
208- pass
209- os.makedirs(os.path.dirname(path), exist_ok=True)
210- d.setdefault('sandbox', {})['enableWeakerNestedSandbox'] = True
211- with open(path, 'w') as f:
212- json.dump(d, f, indent=2)
213- PY
197+ # Configurar Claude Desktop cowork VM para usar HostBackend en Docker
198+ # COWORK_VM_BACKEND=host evita que Claude Desktop use bwrap (que falla en contenedores)
199+ # El contenedor Docker ya provee el aislamiento necesario
200+ COWORK_TAG="# managed-by-danger-template: cowork-vm-backend"
201+ if ! grep -qF "$COWORK_TAG" "$HOME/.xsessionrc" 2>/dev/null; then
202+ printf '%s\nexport COWORK_VM_BACKEND=host\n' "$COWORK_TAG" >> "$HOME/.xsessionrc"
214203 fi
215204
216205 # Asegurar /home/coder como HOME efectivo incluso si se ejecuta como root
Original file line number Diff line number Diff line change @@ -237,23 +237,12 @@ PULSECFG
237237 done
238238 unset _pa_try
239239
240- # Configurar Claude Code sandbox para contenedores Docker
241- # enableWeakerNestedSandbox evita "bwrap: Can't mount proc" en contenedores sin user namespaces
242- if ! grep -q '"enableWeakerNestedSandbox"' "$HOME/.claude/settings.json" 2>/dev/null; then
243- python3 - <<'PY' 2>/dev/null || true
244- import json, os
245- path = os.path.expanduser('~/.claude/settings.json')
246- d = {}
247- try:
248- with open(path) as f:
249- d = json.load(f)
250- except Exception:
251- pass
252- os.makedirs(os.path.dirname(path), exist_ok=True)
253- d.setdefault('sandbox', {})['enableWeakerNestedSandbox'] = True
254- with open(path, 'w') as f:
255- json.dump(d, f, indent=2)
256- PY
240+ # Configurar Claude Desktop cowork VM para usar HostBackend en Docker
241+ # COWORK_VM_BACKEND=host evita que Claude Desktop use bwrap (que falla en contenedores)
242+ # El contenedor Docker ya provee el aislamiento necesario
243+ COWORK_TAG="# managed-by-developer-template: cowork-vm-backend"
244+ if ! grep -qF "$COWORK_TAG" "$HOME/.xsessionrc" 2>/dev/null; then
245+ printf '%s\nexport COWORK_VM_BACKEND=host\n' "$COWORK_TAG" >> "$HOME/.xsessionrc"
257246 fi
258247
259248 # Asegurar /home/coder como HOME efectivo incluso si se ejecuta como root
Original file line number Diff line number Diff line change @@ -212,23 +212,12 @@ PULSECFG
212212 done
213213 unset _pa_try
214214
215- # Configurar Claude Code sandbox para contenedores Docker
216- # enableWeakerNestedSandbox evita "bwrap: Can't mount proc" en contenedores sin user namespaces
217- if ! grep -q '"enableWeakerNestedSandbox"' "$HOME/.claude/settings.json" 2>/dev/null; then
218- python3 - <<'PY' 2>/dev/null || true
219- import json, os
220- path = os.path.expanduser('~/.claude/settings.json')
221- d = {}
222- try:
223- with open(path) as f:
224- d = json.load(f)
225- except Exception:
226- pass
227- os.makedirs(os.path.dirname(path), exist_ok=True)
228- d.setdefault('sandbox', {})['enableWeakerNestedSandbox'] = True
229- with open(path, 'w') as f:
230- json.dump(d, f, indent=2)
231- PY
215+ # Configurar Claude Desktop cowork VM para usar HostBackend en Docker
216+ # COWORK_VM_BACKEND=host evita que Claude Desktop use bwrap (que falla en contenedores)
217+ # El contenedor Docker ya provee el aislamiento necesario
218+ COWORK_TAG="# managed-by-android-template: cowork-vm-backend"
219+ if ! grep -qF "$COWORK_TAG" "$HOME/.xsessionrc" 2>/dev/null; then
220+ printf '%s\nexport COWORK_VM_BACKEND=host\n' "$COWORK_TAG" >> "$HOME/.xsessionrc"
232221 fi
233222
234223 # Alinear grupos para /dev/kvm sin tocar permisos del host
Original file line number Diff line number Diff line change @@ -228,23 +228,12 @@ PULSECFG
228228 done
229229 unset _pa_try
230230
231- # Configurar Claude Code sandbox para contenedores Docker
232- # enableWeakerNestedSandbox evita "bwrap: Can't mount proc" en contenedores sin user namespaces
233- if ! grep -q '"enableWeakerNestedSandbox"' "$HOME/.claude/settings.json" 2>/dev/null; then
234- python3 - <<'PY' 2>/dev/null || true
235- import json, os
236- path = os.path.expanduser('~/.claude/settings.json')
237- d = {}
238- try:
239- with open(path) as f:
240- d = json.load(f)
241- except Exception:
242- pass
243- os.makedirs(os.path.dirname(path), exist_ok=True)
244- d.setdefault('sandbox', {})['enableWeakerNestedSandbox'] = True
245- with open(path, 'w') as f:
246- json.dump(d, f, indent=2)
247- PY
231+ # Configurar Claude Desktop cowork VM para usar HostBackend en Docker
232+ # COWORK_VM_BACKEND=host evita que Claude Desktop use bwrap (que falla en contenedores)
233+ # El contenedor Docker ya provee el aislamiento necesario
234+ COWORK_TAG="# managed-by-maker-template: cowork-vm-backend"
235+ if ! grep -qF "$COWORK_TAG" "$HOME/.xsessionrc" 2>/dev/null; then
236+ printf '%s\nexport COWORK_VM_BACKEND=host\n' "$COWORK_TAG" >> "$HOME/.xsessionrc"
248237 fi
249238
250239 if [ "${ tostring (local. enable_dri )} " = "true" ]; then
Original file line number Diff line number Diff line change @@ -169,23 +169,12 @@ PULSECFG
169169 done
170170 unset _pa_try
171171
172- # Configurar Claude Code sandbox para contenedores Docker
173- # enableWeakerNestedSandbox evita "bwrap: Can't mount proc" en contenedores sin user namespaces
174- if ! grep -q '"enableWeakerNestedSandbox"' "$HOME/.claude/settings.json" 2>/dev/null; then
175- python3 - <<'PY' 2>/dev/null || true
176- import json, os
177- path = os.path.expanduser('~/.claude/settings.json')
178- d = {}
179- try:
180- with open(path) as f:
181- d = json.load(f)
182- except Exception:
183- pass
184- os.makedirs(os.path.dirname(path), exist_ok=True)
185- d.setdefault('sandbox', {})['enableWeakerNestedSandbox'] = True
186- with open(path, 'w') as f:
187- json.dump(d, f, indent=2)
188- PY
172+ # Configurar Claude Desktop cowork VM para usar HostBackend en Docker
173+ # COWORK_VM_BACKEND=host evita que Claude Desktop use bwrap (que falla en contenedores)
174+ # El contenedor Docker ya provee el aislamiento necesario
175+ COWORK_TAG="# managed-by-openclaw-template: cowork-vm-backend"
176+ if ! grep -qF "$COWORK_TAG" "$HOME/.xsessionrc" 2>/dev/null; then
177+ printf '%s\nexport COWORK_VM_BACKEND=host\n' "$COWORK_TAG" >> "$HOME/.xsessionrc"
189178 fi
190179
191180 # Asegurar /home/coder como HOME efectivo incluso si se ejecuta como root
You can’t perform that action at this time.
0 commit comments