Compare commits
19 Commits
14b48e7e2e
...
main
Author | SHA1 | Date | |
---|---|---|---|
8aa326c000
|
|||
91d53625f5
|
|||
33e06fb5ec
|
|||
cc42d327ee
|
|||
db3668adf1
|
|||
51a542254d
|
|||
960b808457
|
|||
cf0b11ea3e
|
|||
ccfe455fb4
|
|||
c3e994ab10
|
|||
aed7041e7b
|
|||
9e31dcb046
|
|||
9f4592c873
|
|||
23c5feef3c
|
|||
bc2f8293f2
|
|||
187546dba6
|
|||
5de583dda4
|
|||
9352d0d900
|
|||
e9b7dc3759
|
38
README.md
38
README.md
@@ -1,26 +1,46 @@
|
||||
# PortProtonQt session
|
||||
|
||||
This project is not affiliated with Valve (wide inspiration was taken from
|
||||
their work on the SteamDeck). This configuration depends on [gamescope-session](https://raw.githubusercontent.com/ChimeraOS/gamescope-session) from the ChimeraOS project. and [portprotonqt](https://git.linux-gaming.ru/Boria138/PortProtonQt)
|
||||
their work on the SteamDeck)
|
||||
|
||||
## Basic manual setup
|
||||
|
||||
Copy this repository file structure into the appropriate places and you'll be
|
||||
able to start the session on any Display Manager of your choice.
|
||||
|
||||
# Configuration
|
||||
# User Configuration
|
||||
|
||||
The session sources environment from `~/.config/environment.d/*.conf` files.
|
||||
The easiest way to configure the session is to create `~/.config/environment.d/gamescope-session.conf`
|
||||
The easiest way to configure the session is to create `~/.config/environment.d/gamescope-session-plus.conf`
|
||||
and set variables there:
|
||||
|
||||
```
|
||||
# Override entire PortProtonQt command line
|
||||
CLIENTCMD="portprotonqtqt"
|
||||
```bash
|
||||
# Size of the screen. If not set gamescope will detect native resolution from drm.
|
||||
SCREEN_HEIGHT=2160
|
||||
SCREEN_WIDTH=3840
|
||||
|
||||
# Override the entire Gamescope command line
|
||||
# This will not use screen and render sizes
|
||||
GAMESCOPECMD="gamescope -e -f"
|
||||
# Internal render size of the screen. If not set, will be the same as SCREEN_HEIGHT and SCREEN_WIDTH.
|
||||
INTERNAL_WIDTH=1280
|
||||
INTERNAL_HEIGHT=800
|
||||
|
||||
# Orientation adjustment of panel, possible values: left, right
|
||||
ORIENTATION=left
|
||||
|
||||
# Enable VRR
|
||||
ADAPTIVE_SYNC=1
|
||||
|
||||
# Treat the internal panel as an external monitor
|
||||
PANEL_TYPE=external
|
||||
|
||||
# Set priority of display connectors
|
||||
OUTPUT_CONNECTOR='*,DSI-1'
|
||||
|
||||
# Set the specific values allowed for refresh rates
|
||||
CUSTOM_REFRESH_RATES=40,50,60
|
||||
|
||||
# DRM mode generation algorithm (cvt, fixed)
|
||||
# TODO: what is this ?
|
||||
DRM_MODE=fixed
|
||||
```
|
||||
|
||||
# License & Contributing
|
||||
|
@@ -1,4 +1,4 @@
|
||||
[Seat:*]
|
||||
#autologin-user=
|
||||
#autologin-user-timeout=
|
||||
#autologin-session=
|
||||
#autologin-user=
|
||||
autologin-user-timeout=
|
||||
|
@@ -1,149 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
die() { echo >&2 "!! $*"; exit 1; }
|
||||
|
||||
SENTINEL_FILE="gamescope-session-type"
|
||||
|
||||
# Determine the configuration directory
|
||||
if [[ "$USER" == "root" ]] ; then
|
||||
config_dir="${XDG_CONF_DIR:-"/home/$4/.config"}"
|
||||
else
|
||||
config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
|
||||
fi
|
||||
|
||||
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
|
||||
|
||||
session="${1:-gamescope}"
|
||||
session_launcher=""
|
||||
create_sentinel=""
|
||||
|
||||
if [[ "$2" == "--sentinel-created" ]]; then
|
||||
SENTINEL_CREATED=1
|
||||
fi
|
||||
|
||||
# Ensure necessary environment variables are set
|
||||
if [[ -z "$HOME" ]]; then
|
||||
die "No \$HOME variable"
|
||||
fi
|
||||
|
||||
update_config_sentinel() {
|
||||
[[ $EUID == 0 ]] && die "Running $0 as root is not allowed"
|
||||
mkdir -p "$config_dir"
|
||||
|
||||
if [[ ! -f "$config_dir/$SENTINEL_FILE" ]]; then
|
||||
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
|
||||
echo "SESSION_TYPE=wayland" > "$config_dir/$SENTINEL_FILE"
|
||||
else
|
||||
echo "SESSION_TYPE=x11" > "$config_dir/$SENTINEL_FILE"
|
||||
fi
|
||||
echo "DE=$XDG_CURRENT_DESKTOP" >> "$config_dir/$SENTINEL_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_lightdm() {
|
||||
sed -i "s/^.*autologin-user=.*/autologin-user=${USER}/" /etc/lightdm/lightdm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*autologin-user-timeout=.*/autologin-user-timeout=0/" /etc/lightdm/lightdm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*autologin-session=.*/autologin-session=$session_launcher/" /etc/lightdm/lightdm.conf.d/10-gamescope-session.conf
|
||||
systemctl restart lightdm
|
||||
}
|
||||
|
||||
configure_sddm() {
|
||||
sed -i "s/^.*Relogin=.*/Relogin=true/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*Session=.*/Session=$session_launcher/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*User=.*/User=${USER}/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
systemctl restart sddm
|
||||
}
|
||||
|
||||
yad_question() {
|
||||
env GDK_BACKEND="x11" yad --window-icon="/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg" --image="/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg" --question --title="$1" --text="$2" --width=300 --text-align=center
|
||||
[[ "$?" != 0 ]] && return 1 || return 0
|
||||
}
|
||||
|
||||
if [[ -z $SENTINEL_CREATED ]]; then
|
||||
update_config_sentinel
|
||||
export SENTINEL_CREATED=1
|
||||
fi
|
||||
|
||||
if [[ $(grep -E '^X-KDE-PluginInfo-Version=' /usr/share/xsessions/plasmax11.desktop | cut -d'=' -f2) =~ 6.* ]] ; then
|
||||
KDE6="true"
|
||||
fi
|
||||
|
||||
case "$session" in
|
||||
desktop)
|
||||
if [[ "$SESSION_TYPE" == "wayland" ]]; then
|
||||
if [[ "$DE" == "GNOME" ]]; then
|
||||
session_launcher="gnome-wayland"
|
||||
elif [[ "$DE" == "KDE" ]]; then
|
||||
session_launcher="plasma"
|
||||
[[ "$KDE6" != "true" ]] && session_launcher="plasmawayland"
|
||||
fi
|
||||
else
|
||||
if [[ "$DE" == "GNOME" ]]; then
|
||||
session_launcher="gnome-xorg"
|
||||
elif [[ "$DE" == "KDE" ]]; then
|
||||
session_launcher="plasmax11"
|
||||
[[ "$KDE6" != "true" ]] && session_launcher="plasma"
|
||||
elif [[ "$DE" == "MATE" ]]; then
|
||||
session_launcher="mate"
|
||||
fi
|
||||
fi
|
||||
create_sentinel=1
|
||||
;;
|
||||
gamescope)
|
||||
session_launcher="gamescope-session-steam"
|
||||
create_sentinel=1
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized session '$session'"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Updated user selected session to $session_launcher"
|
||||
|
||||
if [[ ! -z $4 ]]; then
|
||||
USER="$4"
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet gdm; then
|
||||
env GDK_BACKEND="x11" yad --window-icon="/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg" --image="/usr/share/icons/hicolor/scalable/actions/steamdeck-gaming-return.svg" --title="Требуется подтверждение" --text="Для работы данной функии требуется LIGHTDM или SDDM, GDM не поддерживается" --width=290 --text-align=center --button="OK"
|
||||
echo "autologin=false" >> "$config_dir/$SENTINEL_FILE"
|
||||
die "Autologin configuration aborted due to GDM."
|
||||
fi
|
||||
|
||||
if ! grep -iq "autologin" "$config_dir/$SENTINEL_FILE" || [[ "$2" == "plasma" ]] || [[ "$2" == "desktop" ]] ; then
|
||||
if yad_question "Требуется подтверждение" "Для работы данной функции требуется настроить автологин. Хотите ли вы, чтобы это было настроено автоматически?" ; then
|
||||
echo "autologin=true" >> "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin enabled"
|
||||
else
|
||||
echo "autologin=false" >> "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin disabled"
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
|
||||
|
||||
if [[ "$autologin" == "true" ]] ; then
|
||||
# Re-execute as root
|
||||
if [[ $EUID != 0 ]]; then
|
||||
exec pkexec "$(realpath $0)" "$session" --sentinel-created "$session_type" "$USER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "nopasswdlogin" "/etc/group" ; then
|
||||
groupadd -r nopasswdlogin
|
||||
fi
|
||||
|
||||
if ! id -nG "$USER" | grep -qw "nopasswdlogin"; then
|
||||
gpasswd -a "$USER" nopasswdlogin
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet lightdm; then
|
||||
configure_lightdm
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet sddm; then
|
||||
configure_sddm
|
||||
fi
|
||||
fi
|
9
usr/bin/portprotonqt-desktop-return
Executable file
9
usr/bin/portprotonqt-desktop-return
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/bin/portprotonqt-session-select portprotonqt
|
||||
|
||||
CONFIG_FILE="$HOME/.config/gamescope-session-type"
|
||||
|
||||
if [[ -f "$CONFIG_FILE" ]] && grep -q 'autologin=true' "$CONFIG_FILE"; then
|
||||
exec loginctl terminate-user "$(id -u)"
|
||||
fi
|
83
usr/bin/portprotonqt-gamescope
Executable file
83
usr/bin/portprotonqt-gamescope
Executable file
@@ -0,0 +1,83 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
gamescope_has_option() {
|
||||
if (gamescope --help 2>&1 | grep -e "$1" > /dev/null); then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# Source device quirks if exists
|
||||
if [ -f /usr/share/gamescope-session-plus/device-quirks ]; then
|
||||
. /usr/share/gamescope-session-plus/device-quirks
|
||||
fi
|
||||
|
||||
# Source user configuration from ~/.config/environment.d
|
||||
set -a
|
||||
for i in "${HOME}"/.config/environment.d/*.conf; do
|
||||
[[ -f "${i}" ]] && . "${i}"
|
||||
done
|
||||
set +a
|
||||
|
||||
# Gamescope parameters
|
||||
: "${OUTPUT_CONNECTOR:=*,eDP-1}"
|
||||
: "${XWAYLAND_COUNT:=2}"
|
||||
|
||||
GAMESCOPE_PARAMS="--prefer-output $OUTPUT_CONNECTOR --xwayland-count $XWAYLAND_COUNT"
|
||||
|
||||
# Check if NVK driver is in use
|
||||
if vulkaninfo 2>/dev/null | grep -i "driverName" | grep -q "NVK"; then
|
||||
# Workaround for https://gitlab.freedesktop.org/mesa/mesa/-/issues/13478
|
||||
BACKEND="sdl"
|
||||
GAMESCOPE_PARAMS+=" -f"
|
||||
fi
|
||||
|
||||
if [ -n "$SCREEN_WIDTH" ] && [ -n "$SCREEN_HEIGHT" ]; then
|
||||
GAMESCOPE_PARAMS+=" -W $SCREEN_WIDTH -H $SCREEN_HEIGHT"
|
||||
fi
|
||||
|
||||
if [ -n "$INTERNAL_WIDTH" ] && [ -n "$INTERNAL_HEIGHT" ] ; then
|
||||
GAMESCOPE_PARAMS+=" -w $INTERNAL_WIDTH -h $INTERNAL_HEIGHT"
|
||||
fi
|
||||
|
||||
if [ -n "$DRM_MODE" ] ; then
|
||||
GAMESCOPE_PARAMS+=" --generate-drm-mode $DRM_MODE"
|
||||
fi
|
||||
|
||||
if [ -n "$ORIENTATION" ] ; then
|
||||
GAMESCOPE_PARAMS+=" --force-orientation $ORIENTATION"
|
||||
fi
|
||||
|
||||
if [ -n "$ADAPTIVE_SYNC" ]; then
|
||||
GAMESCOPE_PARAMS+=" --adaptive-sync"
|
||||
fi
|
||||
|
||||
if [ -n "$PANEL_TYPE" ] && gamescope_has_option "--force-panel-type"; then
|
||||
GAMESCOPE_PARAMS+=" --force-panel-type $PANEL_TYPE"
|
||||
fi
|
||||
|
||||
if [ -n "$CUSTOM_REFRESH_RATES" ] && gamescope_has_option "--custom-refresh-rates"; then
|
||||
GAMESCOPE_PARAMS+=" --custom-refresh-rates $CUSTOM_REFRESH_RATES"
|
||||
fi
|
||||
|
||||
if [ -n "$USE_ROTATION_SHADER" ] && gamescope_has_option "--use-rotation-shader"; then
|
||||
GAMESCOPE_PARAMS+=" --use-rotation-shader $USE_ROTATION_SHADER"
|
||||
fi
|
||||
|
||||
if [ -n "$BACKEND" ] && gamescope_has_option "--backend"; then
|
||||
GAMESCOPE_PARAMS+=" --backend $BACKEND"
|
||||
fi
|
||||
|
||||
if [ -f "$CURSOR_FILE" ]; then
|
||||
# Use specified cursor if file exists
|
||||
GAMESCOPE_PARAMS+=" --cursor ${CURSOR_FILE}"
|
||||
fi
|
||||
|
||||
# Prefer a specific Vulkan adapter if defined
|
||||
if [ -n "$VULKAN_ADAPTER" ]; then
|
||||
GAMESCOPE_PARAMS+=" --prefer-vk-device $VULKAN_ADAPTER"
|
||||
fi
|
||||
|
||||
# Start client application with Gamescope
|
||||
gamescope $GAMESCOPE_PARAMS -- portprotonqt --fullscreen
|
218
usr/bin/portprotonqt-session-select
Executable file
218
usr/bin/portprotonqt-session-select
Executable file
@@ -0,0 +1,218 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
die() { echo >&2 "!! $*"; exit 1; }
|
||||
|
||||
SENTINEL_FILE="gamescope-session-type"
|
||||
|
||||
# Determine the configuration directory
|
||||
if [[ "$USER" == "root" ]] ; then
|
||||
config_dir="${XDG_CONFIG_HOME:-"/home/$4/.config"}"
|
||||
else
|
||||
config_dir="${XDG_CONFIG_HOME:-"$HOME/.config"}"
|
||||
fi
|
||||
|
||||
mkdir -p "${config_dir}/environment.d"
|
||||
|
||||
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
|
||||
|
||||
session="${1:-portprotonqt}"
|
||||
session_launcher=""
|
||||
create_sentinel=""
|
||||
|
||||
if [[ "$2" == "--sentinel-created" ]]; then
|
||||
SENTINEL_CREATED=1
|
||||
fi
|
||||
|
||||
# Ensure necessary environment variables are set
|
||||
if [[ -z "$HOME" ]]; then
|
||||
die "No \$HOME variable"
|
||||
fi
|
||||
|
||||
update_config_sentinel() {
|
||||
[[ $EUID == 0 ]] && die "Running $0 as root is not allowed"
|
||||
mkdir -p "$config_dir"
|
||||
|
||||
if [[ ! -f "$config_dir/$SENTINEL_FILE" ]]; then
|
||||
if [[ "$XDG_SESSION_TYPE" == "wayland" ]]; then
|
||||
echo "SESSION_TYPE=wayland" > "$config_dir/$SENTINEL_FILE"
|
||||
else
|
||||
echo "SESSION_TYPE=x11" > "$config_dir/$SENTINEL_FILE"
|
||||
fi
|
||||
echo "DE=$XDG_CURRENT_DESKTOP" >> "$config_dir/$SENTINEL_FILE"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_lightdm() {
|
||||
sed -i "s/^.*autologin-session=.*/autologin-session=$session_launcher/" /etc/lightdm/lightdm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*autologin-user=.*/autologin-user=${USER}/" /etc/lightdm/lightdm.conf.d/10-gamescope-session.conf
|
||||
systemctl reset-failed lightdm
|
||||
systemctl restart lightdm
|
||||
}
|
||||
|
||||
configure_sddm() {
|
||||
sed -i "s/^.*Relogin=.*/Relogin=true/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*Session=.*/Session=$session_launcher/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
sed -i "s/^.*User=.*/User=${USER}/" /etc/sddm.conf.d/10-gamescope-session.conf
|
||||
systemctl reset-failed sddm
|
||||
systemctl restart sddm
|
||||
}
|
||||
|
||||
yad_question() {
|
||||
yad --window-icon="/usr/share/icons/hicolor/scalable/actions/portprotonqt-gaming-return.svg" --image="/usr/share/icons/hicolor/scalable/actions/portprotonqt-gaming-return.svg" --question --title="$1" --text="$2" --width=300 --text-align=center
|
||||
[[ "$?" != 0 ]] && return 1 || return 0
|
||||
}
|
||||
|
||||
if [[ -z $SENTINEL_CREATED ]]; then
|
||||
update_config_sentinel
|
||||
export SENTINEL_CREATED=1
|
||||
fi
|
||||
|
||||
KDE6=""
|
||||
HAS_KDE_X11=""
|
||||
KDE_VERSION=""
|
||||
|
||||
for file in \
|
||||
/usr/share/xsessions/plasmax11.desktop \
|
||||
/usr/share/wayland-sessions/plasma.desktop \
|
||||
/usr/share/wayland-sessions/plasmawayland.desktop \
|
||||
/usr/share/xsessions/plasmax.desktop; do
|
||||
|
||||
if [[ -f "$file" ]]; then
|
||||
version=$(grep -E '^X-KDE-PluginInfo-Version=' "$file" | cut -d'=' -f2)
|
||||
if [[ -n "$version" ]]; then
|
||||
KDE_VERSION="$version"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$KDE_VERSION" && "${KDE_VERSION%%.*}" -ge 6 ]]; then
|
||||
KDE6="true"
|
||||
else
|
||||
KDE6=""
|
||||
fi
|
||||
|
||||
if [[ -f /usr/share/xsessions/plasmax11.desktop ]]; then
|
||||
HAS_KDE_X11="true"
|
||||
fi
|
||||
|
||||
de_normalized="${DE,,}"
|
||||
|
||||
# TODO: Check ALT Workstation session_launcher
|
||||
case "$session" in
|
||||
desktop)
|
||||
if [[ "$SESSION_TYPE" == "wayland" ]]; then
|
||||
if [[ "$de_normalized" == *onyx* ]]; then
|
||||
session_launcher="onyx-wayland"
|
||||
elif [[ "$de_normalized" == *gnome* ]]; then
|
||||
session_launcher="gnome-wayland"
|
||||
elif [[ "$de_normalized" == *kde* ]]; then
|
||||
if [[ "$KDE6" == "true" ]]; then
|
||||
session_launcher="plasma"
|
||||
else
|
||||
session_launcher="plasmawayland"
|
||||
fi
|
||||
elif [[ "$de_normalized" == *hyprland* ]]; then
|
||||
session_launcher="hyprland"
|
||||
elif [[ "$de_normalized" == *xfce* && "$de_normalized" != *unicorn* ]]; then
|
||||
session_launcher="xfce-wayland"
|
||||
fi
|
||||
else
|
||||
if [[ "$de_normalized" == *onyx* ]]; then
|
||||
session_launcher="onyx"
|
||||
elif [[ "$de_normalized" == *gnome* ]]; then
|
||||
session_launcher="gnome-xorg"
|
||||
elif [[ "$de_normalized" == *kde* ]]; then
|
||||
if [[ "$KDE6" == "true" ]]; then
|
||||
if [[ "$HAS_KDE_X11" == "true" ]]; then
|
||||
session_launcher="plasmax11"
|
||||
else
|
||||
die "KDE6 detected, but plasmax11 (X11 session) not available"
|
||||
fi
|
||||
else
|
||||
session_launcher="plasma"
|
||||
fi
|
||||
elif [[ "$de_normalized" == *mate* ]]; then
|
||||
session_launcher="mate"
|
||||
elif [[ "$de_normalized" == *unicorn* ]]; then
|
||||
session_launcher="unicorn"
|
||||
elif [[ "$de_normalized" == *xfce* ]]; then
|
||||
session_launcher="xfce"
|
||||
fi
|
||||
fi
|
||||
create_sentinel=1
|
||||
;;
|
||||
portprotonqt)
|
||||
session_launcher="gamescope-session-portprotonqt"
|
||||
create_sentinel=1
|
||||
;;
|
||||
gamescope)
|
||||
session_launcher="gamescope-session-steam"
|
||||
create_sentinel=1
|
||||
;;
|
||||
*)
|
||||
die "Unrecognized session '$session'"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Updated user selected session to $session_launcher"
|
||||
|
||||
if [[ ! -z $4 ]]; then
|
||||
USER="$4"
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet gdm; then
|
||||
yad --window-icon="/usr/share/icons/hicolor/scalable/actions/portprotonqt-gaming-return.svg" --image="/usr/share/icons/hicolor/scalable/actions/portprotonqt-gaming-return.svg" --title="Требуется подтверждение" --text="Для работы данной функции требуется LIGHTDM или SDDM, GDM не поддерживается" --width=290 --text-align=center --button="OK"
|
||||
if [[ -f "$config_dir/$SENTINEL_FILE" ]]; then
|
||||
if grep -iq "autologin" "$config_dir/$SENTINEL_FILE"; then
|
||||
if ! grep -q "autologin=false" "$config_dir/$SENTINEL_FILE"; then
|
||||
sed -i 's/autologin=.*/autologin=false/' "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin set to false"
|
||||
else
|
||||
echo "autologin already set to false"
|
||||
fi
|
||||
else
|
||||
echo "autologin=false" >> "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin added as false"
|
||||
fi
|
||||
fi
|
||||
die "Autologin configuration aborted due to GDM."
|
||||
fi
|
||||
|
||||
if ! grep -iq "autologin" "$config_dir/$SENTINEL_FILE"; then
|
||||
if yad_question "Требуется подтверждение" "Для работы данной функции требуется настроить автологин. Хотите ли вы, чтобы это было настроено автоматически?" ; then
|
||||
echo "autologin=true" >> "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin enabled"
|
||||
else
|
||||
echo "autologin=false" >> "$config_dir/$SENTINEL_FILE"
|
||||
echo "autologin disabled"
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -f "$config_dir/$SENTINEL_FILE" ]] && source "$config_dir/$SENTINEL_FILE"
|
||||
|
||||
if [[ "$autologin" == "true" ]] ; then
|
||||
# Re-execute as root
|
||||
if [[ $EUID != 0 ]]; then
|
||||
exec pkexec "$(realpath $0)" "$session" --sentinel-created "$session_type" "$USER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q "nopasswdlogin" "/etc/group" ; then
|
||||
groupadd -r nopasswdlogin
|
||||
fi
|
||||
|
||||
if ! id -nG "$USER" | grep -qw "nopasswdlogin"; then
|
||||
gpasswd -a "$USER" nopasswdlogin
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet lightdm; then
|
||||
configure_lightdm
|
||||
fi
|
||||
|
||||
if systemctl is-active --quiet sddm; then
|
||||
configure_sddm
|
||||
fi
|
||||
fi
|
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Return to PortProtonQt
|
||||
Exec=portproton-session-select gamescope
|
||||
Icon=steamdeck-gaming-return
|
||||
Exec=portprotonqt-desktop-return
|
||||
Icon=portprotonqt-gaming-return
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=false
|
||||
|
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CLIENTCMD="portprotonqt --fullscreen"
|
@@ -0,0 +1 @@
|
||||
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><path d="m9.3201 8.0885v-1.0277h3.6483q0.80928 0 1.4066-0.51384 0.59735-0.51384 0.59735-1.2846 0-0.77076-0.59735-1.2846-0.59735-0.51384-1.4066-0.51384h-3.2372l1.336 1.336-0.71938 0.71938-2.5692-2.5692 2.5692-2.5692 0.71938 0.71938-1.336 1.336h3.2372q1.2461 0 2.1389 0.80929 0.89279 0.80929 0.89279 2.0168 0 1.2076-0.89279 2.0168-0.89279 0.80929-2.1389 0.80929z" stroke-width=".012846"/><path d="m16 7.7568v4.1862c0 0.51926-0.21175 0.99438-0.55517 1.3341-0.33894 0.34344-0.81033 0.55517-1.3296 0.55517h-12.226c-0.51926 0-0.99438-0.21175-1.3341-0.55517-0.34344-0.33968-0.55517-0.81481-0.55517-1.3341l7.6618e-4 -8.4714c0-0.51926 0.21175-0.99065 0.55517-1.3341 0.33894-0.34344 0.81481-0.55517 1.3341-0.55517h5.1725l0.011972 0.627c0.00374 0.13169 0.00823 0.25964 0.016461 0.38682l-5.2016 7.47e-4c-0.24018 0-0.4594 0.099513-0.61878 0.25964-0.15563 0.15563-0.25588 0.3756-0.25588 0.61503v8.4714c0 0.23943 0.099513 0.45865 0.25588 0.61878 0.16012 0.15563 0.37935 0.25588 0.61878 0.25588h12.226c0.23943 0 0.45567-0.09951 0.61503-0.25588 0.16012-0.16012 0.25588-0.37935 0.25588-0.61878v-3.1636c0.36738-0.30752 0.70707-0.65095 1.0138-1.0228z" stroke-width=".19154"/><rect x="2.9198" y="14.605" width="10.16" height="1.0146" rx=".57463" ry=".57463" stroke-width=".14456"/></g></svg>
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,7 +0,0 @@
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg id="svg2" height="64" style="" viewBox="0 0 64 64" width="64" xmlns="http://www.w3.org/2000/svg" sodipodi:docname="deck_icon.svg" inkscape:version="1.2-dev (d2dd25d878, 2022-02-01, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<path id="path42220" d="m 32 4 v 10 a 18 18 0 0 1 18 18 a 18 18 0 0 1 -18 18 v 10 a 28 28 0 0 0 28 -28 a 28 28 0 0 0 -28 -28 z" style="fill:#fff;fill-rule:evenodd"/>
|
||||
<circle id="path43518" cx="32" cy="32" r="14" style="fill:#1a9fff;fill-rule:evenodd"/>
|
||||
<path id="path52048" d="m 32 22 a 2 2 0 0 0 -1.4140625 .5859375 l -8 8 a 2.0002 2.0002 0 0 0 0 2.828125 l 8 8 a 2 2 0 0 0 2.828125 0 a 2 2 0 0 0 0 -2.828125 l -4.5859375 -4.5859375 h 11.171875 a 2 2 0 0 0 2 -2 a 2 2 0 0 0 -2 -2 h -11.171875 l 4.5859375 -4.5859375 a 2 2 0 0 0 0 -2.828125 a 2 2 0 0 0 -1.4140625 -.5859375 z" style="fill:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:0"/>
|
||||
<g id="path89696" style=""/>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -3,7 +3,7 @@
|
||||
<policyconfig>
|
||||
<vendor>PortProtonQt</vendor>
|
||||
<vendor_url>https://git.linux-gaming.ru/Boria138</vendor_url>
|
||||
<action id="org.shadowblip.pkexec.run-session-select">
|
||||
<action id="org.linux_gaming.pkexec.run-session-select">
|
||||
<description>Helper to switch sessions</description>
|
||||
<icon_name>package-x-generic</icon_name>
|
||||
<defaults>
|
||||
|
@@ -2,6 +2,6 @@
|
||||
Encoding=UTF-8
|
||||
Name=PortProtonQt
|
||||
Comment=PortProtonQt Session
|
||||
Exec=gamescope-session-plus portprotonqt
|
||||
Exec=portprotonqt-gamescope
|
||||
Type=Application
|
||||
DesktopNames=gamescope
|
||||
|
Reference in New Issue
Block a user