ฉันเพิ่งอัปเกรดเดสก์ท็อปจาก Ubuntu 21.04 เป็น 21.10 ทุกอย่างทำงานได้ดี! ฉันมีความสุข.
แต่หลังจากนั้นฉันเรียกใช้โปรแกรมผิดที่จะเปลี่ยนพื้นหลังของหน้าจอเข้าสู่ระบบแบบกราฟิกเป็นภาพอื่น
ส่วนใหญ่น่าจะเป็นสคริปต์ที่ฉันเรียกใช้:
ฉันดาวน์โหลดโปรแกรมต่อไปนี้ในช่วง 21.04 และติดตั้งและเรียกใช้
github.com/thiggy01/gdm-background
gdm-พื้นหลัง/gdm-พื้นหลังตัวช่วย /
#!/usr/bin/env python3
นำเข้า distro
นำเข้า dbus
นำเข้า dbus.service
จาก dbus.mainloop.glib นำเข้า DBusGMainLoop
จาก gi.repository นำเข้า GLib
นำเข้าปิด
จากการเรียกนำเข้ากระบวนการย่อย
คลาส GDMBackground (dbus.service.Object):
ถ้า distro.id() == 'อูบุนตู':
default_theme = '/usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource'
elif distro.id() == 'ป๊อป':
default_theme = '/usr/share/gnome-shell/theme/Pop/gnome-shell-theme.gresource'
backup_theme = default_theme + '~'
def __init__(ตัวเอง, conn=ไม่มี, object_path=ไม่มี, bus_name=ไม่มี):
dbus.service.Object.__init__(ตัวเอง, conn, object_path, bus_name)
@dbus.service.method('xyz.thiggy01.GDMBackground', in_signature='s', out_signature='b',
sender_keyword='ผู้ส่ง', connection_keyword='conn')
def SetImage(ตัวเอง, งาน, ผู้ส่ง=ไม่มี, conn=ไม่มี):
action_id = 'xyz.thiggy01.GDMBackground.SetImage'
ถ้า self._check_polkit_privilege (ผู้ส่ง, conn, action_id):
ถ้างาน == 'สำรอง':
ปิดการคัดลอก (self.default_theme, self.backup_theme)
งาน elif == 'ตั้งค่า':
shutil.move("/tmp/gdm3/theme/gnome-shell-theme.gresource", self.default_theme)
กลับทรู
อื่น:
กลับเป็นเท็จ
@dbus.service.method('xyz.thiggy01.GDMBackground', in_signature='s', out_signature='b',
sender_keyword='ผู้ส่ง', connection_keyword='conn')
def RestoreBackup(ตัวเอง, งาน, ผู้ส่ง=ไม่มี, conn=ไม่มี):
action_id = 'xyz.thiggy01.GDMBackground.RestoreBackup'
ถ้า self._check_polkit_privilege (ผู้ส่ง, conn, action_id):
ถ้างาน == 'กู้คืน':
shutil.move(self.backup_theme, self.default_theme)
กลับทรู
อื่น:
กลับเป็นเท็จ
@dbus.service.method('xyz.thiggy01.GDMBackground', in_signature='s', out_signature='',
sender_keyword='ผู้ส่ง', connection_keyword='conn')
def RestartGDM(ตัวเอง, action_id, sender=ไม่มี, conn=ไม่มี):
ถ้า self._check_polkit_privilege (ผู้ส่ง, conn, action_id):
โทร (['/usr/sbin/บริการ', 'gdm', 'รีสตาร์ท'])
def _check_polkit_privilege(ตัวเอง, ผู้ส่ง, conn, action_id):
ถ้าผู้ส่งเป็นไม่มีและ conn เป็นไม่มี:
กลับ
self.proxy_dbus = dbus.Interface(conn.get_object('org.freedesktop.DBus',
'/org/freedesktop/DBus/Bus', เท็จ), 'org.freedesktop.DBus')
sender_pid = self.proxy_dbus.GetConnectionUnixProcessID(ผู้ส่ง)
self.proxy_polkit = dbus.Interface(dbus.SystemBus().get_object(
'org.freedesktop.PolicyKit1', '/org/freedesktop/PolicyKit1/Authority', เท็จ),
'org.freedesktop.PolicyKit1.Authority')
พยายาม:
(is_auth, is_challenge, รายละเอียด) = self.proxy_polkit.CheckAuthorization(
('กระบวนการยูนิกซ์', {'pid': dbus.UInt32(sender_pid, Variant_level=1),
'เวลาเริ่มต้น': dbus.UInt64(0, Variant_level=1)}),
action_id, {'':''}, dbus.UInt32(1), 'ยกเลิก')
ถ้า is_auth:
กลับทรู
อื่น:
กลับเป็นเท็จ
ยกเว้น dbus.DBusException เป็นข้อผิดพลาด:
self.proxy_polkit.CancelCheckAuthorization('ยกเลิก')
ยก
ถ้า __name__ == '__main__':
DBusGMainLoop(set_as_default=True)
บัส = dbus.SystemBus()
ชื่อ = dbus.service.BusName('xyz.thiggy01.GDMBackground' บัส)
gdm_background_helper = GDMBackground(ชื่อ, '/xyz/thiggy01/GDMBackground')
GLib.MainLoop().รัน()
หลังจากนั้น Ubuntu 21.10 ไม่สามารถโหลดหน้าจอเข้าสู่ระบบแบบกราฟิกได้อีกต่อไป
มีข้อผิดพลาดบนหน้าจอ: ตรวจสอบใบหน้า SAD พร้อมข้อความ "ไม่นะ! มีบางอย่างผิดพลาด" เกิดปัญหาและระบบไม่สามารถกู้คืนได้ โปรดติดต่อผู้ดูแลระบบ
ฉันลองแก้ไขปัญหาโดยใช้ Ubuntu 21.10 โดยใช้โหมดการกู้คืน จากนั้นไปที่รูทและใช้คำสั่ง:
sudo apt ติดตั้ง ubuntu-gnome-desktop
สถานะ systemctl gdm
systemctl เริ่ม gdm
มันใช้ไม่ได้เลย
ฉันสงสัยว่าโปรแกรม/สคริปต์ที่ฉันเรียกใช้ขัดแย้งกับการตั้งค่า GNOME 40 กับ Ubuntu 21.04 โปรดช่วยฉันคืนการตั้งค่าหน้าจอเข้าสู่ระบบ GUI เดิม
ฉันพยายามลงชื่อเข้าใช้ Ubuntu 21.04 โดยใช้ CTRL-SHIFT-F3 จากนั้นฉันก็พิมพ์:
สถานะ systemctl gdm3
gdm.service ทำงานอยู่ (กำลังทำงาน)
การเริ่มต้นตัวจัดการการแสดงผล GNOME.....
แต่มีข้อความแสดงข้อผิดพลาด:
Gdm: GdmDisplay: เซสชันไม่เคยลงทะเบียน ล้มเหลว
Gdm: กระบวนการลูก -2037 ตายไปแล้ว