summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakxtv13
1 files changed, 8 insertions, 5 deletions
diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv
index 45773de9c..29e0b628a 100755
--- a/perl-install/standalone/drakxtv
+++ b/perl-install/standalone/drakxtv
@@ -79,12 +79,15 @@ sub scan4channels() {
}
# default to pal since most people use that
$norm ||= "PAL";
- log::l("[drakxtv] guess country=>$locale->{country}, norm=>$norm, area=>$ftable_id");
+ log::l("[drakxtv] guess country=>$locale->{country}, norm=>$norm, area=>$ ftable_id");
+ my %users = map { $_->[6] || $_->[0] => $_->[7] } grep { $_->[2] == 0 || 500 <= $_->[2] } list_passwd();
+ my $user;
if ($in->ask_from("TVdrake", N("Please,\ntype in your tv norm and country"),
[
{ label => N("TV norm:"), val => \$norm, list => [ "NTSC", "NTSC-JP", "PAL", "PAL-M", "PAL-N", "PAL-NC", "SECAM" ], type => 'combo' },
{ label => N("Area:"), val => \$ftable_id, list => [keys %freqtables], format => sub { $freqtables{$_[0]} }, sort => 1 },
+ { label => N("User :"), val => \$user, list => [ keys %users ], sort => 1 },
]
)) {
my $_wait = $in->wait_message(N("Please wait"),
@@ -94,12 +97,12 @@ sub scan4channels() {
$ftable_id = "france -a " if $ftable_id eq -1;
# Note that this'll be broken if/when we implement interactive::qt
my $use_X = $in->isa('interactive::gtk') && -x "/usr/X11R6/bin/xvt";
- my $home = $ENV{HOME};
+ my $home = $users{$user}; #ENV{HOME};
my $is_bttv_loaded = cat_("/proc/modules");
# workaround non loaded bttv
run_program::run('/sbin/modprobe', 'bttv') if $< == 0 && $is_bttv_loaded !~ /bttv/;
my $i = system(($use_X ? "xvt -T '" . N("Scanning for TV channels") . " ...' -e " : "") .
- "scantv -n $norm -f $ftable_id -o $home/.xawtv" .
+ "scantv -n $norm -C /dev/v4l/vbi$::i -c /dev/v4l/video$::i -f $ftable_id -o $home/.xawtv" .
($use_X ? "" : " &>$home/tmp/scantv.log;"));
if ($i) {
$in->ask_warn(N("There was an error while scanning for TV channels"),
@@ -118,7 +121,7 @@ if (@devices) {
my $not_canceled = 1;
my $configured;
# TODO: That need some work for multiples TV cards
- foreach (@devices) {
+ each_index {
if (($< == 0 || $::testing) && (grep { detect_devices::isTVcard($_) } @devices)) {
require harddrake::v4l;
require modules;
@@ -128,7 +131,7 @@ if (@devices) {
modules::write_conf();
}
scan4channels() if $not_canceled;
- }
+ } @devices
} else {
$in->ask_warn(N("No TV Card detected!"), formatAlaTeX(
N("No TV Card has been detected on your machine. Please verify that a Linux-supported Video/TV Card is correctly plugged in.