AppImage / appimagetool

A low-level tool to generate an AppImage from an existing AppDir
58 stars 11 forks source link

Remove `$OWD` #16

Closed TheAssassin closed 1 year ago

TheAssassin commented 1 year ago

I have not once seen anybody use the $OWD environment variable. Its purpose is unclear to me anyway. I think we should just remove it.

probonopd commented 1 year ago

https://docs.appimage.org/packaging-guide/environment-variables.html

  • OWD: Path to working directory at the time the AppImage is called

It was introduced upon request from @jviotti and the Scribus team. It is documented and in active use, as a quick search shows.

Background:

As you know, some applications (especially ones for which there is no source code available) need to be patched so that the absolute /usr is replaced with a relative ././. This then requires an AppRun that does cd "{HERE}/usr" prior to running the payload application. Once the payload application is running, it can cd back to the original working directory (OWD), like e.g.,

https://github.com/vim/vim-appimage/blob/b1e366d90a204c3b5554fce6ceed6fbe1f579adf/scripts/vim.start.sh#L18-L21

does.

Let's not remove it, it would break existing AppImage builds.

Reference: