Skip to content

Commit

Permalink
add gnome-x11
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Oct 13, 2023
1 parent af2e788 commit 4c615d1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 7 additions & 1 deletion rootfs/usr/bin/gnome-session-oneshot
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,14 @@ function check_sentinel()
if CONFIGURED_CHAINED_SESSION=$(check_sentinel); then
# We found and consumed the oneshot sentinel, proceed to launch plasma
echo >&2 "$0: Found and removed sentinel file for one-shot desktop, proceeding to launch"
PRODUCT_NAME="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ "ROG Ally RC71L_RC71L" == "$PRODUCT_NAME" ]]; then
/usr/bin/gnome-x11
else
exec "$CONFIGURED_CHAINED_SESSION"
fi
# exec "$CONFIGURED_CHAINED_SESSION"
sudo chimera-session-use-lightdm gnome-xorg
# sudo chimera-session-use-lightdm gnome-xorg
else
if CONFIGURED_RETURN_SESSION=$(check_return); then
/usr/lib/os-session-select "$CONFIGURED_RETURN_SESSION"
Expand Down
4 changes: 4 additions & 0 deletions rootfs/usr/bin/gnome-x11
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sudo sed -i "s/^#NoDisplay=true/NoDisplay=true/" /usr/share/applications/gnome-x11.desktop
sudo chimera-session-use-lightdm gnome-xorg
2 changes: 1 addition & 1 deletion rootfs/usr/bin/return-to-game-mode
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# sudo sed -i "s/NoDisplay=true/#NoDisplay=true/g" /usr/share/applications/gnome-x11.desktop
sudo sed -i "s/^NoDisplay=true/#NoDisplay=true/" /usr/share/applications/gnome-x11.desktop
#[ "$XDG_SESSION_TYPE" = "wayland" ] && gnome-session-quit --no-prompt || gnome-session-oneshot
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
gnome-session-quit --no-prompt
Expand Down
4 changes: 2 additions & 2 deletions rootfs/usr/share/applications/gnome-x11.desktop
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[Desktop Entry]
Name=X11 Mode
Name[zh_CN]=X11 模式
Exec=sudo chimera-session-use-lightdm gnome-xorg
Exec=/usr/bin/gnome-x11
Icon=/usr/share/icons/chimeraos/scalable/actions/x11-mode.svg
Terminal=false
Type=Application
StartupNotify=false
NoDisplay=true
#NoDisplay=true

0 comments on commit 4c615d1

Please sign in to comment.