Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions includes.container/usr/bin/reset-vso
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,45 @@
if [ "$1" == "--tty" ]; then
echo "Are you sure you want to reset the VSO? This will remove all your installed software in the subsystem. [y/N]"
read -r answer
if [ "$answer" == "y" ]; then
podman rm -f apx-vso-pico
blackbox-terminal
if [ "$answer" != "y" ]; then
exit
fi
else
adwdialog --title "Reset VSO?" \
--description "Are you sure you want to reset the VSO? This will remove all your installed software in the subsystem." \
--type "question" \
--icon "org.vanillaos.VSO"
if [ $? -eq 0 ]; then
podman rm -f apx-vso-pico
blackbox-terminal
if [ $? -ne 0 ]; then
exit
fi
fi

CONTAINER_ID=$(podman ps -a --filter name=apx-vso-pico --no-trunc -q)
if [ -n "$CONTAINER_ID" ]; then
PTYXIS_DEFAULT_PROFILE_UUID=$(gsettings get org.gnome.Ptyxis default-profile-uuid 2>/dev/null | tr -d "'" || echo "")
if [ -n "$PTYXIS_DEFAULT_PROFILE_UUID" ]; then
PTYXIS_DEFAULT_CONTAINER=$(gsettings get "org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/${PTYXIS_DEFAULT_PROFILE_UUID}/" default-container 2>/dev/null | tr -d "'" || echo "")
if [ "$PTYXIS_DEFAULT_CONTAINER" == "$CONTAINER_ID" ]; then
gsettings set "org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/${PTYXIS_DEFAULT_PROFILE_UUID}/" default-container session
fi
fi
fi
podman rm -f apx-vso-pico

if [ "$1" == "--tty" ]; then
echo "VSO subsystem has been removed successfully. Do you want to re-initialize it now? [y/N]"
read -r answer
if [ "$answer" != "y" ]; then
exit
fi
else
adwdialog --title "Re-initialize VSO?" \
--description "VSO subsystem has been removed successfully. Do you want to re-initialize it now?" \
--type "question" \
--icon "org.vanillaos.VSO"
if [ $? -ne 0 ]; then
exit
fi
fi

vso pico init
22 changes: 22 additions & 0 deletions includes.container/usr/bin/setup-vso-terminal
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

CONTAINER_ID=$(podman ps -a --filter name=apx-vso-pico --no-trunc -q)
if [ -z "$CONTAINER_ID" ]; then
vso pico init
exit
fi

gsettings set org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/vso/ default-container $CONTAINER_ID
gsettings set org.gnome.Ptyxis.Profile:/org/gnome/Ptyxis/Profiles/vso/ label "VSO Profile"
PTYXIS_PROFILE_UUIDS=$(gsettings get org.gnome.Ptyxis profile-uuids)
case $PTYXIS_PROFILE_UUIDS in
*\[\]*)
gsettings set org.gnome.Ptyxis profile-uuids "['vso']"
;;
*vso*)
;;
*)
gsettings set org.gnome.Ptyxis profile-uuids "${PTYXIS_PROFILE_UUIDS%]}, 'vso']"
;;
esac
gsettings set org.gnome.Ptyxis default-profile-uuid vso
7 changes: 0 additions & 7 deletions includes.container/usr/bin/vanilla-shell-detect

This file was deleted.

44 changes: 0 additions & 44 deletions includes.container/usr/bin/vso-os-shell

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ After=podman.service podman-restart.service podman-auto-update.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/vso run -n -- echo vso container started
ExecStart=/usr/bin/vso pico run --no-reset echo vso container started

[Install]
WantedBy=default.target
2 changes: 1 addition & 1 deletion includes.container/usr/lib/systemd/user/vso-resolv.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=vso-pre-run.service

[Service]
Type=simple
ExecStart=/usr/bin/vso run -n -- /usr/bin/sudo bash /run/host/usr/share/vso/scripts/watch-resolv
ExecStart=/usr/bin/vso pico run --no-reset /usr/bin/sudo bash /run/host/usr/share/vso/scripts/watch-resolv
Restart=on-failure
RestartSec=60s

Expand Down
6 changes: 3 additions & 3 deletions includes.container/usr/libexec/vso/migrate-repo
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- ls /etc/apt/sources.list.d/debian.sources
/usr/bin/distrobox enter --name apx-vso-pico -- ls /etc/apt/sources.list.d/debian.sources
if [ "$?" -ne 2 ]; then
echo "already migrated"
exit 0
fi

set -e
/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- sudo cp /run/host/usr/libexec/vso/debian.sources /etc/apt/sources.list.d/debian.sources
/usr/share/apx/distrobox/distrobox enter --name apx-vso-pico -- sudo rm /etc/apt/sources.list.d/vanilla-base.sources
/usr/bin/distrobox enter --name apx-vso-pico -- sudo cp /run/host/usr/libexec/vso/debian.sources /etc/apt/sources.list.d/debian.sources
/usr/bin/distrobox enter --name apx-vso-pico -- sudo rm /etc/apt/sources.list.d/vanilla-base.sources
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[com.github.stunkymonkey.nautilus-open-any-terminal]
terminal = "custom"
custom-local-command = "blackbox-terminal -w %s"
terminal = "ptyxis"
use-generic-terminal-name = true

This file was deleted.

5 changes: 0 additions & 5 deletions includes.container/usr/share/vso/apx/stacks/vso-waydroid.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions modules/00-vanilla-system-operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ modules:
- name: vso-extra-setup
type: shell
commands:
- chmod +x /usr/bin/vso-os-shell
- echo "/usr/bin/vso-os-shell" >> /etc/shells
- sed -i 's/^\(SHELL=\).*/\1\/usr\/bin\/vso-os-shell/' /etc/default/useradd
- chmod +x /usr/bin/setup-vso-terminal
- chmod +x /usr/bin/reset-vso

- name: vso-gnome-ext
Expand Down
2 changes: 1 addition & 1 deletion modules/15-gnome-essentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ sources:
- gnome-menus
- gnome-online-accounts

- blackbox-terminal
- ptyxis
1 change: 0 additions & 1 deletion modules/160-utilities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ type: apt
sources:
- packages:
- gnome-disk-utility
- gnome-system-monitor
- gnome-sushi
- ghostscript
- zenity
Expand Down
2 changes: 0 additions & 2 deletions modules/997-misc-setup.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: misc-setup
type: shell
commands:
# blackbox-rescue
- echo "\nActions=rescue;\n[Desktop Action rescue]\nName=Rescue Mode\nExec=blackbox-terminal -c /bin/bash\nIcon=com.raggesilver.BlackBox" >> /usr/share/applications/com.raggesilver.BlackBox.desktop
# Make init.d scripts executable
- chmod +x /usr/share/init.d/*
# fix-gdm-permissions-service
Expand Down