Linux-Development-Sys Digest #651, Volume #8     Wed, 18 Apr 01 04:13:10 EDT

Contents:
  Re: Booting Linux on a robot (bob)
  Re: A Linux emulator for Linux, does this exist? (Jonadab the Unsightly One)
  Re: Modifier keys in X ("David Allen")
  Re: Capturing raw ethernet frames ([EMAIL PROTECTED])
  Re: Booting Linux on a robot (Joachim Feise)
  Re: killing a parent process also kills childern ? ("Yoav Zach")
  Re: Booting Linux on a robot (David)
  kernel module for packet interception (vishwanath parakala)
  Re: killing a parent process also kills childern ? ("Yoav Zach")
  Re: Physical Memory Size? ("Niels Sterrenburg")
  Re: Booting Linux on a robot ("Niels Sterrenburg")
  Re: How do I initiate Gnome? (Jonathan Buzzard)
  Re: killing a parent process also kills childern ? (Villy Kruse)
  Re: Modifier keys in X (Sven Mascheck)
  Re: How do I initiate Gnome? ("ray")

----------------------------------------------------------------------------

From: bob <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,alt.os.linux,alt.os.linux.mandrake,comp.os.linux.misc
Subject: Re: Booting Linux on a robot
Date: Wed, 18 Apr 2001 00:32:00 -0500

Jasmin Letendre wrote:
> 
> I'm currently developping a six legged robots. The robot has an on-board
> conmputer and we want it to boot from a flash disk. We use Linux
> Mandrake. After long hour of trial and error, we managed to boot from
> the flash disk and have the prompt for a logging name.
> 
> The problem is that any user name we enter (even root!) gives a "login
> invalid" without even asking for a password. And if we press
> Ctrl+Alt+Delete, it says "You don't exist. Go away!"
> 
> Does anybody has an idea about this problem?
> 
> Thanks.
> 
> Jasmin

Congratulations.  The good news is your robot has developed a high
degree of intelligence.  The bad news is that it has decided it doesn't
like you.  I have no solution to your problem, but having achieved this
problem represents glorious success.  Good luck!

- Bob

------------------------------

From: [EMAIL PROTECTED] (Jonadab the Unsightly One)
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: A Linux emulator for Linux, does this exist?
Date: Wed, 18 Apr 2001 05:40:06 GMT

[EMAIL PROTECTED] (Grant Edwards) wrote:

> Replacing two PCs with a 390 may not be feasible.  It would be
> interesting to see an analysis of where the break-even point
> is.  50 PC's?  1000 PD's?

How much does a 390 cost?

The OP was hoping to escape the cost of a second PC,
so clearly this solution won't fit his budget.

- jonadab

------------------------------

From: "David Allen" <[EMAIL PROTECTED]>
Subject: Re: Modifier keys in X
Crossposted-To: comp.windows.x
Date: Wed, 18 Apr 2001 05:45:49 GMT

In article <[EMAIL PROTECTED]>, "Sven Mascheck"
<[EMAIL PROTECTED]> wrote:

