You are not logged in.
Hi to all,
up to today I was using SDDM as login manager for my laptop which has a NVIDIA optimus system configured to only use the nvidia graphic card.
Today I've decided to switch to GDM so that to have a rootless X org session.
So I've installed the GDM and its required dependencies, I've disabled the sddm.service and enabled the gdm.service.
Then I've followed what written here https://wiki.archlinux.org/index.php/NVIDIA_Optimus#GDM and forced to use the Xorg backend as explained here https://wiki.archlinux.org/index.php/GDM#Rootless_Xorg.
Finally to avoid kde5 asking me the kwallet password after each login I've followed what explained here https://wiki.archlinux.org/index.php/KDE_Wallet for the GDM (as I did when I installed arch with SDDM).
It seems that everything works correctly, but I would like to be sure to have done all the steps. Did I miss something?
Moreover this is the /etc/pam.d/gdm-password file:
#%PAM-1.0
auth include system-local-login
auth optional pam_gnome_keyring.so
auth optional pam_kwallet5.so
account include system-local-login
password include system-local-login
password optional pam_gnome_keyring.so use_authtok
session include system-local-login
session optional pam_gnome_keyring.so auto_start
session optional pam_kwallet5.so auto_start
and since I'm only using the GDM, but not the gnome session (I've renamed the gnome related files in /usr/share/xsessions/ so that GDM always load the plasma session), should I comment out the pam_gnome_keyring.so lines?
I'm still learning English so please excuse me if my English is not good enough and feel free to correct me via PM if you want.
Offline
I've just noted that even thought the X process id owned by my user, the gdm and gdm-session-worker are owned by root. Is it correct? Should they be owned by the gdm user?
Moreover since every time gnome-shell is updated, the gdm background customization is lost, I've put the following script in /usr/local/bin with the idea to run it after every gnome-shell update using a pacman hook.
Is it correct?
Since the script creates a temporary directory in the current folder and then at the end deletes it, what is the current directory when an hook is executed?
Should I, instead, change the script to cd to a different folder and then go back to the previous current directory before exiting?
#!/bin/sh -e
#------------------------------------------------------------------------------------
# Change the GDM background.
# based on https://wiki.archlinux.org/index.php/GDM
# by https://twitter.com/jeffprod
#
# If you have dual screens, you should copy your current settings to gdm
# so that the image is not reversed right-left :
# sudo cp ~/.config/monitors.xml ~gdm/.config
#
# If you have dual screen, the image should be for example : 3840x1080
#
# USAGE
# chmod +x gdmbackground.sh
# ./gdmbackground.sh <path-to-image-filename>
#
# EXEMPLE
# ./gdmbackground.sh ~/wallpaper.jpg
#------------------------------------------------------------------------------------
if [ -z "$1" ]; then
echo "USAGE:"
echo "./gdmbackground.sh <path-to-image-filename>"
exit 0
fi
extractDir="$(pwd)/extract"
echo "Extracting /usr/share/gnome-shell/gnome-shell-theme.gresource to ${extractDir}"
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource
for r in `gresource list $gst`; do
r=${r#\/org\/gnome\/shell/}
if [ ! -d $extractDir/${r%/*} ]; then
mkdir -p $extractDir/${r%/*}
fi
done
for r in `gresource list $gst`; do
gresource extract $gst $r >$extractDir/${r#\/org\/gnome\/shell/}
done
echo "Copy $1 ${extractDir}/theme"
cp "$1" "${extractDir}/theme"
filename=$(basename $1)
cat > "${extractDir}/theme/gnome-shell-theme.gresource.xml" << EOL
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/theme">
<file>calendar-today.svg</file>
<file>checkbox-focused.svg</file>
<file>checkbox-off-focused.svg</file>
<file>checkbox-off.svg</file>
<file>checkbox.svg</file>
<file>dash-placeholder.svg</file>
<file>gnome-shell.css</file>
<file>gnome-shell-high-contrast.css</file>
<file>icons/scalable/status/message-indicator-symbolic.svg</file>
<file>no-events.svg</file>
<file>no-notifications.svg</file>
<file>pad-osd.css</file>
<file>icons/scalable/status/eye-open-negative-filled-symbolic.svg</file>
<file>icons/scalable/status/eye-not-looking-symbolic.svg</file>
<file>icons/scalable/actions/pointer-double-click-symbolic.svg</file>
<file>icons/scalable/actions/pointer-drag-symbolic.svg</file>
<file>icons/scalable/actions/pointer-primary-click-symbolic.svg</file>
<file>icons/scalable/actions/pointer-secondary-click-symbolic.svg</file>
<file>icons/scalable/status/keyboard-caps-lock-filled-symbolic.svg</file>
<file>icons/scalable/status/keyboard-enter-symbolic.svg</file>
<file>icons/scalable/status/keyboard-hide-symbolic.svg</file>
<file>icons/scalable/status/keyboard-layout-filled-symbolic.svg</file>
<file>icons/scalable/status/keyboard-shift-filled-symbolic.svg</file>
<file>process-working.svg</file>
<file>toggle-off-dark.svg</file>
<file>toggle-off-hc.svg</file>
<file>toggle-off.svg</file>
<file>toggle-on-dark.svg</file>
<file>toggle-on-hc.svg</file>
<file>toggle-on.svg</file>
<file>${filename}</file>
</gresource>
</gresources>
EOL
echo "Modifying ${extractDir}/theme/gnome-shell.css"
sed -i -e "/#lockDialogGroup *{/,/}/c#lockDialogGroup { background: url($filename); background-repeat: no-repeat; }" "${extractDir}/theme/gnome-shell.css"
echo "Compiling"
cd "${extractDir}/theme"
glib-compile-resources gnome-shell-theme.gresource.xml
echo "Copy gnome-shell-theme.gresource to /usr/share/gnome-shell"
cp gnome-shell-theme.gresource /usr/share/gnome-shell
echo "Clean up"
rm -rf ${extractDir}
echo "You may now reboot, or restart GDM (this will log you out!) :"
echo "sudo systemctl restart gdm.service"
(I've taken it from https://gist.github.com/Tazeg/aad2bc126 … cc70eb459e and I've removed a sudo and aligned the xml part to work with current gnome-shell one).
Last edited by Xwang (2020-10-06 16:28:18)
I'm still learning English so please excuse me if my English is not good enough and feel free to correct me via PM if you want.
Offline
Is it correct that the gdm and gdm-session-worker processes are owned by root? If not how do I change that?
I'm still learning English so please excuse me if my English is not good enough and feel free to correct me via PM if you want.
Offline