Where to put Files for Mono Application in Unix

BoCoKeith

I am writing a C# application (in Visual Studio on Windows) that will be run as a mono application on Unix (Raspbian aka Debian). I am a Unix noob, and though I have read (well, skimmed) the Linux Foundation Filesystem Hierarchy Standard I am still not completely clear on where I should put the files my application will need. I have:

  1. The compiled C# application (app.exe). I thought I would put this in /usr/bin, except that the application is not run directly (it is invoked by "mono app.exe"), so maybe /usr/libexec is a better location?
  2. Configuration files (there may be more than one) (app.1.conf, app.2.conf, etc.). If they are not user specific, I would think /etc/app (a directory, not a file) would be a good place for these. How about if they are user specific? /home/?
  3. Log file (app.log). Seems that /var/log is the right place for this.

Thanks in advance for your input.

knocte

You should look at an already established Mono app for reference. For example let's take MonoDevelop:

  1. The exe file goes to /usr/lib/{appnameinlowercase}/bin/ , but they place a launcher script in /usr/bin, named {appnameinlowercase}, for easy launch from the command line (this script just calls exec mono YourAppName.exe).

  2. In .NET the config files need to be in the same directory as the executable file, so you could place them in /usr/lib/{appnameinlowercase}/bin, then later for convenience, put symlinks to them from /etc/{appnameinlowercase}/.

  3. Correct, /var/log/{appnameinlowercase}/ should be fine.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related