Posts  

"Fake" Native App

Do you use Discord? Or Microsoft Teams? Or maybe Spotify?
If you use any of these applications on linux, chances are high that you have been annoyed by any of these programs.
• You're about to have a call on Discord and suddenly it tells you that you need to update the app. It directs you to their website where you have to download the latest release, manually unpack it and run the installer.
• Maybe your team uses Teams for meetings. But everytime you interact with it you are reminded that Microsoft doesn't care about the linux UX. I for one have had the experience that half of the time when I launch Teams the chat window is blank.
• And Spotify wouldn't even build on my Gentoo partition...


But I'm not here to complain, there is an incredibly simple solution to this. Are you thinking about Nativefier right now? Even better, just use Firefox!
This way you don't need to install any additional program (ofc you already use Firefox right?) and don't need to worry about updates. And you won't see a visual difference to the nativefier version. No title bar, no address bar, no tabs. Just the app. Let me show you how to do it.


Spotify running in "barless" Firefox window


Step 1: Enter about:profiles  in the address bar and create a new profile. You can name it "barless-window" for example. We are going to use this profile for all webapp instances.
Step 2: Enable userChrome for this profile. Launch a Firefox instance with this profile. Enter about:config and set
toolkit.legacyUserProfileCustomizations.stylesheets 
to true.
Step 3: Open this profile's root directory (the path is displayed on the about:profile page), create a direcotry named "chrome" and a file named "userChrome.css" inside it.
Step 4: Paste the following code into the userChrome.css file:
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#TabsToolbar {visibility: collapse;}
#navigator-toolbox {visibility: collapse;}
browser {margin-right: -14px; margin-bottom: -14px;}
Step 5: Launch a new Firefox instance with this profile and open the webapp you want to use:
firefox-bin --new-window -P <profile name> <url> 

This is my "fake" Spotify running next to a Terminal window.

Any webapp can be run this way, here is Discord.

Have fun with your own "fake" native apps!