[Sysadmins] Не работает утилита tinyca2.

Сергей Дунин =?iso-8859-1?q?forthja_=CE=C1_gmail=2Ecom?=
Чт Июл 10 21:51:37 MSD 2008


Здравствуйте!
Не могу создать сертификаты при помощи утилиты tinyca2.
При запуске выдается:
# tinyca2
Gtk-WARNING **: cannot open display: at /usr/bin/tinyca2 line 48.

У меня OC - altlinux-release-office-server-20080609-alt0.M40.1
#!/usr/bin/perl -w
#
# $Id: tinyca2,v 1.5 2006/06/28 21:50:41 sm Exp $
#
# Copyright (c) Stephan Martin <sm на sm-zone.net>
#
# 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 of the License, 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, USA.

BEGIN { unshift(@INC, '/usr/share/TinyCA2/lib'); # put here the location of
the modules
}

use strict;

use Gtk2;

use MIME::Base64;

use POSIX;
use Locale::gettext;

use OpenSSL;
use CA;
use GUI;
use HELPERS;
use GUI::TCONFIG;
use GUI::HELPERS;
use GUI::CALLBACK;
use GUI::WORDS;
use GUI::X509_infobox;
use GUI::X509_browser;
use CERT;
use REQ;
use KEY;
use TCONFIG;

ВОТ 48 линия INIT { Gtk2->init; }

setlocale(LC_MESSAGES, "");
bindtextdomain("tinyca2", "/usr/share/locale/");
textdomain("tinyca2");

# https://bugs.gentoo.org/show_bug.cgi?id=78576
$ENV{XLIB_SKIP_ARGB_VISUALS}= '1';

my $init = {};

# location of openssl
$init->{'opensslbin'} = "/usr/bin/openssl";
$init->{'zipbin'} = "/usr/bin/zip";
$init->{'tarbin'} = "/bin/tar";

if(not -x $init->{'opensslbin'}) {
  printf(gettext("Can't execute %s.\n"), $init->{'opensslbin'});
  print gettext("Configure correct path to openssl in tinyca.\n");
  exit(1);
}

if(not -x $init->{'zipbin'}) {
  print gettext("zip command not found, support disabled.\n");
  print gettext("Configure correct path to zip in tinyca.\n");
}

if(not -x $init->{'zipbin'}) {
  print gettext("tar command not found, support disabled.\n");
  print gettext("Configure correct path to tar in tinyca.\n");
}

# directory with the templates
$init->{'templatedir'} = "/usr/share/TinyCA2/templates";

if(not -d $init->{'templatedir'}) {
  print gettext("Can't find templatedir.\n");
  print gettext("Please configure correct path with templates in
tinyca.\n");
  exit(1);
}

# location for CA files
$init->{'basedir'} = $ENV{HOME}."/.TinyCA";
$init->{'exportdir'} = $ENV{HOME};

umask(0077);

# create main object and initialize CA
my $gui = GUI->new($init);

# and now run...
$gui->{'mw'}->show_all();

# decide what to do on startup
if(@{$gui->{'CA'}->{'calist'}}) {
  $gui->{'CA'}->get_open_name($gui);
} else {
  $gui->{'CA'}->get_ca_create($gui);
}

sub _ {
  my $s = gettext(@_);
  utf8::decode($s);
  return($s);
}

Gtk2->main();

exit(0);
----------- следующая часть -----------
Вложение в формате HTML было удалено...
URL: <http://lists.altlinux.org/pipermail/sysadmins/attachments/20080710/9cfe60de/attachment-0002.html>


Подробная информация о списке рассылки Sysadmins