Webapps as windows

Being able to add webs as desktop access is a very good idea and helps to have everything at hand very fast, however, it would be nice to be able to choose whether to open as a tab in the browser or in a window (similar to how WhatsApp and Gmail works In Endless OS). This way you could choose between the current method or window mode.

GNOME Web has an integrated feature but is away from the integration in the system that proposes Endless OS. Also many websites don’t offer a suitable icon and being able to add one manually would greatly improve the aesthetics.

Thank you

1 Like

If you right click on a blank space on the dekstop and choose ‘Add Website’ you may find something that serves this need!

1 Like

Of that feature I’m talking about, however, it just opens a web browser tabs. I mean add the possibility of opening web pages in individual windows.

Oh right, I understand. Yeah, that’s a potentially useful feature. We’re thinking about redesigning that ‘Add Website’ thing (we may not actually do it, I don’t want to get peoples hope up) and we’ll think about how we can do that better.

The other, insanely heavyweight way of doing this would be to create each of these as their own Electron app - but you wouldn’t be able to share the cookie or password store and it’d use a fair bit more RAM than ideal.

1 Like

Hi, Hugo.

That is a really nice suggestion. Actually, while not officially supported (and possibly subject to change in the future), it is possible with just a little bit of effort to set up your own webapp (to run in window mode), without the extra weight of an electron app…

  1. Start by adding a weblink to the desktop using the normal method.

  2. If you used one of the suggested websites, click on the icon name on the website and change at least one character in the name. Then, change it back to the desired name. This makes a local copy of the desktop file that you can edit as described below. (This step is not necessary if you typed in the website URL yourself.)

  3. Open the file manager (“Documents”) and hit Ctrl+H to show hidden folders. (You can later hit Ctrl+H again to re-hide them.)

  4. Navigate to the following folder: .local/share/applications. (Alternatively, you could do this in a terminal window via cd ~/.local/share/applications.)

  5. Look for the eos-link-*.desktop file that you just generated. Right-click it and select “Open With Other Application”, then “View All Applications” and click on “Gedit” and then “Select”. (Alternatively, you could do this in a terminal window via gedit eos-link-*.desktop.)

  6. Look for a liine that looks like the following:
    Exec=gvfs-open http://www.bbc.com/news/

  7. Edit this line to look something like the following:
    Exec=gvfs-open webapp://www.bbc.com@http://www.bbc.com/news/
    (From what I can tell, it doesn’t matter much what is between the webapp:// and the @, as what is after the @ specifies the actual website URL to open, but I don’t know all the details regarding this syntax.)

  8. Hit the “Save” button and close the editor.

That’s it. Now when you click the icon on the desktop, it will open in a separate window as a webapp.

For what its worth, the reason we did not default to opening all desktop links as webapps is that for many websites it is helpful to have backward/forward navigation buttons, which are not included in webapp windows.

Hope that helps!

Roddy

2 Likes

@roddy
eos-diagnostic-170211_093043_UTC-0200.txt (328,6 KB)

Thank you, has served me well, since it was what I was looking for. I have no problem with the “back” button since some web services usually have it integrated into its design.

Anyway it would be good to explore a solution like the one delivered by gnome-web, since there are currently 2 web browsers available in endless os (the chromium browser can not be uninstalled), so using a default one to handle this would not be a big problem.

1 Like

Oh, one more thing to make this webapp experience better. In the .desktop file, you should also add a line that looks like the following, so that the window manager will associate the webapp with the proper icon on the taskbar:
StartupWMClass=www.bbc.com

This has to match the name that is provided between the webapp:// and the @ – that part of the syntax is used to specify the wmclass to use – mystery solved. As long as the wmclass is unique and is the same in the Exec line and the StartupWMClass line, the window manager will be able to show the correct icon on the taskbar.

@LeandroStanger, I’m not sure how you got that error dialog to show up. Normally, that is what happens when you try to execute a .exe file. Can you paste the contents of your .desktop file, and I’ll see if I can figure out what might be wrong? Also, what is your default browser?

For what it’s worth, looking through your diagnostic log, I noticed that you may have tried to add an icon to the desktop from within the browser, which does not quite work on Endless, although it gets really close. If you look in your ~/.local/share/applications directory, you will see that there is a file of the form chrome-*-Default.desktop; run the following command: eos-add-to-desktop chrome-*-Default and you will be all set.

Roddy

1 Like

@roddy
Os web aplicativo podia ser assim

@LeandroStanger Thanks for the suggestion. While we could in theory create our own custom WebKit app for webapps, that would require more development and maintenance. I prefer to use the webapp capability built into the browser itself for most cases. To be clear, the “Extra” newspaper app is a custom app that manages the content subscription, not just a link to the website.

1 Like

@roddy
pode usar Epiphany browser
https://projects-old.gnome.org/epiphany/
https://wiki.gnome.org/Apps/Web/

@LeandroStanger For what it’s worth, you can install the Epiphany flatpak from the app center. The app name (at least in English) is “Web”. That said, the “Save as Web Application” functionality is not working – I don’t know if that is a problem with running Epiphany as a flatpak, or if it is a compatibility issue that is specific to Endless, or perhaps both.

Roddy

1 Like

On this same topic, the web apps for Facebook, Twitter, and Gmail all open full-screen, and don’t remember my window size and position after quitting. Is this a limitation of the web wrapper, or can this be fixed?

1 Like

It is not a limitation.
Use as it were a mobile app

https://drive.google.com/file/d/0B_dd-_ZsRL24UDlQMHhISUN5Q0U/view?usp=sharing

Thanks for NOT answering my question, but judging from your replies I am assuming that YES, it is a limitation of the web wrapper, and NO, it cannot be fixed.

1 Like

@Rocky_Carr Yes, the web wrapper always launches full-screen, matching the behavior of other app launching on Endless OS. Of course, if you minimize rather than close the window, its position is maintained when you reopen the window, but I’m guessing you probably already figured that out.

Roddy

3 Likes

That’s what I wanted to know! Thanks!

1 Like

A slight update to this discussion. Starting with Endless OS 3.3.0, the syntax suggested above no longer works (we will be fixing broken webapps on the desktop caused by this in 3.3.1).

Change from:

Exec=gvfs-open webapp://www.bbc.com@http://www.bbc.com/news/

To:

Exec=gvfs-open webapp:www.bbc.com@http://www.bbc.com/news/

(I.e., remove the // after webapp:.)

For what its worth, I see that the gvfs-open command is being deprecated, so you could avoid a warning message in the journal by an additional tweak:

Exec=gio open webapp:www.bbc.com@http://www.bbc.com/news/

  • Roddy