OS/2, eCS & ArcaOS - Technical > Applications

To .config or not .config

(1/4) > >>

Martin Iturbide:

I noticed that some Linux ported apps create their configuration files inside /.config inside the /home directory (example featherpad), but some other applications just go directly to the /home. (example Doodle, Tea).

Do you know if this is something hardcoded on the application, or if it something that can be adjust on compile time (when it is compiled on the OS/2 platform)?

I would prefer everything to try to get standarized and use /.config but I'm not sure if that should be a standard thing on the Linux apps. Is there any recommendation to use .config for Linux developers? Or was something interpreted for the OS/2 platform ports? I was not able to find about it on the internet.


Paul Smedley:
Plenty of *nix apps install their config into ETC/.config - there's no standardisation...

Dave Yeo:
It's all up to the app. Linux ports usually use $HOME, somewhere under /var for shared configs or for older ones, under /etc but if locally compiled or ported to Windows, /.config.
A well behaving program will also have fall backs, what if $HOME doesn't exist?
The screensaver for example tries for %HOME% first, then tries for the boot drive and if that fails, falls back on c:\os2\apps\SSaver\ and judging by the comments in the code, using %HOME% was a more recent addition.
Generally when porting, it is easiest to go with the flow, which usually means $HOME.

Paul Smedley:
Hey Dave,

--- Quote from: Dave Yeo on September 30, 2022, 04:20:04 am ---Generally when porting, it is easiest to go with the flow, which usually means $HOME.

--- End quote ---

Agreed - otherwise you're just asking for code maintenance issues down the track...

Martin Iturbide:
Thanks for the feedback.

I was wondering if the ".config" was standarized, because if it was, maybe that can be requested to the original develper (or project owner) of the open source project, so in the next port update it will reflected.  But since it is not standarized, I guess it can be more difficult for the original developer to agree on that.



[0] Message Index

[#] Next page

Go to full version