sid_snake
Posts: 11
Joined: Thu Sep 05, 2019 8:04 pm

I want a hex editor like HxD on Windows - where is it?

Tue Oct 15, 2019 8:42 pm

A real noob simple basic question, sorry about that. :oops: I want a hex editor like HxD on Windows, I've done a search and come up with dhex. So I did the sudo apt -get dhex thing, all seemed to go well, but now what!? Where is it? I looked in /usr/bin yes dhex is there but now what? In Windows there's an icon to click, a new menu option to press, usually something obvious.

I went to Terminal, typed dhex and it seems to respond, does something relevant (shows help file) so I think right, I need it to open my file so I type: dhex myfile.mid - can't find file, so I try again with the path name; dhex /home/pi/mytests/myfile.mid and again can't find file.

Basic Linux stuff I know, what do I do to open myfile.mid?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6056
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: basic post install - where is it?

Tue Oct 15, 2019 8:48 pm

If you're more comfortable with GUI tools, try ghex or bless as an alternative.

No idea why it doesn't find your file. Sure you've got it all right? Remember it's all case sensitive.

bernie_the_pie
Posts: 4
Joined: Wed Oct 02, 2019 7:09 pm

Re: basic post install - where is it?

Wed Oct 16, 2019 6:02 am

So which would you exect to work?
dhex myfile.mid - where the two files are in very different locations

or does it need the full path name: dhex /home/pi/mytests/myfile.mid

Would that be the correct path name? (up to the /home/)

sid_snake
Posts: 11
Joined: Thu Sep 05, 2019 8:04 pm

Re: basic post install - where is it?

Wed Oct 16, 2019 7:24 am

Very frustrating (and time consuming!) I tried a few more things with dhex such as trying to do the key set up but that seemed to lock out. Does anyone run dhex on their Pi? As in, does it even work on a Pi?

I then looked at ghex, more confusion, where do I get the install? I found something via wiki.gnome and the debian version but got faced with this which is where I got directed to get the install code:

Exact hits
Package ghex
jessie (oldoldstable) (gnome): GNOME Hex editor for files
3.10.1-1: amd64 armel armhf i386
stretch (oldstable) (gnome): GNOME Hex editor for files
3.18.3-1+b1: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x
buster (stable) (gnome): GNOME Hex editor for files
3.18.3-5: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x
bullseye (testing) (gnome): GNOME Hex editor for files
3.18.4-1: amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x
sid (unstable) (gnome): GNOME Hex editor for files
3.18.4-1: alpha amd64 arm64 armel armhf hppa i386 m68k mips64el mipsel ppc64 ppc64el riscv64 s390x sh4 sparc64 x32
3.18.3-5 [debports]: powerpcspe


I'm guessing this is the one > buster (stable) (gnome): GNOME Hex editor for files
3.18.3-5: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x

The download source package gives me this:
[ghex_3.18.3-5.dsc]
[ghex_3.18.3.orig.tar.xz]
[ghex_3.18.3-5.debian.tar.xz]

Now what? Do I use pip or apt or something?

Heater
Posts: 13703
Joined: Tue Jul 17, 2012 3:02 pm

Re: basic post install - where is it?

Wed Oct 16, 2019 8:00 am

That makes me chuckle.

dhex first starts up asking you to press certain keys so that it can learn how your terminal works.

It allows you to press ESC if you don't want to do that.

But ESC does not work because it has not configured your keys....

I tried it on a Pi and my PC, the only key that works is Control-C to kill it.

Kids today can't think in hex so nobody has tested this stuff.

For ghex just install with apt-get in the usual way:

Code: Select all

$ sudo apt-get install ghex
and run it from a terminal:

Code: Select all

$ ghex myfile.hex
Try the KDE hex editor Okteta:

Code: Select all

$ sudo apt-get install search okteta
Memory in C++ is a leaky abstraction .

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6056
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: I want a hex editor like HxD on Windows - where is it?

Wed Oct 16, 2019 9:55 am

what's the output of these commands:

Code: Select all

find ~/ -name myfile.mid
ls ~/mytests
echo $PWD
The ~/ means your home directory (shorthand for /home/pi). The first command says "find all files named myfile.mid in my home directory". The second lists all the files in mytests. The third shows where you are now.

bernie_the_pie
Posts: 4
Joined: Wed Oct 02, 2019 7:09 pm

Re: basic post install - where is it?

Wed Oct 16, 2019 2:38 pm

Heater wrote:
Wed Oct 16, 2019 8:00 am
That makes me chuckle. dhex first starts up asking you to press certain keys so that it can learn how your terminal works.
It allows you to press ESC if you don't want to do that. But ESC does not work because it has not configured your keys....
I tried it on a Pi and my PC, the only key that works is Control-C to kill it.
I'm glad you found it amusing! :lol: Did me blooming head in. :? What you describe there is exactly what happend to me, I could only get Ctrl-C to work, as in kill it. I found a webpage that said dhex needs to configure the attached keyboard, but... Ctrl-C was the only thing that seemed to work.
Thanks for giving it a try on your computers and letting me (and others) know to pass dhex by. And the help with ghex.

Thanks too shify+1, I'll give your tips a try.

I don't feel quite as stoopid now.

BTW: sid and bernie are the same person, I had trouble setting up accounts in here.

sid_snake
Posts: 11
Joined: Thu Sep 05, 2019 8:04 pm

Re: I want a hex editor like HxD on Windows - where is it?

Thu Oct 17, 2019 10:22 am

Result! I feel to be a bit of a fool but all sorted like magic! I went to look in Add/Remove Software, entered ghex into the search box and an option came up showing a taped up cardboard box icon (archive of some sort I assume) I checked the box and went through the process and low and behold it installs ghex AND gives me a groovy green icon in the Programming menu, perfect!

I tried shifty+1's command line things, they worked perfectly as well. I'm beginning to see how this works now.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12357
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: basic post install - where is it?

Thu Oct 17, 2019 11:33 am

bernie_the_pie wrote:
Wed Oct 16, 2019 2:38 pm


BTW: sid and bernie are the same person, I had trouble setting up accounts in here.
Having multiple identities is not allowed here!. So I will have to ban one of you as a sockpuppets. I choose to ban "bernie_the_pie" from posting here (in a few days/weeks).
If you were only joking, or want your other account deleted, you can protest here. :mrgreen:

By the way is see that sid_snake and bernie_the_pie registered about a month in time from each other, and you are not using the same IP address, so I'm doubtful.....

Setting up accounts here is very simple, you just must have the patience to wait for your post to be moderated.

Return to “General programming discussion”