> David Allen <[EMAIL PROTECTED]> wrote:
> 
>> [ Regardless of which slot (Mod1-5) XK_Mode_switch is in, xev reports a
>> state of 0x2000 when Alt Gr is pressed with a character.
> 
> It shouldn't.  This always worked fine for me.

I've checked and rechecked this.

> IMHO mod<x> is derived directly from this state anyway, so have you
> confirmed your remappings with xmodmap(1)? (But as you mentioned remapping
> also with xkeycaps(1), there should be no problem with the exact way of
> clearing/adding modfifier.)

Yep, I've verified with xmodmap.  Also, to eliminate all doubt, I wrote a 
quick custom program that assigns particular modifiers to particular slots.
Here's a print out of the state of the slots in one situation where Alt_Gr
seems to be generating 0x2000:

====== SET #0 Name: ShiftMask Mask (Hex/Dec): 0x1 1
Modifier: code 50 sym 65505 string "Shift_L"
Modifier: code 62 sym 65506 string "Shift_R"
====== SET #1 Name: LockMask Mask (Hex/Dec): 0x2 2
Modifier: code 66 sym 65509 string "Caps_Lock"
====== SET #2 Name: ControlMask Mask (Hex/Dec): 0x4 4
Modifier: code 37 sym 65507 string "Control_L"
Modifier: code 109 sym 65508 string "Control_R"
====== SET #3 Name: Mod1Mask Mask (Hex/Dec): 0x8 8
Modifier: code 64 sym 65513 string "Alt_L"
====== SET #4 Name: Mod2Mask Mask (Hex/Dec): 0x10 16
Modifier: code 113 sym 65406 string "Mode_switch"
Modifier: code 116 sym 65406 string "Mode_switch"
====== SET #5 Name: Mod3Mask Mask (Hex/Dec): 0x20 32
====== SET #6 Name: Mod4Mask Mask (Hex/Dec): 0x40 64
====== SET #7 Name: Mod5Mask Mask (Hex/Dec): 0x80 128

This is the result of running the xmodmap.de file.

> And as you mentioned, such a high state doesn't make sense for mod<x> at
> all:  Perhaps you have activated the XKB extension and it's interfering
> somehow?

Nope, actually I checked out some of the X headers, and get this, here's
where it gets really weird.  0x2000 is the same thing as (0 | (1L<<13)).
So which mask corresponds to 1<<13 in X?  Looking at
/usr/include/X11/X.h, it's ButtonMotionMask!

So I don't think that I'm just getting into weird high bits that are for
extensions or anything like that.

> Perhaps your xev(1) is even broken?

I considered that so I rebuilt it from pristine source, same thing.
I'm using Debian GNU/Linux (Woody) so I got the source package, did my
little xmkmf ; make, same thing.

By the way, here's my quick code for outputting the data I pasted above:
(Note that I may be wrong to cast these things to unsigned long's.  That's
just what I've seen in other code.  It's kinda confusing, since the state
flag is supposed to be an int, but the masks are defined (1L<<1), (1L<<2), 
etc)

#define Q stderr

void x_print_mapping(Display *dpy)
{
     XModifierKeymap *map = XGetModifierMapping(dpy);
     int x=0, y=0;                                   
     KeySym sym=(KeySym)NULL;
     KeyCode c;              
     char *txt=(char*)NULL;
     char *strs[8] = { "ShiftMask",
                       "LockMask",
                       "ControlMask",
                       "Mod1Mask",
                       "Mod2Mask",
                       "Mod3Mask",
                       "Mod4Mask",
                       "Mod5Mask" };

     for(x=0; x<8; x++) {
          fprintf(Q,"====== SET #%d Name: %s Mask (Hex/Dec): 0x%lx %ld\n",
                  x, strs[x], (unsigned long)(1<<x),
                  (unsigned long)(1<<x));

          for(y=0; y<map->max_keypermod; y++) {
               c = map->modifiermap[x*map->max_keypermod+y];
               sym = XKeycodeToKeysym(dpy, c, 0);
               txt = XKeysymToString(sym);

               if(c != 0) /* Only print valid entries */
               {
                    fprintf(Q, "Modifier: code %d sym %ld string \"%s\"\n",
                            c, (long)sym,
                            txt ? txt : "*null*");
               } /* End if */
          } /* End for */
     } /* End while */

     fflush(Q);
     XFreeModifiermap(map);
} /* End x_print_mapping() */

David Allen
http://opop.nols.com/
========================================
A free society is one where it is safe to be unpopular.
                -- Adlai Stevenson

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: Capturing raw ethernet frames
Date: Wed, 18 Apr 2001 05:45:57 -0000

On Mon, 16 Apr 2001 20:26:06 GMT Grant Edwards <[EMAIL PROTECTED]> wrote:

|>What if someone wanted to write their own protocol based
|>on ethernet? How would it be done?
|
| You write a driver module that installs a handler for the
| Ethernet protocol number in question.

What if they want to do it in a process instead of the kernel,
in much the same way a serial port protocol implemented in a
process would start by opening the serial port device.

Again, I still think it would have been more consistent of UNIX
to have made even network interfaces be devices in the /dev
directory, with major/minor node numbers and all that.  Then
doing ifconfig would refer to devices by their /dev name, and
one could simply open() the /dev name for direct access if so
permitted by the ownership/permission mode bits on the device
node file.  This would make it easier to experiment with new
protocols just above the interface layer, by using processes.
I could recompile the code for that process and restart it as
many times as I want without having to mess with modules or
recompile the kernel to change drivers.

ethfd = open( "/dev/eth2", O_RDWR | O_NONBLOCK );

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

------------------------------

From: Joachim Feise <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,alt.os.linux,alt.os.linux.mandrake,comp.os.linux.misc
Subject: Re: Booting Linux on a robot
Date: Tue, 17 Apr 2001 22:59:22 -0700
Reply-To: [EMAIL PROTECTED]

Jasmin Letendre wrote:
> 
> The problem is that any user name we enter (even root!) gives a "login
> invalid" without even asking for a password. And if we press
> Ctrl+Alt+Delete, it says "You don't exist. Go away!"
> 
> Does anybody has an idea about this problem?

You are probably missing a couple of files from the /etc directory.

-Joe

------------------------------

From: "Yoav Zach" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Re: killing a parent process also kills childern ?
Date: Wed, 18 Apr 2001 08:50:31 +0300

Thanks for the answer, but I do not understand it -
What do you mean by 'inherited signals' ? What is inherited is the
signal's - not the signal itself. The sigterm sent to the parent is not sent
to the child, that's for sure.
And anyway, what is this special action I need to take in order to
disinherit it ?


"Lew Pitcher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Mon, 16 Apr 2001 16:32:57 +0300, "Yoav Zach" <[EMAIL PROTECTED]>
> wrote:
>
> >I wrote the simplest piece of code, in which a process creates a new one
and
> >they both wait for input from the keyboard. Now, when killing the parent
> >process ( by sending it SIGTERM ), the child process is killed too. I
can't
> >figure out who kills it and why. Does anyone knows the answer ?
>
> Who killed the child process? You did.
> Why? For whatever reason you sent the SIGTERM
>
> Most signals are 'inherited' by the child processes. You have to take
> special action in the child to 'disinherit' it from the signals passed
> to the parent process. This is even more true when both parent and
> child share a controlling terminal.
>
> For more details, read...
>   'man 2 signal'
>   'man 2 fork'
>   'man 2 kill'
>   'man 2 clone'
> and any good book on Unix.
>
>
>
> Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank
Financial Group
> ([EMAIL PROTECTED])
>
> (Opinions expressed are my own, not my employer's.)



------------------------------

From: David <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,alt.os.linux,alt.os.linux.mandrake,comp.os.linux.misc
Subject: Re: Booting Linux on a robot
Date: Wed, 18 Apr 2001 06:30:07 GMT

Joachim Feise wrote:
> 
> 
> You are probably missing a couple of files from the /etc directory.
> 
> -Joe


 /etc/passwd   /etc/group   /etc/login.defs ???

Just a thought.
-- 
Confucius say: He who play in root, eventually kill tree.
Registered with the Linux Counter.  http://counter.li.org
ID # 123538
Completed more W/U's than 99.166% of seti users. +/- 0.01%

------------------------------

From: vishwanath parakala <[EMAIL PROTECTED]>
Subject: kernel module for packet interception
Date: 18 Apr 2001 00:42:21 -0700

Hi,
        I'm writing a kernel module that eeds to intercept packets ..
        all packets IP,IPX,etc that come in on ethx,pppx,or any other interface ..
        I tried dev_add_pack, but using that I can intercept only
        ETH_P_IP ie. ethrnet packets - ip.

        ANy idea about the direction I should go in ?

        Thanks

------------------------------

From: "Yoav Zach" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: Re: killing a parent process also kills childern ?
Date: Wed, 18 Apr 2001 09:43:50 +0300

Thanks for the answer.
As far as I can see - the SIGHUP signal is sent only to child processes that
are STOPPED when the parent is killed. What about children that are running
?

"Thanh-Lam NGUYEN" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Yoav Zach wrote:
>
> > I wrote the simplest piece of code, in which a process creates a new one
and
> > they both wait for input from the keyboard. Now, when killing the parent
> > process ( by sending it SIGTERM ), the child process is killed too. I
can't
> > figure out who kills it and why. Does anyone knows the answer ?
>
> When the parent process is killed, it sends a SIGUP to every child.
> As there's no default handler for this signal, the child process kills
itself.
> In order to keep the child and not the parent, you'll have to handle this
> signal.
>
>
>



------------------------------

From: "Niels Sterrenburg" <[EMAIL PROTECTED]>
Subject: Re: Physical Memory Size?
Date: Wed, 18 Apr 2001 08:59:28 +0200

/proc/meminfo

"hushui" <[EMAIL PROTECTED]> wrote in message
news:9bj0kf$[EMAIL PROTECTED]...
> I think the size of mem can be founded in the files in the directory of
> /proc.
> But I don't know  which file it is in .
>
> <[EMAIL PROTECTED]> wrote in message
> news:9biqd1$4m6$[EMAIL PROTECTED]...
> > From a driver, how can I determine the physical memory size of my
machine?
> I
> > already know about the High_Memory variable but that is adjusted
according
> to
> > the append="mem=nM" convention in the lilo.conf file. I want to
determine
> the
> > actual size of physical memory.
> >
> > Thanks in advance.
> >
> > Gary R. Day
> > [EMAIL PROTECTED]
> >
> >
> >  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
> eb  -----
> >   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
> groups
> >    NewsOne.Net prohibits users from posting spam.  If this or other
posts
> > made through NewsOne.Net violate posting guidelines, email
> [EMAIL PROTECTED]
>
>
>



------------------------------

From: "Niels Sterrenburg" <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,alt.os.linux,alt.os.linux.mandrake,comp.os.linux.misc
Subject: Re: Booting Linux on a robot
Date: Wed, 18 Apr 2001 09:04:00 +0200

Try to boot in single user mode, checkout the lilo options how or take a
look on www.oxide.nl/phpnuke there is a story how to boot in single user
mode if you "forgot" you're password

good luck

"Jasmin Letendre" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I'm currently developping a six legged robots. The robot has an on-board
> conmputer and we want it to boot from a flash disk. We use Linux
> Mandrake. After long hour of trial and error, we managed to boot from
> the flash disk and have the prompt for a logging name.
>
> The problem is that any user name we enter (even root!) gives a "login
> invalid" without even asking for a password. And if we press
> Ctrl+Alt+Delete, it says "You don't exist. Go away!"
>
> Does anybody has an idea about this problem?
>
> Thanks.
>
> Jasmin
>
>



------------------------------

From: [EMAIL PROTECTED] (Jonathan Buzzard)
Subject: Re: How do I initiate Gnome?
Date: Tue, 17 Apr 2001 23:35:17 +0100

In article <2M%C6.162109$[EMAIL PROTECTED]>,
        [EMAIL PROTECTED] writes:
> "ray" <[EMAIL PROTECTED]> writes:
>> I have left the Unix industry for a few years already. Now I am
>> moving back to Unix/Linux environment believing that this is the
>> future. I did not realised that there are so many changes being made
>> to Linux and I am very happy to be back. So now, I am picking up new
>> terms and working on new environment. If I have offended you, please
>> ignore my posting.
> 
> No offense taken; it's just that your question doesn't directly admit
> a useful answer; Gnome components are able to start themselves when
> needed, so all you really need to do is to start some application you
> consider useful, and it'll do what's needed to start up other pieces.

Well I would have said putting 'exec gnome-session' in your .xsession
or similar file is what he is probably looking for.

JAB.

-- 
Jonathan A. Buzzard                 Email: [EMAIL PROTECTED]
Northumberland, United Kingdom.       Tel: +44(0)1661-832195

------------------------------

From: [EMAIL PROTECTED] (Villy Kruse)
Crossposted-To: comp.os.linux.development
Subject: Re: killing a parent process also kills childern ?
Date: 18 Apr 2001 07:26:01 GMT

On Wed, 18 Apr 2001 08:50:31 +0300, Yoav Zach <[EMAIL PROTECTED]> wrote:
>Thanks for the answer, but I do not understand it -
>What do you mean by 'inherited signals' ? What is inherited is the
>signal's - not the signal itself. The sigterm sent to the parent is not sent
>to the child, that's for sure.
>And anyway, what is this special action I need to take in order to
>disinherit it ?
>



There is a difference between killing a job and killing by process id
number.  Killing a jobw will indeed send a signal to all members of that
job, but killing the process id will only kill that process id, and only
by catching the signal and propagate the signal to the child processes
can the children be affected by that.  The shell will quite often do that.

A special case occurs if you kill a session leader, that is, a process
with process id the same as the session id.  I don't recall the exact
rule in this case, though.



Villy

------------------------------

From: Sven Mascheck <[EMAIL PROTECTED]>
Subject: Re: Modifier keys in X
Crossposted-To: comp.windows.x
Date: 18 Apr 2001 09:54:58 +0200

David Allen <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote:
>> David Allen <[EMAIL PROTECTED]> wrote:

>>> [ Regardless of which slot (Mod1-5) XK_Mode_switch is in, xev
>>> reports a state of 0x2000 when Alt Gr is pressed with a character.

>> It shouldn't.  This always worked fine for me.

> I've verified with xmodmap.  Also, to eliminate all doubt, I wrote a 
> quick custom program [...]
>
> Here's a print out of the state of the slots in one situation where
> Alt_Gr seems to be generating 0x2000:
>
> ... [ Mode_switch reported to be associated with Mod2 ]

I guess _xev(1)_ actually reported the state as 0x2000 then
(as your output didn't).


>> And as you mentioned, such a high state doesn't make sense for mod<x> at
>> all:  Perhaps you have activated the XKB extension and it's interfering
>> somehow?

> Nope, [actually I checked out some of the X headers,... *snip*]

Please don't mind (and for the sake of completeness)  Are you sure?
It might be activated by default.  Have you verified with xdpyinfo(1)
or just etarted the Xserver with an explicit "-kb"?



> 0x2000 is the same thing as (0 | (1L<<13)). So which mask corresponds
> to 1<<13 in X?  Looking at /usr/include/X11/X.h, it's ButtonMotionMask

No, apparently "...Mask" might have confused you  :)  The highest real
_Modifier_mask is Button5Mask (1<<12) (apart from 1<<15 for "grabbing").
The 'Input Event Masks' in contrast are for XSelectInput(), etc.

(btw, i suggest a f'up2 c.w.x.  And if things don't clear up, we
 might do a xpost+fup2 c.o.linux.x, which would likely help more
 than c.o.l.development.system anyway?)

Sven

------------------------------

From: "ray" <[EMAIL PROTECTED]>
Subject: Re: How do I initiate Gnome?
Date: Wed, 18 Apr 2001 16:02:08 +0800

I have tried setting at the ~/.initrc using gnome-session.
When I execute it, it says cannot find the gnome-session command and
terminates my fvwm window manager.
Someone suggested that I set the path but did not specify which path to
choose from.
Would appreciate some help here.
Thank you

"Allin Cottrell" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> [EMAIL PROTECTED] wrote:
> >
> > "ray" <[EMAIL PROTECTED]> writes:
> > > How do I initiate a gnome from fvwm?
> >
> > This is a nonsequitor.  Gnome is a set of libraries used to build some
> > "desktop" applications.  There is no single thing called Gnome that
> > you would initiate.
>
> Well, it's more than a set of libraries and surely it's safe to assume
> that the OP wants the gnome "desktop" started up.  The command to put
> into ~/.xinitrc is "gnome-session", I believe.  This will start the
> panel and mc, sprinkle icons around, fire up various daemons and
> so on.
>
> --
> Allin Cottrell
> Department of Economics
> Wake Forest University, NC



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Development-System Digest
******************************

Reply via email to