[已解决]openSUSE15.0 KDE无法切换桌面环境

#1

本身是KDE环境 后来安装了xfce4 发现无法切换 而且其他的桌面环境也切换不了 每次重启都默认登录的KDE

更改的内容就这两个
参考的这里 https://forums.opensuse.org/showthread.php/449803-How-can-I-switch-my-desktop-environment-from-LXDE-to-XFCE
cat -n /etc/sysconfig/windowmanager | grep xfce

    12  ## Type:        string(default,gnome,plasma5,lxde,xfce,twm,icewm,enlightenment)
    19  DEFAULT_WM="xfce

cat -n /etc/sysconfig/displaymanager | grep xdm

     8	## Type:	string(kdm,xdm,gdm,wdm,entrance,console,lightdm,sddm)
    11	# Here you can set the default Display manager (kdm/xdm/gdm/wdm/entrance/console).
    15	DISPLAYMANAGER="xdm"

软件安装的内容

liangzi@xuan 3 12:05 >sudo zypper in -t pattern xfce
正在加载软件源数据...
正在读取已安装的软件包...
正在解决软件包依赖关系...

将安装以下 145 个新软件包:
  canberra-gtk-play evince evince-lang evince-plugin-pdfdocument evince-plugin-psdocument
  falkon-gnome-keyring fifth-leg-font file-roller file-roller-lang gnome-calculator
  gnome-calculator-lang gnome-desktop-lang gnome-games gnome-games-lang gnome-keyring
  gnome-keyring-32bit gnome-keyring-lang gnome-keyring-pam gnome-keyring-pam-32bit gnome-packagekit
  gnome-packagekit-lang gstreamer-plugin-cluttergst3 gucharmap gucharmap-lang ibus
  ibus-branding-openSUSE-KDE ibus-gtk ibus-gtk3 ibus-gtk-32bit ibus-lang ibus-qt leafpad libclastfm0
  libclutter-gst-3_0-0 libevdocument3-4 libevview3-3 libgarcon-1-0 libgarcon-branding-openSUSE
  libgarcon-data libgarcon-lang libgexiv2-2 libglyr1 libgnome-desktop-3_0-common libgnome-desktop-3-12
  libgnomesu libgnomesu0 libgnomesu-lang libgnustep-base1_25 libgucharmap_2_90-7 libgusb2 libobjc4
  libreoffice-gnome libreoffice-gtk3 libretro-gtk0 libwnck-3-0 libwnck-lang libxfce4panel-2_0-4
  libxfce4ui-tools libxfsm-4_6-0 MozillaThunderbird NetworkManager-applet NetworkManager-applet-lang
  openSUSE-xfce-icon-theme orage orage-doc orage-lang patterns-xfce-xfce patterns-xfce-xfce_basis
  patterns-xfce-xfce_office pavucontrol pavucontrol-lang pidgin pk-update-icon pk-update-icon-lang
  polkit-gnome polkit-gnome-lang pragha pragha-lang pragha-plugins remmina-plugin-xdmcp ristretto
  ristretto-lang seahorse seahorse-lang shotwell shotwell-lang simple-scan simple-scan-lang
  sound-juicer sound-juicer-lang thunar-plugin-archive thunar-plugin-archive-lang
  thunar-plugin-media-tags thunar-plugin-media-tags-lang totem totem-lang totem-plugin-brasero
  totem-plugins transmission-gtk transmission-gtk-lang typelib-1_0-TotemPlParser-1_0 unar
  xdg-user-dirs-gtk xdg-user-dirs-gtk-lang xfce4-appfinder xfce4-appfinder-lang xfce4-dict
  xfce4-dict-lang xfce4-notifyd xfce4-notifyd-branding-openSUSE xfce4-notifyd-lang xfce4-panel
  xfce4-panel-branding-openSUSE xfce4-panel-lang xfce4-panel-plugin-notes xfce4-panel-plugin-notes-lang
  xfce4-panel-plugin-power-manager xfce4-panel-plugin-pulseaudio xfce4-panel-plugin-pulseaudio-lang
  xfce4-panel-plugin-whiskermenu xfce4-panel-plugin-whiskermenu-lang xfce4-panel-plugin-xkb
  xfce4-panel-plugin-xkb-lang xfce4-power-manager xfce4-power-manager-branding-openSUSE
  xfce4-power-manager-lang xfce4-screenshooter xfce4-screenshooter-lang xfce4-session
  xfce4-session-branding-openSUSE xfce4-session-lang xfce4-settings xfce4-settings-branding-openSUSE
  xfce4-settings-lang xfce4-splash-branding-openSUSE xfce4-taskmanager xfce4-taskmanager-lang
  xfce4-terminal xfce4-terminal-lang xfdesktop xfdesktop-branding-openSUSE xfdesktop-lang xfwm4
  xfwm4-branding-openSUSE xfwm4-lang

