gnupg under X
Hallo,
first of all I want to thank you for answering my MAXHOSTNAMELEN problem.
I have been figuring for a while but to no success:
When I try to work with gnupg (1.0.4) under X I get the error message:
gpg: cannot open /dev/tty: Device not configured
and gnupg aborts.
In terminal mode I have no problems.
I executed the /dev/MAKEDEV script that did generate a /dev/tty.
I am not sure whether this script comes as standard, executing ls -l /dev/tty gets me:
/dev/tty: can't stat '/dev/tty' (Device not configured).
When looking through the source I found the file ttyio.c,
the culprit lies here , I guess(the actual file is larger, this is just a part of it):
----------------------------------------------------------------
static void
init_ttyfp(void)
{
if( initialized )
return;
#if defined(__MINGW32__)
{
SECURITY_ATTRIBUTES sa;
memset(&sa, 0, sizeof(sa));
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
con.out = CreateFileA( "CONOUT$", GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
&sa, OPEN_EXISTING, 0, 0 );
if( con.out == INVALID_HANDLE_VALUE )
log_fatal("open(CONOUT$) failed: rc=%d", (int)GetLastError() );
memset(&sa, 0, sizeof(sa));
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
con.in = CreateFileA( "CONIN$", GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE,
&sa, OPEN_EXISTING, 0, 0 );
if( con.in == INVALID_HANDLE_VALUE )
log_fatal("open(CONIN$) failed: rc=%d", (int)GetLastError() );
}
SetConsoleMode(con.in, DEF_INPMODE );
SetConsoleMode(con.out, DEF_OUTMODE );
#elif defined(__EMX__)
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
#else
ttyfp = batchmode? stderr : fopen("/dev/tty", "r+");
if( !ttyfp ) {
log_error("cannot open /dev/tty: %s\n", strerror(errno) );
exit(2);
}
#endif
#ifdef HAVE_TCGETATTR
atexit( cleanup );
#endif
initialized = 1;
}
---------------------------------------------------------------
May I change the source or how can I configure /dev/tty?
Since I could not find a binary for the Hurd, I am asking here...
TIA, Martin.
--
Martin Stenzel
martin.stenzel@rz.hu-berlin.de
PGP-/GnuPG-encrypted mail appreciated,
public key (signature: >>C7F36969<<) at:
>>http://141.20.1.38/~h0444xyv/GPGkey_martin.stenzel<<
Reply to: