nanogui: Re: how to debug microwindow


Previous by date: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Hejinjing
Next by date: 14 Mar 2002 09:39:58 -0000 inside Nano-X, "=?big5?B?v+C5Rg==?="
Previous in thread: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Hejinjing
Next in thread: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Greg Haerr

Subject: RE: [nanogui] Re: how to debug microwindow
From: Henry Chea ####@####.####
Date: 14 Mar 2002 09:39:58 -0000
Message-Id: <ED968F412990DE4080ADEC412897784907C6AB@gotz-fs1.semcon.se>

To be able to telnet as root, edit this file:
/etc/securetty

At the bottom of this file, add this line:
ttyp0

If you want to be able to telnet as root by more than one machine at a time,
add some more ttyp entries.  For example:
ttyp1
ttyp2
ttyp3


Hope this helps.

Cheers,
//Henry Chea
Semcon Sweden AB

-----Original Message-----
From: Hejinjing
To: Greg Haerr
Cc: ####@####.####
Sent: 3/14/2002 10:14 AM
Subject: [nanogui] Re: how to debug microwindow

Dear sir and all,

Thanks for your help!

when I use telnet from a separate terminal,I can only
use ordinary USER-NAME to login and can not use "root"

in scr_fb.c like next
fb_open(PSD psd)
{
...
...
...
#if HAVETEXTMODE
 /* open tty, enter graphics mode*/
 tty = open ("/dev/tty0", O_RDWR);    //****************
 if(tty < 0) {
  EPRINTF("Error can't open /dev/tty0: %m\n");
  goto fail;
 }
 if(ioctl (tty, KDSETMODE, KD_GRAPHICS) == -1) {  //*************

  EPRINTF("Error setting graphics mode: %m\n");
  close(tty);
  goto fail;
 }
 close(tty);
#endif
...
...
...
fail:
 close(fb);
 return NULL;
}
if I open /dev/tty0, it says
"Error can't open /dev/tty0: Permission denied"

if I change open /dev/tty0 to /dev/tty
it will says:
"Error setting graphics mode: Invalid argument"

Now, Two question:
1. can I telnet use root identifier ?
2. if can't, how to overcome these problem ?!

I wonder how the supper man like Greg build the greate building !

Best Regard!

Hejinjing

  ----- Original Message ----- 
  From: Greg Haerr 
  To: Hejinjing 
  Sent: Thursday, March 14, 2002 10:41 AM
  Subject: Re: how to debug microwindow


  The best I can say is it sounds like you've got a kernel problem
  switching to or acessing the graphics framebuffer device.  Again,
  I suggest telneting in from a seperate terminal, and then running
  "kbd_mode -a" to reset the keyboard.

  Regards,

  Greg
    ----- Original Message ----- 
    From: Hejinjing 
    To: Greg's email 
    Sent: Monday, March 11, 2002 10:32 PM
    Subject: Re: how to debug microwindow


    Dear Sir;
        Very glad and excited for you help.
        I change the config file to use the TTY driver,Yes ,It works,
GDB can go through GdOpenKeyboard().
        but,when go to GdOpenScreen -> scr_fb.c -> fb_open() like next,

     if(!(env = getenv("FRAMEBUFFER")))
      env = "/dev/fb0";
     fb = open(env, O_RDWR);
     if(fb < 0) {
      EPRINTF("Error opening %s: %m. Check kernel config\n", env);
      return NULL;
     }
     if(ioctl(fb, FBIOGET_FSCREENINFO, &fb_fix) == -1 ||
      ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1) {
       EPRINTF("Error reading screen info: %m\n");
       goto fail;
     }

    when trace to ioctl(...)function, systerm will die again! keyboard
will not repones include 
    (ALT_F1,ALT_F2...),but it can respones CAPSLOCK SCROLLOCK,you can
also use CTRL_ALT_DEL to
    restart the computer.

     I have no idea except ask for your help again! 

        With Best Regard!

        Mar 12,2002
        Hejinjing
        
      ----- Original Message ----- 
      From: Greg's email 
      To: Hejinjing 
      Sent: Tuesday, March 12, 2002 12:35 AM
      Subject: Re: how to debug microwindow


      The first thing I do is use the regular TTY driver, not the
TTYSCAN
      driver, this will help.  Edit the config file for this.  Also, I
sometimes
      debug using telnet from a different terminal, using gdb.  This
allows
      gdb text to be seen and the graphics at the same time.  If
Microwindows
      crashes, you have to run the Linux keyboard reset program,
      whose name I can't remember, I think it's "kbd_reset a" or 
      something like that to use the console again. When I get home,
      I can find this for you if you like.
       
      Regards,
       
      Greg
        ----- Original Message ----- 
        From: Hejinjing 
        To: ####@####.#### 
        Sent: Wednesday, March 06, 2002 10:06 PM
        Subject: how to debug microwindow


        Dear Sir;
            Very glad to meet you!
            I am a pupil on microwindow.
            Due to some reason, I need to cut out some context of
microwindow.
            But when I use gdb to debug or trace
nano-X->srvmain.c(gsinitial->gdopenkeyboard)->kbdtty_scan.c(
            TTY_open->ioctr), the linux system will halted,the keyboard
can not work,wrong echo char will display
            on screen when you type keyboard,you must press reset key or
power down computer to reload linux         system.
            Can I use GDB to trace microwindow server? What must I do ?
Please help me!
            Many Many thanks for your help !

            my e_mail is ####@####.####

            Mar 7,2002
            Hejinjing
            

Previous by date: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Hejinjing
Next by date: 14 Mar 2002 09:39:58 -0000 inside Nano-X, "=?big5?B?v+C5Rg==?="
Previous in thread: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Hejinjing
Next in thread: 14 Mar 2002 09:39:58 -0000 Re: how to debug microwindow, Greg Haerr


Powered by ezmlm-browse 0.20.