将安装以下 3 个新软件集:
  xfce xfce_basis xfce_office

自动选中了以下 92 个推荐软件包:
  evince evince-lang file-roller file-roller-lang gnome-calculator gnome-calculator-lang
  gnome-desktop-lang gnome-games gnome-keyring gnome-keyring-lang gnome-keyring-pam gnome-packagekit
  gnome-packagekit-lang gstreamer-plugin-cluttergst3 gucharmap gucharmap-lang leafpad libgarcon-data
  libgarcon-lang libgnomesu libgnomesu-lang libreoffice-gnome libwnck-lang libxfce4ui-tools
  MozillaThunderbird NetworkManager-applet NetworkManager-applet-lang orage orage-doc orage-lang
  patterns-xfce-xfce_office pavucontrol pavucontrol-lang pidgin pk-update-icon pk-update-icon-lang
  polkit-gnome polkit-gnome-lang pragha pragha-lang pragha-plugins remmina-plugin-xdmcp ristretto
  ristretto-lang seahorse seahorse-lang shotwell shotwell-lang simple-scan simple-scan-lang
  sound-juicer sound-juicer-lang thunar-plugin-archive thunar-plugin-archive-lang
  thunar-plugin-media-tags thunar-plugin-media-tags-lang totem totem-lang totem-plugins
  transmission-gtk transmission-gtk-lang unar xdg-user-dirs-gtk xdg-user-dirs-gtk-lang
  xfce4-appfinder-lang xfce4-dict xfce4-dict-lang xfce4-notifyd xfce4-notifyd-lang xfce4-panel
  xfce4-panel-lang xfce4-panel-plugin-notes xfce4-panel-plugin-notes-lang
  xfce4-panel-plugin-power-manager xfce4-panel-plugin-pulseaudio xfce4-panel-plugin-pulseaudio-lang
  xfce4-panel-plugin-whiskermenu-lang xfce4-panel-plugin-xkb xfce4-panel-plugin-xkb-lang
  xfce4-power-manager-lang xfce4-screenshooter xfce4-screenshooter-lang xfce4-session-lang
  xfce4-settings-lang xfce4-taskmanager xfce4-taskmanager-lang xfce4-terminal xfce4-terminal-lang
  xfdesktop xfdesktop-lang xfwm4 xfwm4-lang

卸载的内容

sudo zypper rm falkon-gnome-keyring gnome-keyring gnome-keyring-32bit gnome-keyring-lang gnome-keyring-pam gnome-keyring-pam-32bit libgck-modules-gnome-keyring libgnome-keyring-devel libgnome-keyring0

将移除

falkon-gnome-keyring gnome-encfs-manager gnome-keyring gnome-keyring-32bit gnome-keyring-lang gnome-keyring-pam gnome-keyring-pam-32bit libgck-modules-gnome-keyring libgnome-keyring0 libgnome-keyring-devel libgnomeui libgnomeui-lang NetworkManager-applet NetworkManager-applet-lang perl-Gnome2 system-config-printer system-config-printer-applet system-config-printer-common system-config-printer-common-lang system-config-printer-dbus-service typelib-1_0-GnomeKeyring-1_0
openSUSE-Gossip-20190408-20190731
#2

sudo zypper in xdm

sudo nano /etc/sysconfig/displaymanager
DISPLAYMANAGER=“gdm”

要列出替代系统知道的所有显示管理器,运行
sudo update-alternatives --list default-displaymanager

要更改显示管理器
sudo update-alternatives --config default-displaymanager

sudo update-alternatives --display default-displaymanager
default-displaymanager - 手动模式
最佳链接版本为 /usr/lib/X11/displaymanagers/sddm
链接目前指向 /usr/lib/X11/displaymanagers/xdm
链接 default-displaymanager 指向 /usr/lib/X11/displaymanagers/default-displaymanager
/usr/lib/X11/displaymanagers/console - 优先级 5
/usr/lib/X11/displaymanagers/lightdm - 优先级 15
/usr/lib/X11/displaymanagers/sddm - 优先级 25
/usr/lib/X11/displaymanagers/xdm - 优先级 10

https://en.opensuse.org/SDB:Change_Display_Manager