sym links in userdata

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
User avatar
pyrophorus
Posts: 533
Joined: December 1st, 2010, 12:54 pm

sym links in userdata

Post by pyrophorus »

Hi everybody...
I recently updated Wesnoth to v 1.16.2 (flatpak) and tried to create in userdata/add_ons a symbolic link to my user content (Linux OS). But my add_on don't show in the campaign dialog as it does with 1.12 version.
I'm sure I work with the right add_ons folder.
Did I missed something ?
BTW, I tried to access the log but can't find it out. The "version" button dialog in main screen don't show any access to the logs, and there's no such files in the legacy folders.
Thanks in advance for your replies...
Friendly,
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2358
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: sym links in userdata

Post by Lord-Knightmare »

pyrophorus wrote: February 11th, 2022, 7:12 am Hi everybody...
I recently updated Wesnoth to v 1.16.2 (flatpak) and tried to create in userdata/add_ons a symbolic link to my user content (Linux OS). But my add_on don't show in the campaign dialog as it does with 1.12 version.
I'm sure I work with the right add_ons folder.
Did I missed something ?
BTW, I tried to access the log but can't find it out. The "version" button dialog in main screen don't show any access to the logs, and there's no such files in the legacy folders.
Thanks in advance for your replies...
Friendly,
I use Wesnoth (1.16.2/1.17.0) in both macos and windows10. In both the userdata leads to a "add-ons" folder (the hyphen, not underscore). Perhaps that's what's causing the issue? You clearly stated add_ons twice.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
pyrophorus
Posts: 533
Joined: December 1st, 2010, 12:54 pm

Re: sym links in userdata

Post by pyrophorus »

Thanks for your reply.
Unfortunately, this is not the reason. I misspelled the folder name in my post, but the exact path to my userdata/add-ons folder is:
/home/linuxuser/.var/app/org.wesnoth.Wesnoth/data/wesnoth/1.16/data/add-ons
BTW, when moving my add-on to this folder (instead of creating a symlink) it works: the add-on shows then in campaign dialog.
Friendly,
User avatar
Heindal
Posts: 1353
Joined: August 11th, 2011, 9:25 pm
Location: Germany, Karlsruhe
Contact:

Re: sym links in userdata

Post by Heindal »

Hi pyrophorus.

nice to see you again.

I've noticed that when the game can't access the user data folder accessed (for whatever reason, in my case it was a security issue, which disallowed certain apps to just create folders), that Wesnoth uses a fallback and installs the add-on folder in the installation folder as well. I've noticed that, when I upgraded the steam version of the game, when the game got upgraded to 1.16.

You might also access the folder where the user-data is saved, by using the map editor. There is a button that leads directly into the user-data folder.
I hope it helps.


Kind regards

Heindal
The future belongs to those, who believe in the beauty of their dreams.
Developer of: Trapped, Five Fates, Strange Legacy, Epical, UR Epic Era
Dungeonmasters of Wesnoth, Wild Peasants vs Devouring Corpses, Dwarf Dwarfson Dwarvenminer
gnombat
Posts: 706
Joined: June 10th, 2010, 8:49 pm

Re: sym links in userdata

Post by gnombat »

I've never used Flatpak, but doesn't it run applications inside a sandbox? You might not be able to use a symbolic link if it points outside the sandbox.

I suspect the symlink would work if you used the regular (non-Flatpak) version of Wesnoth. Alternatively, maybe there is some way to tell Flatpak to grant permission to use the entire filesystem?
User avatar
pyrophorus
Posts: 533
Joined: December 1st, 2010, 12:54 pm

Re: sym links in userdata

Post by pyrophorus »

Heindal wrote: February 11th, 2022, 2:12 pm Hi pyrophorus.

nice to see you again.
Thanks... I'm glad seeing you're still there !
Heindal wrote: February 11th, 2022, 2:12 pm You might also access the folder where the user-data is saved, by using the map editor. There is a button that leads directly into the user-data folder.
I hope it helps.
Heindal
Actually, I followed your idea to use the map editor 'load map' dialog to see what happens. In my add-on folder I can see the two add-ons I have downloaded from the server, but the sym link don't show along with them as it should (and as it shows in the files manager of course).

Friendly,
User avatar
pyrophorus
Posts: 533
Joined: December 1st, 2010, 12:54 pm

Re: sym links in userdata

Post by pyrophorus »

gnombat wrote: February 11th, 2022, 3:46 pm I've never used Flatpak, but doesn't it run applications inside a sandbox? You might not be able to use a symbolic link if it points outside the sandbox.

I suspect the symlink would work if you used the regular (non-Flatpak) version of Wesnoth. Alternatively, maybe there is some way to tell Flatpak to grant permission to use the entire filesystem?
Well... Well... Well... You're most probably (certainly) right. And there is a way to modify the permissions, but the doc is rather elusive about instruction syntax.

Many thanks anyway !
User avatar
Atreides
Posts: 1074
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: sym links in userdata

Post by Atreides »

gnombat wrote: February 11th, 2022, 3:46 pm I've never used Flatpak, but doesn't it run applications inside a sandbox? You might not be able to use a symbolic link if it points outside the sandbox.

I suspect the symlink would work if you used the regular (non-Flatpak) version of Wesnoth. Alternatively, maybe there is some way to tell Flatpak to grant permission to use the entire filesystem?
I'm no expert at this but I am running Linux and have 14/16 installed via flatpak also. I have setup a "symlink" to the wmltools GUI for them and they work fine (until I install a new version which for flatpak makes a brand new directory name, gah!) so I think that's not it.

The files for flatpak are not "sandboxed" I guess. They're just in normal (although HORRIBLY long and obscure) directories.

As for the addons I doubt that could matter at all. They got stored in my user dir just like 1.12 (not flatpak) did although again in a different place.

Hmmm I'll list my dirs, maybe that helps:
.var/app/org.wesnoth.Wesnoth/data/wesnoth/1.16/data/add-ons (flatpak)
.local/share/wesnoth/1.12./data/add-ons (debian install)
User avatar
pyrophorus
Posts: 533
Joined: December 1st, 2010, 12:54 pm

Re: sym links in userdata (SOLVED)

Post by pyrophorus »

Hi everyone !

I finally fixed the issue and give the tip here just in case it could help someone else.
gnombat was right: the flatpak sandbox was ignoring silently the sym link. Give access to the Wesnoth process outside the sandbox is possible using the "--filesystem" option in the launching command. (You'll find it in the .desktop file or the gnome menu). It looks like:

Code: Select all

/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=sh org.wesnoth.Wesnoth -c 'wesnoth >/dev/null 2>&1'
You only have to add the option: --filesystem=home

Code: Select all

/usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=home --command=sh org.wesnoth.Wesnoth -c 'wesnoth >/dev/null 2>&1'
This gives access to my whole home directory, but it's possible to specify a path instead. See the link here for all options:https://docs.flatpak.org/en/latest/flat ... latpak-run

Hope this will help someone,
Friendly,
Post Reply