0

I was trying to configure kde sddm and accidentally deleted them. It's the latest Ubuntu release and I deleted /etc/sddm/ wayland-session and xsession.

waltinator
  • 37,856

1 Answers1

0
mkdir $HOME/sddm-bak

we create a kinda of working directory in your $HOME.

sudo apt-get -d -o dir::cache::archives="$HOME/sddm-bak" reinstall sddm

We download the package we need to your created directory.

Now extract it.

dpkg-deb --extract $HOME/sddm-bak/sddm_0.20.0-2ubuntu4.2_amd64.deb $HOME/sddm-bak/

Now you can search for your deletet file and restore it.

ls -al $HOME/sddm-bak/etc/sddm/
insgesamt 16
drwxr-xr-x 2 alex alex 4096 Jul  1  2024 .
drwxr-xr-x 6 alex alex 4096 Jul  1  2024 ..
-rwxr-xr-x 1 alex alex 1628 Jul  1  2024 wayland-session
-rwxr-xr-x 1 alex alex 1674 Jul  1  2024 Xsession

Now you can restore it.

nobody
  • 5,792