From: chen c. <by...@gm...> - 2007-05-21 13:32:37
|
With "Zhang Le"'s guidance, I tried to run zhcon under X-window. At first, it print the following message: -------------------------------------------------------------------------------------------------- root@ubuntu:~/zhcon/src# ./zhcon --drv=ggi warning!!! /dev/pts/0 is not real tty or vc, are your running under X-Window? libggi support not complied in, can not run under X-Window, now quit -------------------------------------------------------------------------------------------------- Then I installed all libggi related packages, and do "configure/make/make install" a second time, the following is the configure result: -------------------------------------------------------------------------------------------------- Configuration: Target system: i686-pc-linux-gnu Source code location: . C++ Compiler: g++ C++ Compiler flags: -funsigned-char -O2 -march=i686 -DNDEBUG -Wall C Compiler: gcc C Compiler flags: -funsigned-char -O2 -march=i686 -DNDEBUG -Wall VGA support: yes gpm moues support: yes libggi support: yes unicon support: no zhcon binary dir: /usr/local/bin zhcon files dir: /usr/local/lib/zhcon Config complete, now type make to build zhcon. -------------------------------------------------------------------------------------------------- However, it failed again under X-window, with the same error message. Then I checked the code, and found the following code in void Zhcon::InitTty(): -------------------------------------------------------------------------------------------------- if (!(strncmp("/dev/tty", TtyName, 8) == 0 || strncmp("/dev/vc/", TtyName, 8) == 0)) { fprintf(stderr, "warning!!!\n"); fprintf(stderr, "%s is not real tty or vc, are your running under X-Window?\n", TtyName); #ifndef HAVE_GGI_LIB fprintf(stderr, "libggi support not complied in, can not run under X-Window, now quit\n"); exit(1); #endif } -------------------------------------------------------------------------------------------------- Here I have a question: Is tty/vc both concepts of tty-environment (command), and only pty is related with X-window? If yes, then for these code, how we can use GGI to support X-window? If no, then what can be the reason that I can not run zhcon successfully under X-window? Sorry, I'm still not very clear with these concepts. |