[PATCH 4/7] Introduces metacity window manager (#520146)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need a solid window manager to be able to open and close the
nm-connection-editor window.
---
 anaconda             |   41 ++++++++++++++++++++++++++++++-----------
 scripts/upd-instroot |   20 +++++++++++++-------
 2 files changed, 43 insertions(+), 18 deletions(-)

diff --git a/anaconda b/anaconda
index 45f2592..5a2273f 100755
--- a/anaconda
+++ b/anaconda
@@ -36,7 +36,7 @@ from tempfile import mkstemp
 
 # keep up with process ID of miniwm if we start it
 
-miniwm_pid = None
+wm_pid = None
 
 # Make sure messages sent through python's warnings module get logged.
 def AnacondaShowWarning(message, category, filename, lineno, file=sys.stderr, line=None):
@@ -67,22 +67,41 @@ def startMiniWM(root='/'):
 
     return childpid
 
+def startMetacityWM():
+    childpid = os.fork()
+    if not childpid:
+        cmd = '/usr/bin/metacity'
+        if not os.access(cmd, os.X_OK):
+            log.error("Unable to find the window manager binary.")
+            sys.exit(1)
+        args = ['--display', ':1',
+                '--sm-disable']
+        rc = iutil.execWithRedirect(cmd, args,
+                               stdout='/dev/null', stderr='/dev/null')
+        if rc:
+            log.error("Error running window manager.")
+            sys.exit (rc)
+        else:
+            log.info("The window manager has terminated.")
+            sys.exit(0)
+    return childpid
+
 # function to handle X startup special issues for anaconda
 def doStartupX11Actions(runres="800x600"):
-    global miniwm_pid
+    global wm_pid
 
     setupGraphicalLinks()
 
     # now start up mini-wm
     try:
-        miniwm_pid = startMiniWM()
-        log.info("Started mini-wm")
+        wm_pid = startMetacityWM()
+        log.info("Started metacity, pid %s." % (wm_pid,))
 
     except:
-        miniwm_pid = None
-        log.error("Unable to start mini-wm")
+        wm_pid = None
+        log.error("Unable to start the window manager.")
 
-    if miniwm_pid is not None:
+    if wm_pid is not None:
         import xutils
         import gtk
 
@@ -103,12 +122,12 @@ def doStartupX11Actions(runres="800x600"):
             raise RuntimeError, "X server failed to start"
 
 def doShutdownX11Actions():
-    global miniwm_pid
+    global wm_pid
     
-    if miniwm_pid is not None:
+    if wm_pid is not None:
         try:
-            os.kill(miniwm_pid, 15)
-            os.waitpid(miniwm_pid, 0)
+            os.kill(wm_pid, 15)
+            os.waitpid(wm_pid, 0)
         except:
             pass
 
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 21565af..eea0e5e 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -173,16 +173,17 @@ PACKAGES="GConf2 NetworkManager NetworkManager-gnome ORBit2 acl anaconda
     libXaw libXcursor libXdmcp libXevie libXext libXfixes libXfont libXft
     libXi libXinerama libXmu libXpm libXrandr libXrender libXt libXtst
     libXxf86misc libacl libaio libart_lgpl libattr
-    libbonobo libcurl libfontenc libidn libgcc
-    libglade2 libgnomecanvas libgcrypt libgpg-error libjpeg libnl
+    libbonobo libcanberra libcanberra-gtk2 libcurl libfontenc libidn libgcc
+    libglade2 libgnomecanvas libgcrypt libgpg-error libjpeg libnl libogg
     libpng libselinux libselinux-python libsemanage
-    libsemanage-python libsepol libssh2 libstdc++ libthai libtirpc libuser
-    libuser-python libvolume_id libxcb libxkbfile libxml2 lklug-fonts 
+    libsemanage-python libsepol libssh2 libstdc++ libtdb libthai libtirpc
+    libtool-ltdl libuser
+    libuser-python libvolume_id libvorbis libxcb libxkbfile libxml2 lklug-fonts
     lohit-assamese-fonts lohit-bengali-fonts lohit-gujarati-fonts lohit-hindi-fonts
     lohit-kashmiri-fonts lohit-kannada-fonts lohit-maithili-fonts lohit-marathi-fonts
     lohit-oriya-fonts lohit-punjabi-fonts lohit-sindhi-fonts lohit-tamil-fonts
     lohit-telugu-fonts lvm2 madan-fonts mdadm
-    mesa-dri-drivers module-init-tools ncurses neon net-tools
+    mesa-dri-drivers metacity module-init-tools ncurses neon net-tools
     newt newt-python nfs-utils nspr nss nss-softokn ntfs-3g
     openldap openssh openssh-server
     pam pango parted pciutils pcre psmisc
@@ -190,13 +191,14 @@ PACKAGES="GConf2 NetworkManager NetworkManager-gnome ORBit2 acl anaconda
     python-libs python-nss python-pyblock python-sqlite python-epdb
     python-urlgrabber python-volume_key pyxf86config readline redhat-artwork
     reiserfs-utils rpm rpm-libs rpm-python rsyslog sed selinux-policy-targeted
-    setup slang smc-meera-fonts specspo sqlite strace synaptics system-config-date
+    setup slang smc-meera-fonts specspo sqlite strace startup-notification
+    synaptics system-config-date
     system-config-keyboard ${brandpkgname}-logos ${brandpkgname}-release
     sysvinit-tools taipeifonts tcp_wrappers tcp_wrappers-libs telnet
     tigervnc-server tigervnc-server-module tzdata
     udev un-core-dotum-fonts urw-fonts usbutils util-linux-ng
     vlgothic-fonts vim-minimal
-    wget wpa_supplicant xkeyboard-config xfsprogs xorg-x11-xauth
+    wget wpa_supplicant xcb-util xkeyboard-config xfsprogs xorg-x11-xauth
     xorg-x11-drivers xorg-x11-font-utils xorg-x11-fonts-ethiopic
     xorg-x11-fonts-misc xorg-x11-server-utils
     xorg-x11-server-Xorg xorg-x11-xkb-utils xorg-x11-xfs yum
@@ -504,6 +506,7 @@ usr/$LIBDIR/libsqlite3.so*
 usr/$LIBDIR/xorg/modules
 usr/$LIBDIR/xserver/SecurityPolicy
 usr/$LIBDIR/libfreebl3.so
+usr/$LIBDIR/libmetacity-private.so*
 usr/$LIBDIR/libnss3.so
 usr/$LIBDIR/libnssckbi.so
 usr/$LIBDIR/libnssdbm3.so
@@ -516,6 +519,7 @@ usr/bin/Xorg
 usr/bin/Xvnc
 usr/bin/chattr*
 usr/bin/dbus-launch
+usr/bin/dbus-launch
 usr/bin/du
 usr/bin/expr
 usr/bin/gdb-gdbserver
@@ -535,6 +539,7 @@ usr/bin/lsattr*
 usr/bin/lshal
 usr/bin/maketilo
 usr/bin/md5sum
+usr/bin/metacity
 usr/bin/mini-wm
 usr/bin/mkzimage
 usr/bin/nm-connection-editor
@@ -683,6 +688,7 @@ usr/share/terminfo/v/vt100-nav
 usr/share/terminfo/v/vt320
 usr/share/terminfo/v/vt320-w
 usr/share/terminfo/x/xterm
+usr/share/themes/Atlanta/metacity-1
 usr/share/xorg/extramodes
 usr/share/xorg/vesamodes
 usr/share/zenity
-- 
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux