FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 03-12-2010, 02:29 PM
Ales Kozumplik
 
Default livecd: show graphical error dialog when memory check fails (#572263)

Currently we only output text to stdout which is not visible when anaconda is
launched using the desktop icon. The patch outputs to stdout still but also uses
zenity to display the error graphically.

Only for rawhide.
---
anaconda | 24 ++++++++++++++++++++----
1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/anaconda b/anaconda
index dcea88b..5fa4aab 100755
--- a/anaconda
+++ b/anaconda
@@ -347,10 +347,26 @@ def checkMemory(anaconda):
# override display mode if machine cannot nicely run X
if not flags.usevnc:
if anaconda.displayMode not in ('t', 'c') and iutil.memInstalled() < isys.MIN_GUI_RAM:
- stdoutLog.warning(_("You do not have enough RAM to use the graphical "
- "installer. Starting text mode."))
- anaconda.displayMode = 't'
- time.sleep(2)
+ complain = _("You do not have enough RAM to use the graphical "
+ "installer.")
+ if flags.livecdInstall:
+ stdoutLog.warning(complain)
+ recommendation = _("Try the text mode installer by running:

"
+ "'/usr/bin/liveinst -T'

from a root "
+ "terminal.")
+ title = _("Not enough RAM")
+ text = "%s %s" %(complain, recommendation)
+ text_arg = "--text="%s"" % text
+ title_arg = "--title="%s"" % title
+ import shlex
+ argv = ['--error'] + shlex.split(text_arg) + shlex.split(title_arg)
+ iutil.execWithRedirect('zenity', argv)
+ sys.exit(1)
+ else:
+ resolution = _("Starting text mode.")
+ stdoutLog.warning("%s %s" % (complain, resolution))
+ anaconda.displayMode = 't'
+ time.sleep(2)

def setupGraphicalLinks():
for i in ( "imrc", "im_palette.pal", "gtk-2.0", "pango", "fonts",
--
1.6.6

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

Thread Tools




All times are GMT. The time now is 05:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org