# Portable configuration data

**URL:** <https://discourse.appimage.org/t/portable-configuration-data/105>\
**Category:** Using AppImages\
**Created:** [December 3, 2016, 3:44pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105 "2016-12-03T15:44:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawnstar](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dawnstar](https://discourse.appimage.org/u/dawnstar)\
**Post date:** [December 3, 2016, 3:44pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/1 "2016-12-03T15:44:28Z")

</div>

a portable application should be portable no? this means not leaving traces in $home, %appdata, etc. deployable from a network share, usb fs, anywhere, but generating many likely conflicts from for example ~/.links2 across my network. I love what yall are driving at here but until I can see some method of like installing to a USB disk and keeping libraries [which works thus farly] AS WELL as configuration uhhh like vmwares thinapp system. Portableapps platform is another good one, again, only on windows… then again one can just write a batch script giving environmental prams set appdata=%CD%\data on some things.  
dephell is never a fun place to be, i dont know where to post this but try and hear me 🙂 you all rock

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [December 3, 2016, 6:29pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/2 "2016-12-03T18:29:49Z")

</div>

AppImages are “portable” in the sense that you can copy the one app = one file to a different system and it should run.

They are _not_ portable in the sense that _data_ (such as created documents and/or settings, caches) travels with them.

But on Linux, this is quite easy to achieve:  
Simply launch it like this: `export HOME=/where/you/want/your/data ./some.AppImage`. You can even put something like this into a script.

If have been considering to make the following feature: If there is a directory with the same name as the AppDir and a special suffix present next to the AppImage location, then use that as the $HOME for the AppImage. Would you be interested in such a functionality?

---

<div class="post-metadata">

**Author:** ![dawnstar](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dawnstar](https://discourse.appimage.org/u/dawnstar)\
**Post date:** [December 3, 2016, 6:57pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/3 "2016-12-03T18:57:22Z")

</div>

oh that is exactly what im looking for, ive already been using the bash function export HOME on several other scripts  
brilliant!

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [December 8, 2016, 5:44pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/4 "2016-12-08T17:44:59Z")

</div>

Similar discussion: [https://github.com/AppImage/AppImageSpec/issues/4](https://github.com/AppImage/AppImageSpec/issues/4)

---

<div class="post-metadata">

**Author:** ![CalebQ42](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/calebq42/32/151_2.png) [@CalebQ42](https://discourse.appimage.org/u/CalebQ42)\
**Post date:** [April 6, 2017, 12:05am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/5 "2017-04-06T00:05:09Z")

</div>

I though the same thing and that’s why I created [LinuxPA](http://GitHub.com/CalebQ42/LinuxPA). If you go into setting and enable `common.sh` it will run before the program, so you can set things such as HOME (which the default `common.sh` does).

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [June 18, 2017, 8:37pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/6 "2017-06-18T20:37:50Z")

</div>

[https://github.com/AppImage/AppImageKit/commit/d17fdefadcb98befa66c29137ce25731256f8f2a](https://github.com/AppImage/AppImageKit/commit/d17fdefadcb98befa66c29137ce25731256f8f2a) implements the following:

- If there is a directory with the same name as the AppImage plus `.home`, then export `$HOME`.
- If there is a directory with the same name as the AppImage plus `.config`, then export `$XDG_CONFIG_HOME`.

All new AppImages generated with the latest continuous build of appimagetool will have this functionality.

Depending on how well this works in practice, it may become part of the spec.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [June 18, 2017, 8:52pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/7 "2017-06-18T20:52:38Z")

</div>

Example on how to use this.

Imagine you want to use the Leafpad text editor, but carry its settings around with the executable.

You can do the following:

```bash
# Download Leafpad AppImage and make it executable
wget -c "https://bintray.com/probono/AppImages/download_file?file_path=Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage" -O Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
chmod a+x Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage

# Create a directory with the same name as the AppImage plus the ".config" extension
# in the same directory as the AppImage
mkdir Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config

# Run Leafpad, change some setting (e.g., change the default font size)
# then close Leafpad
./Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage

# Now, check where the settings were written:
linux@linux:~> find Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
(...)
Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config/leafpad/leafpadrc

```

Note that the file `leafpadrc` was written in the directory we have created before.

---

<div class="post-metadata">

**Author:** ![appim](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@appim](https://discourse.appimage.org/u/appim)\
**Post date:** [October 23, 2017, 6:48am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/8 "2017-10-23T06:48:59Z")

</div>

Hello probono,

i have follow the same step for firefox appimage.  
Created Firefox-54.0.glibc2.3.4-x86\_64.AppImage.config directory for Firefox-54.0.glibc2.3.4-x86\_64.AppImage .  
Make changes to settings in the firefox.  
close it.  
i don’t see any new data been saved in Firefox-54.0.glibc2.3.4-x86\_64.AppImage.config directory .

please enlighten me on where are the data been saved to?

How do i make sure my data are store along with appimage in the same directory?

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [October 31, 2017, 9:17am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/9 "2017-10-31T09:17:38Z")

</div>

> [@appim](#):
>
> Firefox-54.0.glibc2.3.4-x86\_64.AppImage

This AppImage does not have this functionality yet. It was introduced in a later version of AppImageKit.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [October 31, 2017, 11:48am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/10 "2017-10-31T11:48:27Z")

</div>

First quit all currently running instances of Firefox:

```
killall firefox

```

Then download the AppImage from [https://bintray.com/probono/AppImages/Firefox/56.0.2.glibc2.3.4#files](https://bintray.com/probono/AppImages/Firefox/56.0.2.glibc2.3.4#files)

```
mkdir Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home
./Firefox-56.0.2.glibc2.3.4-x86_64.AppImage

```

After running the AppImage, you can inspect the contents of `Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home` and you will see stuff has been saved there:

```
me@host:~/Downloads$ find Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/ | head -n 10
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/Desktop
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/.cache
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/.cache/fontconfig
(...)
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/.cache/fontconfig/CACHEDIR.TAG
Firefox-56.0.2.glibc2.3.4-x86_64.AppImage.home/.cache/mozilla
(...)
```

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [November 23, 2017, 6:43pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/11 "2017-11-23T18:43:08Z")

</div>

See this asciicinema for a live demo:

[https://asciinema.org/a/SGKGaxZ99Gf3tOsdrlZICpDLz](https://asciinema.org/a/SGKGaxZ99Gf3tOsdrlZICpDLz)

---

<div class="post-metadata">

**Author:** ![appim](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@appim](https://discourse.appimage.org/u/appim)\
**Post date:** [November 24, 2017, 7:13am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/12 "2017-11-24T07:13:41Z")

</div>

probono: ok

thank you.

---

<div class="post-metadata">

**Author:** ![Royi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/royi/32/150_2.png) [@Royi](https://discourse.appimage.org/u/Royi)\
**Post date:** [May 28, 2018, 7:47pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/13 "2018-05-28T19:47:12Z")

</div>

> [@probono](#):
>
> Example on how to use this.
> 
> Imagine you want to use the Leafpad text editor, but carry its settings around with the executable.
> 
> You can do the following:
> 
> ```bash
> # Download Leafpad AppImage and make it executable
> wget -c "https://bintray.com/probono/AppImages/download_file?file_path=Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage" -O Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
> chmod a+x Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
> 
> # Create a directory with the same name as the AppImage plus the ".config" extension
> # in the same directory as the AppImage
> mkdir Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
> 
> # Run Leafpad, change some setting (e.g., change the default font size)
> # then close Leafpad
> ./Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage
> 
> # Now, check where the settings were written:
> linux@linux:~> find Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config
> (...)
> Leafpad-0.8.18.1.glibc2.4-x86_64.AppImage.config/leafpad/leafpadrc
> 
> ```
> 
> Note that the file `leafpadrc` was written in the directory we have created before.

This use case should be shown in the `README.md` in GitHub.

Moreover, have you thought about extending this approach?  
Think of the following use case, we have a software which supports Plug In’s.  
It expects the Plug In’s to be in a certain location which is not `~/` related.  
So could we have something like `AppData` folder next to the AppImage which can be configured to be copied to somewhere to allow Plug In’s functionality?

Really like the Portable Data Feature.  
I think this is your edge over FlatPak and Snap (Allowing Portable Use Case).

All needed now it Portable AppImage which is a Menu System to launch other AppImages (Think like the [PortableApps](https://portableapps.com/) Menu which is a portable application by itself, no system wide installation).

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 30, 2018, 5:42am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/14 "2018-05-30T05:42:55Z")

</div>

> [@Royi](#):
>
> This use case should be shown in the `README.md` in GitHub.

Added.

> [@Royi](#):
>
> So could we have something like `AppData` folder next to the AppImage which can be configured to be copied to somewhere to allow Plug In’s functionality?

This is probably something specific to the application in question that should best be implemented either within the application itself, or by writing a custom `AppRun` launcher. Every application probably needs some environment variable to be set in order to load plugins from custom locations. Actually I would assume that most will (also) load plugins from somewhere within `$HOME`, so the `.home` feature (described above) that is already available might be sufficient in many cases.

---

<div class="post-metadata">

**Author:** ![Royi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/royi/32/150_2.png) [@Royi](https://discourse.appimage.org/u/Royi)\
**Post date:** [May 30, 2018, 6:08am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/15 "2018-05-30T06:08:41Z")

</div>

@probono,  
Do you expect that TeXStudio will download MiKTeX to `.home`?  
Let’s sya I use both TeXMaker and TeXStudio, should I expect each to download MiKTeX?

There should be a well defined way to have AppImage format auxiliary data.

Again, have a look on PortableApss approach for that.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 30, 2018, 6:27am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/16 "2018-05-30T06:27:42Z")

</div>

> [@Royi](#):
>
> Do you expect that TeXStudio will download MiKTeX to `.home` ?  
> Let’s sya I use both TeXMaker and TeXStudio, should I expect each to download MiKTeX?

No, if TeXStudio requires MiKTeX to work properly, then I expect a TeXStudio.AppImage to contain MiKTeX. Because an AppImage is supposed to run without the user needing to download anything else besides the AppImage.

> <https://github.com/unruhschuh/TeXstudio.AppImage/issues/2>
>
> I have found a way to bundle a minimal version of TeX Live inside the AppImage. …The resulting AppImage can output PDF files without any existing LaTeX installation in the system and is 149 MB in size which I think is still reasonable.
> 
> If needed we could also have a script check the system for a pre-existing LaTeX installation and if it exists (e.g., latexpdf is already on the \`$PATH\`) use that instead.
> 
> Here is the recipe, I am using your AppImage as the basis and bundle the minimal version of TeX Live:
> https://github.com/probonopd/AppImages/blob/master/recipes/texstudio/Recipe
> 
> And here is the AppImage:
> https://bintray.com/probono/AppImages/download\_file?file\_path=TeXstudio-2.10.8.tl20160405.glibc2.4-x86\_64.AppImage
> 
> There is one remaining issue which I couldn't resolve and would love to get help on:
> If you open the AppImage and try to run pdflatex, then the pdflatex binary is not found (although it is on the $PATH, see my custom AppRun script). However if I go to Options -\> Configure TeXstudio -\> Commands -\> PdfLaTex -\> Select Program -\> Press OK, then it starts working.
> 
> What do I need to do in order not to need the manual Options -\> Configure TeXstudio -\> Commands -\> PdfLaTex -\> Select Program -\> Press OK?

---

<div class="post-metadata">

**Author:** ![Royi](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/royi/32/150_2.png) [@Royi](https://discourse.appimage.org/u/Royi)\
**Post date:** [May 30, 2018, 6:39am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/17 "2018-05-30T06:39:23Z")

</div>

But in most cases Minimal TeXLive won’t cut it.  
So you suggest user who use both TeXMaker and TeXStudio and needs extra packages to have 2 ~4 GB programs.

Yea, great user experience.  
Not to mention the chances the TeXMaker / TeXStudio maintainers to have such a mess as a choice.

Really, those design choices only makes FlatPak / Snap look much more reasonable.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 30, 2018, 6:51am UTC](https://discourse.appimage.org/t/portable-configuration-data/105/18 "2018-05-30T06:51:11Z")

</div>

> [@Royi](#):
>
> Really, those design choices only makes FlatPak / Snap look much more reasonable.

Flatpak and Snap allow dependencies. We discourage them. But hey, in the end it’s up to whoever makes the TeXMaker/TeXStudio AppImage to decide what goes inside and what doesn’t. Unlike Flatpak and Snap we don’t enforce things. We just provide the tools. AppImage does not restrict them from doing what they want to do. The developer of an AppImage can do what they want. An AppImage is just a self-mounting filesystem image (“disk image”) that runs what _someone_ puts inside.

---

<div class="post-metadata">

**Author:** ![emil\_9822](https://avatars.discourse-cdn.com/v4/letter/e/3bc359/32.png) [@emil\_9822](https://discourse.appimage.org/u/emil_9822)\
**Post date:** [May 5, 2020, 1:13pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/19 "2020-05-05T13:13:34Z")

</div>

I tried the suggested solution to save appimage application settings in the same folder, by creating folder with the same name and extension .config or .home, but none of them worked. The folders are empty.

I also tried to change the home directory of appimage application by launching it with the command `export HOME=/path/to/data/folder ./xxxx.appimage` but also it didn’t worked. I get `bash export not a valid identifier`.

---

<div class="post-metadata">

**Author:** ![probono](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.appimage.org/probono/32/81_2.png) [@probono](https://discourse.appimage.org/u/probono)\
**Post date:** [May 16, 2020, 12:50pm UTC](https://discourse.appimage.org/t/portable-configuration-data/105/20 "2020-05-16T12:50:45Z")

</div>

Hi @emil_9822, which AppImage? Try running the AppImage with `--appimage-portable-home` .

For more information, please see [https://github.com/AppImage/AppImageKit/issues/539](https://github.com/AppImage/AppImageKit/issues/539).

Please open an issue in [https://github.com/AppImage/AppImageKit/](https://github.com/AppImage/AppImageKit/) if it does not work with any AppImage.

[Next page](https://discourse.appimage.org/t/portable-configuration-data/105.md?page=2)
