#Linux Question: How to change install location for Flatpaks in general or just BAR only?

1 messages · Page 1 of 1 (latest)

raven light
#

The default install location is: /home/USER/.var/app/info.beyondallreason.bar/

I created today a ext4 gaming partition for Linux, is there a way to install BAR Flatpak version on my second drive? Im using Manjaro KDE btw.

raven light
#

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?

proven sage
#

@rocky ermine linux instal halp

rocky ermine
#

this question is not BAR specific

raven light
#

@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

rocky ermine
#

"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

raven light
#

@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

rocky ermine
rocky ermine
#

Try ls ~/, it will list the same as ls /home/koboldx/

raven light
#

@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

rocky ermine
raven light
#

@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?

rocky ermine
raven light
#

@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?

rocky ermine
#

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.

raven light
#

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

rocky ermine
raven light
#

as you see in terminal, yeah

#

everything is in the screenshot

rocky ermine
#

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

raven light
#

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

rocky ermine
#

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)

raven light
#

he already downloaded the files, but i can delete them again...

rocky ermine
#

whatever you prefer, I thought that you want to have replays/config/maps etc

#

you can copy over downloaded stuff

#

it will work ok

raven light
#

yeah, i want everything in my new folder

#

okay, i move everything from data folder to "bar", thats data folder is empty after that

rocky ermine
#

cool, so it should work now with old settings etc

raven light
#

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?

rocky ermine
raven light
#

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.

rocky ermine
#

yes, makes sense

#

I find the behavior of mv annoying in this regard

raven light
#

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

rocky ermine
#

No, I think this doesn't change anything

raven light
#

so just removing the data"/"

rocky ermine
#

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

raven light
#

i mean, i could also copy and delete later, if mv isnt exactly doing what it should do

rocky ermine
#

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

raven light
#

there is also copy and xcopy, i did this 1 year ago with my homefolder that i duplicated from my PC to my Laptop

rocky ermine
#

I have no clue what those are. I often use rsync

raven light
#

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 🙂

rocky ermine
#

Heh, yeah, giving directions under linux is annoying because

  1. 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
  2. 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
raven light
#

Yeah i used Timeshift, i think that includes rsync... but i manually copy that homefolder per command line

raven light
#

@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?

rocky ermine
#

So, the #1047080297042280518 is both support and bugs, I don't think it matters at this point where it is exactly

ripe wren
#

I think it'd fit with a wider installation guide (subsection Linux). That said I've zero issues with this thread existing here.

raven light
#

@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?

rocky ermine
#

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

raven light
#

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

rocky ermine
#

hmmm, very weird then

#

Maybe I will try over the next weekend to reproduce this myself

raven light
#

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

raven light
raven light
#

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.

burnt yacht
#

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?

rocky ermine
#

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.

burnt yacht
#

okay I'll try that , thanks 🙂

rocky ermine
#

There's going to be probably update today pushed to fix it if Dev figure out mitigation.

burnt yacht
#

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?

rocky ermine
#

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

burnt yacht
#

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) 🙂

rocky ermine
#

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.

burnt yacht
#

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 🙂

raven light
#

@rocky ermine Do you had time to check the performance issue with symlink?

rocky ermine
#

Unfortunately not, a lot happening this weekend

raven light
#

ok :/

raven light
rocky ermine
raven light
#

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.

rocky ermine
#

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.

raven light
#

@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

rocky ermine
#

looks sane

raven light
#

i used the UUID when i open the diskmanager from KDE Partition manager and used properties to check the info

rocky ermine
#

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

raven light
#

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?

rocky ermine
#

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

raven light
#

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.

rocky ermine
#

That Guy is full of bullshit

raven light
#

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

raven light
#

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?

rocky ermine
# raven light <@240945074140217346> 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

raven light
#

@rocky ermine I though maybe this symlinks is like windows-registry, somewhere hidden deep into the system, but its just a normal shortcut, right?

rocky ermine
raven light
#

allright, thanks for explanation