/[soft]/control-center/trunk/drakxconf
ViewVC logotype

Contents of /control-center/trunk/drakxconf

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5411 - (show annotations) (download)
Fri Aug 24 21:07:45 2012 UTC (11 years, 7 months ago) by tv
File size: 1617 byte(s)
prevent running internal text mode UI in graphical mode (mga#7161)
1 #!/usr/bin/perl
2
3 use lib qw(/usr/lib/libDrakX);
4 use strict;
5
6 # i18n: IMPORTANT: to get correct namespace (drakconf instead of libDrakX)
7 BEGIN { unshift @::textdomains, 'drakconf' }
8
9 use standalone; #- warning, standalone must be loaded very first, for 'explanations'
10 use interactive;
11 use common;
12
13 local $_ = join '', @ARGV;
14
15 delete $ENV{DISPLAY};
16
17 /-h/ and die "usage: drakxconf\n";
18 /-version/ and die 'version: $Id: drakxconf 254567 2009-03-23 09:22:59Z tv $\n';
19
20 my $in = 'interactive'->vnew('su', 'default');
21
22 my @l = map {
23 my $path;
24 foreach my $i (split (":", $ENV{PATH})) {
25 my $j = "$i/$_->{cmd}";
26 $path = $j if -x $j;
27 }
28 { des => $_->{des}, cmd => $path };
29 } (
30 { des => N("Display"), cmd => 'XFdrake' },
31 { des => N("Keyboard"), cmd => 'keyboarddrake' },
32 { des => N("Mouse"), cmd => 'mousedrake' },
33 { des => N("Network & Internet"), cmd => 'drakconnect' },
34 { des => N("Users and groups"), cmd => 'adduserdrake' },
35 { des => N("Services"), cmd => 'drakxservices' },
36 { des => N("Firewall"), cmd => 'drakfirewall' },
37 { des => N("Boot loader"), cmd => 'drakboot' },
38 { des => N("Auto Install"), cmd => 'drakautoinst' },
39 { des => N("Internet connection sharing"), cmd => 'drakgw' },
40 { des => N("3D Desktop effects"), cmd => 'drak3d' },
41 { des => N("Partitions"), cmd => 'diskdrake' }
42 );
43
44 my $choice = $in->ask_from_listf(N("Control Center"), N("Choose the tool you want to use"), sub { $_[0]{des} }, \@l)
45 or $in->exit(1);
46 $in->end;
47
48 -x $choice->{cmd} or die "$choice->{cmd} is not executable!\n";
49 exec $choice->{cmd}, @ARGV or $in->exit(1);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30