Shortcut Configuration File Location

31 views
Skip to first unread message

BluFudge CrispyRice

unread,
Nov 13, 2023, 3:03:56 PM11/13/23
to GrafX2
Hi, I'm using Fedora 38 and installed GrafX2 using flatpak.

It works as far as I can see with no issues, however there is a bug when it comes to setting a keyboard shortcut for Duplicating a frame/layer. Basically, I set the shortcut for duplication and it works for that session, however when I close GrafX2 and then start it up again, it forgets my custom command.
I was able to create a new shortcuts for "move to last frame" and "move to first frame" now, and they would work as normal. However, duplicating a frame/layer just doesn't stay.

While a bug fix would be nice, this feels more like a Linux issue which I'm sure will be resolved down the line. What I'm more curious is if there's a shortcut configuration file. I've found the grafx2def.ini which seems to be the configuration file, however I cannot see any shortcuts saved.

pulko...@pulkomandy.tk

unread,
Nov 13, 2023, 3:42:03 PM11/13/23
to gra...@googlegroups.com
Hello,

GrafX2 shortcuts are stored in a binary file named gfx2.cfg, gfx2-sdl2.cfg or gfx2-x11.cfg depending on which backend is used.

It should be saved next to gfx2.ini in the configuration directory. The algorithm (on Linux) to decide where that is:

- Look for the "gfx2*.cfg" file next to the executable. If it is there, run in portable mode and save all settings in that directory
- Otherwise, use the XDG_CONFIG_HOME environment variable (normally this will be $HOME/.config) and create a grafx2 subdirectory there
- If that is also not set, use $HOME/.config/grafx2/

This should be simple and work everywhere.

As far as I can see, Fedora provides GrafX2 as an RPM file. I would recommend using that, because I have no idea who made a FlatPak of GrafX2 and I don't know how FlatPak packaging works. If you want to get something fixed in the FlatPak package, you will have to track down who made it, and ask them for support. I think this is the correct place? https://github.com/flathub/com.chez.GrafX2

--
Adrien / PulkoMandy

BluFudge CrispyRice

unread,
Nov 15, 2023, 2:56:32 AM11/15/23
to GrafX2
Thanks, for the reply.

I've installed the RPM package and unfortunately this port has the same strange error. 
On the other hand using the windows version with wine works fine, so it's probably a porting issue which I'll ask the maintainers about.

Thankfully, I found gfx2-sdl2.cfg in the usual configuration directory: ~/.config/grafx2
However, I'm not able to read the config file. As in, when viewed through a text editor, it comes out as garbled text similar to how you open a binary file.

miniupnp

unread,
Nov 15, 2023, 1:04:02 PM11/15/23
to gra...@googlegroups.com
That's a strange bug.
What key are you trying to use ?
--

---
You received this message because you are subscribed to the Google Groups "GrafX2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grafx2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grafx2/816913f9-243c-46b1-a055-834b783c25f2n%40googlegroups.com.

BluFudge CrispyRice

unread,
Nov 18, 2023, 2:33:46 AM11/18/23
to GrafX2
Alt + Shift + KP 0.

I've tried other keys, they don't work. Like I said, it's a problem with the linux version only, the wine version looks fine.
I asked where the configuration file is, which I found, however I can't edit it and would like to know how.

miniupnp

unread,
Nov 18, 2023, 5:57:06 AM11/18/23
to gra...@googlegroups.com
I have to check how it works and if it is really saved in the file.

The file is binary, that's why you can't edit it.

  HELP_LINK ("  Add new   : %s",   0x100+BUTTON_LAYER_ADD)
  HELP_LINK ("  Duplicate : %s",   0x200+BUTTON_LAYER_ADD)

BluFudge CrispyRice

unread,
Nov 18, 2023, 11:23:31 AM11/18/23
to GrafX2
That's what I was thinking. What are those two last lines?

miniupnp

unread,
Nov 18, 2023, 12:39:42 PM11/18/23
to gra...@googlegroups.com
Le 18/11/2023 à 16:52, BluFudge CrispyRice a écrit :
That's what I was thinking. What are those two last lines?
nothing important ;)

 I just tested on my FreeBSD with SDL2 and it successfully saved that setting and reloaded it.


Please run grafx2 with the -v option and check for lines such as :

DEBUG: Load_CFG() trying to load /home/nanard/code/git/grafX2/bin/../gfx2-sdl2.cfg
DEBUG: Load_INI() loading /home/nanard/code/git/grafX2/bin/../gfx2.ini


You will get the exact location of the .cfg and gfx2.ini file

BluFudge CrispyRice

unread,
Mar 6, 2024, 4:24:43 AMMar 6
to GrafX2
Sorry, I forgot to reply. Thanks for the -v tip but there's no way to edit the config file and the ini file doesn't have what I'm looking for.
Since this is such a fringe bug, I'll just live with it and eventually install it on some other distro.
Reply all
Reply to author
Forward
0 new messages