diff options
Diffstat (limited to 'perl-install/standalone/drakedm')
-rw-r--r-- | perl-install/standalone/drakedm | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/perl-install/standalone/drakedm b/perl-install/standalone/drakedm deleted file mode 100644 index f70c585d5..000000000 --- a/perl-install/standalone/drakedm +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/perl -# DrakxDM -- Display Manager chooser -# Copyright (C) 2003 MandrakeSoft (tvignaud@mandrakesoft.com) -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -use strict; -use lib qw(/usr/lib/libDrakX); - -use standalone; #- warning, standalone must be loaded very first, for 'explanations' -use common; -use interactive; - -my $in = 'interactive'->vnew('su'); - -my $cfg_file = '/etc/sysconfig/desktop'; - -my %dm = ('GNOME' => [ 'GDM (GNOME Display Manager)', '/usr/bin/gdm', 'gdm' ], - 'KDM' => [ 'KDM (KDE Display Manager)', '/usr/bin/kdm', 'kdebase-kdm' ], - 'KDE' => [ 'MdkKDM (Mandrake Display Manager)', '/usr/bin/mdkkdm', 'mdkkdm' ], - 'XDM' => [ 'XDM (X Display Manager)', '/usr/bin/X11/xdm', 'XFree86' ], - ); - -my $dm = 'KDE'; - -foreach (cat_($cfg_file)) { - $dm = uc($1) if /^DISPLAYMANAGER=(.*)$/; -} - -start: -if ($in->ask_from(N("Choosing a display manager"), - formatAlaTeX(N("X11 Display Manager allows you to graphically log -into your system with the X Window System running and supports running -several different X sessions on your local machine at the same time.")), - [ - { - list => [ sort keys %dm ], - val => \$dm, - type => 'list', - format => sub { $dm{$_[0]}[0] }, - sort => 1, - } - ] - ) - ) { - log::explanations("modified file $cfg_file"); - ! -x $dm{$dm}[1] and do { $in->do_pkgs->ensure_is_installed($dm{$dm}[2], $dm{$dm}[1]) or goto start }; - substInFile { - s/^(DISPLAYMANAGER)=.*(\n|)//; - s/^\n//g; - $_ .= "\nDISPLAYMANAGER=$dm\n" if eof; - } $cfg_file; -} - -$in->exit(0); |