Skip to content
Snippets Groups Projects
Commit a9fa948c authored by Simon McVittie's avatar Simon McVittie
Browse files

Remove "unshare home" from GUI launcher to manage expectations

parent b78f9751
No related branches found
No related tags found
No related merge requests found
...@@ -76,6 +76,8 @@ newer libstdc++. This is not yet implemented. ...@@ -76,6 +76,8 @@ newer libstdc++. This is not yet implemented.
### Protecting `$HOME` ### Protecting `$HOME`
(This feature is not being actively developed right now.)
If we change the meaning of `/home` for a game to be a fake If we change the meaning of `/home` for a game to be a fake
app-specific directory, then the game can't write random files in unknown app-specific directory, then the game can't write random files in unknown
subdirectories of $HOME, and we can be reasonably sure that uninstalling subdirectories of $HOME, and we can be reasonably sure that uninstalling
...@@ -435,11 +437,7 @@ interactive shell). ...@@ -435,11 +437,7 @@ interactive shell).
- `--steam-app-id=70 --unshare-home` (when running from Steam you can use - `--steam-app-id=70 --unshare-home` (when running from Steam you can use
`--steam-app-id=${SteamAppId}`, which is the default) `--steam-app-id=${SteamAppId}`, which is the default)
Unchecking "Share real home directory" in the GUI launcher is the This feature is not being actively developed right now.
same as `--unshare-home` on the command-line. It is an error to do
this without telling `pressure-vessel-wrap` what to use for the home
directory, either via `--fake-home`, `--freedesktop-app-id`,
`--steam-app-id`, or having the `SteamAppId` environment variable.
Steam integration Steam integration
----------------- -----------------
...@@ -548,6 +546,8 @@ increasingly long "adverb" command around the command to be run. ...@@ -548,6 +546,8 @@ increasingly long "adverb" command around the command to be run.
### Unsharing the home directory ### Unsharing the home directory
(This feature is not being actively developed right now.)
Each game gets a private home directory in `~/.var/app`, the same as Each game gets a private home directory in `~/.var/app`, the same as
Flatpak apps do. The name of the private home directory follows the Flatpak apps do. The name of the private home directory follows the
[naming recommendations from the freedesktop.org Desktop Entry [naming recommendations from the freedesktop.org Desktop Entry
......
...@@ -43,6 +43,10 @@ from gi.repository import Gtk ...@@ -43,6 +43,10 @@ from gi.repository import Gtk
logger = logging.getLogger('pressure-vessel-test-ui') logger = logging.getLogger('pressure-vessel-test-ui')
# This doesn't fully work yet. Hack at own risk.
CAN_UNSHARE_HOME = False
class Gui: class Gui:
def __init__(self): def __init__(self):
# type: (...) -> None # type: (...) -> None
...@@ -104,13 +108,16 @@ class Gui: ...@@ -104,13 +108,16 @@ class Gui:
row += 1 row += 1
self.share_home_check = Gtk.CheckButton.new_with_label( if CAN_UNSHARE_HOME:
'Share real home directory' self.share_home_check = Gtk.CheckButton.new_with_label(
) 'Share real home directory'
self.share_home_check.set_active(True) )
self.grid.attach(self.share_home_check, 1, row, 1, 1) self.share_home_check.set_active(True)
self.grid.attach(self.share_home_check, 1, row, 1, 1)
row += 1 row += 1
else:
self.share_home_check = None
self.xterm_check = Gtk.CheckButton.new_with_label('Run in an xterm') self.xterm_check = Gtk.CheckButton.new_with_label('Run in an xterm')
self.xterm_check.set_active(False) self.xterm_check.set_active(False)
...@@ -255,7 +262,7 @@ class Gui: ...@@ -255,7 +262,7 @@ class Gui:
argv.append('--runtime') argv.append('--runtime')
argv.append(os.path.join(id, 'files')) argv.append(os.path.join(id, 'files'))
if self.share_home_check.get_active(): if self.share_home_check is None or self.share_home_check.get_active():
argv.append('--share-home') argv.append('--share-home')
else: else:
argv.append('--unshare-home') argv.append('--unshare-home')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment