Posted inExperience / Information Technology

Flatpak Won’t Load URL

Flatpak logo

I see this mostly on Manjaro Cinnamon, but it’s rampant on other distros given the volume of complaints. It is yet another reason why Agile must be banned globally. Anything that can’t be tested automatically just isn’t tested in either the Microsoft or Linux worlds all because of Agile.

The name of the file you need to create will change based on the desktop you are running. On Cinnamon it is this:

.config/xdg-desktop-portal/x-cinnamon-portals.conf

Unless someone well and truly screwed you by putting one higher up in the search path, the location will be the same on all desktops. You can “safely” find what search path yours follows, at least until it finds a config it recognizes via the following command.

/usr/lib/xdg-desktop-portal --verbose 

If you don’t have one configured you will see a much longer list than this.

[roland@roland-hpz820workstation ~]$ /usr/lib/xdg-desktop-portal --verbose 
XDP: Looking for portals configuration in '/home/roland/.config/xdg-desktop-portal/x-cinnamon-portals.conf'
XDP: Preferred portals for interface 'default': gtk, xapp
XDP: Using portal configuration file '/home/roland/.config/xdg-desktop-portal/x-cinnamon-portals.conf' for desktop 'x-cinnamon'
XDP: load portals from /usr/share/xdg-desktop-portal/portals

What Flatpak Needs

Someone has decided that “xapp” should be first. Trouble is “xapp” doesn’t work, at least not for many/most people, hence all of the bitching. If you cat out the file your first command chooses to use (and you are having problem with links not opening for your editor/email/whatever Flatpak software) you will most likely see this:

[preferred]
default=xapp;gtk;

The “default” line may well be quite a ways down below [preferred] but it will list xapp, or some other portal first. As far as I can tell gtk is the only one known to work. In your custom portals.conf file you only need the following:

[preferred]
default=gtk;xapp;

Save it via the appropriate name in .config/xdg-desktop-portal/ under your $HOME directory.

Reboot.

Life should be good!

Roland Hughes started his IT career in the early 1980s. He quickly became a consultant and president of Logikal Solutions, a software consulting firm specializing in OpenVMS application and C++/Qt touchscreen/embedded Linux development. Early in his career he became involved in what is now called cross platform development. Given the dearth of useful books on the subject he ventured into the world of professional author in 1995 writing the first of the "Zinc It!" book series for John Gordon Burke Publisher, Inc.

A decade later he released a massive (nearly 800 pages) tome "The Minimum You Need to Know to Be an OpenVMS Application Developer" which tried to encapsulate the essential skills gained over what was nearly a 20 year career at that point. From there "The Minimum You Need to Know" book series was born.

Three years later he wrote his first novel "Infinite Exposure" which got much notice from people involved in the banking and financial security worlds. Some of the attacks predicted in that book have since come to pass. While it was not originally intended to be a trilogy, it became the first book of "The Earth That Was" trilogy:
Infinite Exposure
Lesedi - The Greatest Lie Ever Told
John Smith - Last Known Survivor of the Microsoft Wars

When he is not consulting Roland Hughes posts about technology and sometimes politics on his blog. He also has regularly scheduled Sunday posts appearing on the Interesting Authors blog.