https://github.com/jellyterra/space-bwrap
Isolated workspace based on bubblewrap.
https://github.com/jellyterra/space-bwrap
bubblewrap sandbox workspace
Last synced: about 2 months ago
JSON representation
Isolated workspace based on bubblewrap.
- Host: GitHub
- URL: https://github.com/jellyterra/space-bwrap
- Owner: jellyterra
- License: mit
- Created: 2024-04-23T09:38:54.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-12T03:54:43.000Z (over 1 year ago)
- Last Synced: 2025-01-14T04:23:51.896Z (over 1 year ago)
- Topics: bubblewrap, sandbox, workspace
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# space-bwrap
Isolated workspace based on bubblewrap.
`swrap` and `swrap-lesser` are implementations written in Python.
`swrap.sh` is the deprecated implementation written in Bash.
## Usage
### swrap
```
swrap (name) [cmdline ...]
```
**swrap** bind-mounts the directories or sockets listed below:
Bind device:
- `/dev`
Bind in **read-only** to:
- `/etc`
- `/opt`
- `/sys`
- `/usr`
- `/run/dbus`
- `/run/systemd`
- `/tmp/.X11-unix`
- `$XAUTHORITY`
- `$XDG_RUNTIME_DIR/bus`
- `$XDG_RUNTIME_DIR/pulse`
- `$XDG_RUNTIME_DIR/pipewire-0`
- `$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY`
Bind in **read-write** to:
- `$SPACE/home/$1` => `$HOME`
- `$SPACE/home/$1` => `$SPACE/home/$HOME`
### swrap-lesser
**swrap-lesser** allows running applications which put their sockets under `/tmp`, such as Chrome.
```
swrap-lesser (name) [cmdline ...]
```
**In additinon to swrap.**
Bind in **read-write**:
- `/tmp`
- `/data`
- `/exdata`
## Create workspace
Declare where the `$SPACE` is.
```
. -> required by $SPACE
└── home/ -> required
├── dev/
│ ├── .bashrc
│ ├── .config/
│ └── .local/
└── chrome/
├── .bashrc
├── .config/
└── .local/
```
```shell
# bash
swrap dev
# VSCode
swrap dev /opt/vscode/code
# Chromium
swrap-lesser chrome chromium-browser
# New tab will be opened in an existing session.
swrap-lesser chrome chromium-browser
```