Здравствуйте!<br>Не могу создать сертификаты при помощи утилиты tinyca2.<br>При запуске выдается:<br># tinyca2<br>Gtk-WARNING **: cannot open display: at /usr/bin/tinyca2 line 48.<br><p>У меня OC - altlinux-release-office-server-20080609-alt0.M40.1<br>
</p>#!/usr/bin/perl -w<br>#<br># $Id: tinyca2,v 1.5 2006/06/28 21:50:41 sm Exp $<br>#<br># Copyright (c) Stephan Martin <<a href="mailto:sm@sm-zone.net">sm@sm-zone.net</a>><br>#<br># This program is free software; you can redistribute it and/or modify<br>
# it under the terms of the GNU General Public License as published by<br># the Free Software Foundation; either version 2 of the License, or<br># (at your option) any later version.<br>#<br># This program is distributed in the hope that it will be useful,<br>
# but WITHOUT ANY WARRANTY; without even the implied warranty of<br># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br>
# along with this program; if not, write to the Free Software<br># Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.<br><br>BEGIN { unshift(@INC, '/usr/share/TinyCA2/lib'); # put here the location of the modules<br>
}<br><br>use strict;<br><br>use Gtk2;<br><br>use MIME::Base64;<br><br>use POSIX;<br>use Locale::gettext;<br><br>use OpenSSL;<br>use CA;<br>use GUI;<br>use HELPERS;<br>use GUI::TCONFIG;<br>use GUI::HELPERS;<br>use GUI::CALLBACK;<br>
use GUI::WORDS;<br>use GUI::X509_infobox;<br>use GUI::X509_browser;<br>use CERT;<br>use REQ;<br>use KEY;<br>use TCONFIG;<br><br><span style="background-color: #ff0000;">ВОТ 48 линия INIT { Gtk2->init; }</span><br><br>
setlocale(LC_MESSAGES, "");<br>bindtextdomain("tinyca2", "/usr/share/locale/");<br>textdomain("tinyca2");<br><br># <a href="https://bugs.gentoo.org/show_bug.cgi?id=78576">https://bugs.gentoo.org/show_bug.cgi?id=78576</a><br>
$ENV{XLIB_SKIP_ARGB_VISUALS}= '1';<br><br>my $init = {};<br><br># location of openssl<br>$init->{'opensslbin'} = "/usr/bin/openssl";<br>$init->{'zipbin'} = "/usr/bin/zip";<br>
$init->{'tarbin'} = "/bin/tar";<br><br>if(not -x $init->{'opensslbin'}) {<br> printf(gettext("Can't execute %s.\n"), $init->{'opensslbin'});<br> print gettext("Configure correct path to openssl in tinyca.\n");<br>
exit(1);<br>}<br><br>if(not -x $init->{'zipbin'}) {<br> print gettext("zip command not found, support disabled.\n");<br> print gettext("Configure correct path to zip in tinyca.\n");<br>
}<br><br>if(not -x $init->{'zipbin'}) {<br> print gettext("tar command not found, support disabled.\n");<br> print gettext("Configure correct path to tar in tinyca.\n");<br>}<br><br># directory with the templates<br>
$init->{'templatedir'} = "/usr/share/TinyCA2/templates";<br><br>if(not -d $init->{'templatedir'}) {<br> print gettext("Can't find templatedir.\n");<br> print gettext("Please configure correct path with templates in tinyca.\n");<br>
exit(1);<br>}<br><br># location for CA files<br>$init->{'basedir'} = $ENV{HOME}."/.TinyCA";<br>$init->{'exportdir'} = $ENV{HOME};<br><br>umask(0077);<br><br># create main object and initialize CA<br>
my $gui = GUI->new($init);<br><br># and now run...<br>$gui->{'mw'}->show_all();<br><br># decide what to do on startup<br>if(@{$gui->{'CA'}->{'calist'}}) {<br> $gui->{'CA'}->get_open_name($gui);<br>
} else {<br> $gui->{'CA'}->get_ca_create($gui);<br>}<br><br>sub _ {<br> my $s = gettext(@_);<br> utf8::decode($s);<br> return($s);<br>}<br><br>Gtk2->main();<br><br>exit(0);<br><br><br>