Modifications to Software...

Chat about Linux in general
Post Reply
User avatar
Portreve
Level 6
Level 6
Posts: 1078
Joined: Mon Apr 18, 2011 12:03 am
Location: Florida
Contact:

Modifications to Software...

Post by Portreve » Sat Feb 17, 2018 1:47 pm

About a million years ago (or so it feels some days) there was a utility program for Classic Mac OS called ResEdit. This program was used by developers and end users (such as myself) alike, and was useful for modifying a program to, for example, add keyboard shortcuts to menu options, tinkering with a program's file icon, swapping out embedded sound files, changing the contents of dialog boxes and splash screens, etc.

There is a utility within the Gnome world (and, consequentially, in other DEs like Cinnamon and MATE) which allow you to add, remove, or modify keyboard shortcuts for desktop environment-level functions (volume control, minimizing windows, etc.) and, of course, another one for editing the main launch menu itself.

I have noticed that there are any of a number of programs which have no direct keyboard shortcut for accessing Quit. In many, one can type [CTRL] + [Q] (for example) but it's not present everywhere. And yes, before someone thinks they have to point this out, I'm well-familiar with [ALT] + [F4], but that's not the point.

I want to know if there's some utility out there, or some other equally trivial means, to take an existing program (presumably, in its compiled state) and tweak it as could once be done with ResEdit.
Everything is in hand. With this tapestry... and with patience, there is nothing one cannot achieve.

No hamsters were harmed in the authoring of this post.

User avatar
thx-1138
Level 5
Level 5
Posts: 764
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Modifications to Software...

Post by thx-1138 » Mon Feb 19, 2018 6:21 pm

...this must had been very specific to the early MacOS architecture & applications...

Ie. on Windows for example, there are numerous resource editors that can change the icons of an executable. But to change the actual instructions there, ie. to make a drop-down menu instead of "Open" to display a pop-up windows with your logo, then the app itself should be manually patched with the instructions in question, no automated way to do so. There were (still are?) some semi-automated tools developed mainly in the cracking scene for such tasks, but still, not point-&-click - someone still needed to have a good understanding of the PE format and some programming abilities...

On Linux furthermore, icons typically aren't embedded into the executable (in most cases at least), hence also the reason you easily change themes / icon packs etc...Plus, the fact that the code is also (usually) open, hence not really required to reverse engineer the binary, it would make more sense for someone to edit the sources and recompile...
Had never thought of that before actually, googled for the fun of it and stumbled upon this and also this. None of those obviously really ever took off...and they both refer only to simply modifying icon resources, not to actually changing the actual program's behavior (ie. adding a 'Quit' keyboard-mapped shortcut)...

User avatar
absque fenestris
Level 5
Level 5
Posts: 536
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Modifications to Software...

Post by absque fenestris » Mon Feb 19, 2018 7:08 pm

Portreve wrote:
Sat Feb 17, 2018 1:47 pm
About a million years ago (or so it feels some days) there was a utility program for Classic Mac OS called ResEdit... ... ...
Oh yeah!
All warning dialog boxes for me "Hello darling... little mistake?"
For special customers "Are you really such an idiot and pressed this command? Want the bomb?"
Linux Mint 18.3 Sylvia (Mate) 32-bit - Acer D250 Netbook (Intel Atom N270, 2 GB RAM, 120 GB SSD)

User avatar
Portreve
Level 6
Level 6
Posts: 1078
Joined: Mon Apr 18, 2011 12:03 am
Location: Florida
Contact:

Re: Modifications to Software...

Post by Portreve » Mon Feb 19, 2018 8:40 pm

I'm by no means a programmer, so I don't want to try and put myself forward as an expert on any software design, but it is my understanding that software written for Mac OS was divided up into the compiled code, and lots and lots of component resources. So, for example, you'd have standard code (written in C, or Pascal, etc.) which would, for example, summon up a dialog box to let you save files, but the actual dialog box itself was a resource component. So, for example, you'd have a resource that would open up and you'd see text like, "Save modifications to %X?" which, when in normal operation, would say Save modifications to "Letter to thx-1138"? or whatever the file name was.

Pretty much everything was embedded. Icons, specialized sounds, etc.

Setting aside the fact that the GPL was an unknown thing and libre software an unknown concept, even if the source code was available, it would be a lot easier to open up a resource containing all the drop-down menus of a program and tweak them, than to try and rifle through a bunch of source code.
Everything is in hand. With this tapestry... and with patience, there is nothing one cannot achieve.

No hamsters were harmed in the authoring of this post.

Schallaven
Level 2
Level 2
Posts: 55
Joined: Sun Jul 16, 2017 11:42 am

Re: Modifications to Software...

Post by Schallaven » Tue Feb 20, 2018 2:55 am

There are a lot of shared resources for most but not all Gtk programs, for example user-interface files (usually *.ui in /usr/share/<program_name>/...) you can edit with "Glade" (make backups).
kittykernel - a cat-friendly, custom kernel manager for Linux Mint and other Debian derivates. Take a look or two here: Releases Github
Your argument is irrelephant - it's lacking elephants.

Post Reply

Return to “Chat about Linux”