]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/config/__init__.py
lxc: Make sure vibrator sys nodes are writable
[waydroid.git] / tools / config / __init__.py
index 9af1657eba81b6e0af3a39feec753a322fc18daf..4b6101d5ca23af5c0bc8e0d8b62bcc5614b3b16f 100644 (file)
@@ -12,7 +12,7 @@ from tools.config.save import save, save_session
 #
 # Exported variables (internal configuration)
 #
 #
 # Exported variables (internal configuration)
 #
-version = "1.0.0"
+version = "1.1.1"
 tools_src = os.path.normpath(os.path.realpath(__file__) + "/../../..")
 
 # Keys saved in the config file (mostly what we ask in 'waydroid init')
 tools_src = os.path.normpath(os.path.realpath(__file__) + "/../../..")
 
 # Keys saved in the config file (mostly what we ask in 'waydroid init')
@@ -26,6 +26,7 @@ session_config_keys = ["user_name",
                        "user_id",
                        "group_id",
                        "host_user",
                        "user_id",
                        "group_id",
                        "host_user",
+                       "xdg_data_home",
                        "waydroid_data",
                        "xdg_runtime_dir",
                        "wayland_display",
                        "waydroid_data",
                        "xdg_runtime_dir",
                        "wayland_display",
@@ -38,7 +39,7 @@ session_config_keys = ["user_name",
 # overridden on the commandline)
 defaults = {
     "arch": "arm64",
 # overridden on the commandline)
 defaults = {
     "arch": "arm64",
-    "work": "/home/.waydroid",
+    "work": "/var/lib/waydroid",
     "vendor_type": "MAINLINE",
     "system_datetime": "0",
     "vendor_datetime": "0",
     "vendor_type": "MAINLINE",
     "system_datetime": "0",
     "vendor_datetime": "0",
@@ -55,6 +56,7 @@ session_defaults = {
     "user_id": str(os.getuid()),
     "group_id": str(os.getgid()),
     "host_user": os.path.expanduser("~"),
     "user_id": str(os.getuid()),
     "group_id": str(os.getgid()),
     "host_user": os.path.expanduser("~"),
+    "xdg_data_home": str(os.environ.get('XDG_DATA_HOME', os.path.expanduser("~") + "/.local/share")),
     "xdg_runtime_dir": str(os.environ.get('XDG_RUNTIME_DIR')),
     "wayland_display": str(os.environ.get('WAYLAND_DISPLAY')),
     "pulse_runtime_path": str(os.environ.get('PULSE_RUNTIME_PATH')),
     "xdg_runtime_dir": str(os.environ.get('XDG_RUNTIME_DIR')),
     "wayland_display": str(os.environ.get('WAYLAND_DISPLAY')),
     "pulse_runtime_path": str(os.environ.get('PULSE_RUNTIME_PATH')),
@@ -62,7 +64,7 @@ session_defaults = {
     "lcd_density": "0"
 }
 session_defaults["config_path"] = defaults["work"] + "/session.cfg"
     "lcd_density": "0"
 }
 session_defaults["config_path"] = defaults["work"] + "/session.cfg"
-session_defaults["waydroid_data"] = session_defaults["host_user"] + \
+session_defaults["waydroid_data"] = session_defaults["xdg_data_home"] + \
     "/waydroid/data"
 if session_defaults["pulse_runtime_path"] == "None":
     session_defaults["pulse_runtime_path"] = session_defaults["xdg_runtime_dir"] + "/pulse"
     "/waydroid/data"
 if session_defaults["pulse_runtime_path"] == "None":
     session_defaults["pulse_runtime_path"] = session_defaults["xdg_runtime_dir"] + "/pulse"