Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppRun doesn't get proper app pathway in some cases, preventing it from running. #9

Closed
BlueDrink9 opened this issue Oct 17, 2017 · 8 comments

Comments

@BlueDrink9
Copy link

No description provided.

@BlueDrink9
Copy link
Author

Easily fixed by changing AppRun script line 33.
I have removed the find-up function in mine. It returned a relative path (i.e. ".") which wasn't recognised by the rest of the script.
Instead I have replaced it with a (supposedly) more reliable command to get the current path, found on stack overflow

My version now looks like:

#!/bin/bash

set -e

# Be verbose if $DEBUG=1 is set
if [ ! -z "$DEBUG" ] ; then
  env
  set -x
fi

THIS="$0"
args=("$@") # http://stackoverflow.com/questions/3190818/
NUMBER_OF_ARGS="$#"

# Please do not change $VENDORPREFIX as it will allow for desktop files
# belonging to AppImages to be recognized by future AppImageKit components
# such as desktop integration daemons
VENDORPREFIX=appimagekit


if [ -z $APPDIR ] ; then
  # Find the AppDir. It is the directory that contains AppRun.
  # This assumes that this script resides inside the AppDir or a subdirectory.
  # If this script is run inside an AppImage, then the AppImage runtime
  # likely has already set $APPDIR
  # This command gets the absolute path this script is in. (EG /home/user/bin)
  # See stackoverflow.com/questions/4774054
  APPDIR=$(dirname "$(realpath -s "$0")")
fi

@BlueDrink9
Copy link
Author

Would have PRed myself, but couldn't find the original files.

@p3x-robot
Copy link
Member

sorry, i exchanged a package.json dependencies electron to devDependencies because the build AppImage (which is in the releases) it only allow in devDependencies.
My bad.
Try now, it will work. Sorry.

The exact npm install is:
sudo npm install -g p3x-onenote --unsafe-perm=true --allow-root

As of the AppImage @ https://github.com/patrikx3/onenote/releases/tag/1.0.297-181

for me it works.

What is the error? Which Linux?

@p3x-robot
Copy link
Member

The issue is that for npm the electron needs to be in dependencies, but to build in AppImage, the electron needs to be in devDependencies.

And last time if exchanged and that's why it was not working in npm.
Now it works with both ways.

@p3x-robot
Copy link
Member

I just don't know how to change the AppImage, what Linux distro do you have? How come it not working? I tried any dir it just works.

@BlueDrink9
Copy link
Author

When I'm next at the machine I'll give more details. Fedora 22, non-root. Wasn't installing, just running from AppImage. Manually setting $APPDIR in a terminal to the absolute path of the appimage caused it to work fine

@p3x-robot
Copy link
Member

Well, AppImage-s I use all in /opt and I have it in the PATH and that's all, besides, it provides a menu as well, so it is enough to click.

@p3x-robot
Copy link
Member

@BlueDrink9
i set a settings, so you can disable the hiding if the tray is not working
https://github.com/patrikx3/onenote#latest-gnome-with-dash-to-panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants