diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-08-19 13:09:12 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-08-19 13:09:12 +0000 |
commit | 8856c8f96431d149865eb02f41ef933fe35f64fb (patch) | |
tree | 728012edc5709602683b314418e0a9d0e54d3868 /tools | |
parent | 0e583f591004fbb4ea951d5885e11aa7f9bdee6c (diff) | |
download | drakx-backup-do-not-use-8856c8f96431d149865eb02f41ef933fe35f64fb.tar drakx-backup-do-not-use-8856c8f96431d149865eb02f41ef933fe35f64fb.tar.gz drakx-backup-do-not-use-8856c8f96431d149865eb02f41ef933fe35f64fb.tar.bz2 drakx-backup-do-not-use-8856c8f96431d149865eb02f41ef933fe35f64fb.tar.xz drakx-backup-do-not-use-8856c8f96431d149865eb02f41ef933fe35f64fb.zip |
enable to choose resolution of Xvfb
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/drakx-in-chroot | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot index b12f9cf8f..15828e53d 100755 --- a/tools/drakx-in-chroot +++ b/tools/drakx-in-chroot @@ -15,10 +15,19 @@ my $COMPRESSED_FILE_REL = $COMPRESSED_LOCATION_REL . 'mdkinst.sqfs'; my $AUTO_INSTALL_ROOTED = '/tmp/auto_inst.cfg.pl'; my $DEFCFG_ROOTED = '/tmp/defcfg.pl'; my $RPMSRATE_ROOTED = '/tmp/rpmsrate'; +my $resolution = '800x600'; -@ARGV >= 2 or die "usage: drakx-in-chroot <root of distrib> <dir to install to> [options]\n"; +@ARGV >= 2 or die "usage: drakx-in-chroot <root of distrib> <dir to install to> [options]\n +\nOptions specific to drakx-in-chroot: + --resolution=XXXxYYYY (eg: --resolution=1024x768)\n"; (my $repository, my $dir, @ARGV) = @ARGV; +foreach (@ARGV) { + $i++; + if (/--resolution=(.*)/) { + $resolution = $1; + } +} my ($repository_without_arch, $repository_arch) = basename($repository) eq arch() ? (dirname($repository), '/' . arch()) : ($repository, ''); my $STAGE2_LOCATION = $SLASH_LOCATION . $STAGE2_LOCATION_ROOTED; @@ -87,7 +96,7 @@ if (!-f ($SLASH_LOCATION . $AUTO_INSTALL_ROOTED) && $Xnest_bin) { my $DISPLAY = ':8'; $Xnest_pid = fork(); if (!$Xnest_pid) { - exec $Xnest_bin, $DISPLAY, '-ac', ($Xnest_bin eq 'Xephyr' ? '-screen' : '-geometry'), '800x600' or die "Xnest failed\n"; + exec $Xnest_bin, $DISPLAY, '-ac', ($Xnest_bin eq 'Xephyr' ? '-screen' : '-geometry'), $resolution or die "Xnest failed\n"; } $ENV{DISPLAY} = '127.0.0.1' . $DISPLAY; } |