Board index FlightGear Support

Linux: Flightgear folders and files - owner / permissions?

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Linux: Flightgear folders and files - owner / permissions?

Postby ScottBouch » Tue May 02, 2017 1:21 pm

Hi all,

Just starting to have a bash at making an xml proprties file for an Arduino control stick that has two potentiometers, one for pitch, one for roll, and a digital trim hat & trigger.

However, the default owner of /usr/share/games/flightgear/ and all sub directories is Root, so I'm barred from making any changes until I change the owner.

Will the game get fussy if I just blanket change all folders and files ownership to be my username? ie: am I likely to break it?

ie:
Code (): Select all
sudo chown scott:scott -R /usr/share/games/flightgear


FGFS running on Linux Mint 18.1 Serena 64bit.

Cheers, Scott
User avatar
ScottBouch
 
Posts: 183
Joined: Wed Jun 22, 2016 4:14 pm
Location: Midlands, UK
OS: Linux Mint

Re: Linux: Flightgear folders and files - owner / permission

Postby Parnikkapore » Tue May 02, 2017 1:27 pm

That won't break anything afaik.
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: Linux: Flightgear folders and files - owner / permission

Postby ScottBouch » Tue May 02, 2017 1:29 pm

Thank you very much!

Just tested it, and it worked like a charm.

Cheers, Scott.
User avatar
ScottBouch
 
Posts: 183
Joined: Wed Jun 22, 2016 4:14 pm
Location: Midlands, UK
OS: Linux Mint

Re: Linux: Flightgear folders and files - owner / permission

Postby rominet » Wed May 03, 2017 7:09 pm

FlightGear shouldn't complain, but your distro package manager might. Probably what will happen is that you will get root owner and group back next time you update the distro package providing these files. And have your files replaced with the official ones, so beware!

One way to avoid this problem is to manage FGData yourself in your home directory or elsewhere (wherever you want). You can point FG to where it is with the --fg-root option. If you use a launcher, there is some field in there to choose this location.

If you download/clone FGData from the above link, don't forget to choose the correct branch for your FG version on the left.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Linux: Flightgear folders and files - owner / permission

Postby ScottBouch » Wed May 03, 2017 7:54 pm

Thank you Rominet, I like the idea of using the Home directory as you suggested.

I just installed it using the Linux Mint software manager GUI from the default repo, so not deviated form where it's installed the files.

Is there some general guidance anywhere on the folder structures used for FGFS in Linux? ie: where all elements should go and what you need to do if you want to move things around? I'm also willing to admit I'm still fairly novice to Linux (6 years into learning it!)

Cheers, Scott.
User avatar
ScottBouch
 
Posts: 183
Joined: Wed Jun 22, 2016 4:14 pm
Location: Midlands, UK
OS: Linux Mint

Re: Linux: Flightgear folders and files - owner / permission

Postby rominet » Thu May 04, 2017 12:23 am

There is nothing really Linux-specific in that, except the default value for some paths like FG_HOME depends on the OS.

The most important thing is FG_ROOT. You must, one way or another, tell FG where you have FGData (or the base package, which AFAIK is the contents of the FGData Git repository, without history information, but with a few more things suitable for a default installation such as a small scenery chunk around the default airport, for people who just installed FG and want to start flying without downloading anything). If you use a launcher, there is certainly a setting to tell FG the corresponding path; otherwise, you can use --fg-root=/path/to/FGData, or set the FG_ROOT environment variable. If you compile FG yourself, it can remember a value passed at compile-time so that you don't have to pass --fg-root, unless you want to use another location. But there are other ways to avoid tedious typing of the same options: launchers, $FG_HOME/fgfsrc, and home-made scripts.

FG_HOME doesn't have to be set. In fact, it is discouraged unless you really need to change it. Just rely on the platform default for your OS. On Linux, it is $HOME/.fgfs.

With both of these, FG can run. But generally, you also want aircraft and scenery. There are always a few default aircraft in FGData (c172p and ufo + variants). If you want more, you have to install them. How to do so and tell FG where they are depends on how you start FG, so we would need to know that. Basically, there are two ways:
  • With the built-in launcher (fgfs --launcher), there is a sort of package manager for aircraft, allowing to install and update aircraft by clicking on obvious buttons.
  • With and without the built-in launcher, you can also use aircraft downloaded from FGAddon. fgfs supports a --fg-aircraft option (that can be passed several times) that you can use to tell him where you have additional aircraft (i.e., the ones in places different from $FG_ROOT/Aircraft). There is also an FG_AIRCRAFT environment variable that does the same thing, and often we use the $FG_AIRCRAFT notation to informally represent your setting, regardless of how you've specified it (be it with --fg-aircraft or with the environment variable).

Finally, there is scenery. At a high-level, the situation is similar to aircraft: FG looks for scenery in folders specified with --fg-scenery options, in the TerraSync directory as well as in $FG_ROOT/Scenery (collectively and slightly informally referred to as $FG_SCENERY). Contrary to aircraft, there is no default scenery in FGData, because updating it regularly would make FGData absolutely huge since it is a Git repository. So, unless you get scenery from the base package(*), or from TerraSync, or install some manually, you get to start in water (frequent question here...).

When you download aircraft from the built-in launcher, or scenery from TerraSync (the wiki page is outdated, it is integrated in FG nowadays and already based on HTTP), the data goes inside the download directory. On Linux, this is by default $FG_HOME, i.e. (still on Linux) $HOME/.fgfs. You may choose a different one with --download-dir. There is also --terrasync-dir to specifically choose the TerraSync dir, but --download-dir is more useful in general. If you divert from the default values, you need to reflect it on --fg-aircraft and --fg-scenery, otherwise FG won't find what you've downloaded (or use equivalent GUI settings in a launcher, since I don't know how you start FG...).

There is no standard place where to install additional aircraft or scenery. Just use the options mentioned above so that FG can find them. For --fg-aircraft and --fg-scenery, two syntaxes are possible:
  • --fg-foobar=/path1 --fg-foobar=/path2 ...
  • --fg-foobar=/path1:/path2:...:/last_path
(I think you can mix both, but that's weird. foobar stands for aircraft or scenery, of course; on Windows, the path separator is a semicolon instead of a colon)

If you want more help, tell us how you start FG and please try to be more specific...

(*) In which case it is in $FG_ROOT/Scenery... once you've set up FG_ROOT properly, that is.
rominet
 
Posts: 605
Joined: Sat Nov 01, 2014 2:33 pm
Callsign: F-KATS
Version: Git next
OS: Debian GNU/Linux

Re: Linux: Flightgear folders and files - owner / permission

Postby Johan G » Sun May 07, 2017 11:25 am

rominet wrote in Thu May 04, 2017 12:23 am:When you download aircraft from the built-in launcher, or scenery from TerraSync (the wiki page is outdated, it is integrated in FG nowadays and already based on HTTP)

Please put a note about it on the discussion page of article and preferably a suitable maintenance template (probably {{outdated}}) on top of the article with a link to the discussion page topic. The best would of course be to update the page. ;)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit


Return to Support

Who is online

Users browsing this forum: No registered users and 10 guests