#Linux Question: How to change install location for Flatpaks in general or just BAR only?
1 messages · Page 1 of 1 (latest)
Linux Question: How to change or move install location for Flatpaks in general or just BAR only?
Linux Question: How to change install location for Flatpaks in general or just BAR only?
@rocky ermine linux instal halp
That thread should be in #1047080297042280518, but it's ok. See https://discord.com/channels/549281623154229250/1065664774832132188 that should answer your question.
this question is not BAR specific
@rocky ermine I also try to collect other infos from a help tread in another forum, and the link (tutorial) doesnt really help with flatpak install... the real gamefiles are under home/user/.var/ and from the response that i have gotten doesnt looks good. So only the path to the config files can be changed... is that right? Here the Link from the Manjaro Forum where i also asked: https://forum.manjaro.org/t/how-to-change-install-location-for-flatpak/134268
"So only the path to the config files can be changed" not sure what you mean by that.
But, yes, sorry https://discord.com/channels/549281623154229250/1065664774832132188 is not enough, the guide to change flatpak install to custom will change the directory where the launcher is installed, not where the launcher will install game. To change where game files are installed, currently symlinks is the simplest option to make it work.
Assuming that you want BAR files installation to be e.g in /run/media/games/bar, you can run following commands:
# move exiting installation to new directory
$ mv ~/.var/app/info.beyondallreason.bar/data/ /run/media/games/bar
# give app in flatpak permission to read and write to new data directory
$ flatpak override --user --filesystem=/run/media/games/bar info.beyondallreason.bar
# symlink the old data directory to new one
$ ln -s /run/media/games/bar ~/.var/app/info.beyondallreason.bar/data
@raven light and that should work just fine
@rocky ermine Thanks alot for your support... i will try this out.
I have few additional questions to your commands, about:
$ flatpak override --user --filesystem=/run/media/games/bar info.beyondallreason.bar Do i have to replace --user with my actual username from my homedirectory? And the same question with --filesystem do i have to replace that with --ext4 in my use case?
Are this 2 last commands temporary till system restart or permanently?
$ ln -s /run/media/games/bar ~/.var/app/info.beyondallreason.bar/data The second path looks to me incompleted and needs to adjusted, is that possible? Specially when i look at ~/.var In my case it should be $ ln -s /run/media/games/bar /home/koboldx/.var/app/info.beyondallreason.bar/data
No, those are just flag names
Permanent
~ is expanded to your home directory path by shell, no need to write full absolute path. It's useful in exactly case like this were command works relative to user directory, not filesystem root /. But of course you can use absolute path if you want, it's just a shortcut.
Try ls ~/, it will list the same as ls /home/koboldx/
@rocky ermine Allright thanks again 🙂
@rocky ermine is it possible that you did a little type mistake here and forgot the /? Please check the difference below, for better overview... first command is yours and the second command is from my side... i hope i adjusted that right.
flatpak override --user --filesystem=/run/media/games/bar info.beyondallreason.bar flatpak override --user --filesystem=/run/media/games/bar/info.beyondallreason.bar
Space there is correct because those are 2 different arguments and info.beyondallreason.bar is there to identify application and is not part of path set to --filesystem argument.
Reading command as English:
The command overrides the security settings, for current user, by adding filesystem path /run/media/games/bar to allowlist for flatpak application info.beyondallreason.bar
You could do the same operation by installing https://flathub.org/apps/details/com.github.tchx84.Flatseal which is GUI application to manage permissions for flatpak applications and there for BAR add that path to the list of allowed paths.
Find and install hundreds of apps and games for Linux. Enjoy GIMP, GNU Octave, Spotify, Steam and many more!
@rocky ermine As long your commands do the job here, i think i dont need the GUI... but thanks and its also very nice that you explainet everything too me. That helps me alot 🙂 Do i only need this symlink as long i only want my "appfiles" on my other drive? Or do i still need to follow the guide?
you're welcome 🙂
You need to follow that (https://tuxexplorer.com/can-i-choose-where-my-flatpak-apps-are-saves-on-the-steam-deck ) guide only if you also want to put launcher on a separate drive and not have it on the main drive. It's ~300MiB in size, your call, but IMHO not worth it, I think currently it's overall a bit inconvenient to have multiple flatpak installations
@rocky ermine # symlink the old data directory to new one
$ ln -s /run/media/games/bar ~/.var/app/info.beyondallreason.bar/data
are you sure? if the second path should be the new one?
$ ln -s ~/.var/app/info.beyondallreason.bar/data /run/media/games/bar
this makes more sense or not?
ln -s /source /dest makes all accesses to /dest to instead read from /source. The data is stored in /source. When you do it in the other direction, the data will be actually stored in /dest.
So, the other direction will work, but then the data will be stored in~/.var/app/info.beyondallreason.bar/data and that's exactly what you don't want, you want to store data in /run/media/games/bar
In other words, ln -s source dest, creates a link from dest to source.
okay, i think i got it, i just try it out, right now
do i have to use sudo for this commands?
@rocky ermine Help something is wrong, the updater doing big downloads after my changes 😦
@rocky ermine The Launcher will download 1,4Gbyte... but i just updated the game 20min ago befor i did my adjustments
Did you move the files to new directory?
Ok, I see, this behavior is annoying.
if directory /some/path/x exists and you do
mv /some/path1/asd /some/path/x
the asd will be moved inside, and it will look like /some/path/x/asd
if it doesn't exist
it will look like /some/path/x
So, you did mv, when the target directory already existed. What you basically need to do, is just move the content of data directory I see in the screenshot, into the directory in the screenshot
so in the screenshot, there should be directory named pool, packages etc
yeah there are new directorys created in "bar" folder... after i started the launcher
bar folder had only data folder and nothing else, after i use move command
so something is wrong with your pathing that you gave me
that's good, but to not have to redownload, just move what is currently in the data directory in screenshot, to the directory in screenshot. (don't know how to say it clearer, I hope you know what I mean..., just open data, select all, "cut", and paste in the parent of data: the directory visible in the screenshot)
he already downloaded the files, but i can delete them again...
whatever you prefer, I thought that you want to have replays/config/maps etc
you can copy over downloaded stuff
it will work ok
yeah, i want everything in my new folder
okay, i move everything from data folder to "bar", thats data folder is empty after that
cool, so it should work now with old settings etc
okay, its working now... awesome! 🙂
@rocky ermine So the only issue was with the move command, because i shouldnt created the "bar" folder, is that correct?
Yeah... because when you open man page for mv command, you will see Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
im still a bloody noob, when it comes to copy and move commands in the command line, i also try to archive my adjustments that i make to linux... that i can duplicate it when i reinstall linux.
if i understand this case right and when the folder "was already" created, i should adjust your mv command like this:
from:
$ mv ~/.var/app/info.beyondallreason.bar/data/ /run/media/games/bar
to this:
$ mv ~/.var/app/info.beyondallreason.bar/data /run/media/games/bar
No, I think this doesn't change anything
so just removing the data"/"
you can create empty directories with some files etc and try yourself, but for mv command this doesn't matter
if the target folder already exists
i mean, i could also copy and delete later, if mv isnt exactly doing what it should do
the correct thing is to individually move all files from source, to destination folder.
Something like mv ~/.var/app/info.beyondallreason.bar/data/* /run/media/games/bar
because * will be expanded by shell, to all files in directory. But it's not foolpoof, because * will only expand to non-hidden files.
It's just easier when target directory doesn't exist
there is also copy and xcopy, i did this 1 year ago with my homefolder that i duplicated from my PC to my Laptop
I have no clue what those are. I often use rsync
This was one of my biggest linux archivements that i earned, im always happy when i got some stuff working under linux, its like destroying the boss of the internet 🙂
Heh, yeah, giving directions under linux is annoying because
- In terminal, there are all those gotchas, you just kind of need some basic understanding of how things works. But those steps will work ~everywhere
- In GUI, there is just sooo many GUIs, I can tell somebody how to do something in Gnome, but I don't know KDE etc
Yeah i used Timeshift, i think that includes rsync... but i manually copy that homefolder per command line
- yeah, all this DE's (Desktop Enviroments) makes it for universal help, complicated
@rocky ermine Okay im close this Topic now, but maybe it should moved to bugs, as you said in your first comment? Or maybe some admin should create a Help Support Tread... because this Topic doesnt really fits in Suggestions and also not in the Bugs categorie. @ripe wren What are you thinking?
So, the #1047080297042280518 is both support and bugs, I don't think it matters at this point where it is exactly
I think it'd fit with a wider installation guide (subsection Linux). That said I've zero issues with this thread existing here.
@rocky ermine I had very strong performance issues, after this flatpak symlink changes (my other topic just vanished today and i have no idea why) and after a week of crappy performance and game stutters, i used timeshift yesterday and i reverted this symlink changes and my performance is back to normal now. Do you have a idea why is that?
Other then somehow BAR doing a bunch of blocking writes/reads to the disk, and the disk you put game on being very slow, I can't think about anything that can cause that.
To confirm that it's that, you could use symlink, but not put game on the external drive, but on different folder on the same drive
My SSD where i copy it, is only a year old and pretty expensive and faster than my external drive that im using now for linux/swap/bar
hmmm, very weird then
Maybe I will try over the next weekend to reproduce this myself
i have also a screenshot from crystal disk info from my 860 Pro (expensive MLC SSD)
also no problems with win10 and windows games, where i also use the 860 Pro
This would be very nice, thank you.
Im pretty sure, that my other drive cant be the problem in this case... i also had on that drive played bar (windows client) on win10 without issues.
Hey everyone. is there a guide to cleanly uninstall BAR (flatpak version)? I'm kind of new to linux and just uninstalling via the software GUI and reinstalling it sadly doesn't fix the menu crashes I get. there probably have to be some additional folders / files that have to be deleted to do a clean reinstallation, right?
Reinstall will not help.
See #1047080297042280518 , people have issue with crashes in menu. Often you just have to wait a bit longer, don't click much when it hangs.
okay I'll try that , thanks 🙂
There's going to be probably update today pushed to fix it if Dev figure out mitigation.
Game runs totally fine on my AMD GPU machine, but my nvidia machine crashes often times in the menu. I'll try waiting a bit after starting the game. Crashes often accur in map select screen
thats nice to hear 🙂 the updates gets installed automatically if I look for flatpak updates?
For this, update will be fetched automatically in the launcher window, the one with start button, it's checking for updates everytime you launch game
Only launcher itself updates are downloaded via flatpak, launcher then downloads the game, engine, etc
And keeps them up to date
ah yes, youre right, there was a launcher too, I forget about that ...
thanks a lot for your help and building such a great game! I'm really glad I can play TA with a really great engine again 🙂
I even got some RTS haters into playing it, just because of the great AI options (they like to play defensivly) 🙂
Btw: if you really actually wanted to remove all installed files in the future, in launcher there is button "open install directory" it will take you to directory with installed files, so you would have to delete that one in addition to removing flatpak.
But it's very, very rare that you would have to do it to actually fix something.
I'll try the "patient" method first, this could actually be the cause of my problem in this machine 😄
thanks a lot for your help 🙂
@rocky ermine Do you had time to check the performance issue with symlink?
Unfortunately not, a lot happening this weekend
ok :/
Just a little reminder message 🙂
Just tested and I've not noticed any performance impact on using symlink vs without symlink
you may dont just see the impact in the first few minutes
@rocky ermine i mainly saw it when i click on factorys to build some units and when scrolling in and out when a com explodes, that the game performance went from 100% to almost 0% performance, for a second. I also experience one time in a 8v8 PVP DSD match in the first 3minutes that my game almost frozen 3-4 heavy performance impacts... maybe the fps went down to 2-3fps where i have should have per default 144fps (no big deal with a 2080Ti and a i7-6700k on medium presets). But all that issue was temporary and not constantly... so you may not see the difference instantly.
I've played one game, and I've not noticed anything. I also can't think about any technical reason why it would happen. Next time I play I can play again with the symlink, but if I don't notice anything, if I can't reproduce it, there is nothing I can do about it. You would have to spend time debugging it with some profiling tools to see why it's freezing like that.
If I at least had idea what could cause that, but it really doesn't make sense, it can't be just "usage of symlink"
What you could experiment with is not linking the whole data directory to the new drive, but just maps and pool folders. Those are the ones that hold the most data, and they are read only at the begging of the game, not during.
Maybe for some reason, when engine produces log messages that is causing pauses because that log messages are written to that other disk and that is somehow slow? I don't know why that would be slow, but maybe you have "flush logs" option enable in Chobby and mounted that SSD with some weird options that causes writes to logs to slow everything down? Really just speculation.
@rocky ermine I think i mounted my drive correctly, but maybe you can look into it, if you have the time. I mounted it in etc/fstab
Linux Games /dev/sda3
UUID=dd5af583-9d00-4017-adf7-e1d8876486e7 /media/linux-games ext4 defaults 0 0
looks sane
i used the UUID when i open the diskmanager from KDE Partition manager and used properties to check the info
yes, uuid is prefered, looks good. You can again try with just linking maps and pool then. This will at least show if it's problem with them (highly unlikely) or some other file
i think the tools in Linux are very limited, maybe you can recommend a tool where i can check where the issue is related too?
Linux has incredible amount of tools, but they are not easy to use.
The best what you can do, is to move the files one by one to the new location, and set up symlinks
then test
that way you can identify WHICH files don't like being symlinked on your system
I asked also in Manjaro Linux Forum related to my performance issue, there was not big response from my topic but one guy told me that flatpak just had bad performance and symlink is just shit.
That Guy is full of bullshit
possible true... i hope so
the same guy, also told me its not possible to symlink this game and many others stuff with flatpak... and you proofed him wrong... so im glad you here to give me support
My worries about the symlink, that i lose the overview... is there some terminal command where i have a overview... i dont want to rollback my whole system because of some symlink changes.
is there a easy command clean this commands, when im lost? or maybe a single file that i can backup and restore later... to prevent me from future issues, if im fuck it up?
@rocky ermine any suggestions?
practice practice practice 😄. Try to create some empty directories with mkdir, see what mv does, what cp does, empty files with touch, create some symlinks with ln -s etc. Show what is in directory with status of symlinks present there with ls -l
you can put output of command to file like ls -l > output.txt, so that you can eg run this and save how folder looked like when it was correct, then compare after you made changes.
Overall, those are just files, so you can not even in the terminal, but in GUI copy the whole data folder to some other location, and when you feel like you screwed up something, just delete whatever is there, and copy back the original files and it will work, no need to do full system backup rollback
@rocky ermine I though maybe this symlinks is like windows-registry, somewhere hidden deep into the system, but its just a normal shortcut, right?
Yeah, it's like a shortcut. A special type of "file" that points at some other file or directly somewhere else.
symlinks are also on Windows https://www.howtogeek.com/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
allright, thanks for explanation