Modifications to Software...

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Portreve
Level 13
Level 13
Posts: 4882
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Modifications to Software...

Post by Portreve »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
User avatar
thx-1138
Level 8
Level 8
Posts: 2092
Joined: Fri Mar 10, 2017 12:15 pm
Location: Athens, Greece

Re: Modifications to Software...

Post by thx-1138 »

...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 12
Level 12
Posts: 4124
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Modifications to Software...

Post by absque fenestris »

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?"
User avatar
Portreve
Level 13
Level 13
Posts: 4882
Joined: Mon Apr 18, 2011 12:03 am
Location: Within 20,004 km of YOU!
Contact:

Re: Modifications to Software...

Post by Portreve »

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.
Flying this flag in support of freedom 🇺🇦

Recommended keyboard layout: English (intl., with AltGR dead keys)

Podcasts: Linux Unplugged, Destination Linux

Also check out Thor Hartmannsson's Linux Tips YouTube Channel
Schallaven

Re: Modifications to Software...

Post by Schallaven »

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).
Locked

Return to “Chat about Linux”