aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>2000-07-18 09:39:27 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>2000-07-18 09:39:27 +0000
commitab1deabbf14e0a25b8a716217fc0ba130709358e (patch)
treef2adcaf19917b3ca06507b980e998f0115829d19 /bin
parent41c5d67bc64434e3a5b7d7e666771cf924564816 (diff)
downloadcommon-data-ab1deabbf14e0a25b8a716217fc0ba130709358e.tar
common-data-ab1deabbf14e0a25b8a716217fc0ba130709358e.tar.gz
common-data-ab1deabbf14e0a25b8a716217fc0ba130709358e.tar.bz2
common-data-ab1deabbf14e0a25b8a716217fc0ba130709358e.tar.xz
common-data-ab1deabbf14e0a25b8a716217fc0ba130709358e.zip
* bin/DrakWM: Add -i options to launch with xinit.
add -a option to provide alias for bash.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/DrakWM17
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/DrakWM b/bin/DrakWM
index 469d752..2af7b18 100755
--- a/bin/DrakWM
+++ b/bin/DrakWM
@@ -4,6 +4,7 @@
# MandrakeSoft Inc.
# Redistribution of this file is permitted under the terms of the GNU
# Public License (GPL)
+# $Id$
######################
# Description: Launch window manager according to
# /etc/X11/window-manager with various options.
@@ -14,6 +15,8 @@ my ($wm, $command, $window_mgr_file);
my (@lf);
my @getopt_args = ('l|list-active-session',
+ 'i|xinit',
+ 'a|alias',
'm|window-manager-file=s',
'g|with-file-manager=s',
'p|picture=s',
@@ -34,6 +37,8 @@ if ($options{l}){
exit(0);
}
+if ($options{a}) {print "alias $_=\'$0 -i $_\';" for @lf; exit 0;}
+
unless ($ARGV[0]) {
print STDERR "\n\t\tYou need to specify a Window Manager\n\n";
usage(1);
@@ -79,8 +84,12 @@ if ($options{x}) {
}
# END
-$command = $script{$wm} ? $script{$wm} : $script{shift @lf};
-exec ("/bin/sh", "-c", "$command");
+if (!$options{i}) {
+ $command = $script{$wm} ? $script{$wm} : $script{shift @lf};
+ exec ("/bin/sh", "-c", "$command");
+} else {
+ exec ("xinit $exec{$wm}");
+}
sub parse_file {
my $f=shift @_;
@@ -104,9 +113,11 @@ sub usage {
my $e = shift @_;
(my $basename = $0) =~ s|.*/||;
print { $e ? STDERR : STDOUT } << "EOF";
-Usage: $0 [-Fxh] [ -b color ] [ window-manager session]
+Usage: $0 [-Faixh] [ -b color ] [ window-manager session]
Window-Manager launcher
+ -i --xinit: Launch with xinit.
+ -a --alias: Product alias for bourne shell.
-b=COLOR --background=COLOR: Specify a background color.
-g --with-file-manager: Launch with a filemanager [ KFM | GMC ]
-x --with-xtermM: Display an xterm.