Is there a way to view what's in a binary/executable? or whatever the widget icon is. i tried kedit, and emacs, but get garbage or odd symbols, with the a statement in between. I ask because I'm trying to figure out what script controls the reboot drop down menu... after you press shutdown there is a choice for halt or reboot, and a pull down menu which used to have choices for the other operating systems on this machine, but now it is blank. I've checked the security settings to see if that is what made it disappear, but it wasn't. I tried the control center/system/login manager but no reboot option. so i think it is in /sbin/halt or /sbin/reboot or one of the other shutdown like executables... But I'm probably wrong. I also could have read the right script, but missed because i'm not sure what I'm looking for. thanks W.W.Webb
On 14 Aug 2002 12:47:48 -0400
"W.W.Webb"
Is there a way to view what's in a binary/executable? or whatever the widget icon is. i tried kedit, and emacs, but get garbage or odd symbols, with the a statement in between.
I ask because I'm trying to figure out what script controls the reboot drop down menu... after you press shutdown there is a choice for halt or reboot, and a pull down menu which used to have choices for the other operating systems on this machine, but now it is blank.
I don't know about your exact drop-down problem, but you can use "strings mybinary > output.txt" to get a list of readable strings in the binary. Or you can open it up in a hex editor. Unless you are real lucky, these won't show you the logic of the program, but you might get a clue. You need to look at the source code of the binary in question. -- use Perl; #powerful programmable prestidigitation
On Wednesday 14 August 2002 18.47, W.W.Webb wrote:
Is there a way to view what's in a binary/executable? or whatever the widget icon is. i tried kedit, and emacs, but get garbage or odd symbols, with the a statement in between.
I don't know what a "widget icon" is or what you tried to view, but binary files generally can't be viewed in text editors, at least not with sensible results. Binary executables are created from source code that is run through a "compiler". If you have the source code available you can just look at that in any text editor, since (most) source code is plain text. If you don't have the source, you can try your luck with various tools, such as disassemblers and similar, but these usually require a good understanding of machine language/assembly language, and - most of all - an *incredible* level of patience. Not to be tried unless you absolutely have to (it may even be illegal, depending on where you live and the license of the program).
I ask because I'm trying to figure out what script controls the reboot drop down menu... after you press shutdown there is a choice for halt or reboot, and a pull down menu which used to have choices for the other operating systems on this machine, but now it is blank.
Step 1: determine what program it is that performs the function you're wondering about. In this particular case it's kdm. Step 2: find the source, if possible, and look through it. In this particular case you would have found that the list you're wondering about is produced by running "lilo -q" and parsing the output, and that the parsing fails if there are any warnings in the output. So the solution to this particular problem is to put "nowarn" somewhere at the top of /etc/lilo.conf and running /sbin/lilo Oh, and step 0: check mailing list archives to see if other people have had the same problem and if there already is a solution. Unless your purpose is to learn bug hunting it could save you an enormous amount of time. The problem you mention has been reported (and solved) numerous times on this list, and I'm sure other lists too. regards Anders -- 'Deserves [death]. I daresay he does. Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends.' --Tolkien, The Lord of the Rings
participants (3)
-
Anders Johansson
-
W.W.Webb
-
zentara