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

[desktop integration] Make the dialog text "nicer" #209

Closed
chrisnharvey opened this issue Aug 5, 2016 · 23 comments
Closed

[desktop integration] Make the dialog text "nicer" #209

chrisnharvey opened this issue Aug 5, 2016 · 23 comments

Comments

@chrisnharvey
Copy link

To me, the dialog text for desktop integration text that is used could be made simpler

Should a desktop file for /path/to/application.AppImage be installed?

Could this be made a little nicer like this?

Would you like to install application.AppImage?

or:

Would you like to add application.AppImage to your menus?

I'm just thinking that the average person might not know what a desktop file is, and showing the full path to the AppImage could look messy.

Any thoughts?

@probonopd
Copy link
Member

Well, the point about AppImage is that you do not need to "install" them. You can, optionally, integrate them with the system by the use of .desktop files. However, a .desktop file not only can add it to the menus (in fact, there are some which don't - e.g, xdgurl) but could also install URL handlers or MIME associations etc.
The full path is there so that you know which AppImage is going to be integrated with the menu. Remember you can have any number of them in any number of locations, including USB drives or network locations, even of the same app.

@shoogle
Copy link

shoogle commented Aug 6, 2016

@probonopd what you say is true, but desktop integration does more than just install a desktop entry file (e.g. it also installs icons) and as you say it could do more besides (e.g. manuals, bash completion, etc).

Perhaps the message could be?

Would you like to integrate with your system?

This will add it to your applications menu, set up file associations, and install icons and resources.
If you don't do this you can still launch the application by double-clicking on the AppImage.

Of course, it would be nice to agree on a directory (e.g. ~/AppImages) where AppImages would be detected and resources extracted automatically, assuming the good folks over at KDE et al. are willing.

@probonopd
Copy link
Member

@shoogle thanks for your text suggestion, which I like. Since we do not control what goes into the AppImage, it is basically up to the upstream application authors what to put into the desktopintegration bash script. Be aware that not each application might do all of the above, especially set up file associations.

I disagree on the idea that there should be only certain locations from where AppImages work (or even work better, for that matter). One of the key ideas of AppImages is that they run from any location.

@chrisnharvey
Copy link
Author

@probonopd Agree that the wording I suggested probably isn't the best. Although, I do like @shoogle's suggestion. I think it just needs to be more obvious as to what is going to happen when the user clicks "Yes", because saying a desktop file is going to be installed will probably mean nothing to a novice Linux user, they might think that the AppImage will be copied to their desktop.

@probonopd
Copy link
Member

How do I do i18n in bash? Switch statement on $LANG?

@shoogle
Copy link

shoogle commented Aug 7, 2016

This article on localising Bash scripts is an interesting read:
http://www.linuxjournal.com/content/internationalizing-those-bash-scripts

You put strings and translations in a separate text file and then use gettext to do the substitution.

A more concise guide is here: http://stackoverflow.com/a/26273036

Follow the guide exactly, except...

  1. Add a translation to the PRJ.pot file (or directly to the PRJ.po file)
#: PRJ.sh:5
msgid "Hello world"
msgstr "Bonjour tout le monde!"
  1. Install the PRJ.mo file to a relative path. E.g.
install  fr.mo  Application.AppDir/share/locale/fr/LC_MESSAGES/PRJ.mo

From inside the Application.AppDir directory you can do this:

LANGUAGE=fr ./PRJ.sh

Or alternatively...

LANGUAGE=fr TEXTDOMAIN=PRJ TEXTDOMAINDIR=$PWD/share/locale gettext -s "Hello world"

Output:

Bonjour tout le monde!

@probonopd
Copy link
Member

Pull request welcome :-)

@probonopd
Copy link
Member

@shoogle want to give it a try?

@shoogle
Copy link

shoogle commented Aug 19, 2016

@probonopd maybe in a week or two. I have a big project coming to a close very soon.

@develar
Copy link
Contributor

develar commented Sep 6, 2016

electron-builder message changed to #209 (comment), thanks.

@benboggart
Copy link

benboggart commented Sep 24, 2016

A bit late, but I support that proposal as I'm one of the mentioned "average" persons and had no clue what a desktop file is. Tried - obviously in vain - to assess, whether my yes/no decision made a difference with respect to certain issue I had with the actual *.AppImage ...
A hint like in Chris' second suggestion could be very helpful.

Almost unrelated: is there a command line option to not have this dialogue pop up?

@probonopd
Copy link
Member

probonopd commented Sep 24, 2016

@benboggart thanks for the feedback. @shoogle will try to get it translatable, and then we will change it to the new text.

The command line command to not have this dialogue pop up:
touch "$HOME/.local/share/appimagekit/no_desktopintegration"

@PHPJosh
Copy link

PHPJosh commented Sep 24, 2016

this works for all AppImages? cause i was wondering a way to ignore the Desktop integration in AppImages as I will have the AppImageMonitor running by default and tested some of your prebuilt AppImages and the desktop integration would pop up lol and been trying to figure a work around

@probonopd
Copy link
Member

probonopd commented Sep 24, 2016

Don't know about AppImageMonitor, it should set the environment variable $DESKTOPINTEGRATION=AppImageMonitor, which would prevent the dialog from appearing. @RazZziel?

@PHPJosh
Copy link

PHPJosh commented Sep 24, 2016

maybe i should do more testing with more app images main one that did this was VLC and there was some QT app that did also IDK will play around more with them after I finish compiling packages for my repos

@PHPJosh
Copy link

PHPJosh commented Sep 24, 2016

well just was looking through the monitors code while i had some stuff compiling and i didn't see in any the scripts where it sets environment variable unless it does so in the AppRun. but honestly maybe its just better for me to set that globally in the OS since my OS runs it by default anyway

@probonopd
Copy link
Member

It's possible that AppImageMonitor doesn't do it (but should), that's a bug in AppImageMonitor then.

@PHPJosh
Copy link

PHPJosh commented Sep 24, 2016

well til it gets fixed i will just set the environment variable in either the global profile or environment files in /etc

@benboggart
Copy link

@probonopd

touch "$HOME/.local/share/appimagekit/no_desktopintegration"

... no such path on my system. Am I right to assume that this is for building an AppImage without that dialogue?
'Cause I'm on the dummy side, and just use the AppImage someone else has built. Still it would be nice to not have that dialogue pop up.
I'm sure there are more urgent things to address though, so thanks!

@probonopd
Copy link
Member

mkdir -p "$HOME/.local/share/appimagekit"
touch "$HOME/.local/share/appimagekit/no_desktopintegration"

But this is something the user should do, not the system. If the system uses a daemon such as AppImageMonitor, then the daemon should export $DESKTOPINTEGRATION=....

@benboggart
Copy link

It works (with your firefox*.AppImage), thank you!

@azubieta
Copy link
Contributor

Are this desktop integration dialogs still supported/recommended?
Can we close the issue ?

@probonopd
Copy link
Member

probonopd commented Nov 23, 2018

Yes; I think we can close this since we don't support desktop integration scripts inside the AppImage anymore as we have already 3 different optional tools for desktop integration now (which in fact we are trying to unify); and I think the grand scheme of things where we want to go is outlined roughly in AppImageCommunity/appimaged#30

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

No branches or pull requests

7 participants