Page 1 of 1

Microsoft PWAs (Teams, To-Do ..) firejailed in chromium-browser

Posted: Tue Dec 19, 2023 12:19 pm
by l0dr3
Part1 - First the dependencies and the browser setup

Code: Select all

sudo apt install 7zip firejail firetools
Then ... in my setups, i always prefer 'ungoogled-chromium' from 'ungoogled-chromium-portablelinux' as PWA-enabled browser :cool:

Get a recent appimage of ungoogled-chromium
(from: :ungoogled-chromium-portablelinux: )
..extract an icon
...make a .desktop-launcher

Code: Select all

img=ung00gled.appimage
mkdir -p $HOME/#/app/img
wget -O "$HOME/#/app/img/"$img \
"https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/releases/download/120.0.6099.109-1/ungoogled-chromium_120.0.6099.109-1.1.AppImage"
chmod +x "$HOME/#/app/img/"$img
cd "$HOME/#/app/img"
icon=ung00gled
iext=png
7z x $img -o"/tmp/$icon" -ir\!*.png -ir\!*.svg
cp -f "/tmp/$icon/"chromium.png "$HOME/.local/share/icons/#$icon.$iext"
rm -rf "/tmp/$icon"
dtop=$img.desktop
echo [Desktop Entry] >$dtop
echo GenericName="Web Browser" >>$dtop
echo Name="UnG00GleD [#app#img@firejail]" >>$dtop
echo Icon="#ung00gled" >>$dtop
echo Type=Application >>$dtop
echo Exec="sh -c 'firejail --appimage --build \$HOME/#/app/img/ung00gled.appimage --class=UnG00Gled \"\$@\"' - %U" >>$dtop
echo Categories="Network;WebBrowser;Privacy;" >>$dtop
echo Comment="#APP#IMG: firejailed ungoogled-chromium-browser" >>$dtop
echo Keywords="internet;web;browser;privacy;ungoogled;" >>$dtop
echo MimeType="application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;" >>$dtop
echo X-APPImage-Version=$trev >>$dtop
echo StartupWMClass="UnG00Gled" >>$dtop
cp -f $dtop "$HOME/.local/share/applications/#"$dtop
Start the browser 'UnG00GleD' ... rename the startup-profile and create a new profile for PWAs!
fucai.02-mspwas-profile.jpg
Settings#1: create 'MSPWAS' profile

Close all instances, restart and select 'MSPWAS' profile ...
..pin tabs: chrome://apps/
..pin tabs: chrome://settings/
..select: chrome://password-manager/settings
fucai.03-mspwas-pw-preferences.jpg
Settings#2: password preferences

adjust cookie settings and allow necessary 3rdParty cookies for

[*.]live.com
[*.]microsoft.com
fucai.04-mspwas-cookies.jpg
Settings#3: cookies

adjust memory-performance and preloading settings (this is optional) ...
fucai.05-mspwas-performance-preloading.jpg
Settings#4: performance and preloading

Select search-engine: 'Bing' ...

On Startup: Continue where you left ...

System: Continue running background apps ...

EOF:Part1

Re: Microsoft PWAs (Teams, To-Do ..) firejailed in chromium-browser

Posted: Tue Dec 19, 2023 12:32 pm
by l0dr3
Part2 - create PWAs

NOW - visit: https://outlook.live.com/ .. ACCEPT ALL cookies ...
.. 'Sign In to your account'
.. choose 'Stay signed in'
.. select 'Microsoft To Do' app

Create the PWA: from Browser:Menu, select 'More Tools|Create Shortcut'
fucai.09-mspwas-to-do.jpg
Create shortcut for 'M$ To-Do' open as window!

THEN - visit (in main window) https://teams.live.com .. Sign In again ...

To have notifications in DE (xfce in this case) .. Allow 'teams' desktop notifications
fucai.11-mspwas-teams-notifyd.jpg
xfce notifyd

On the teams website, select calendar .. and again, from :|More Tools|Create Shortcut .. 'M$ Teams' open as window!

Close the 'M$ To-Do' and the 'M$-Teams' window .. check: chrome://apps/

OK - basic setup done - NOW: lets adjust the auto-generated .desktop-launchers for firejail-environment!

~/.local/share/applications

edit the two autogenerated launchers of the form chrome-<app-id>-Profile_1.desktop

:exclamation: replace the app-ids in the launchers with the ones that are generated on your setups - they will differ :exclamation:
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=M$ To-Do
Comment=#APP#IMG#PWA: firejailed ungoogled-chromium-browser
Exec=sh -c 'firejail --appimage --build $HOME/#/app/img/ung00gled.appimage "--profile-directory=Profile 1" --app-id=nggnofofpaklagebkpnpncaakmajnigb'
Icon=chrome-nggnofofpaklagebkpnpncaakmajnigb-Profile_1
StartupWMClass=crx_nggnofofpaklagebkpnpncaakmajnigb
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=M$-Teams
Comment=#APP#IMG#PWA: firejailed ungoogled-chromium-browser
Exec=sh -c 'firejail --appimage --build $HOME/#/app/img/ung00gled.appimage "--profile-directory=Profile 1" --app-id=gebnlfejkjhoifjjfbofapjhaibkibim'
Icon=chrome-gebnlfejkjhoifjjfbofapjhaibkibim-Profile_1
StartupWMClass=crx_gebnlfejkjhoifjjfbofapjhaibkibim

Thats all .. you are done .. Enjoy ;)
fucai.atwork.jpg

:goodluck: greetz l0dr3

Re: Microsoft PWAs (Teams, To-Do ..) firejailed in chromium-browser

Posted: Tue Dec 19, 2023 3:44 pm
by l0dr3
Addendum#1 - for the autogenerated ~/Desktop launchers ...

Delete them .. symlink to the edited variants ~/.local/share/applications
Screenshot_2023-12-19_21-41-31.jpg

Re: Microsoft PWAs (Teams, To-Do ..) firejailed in chromium-browser

Posted: Wed Dec 20, 2023 10:45 am
by l0dr3
Part3 <placeholder>/TBD/ Audio/Video (WebCam/Headset) configuration

Re: Microsoft PWAs (Teams, To-Do ..) firejailed in chromium-browser

Posted: Wed Dec 20, 2023 10:47 am
by l0dr3
Part4 <placeholder>/WIP/ Privacy/Security and Extensions configuration for PWA context