# Changing flatpak app startup settings?

**URL:** https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075
**Category:** General
**Tags:** developer-experience
**Created:** [June 3, 2024, 5:22am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075 "2024-06-03T05:22:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Blaise](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/blaise/32/1130_2.png) [@Blaise](https://universal-blue.discourse.group/u/Blaise)
#### Post date: [June 3, 2024, 5:22am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/1 "2024-06-03T05:22:19Z")

</div>

While trying to change Discord to use Wayland:

```shell
$ flatpak run com.discordapp.Discord --enable-features=UseOzonePlatform --ozone-platform=wayland 

Disabling updates already done
[5:0603/051518.107507:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Discord 0.0.54
[5:0603/051518.417571:ERROR:wayland_connection.cc(193)] Failed to connect to Wayland display: No such file or directory (2)
[5:0603/051518.417587:ERROR:ozone_platform_wayland.cc(259)] Failed to initialize Wayland platform
[5:0603/051518.417591:ERROR:env.cc(257)] The platform failed to initialize. Exiting.
/app/bin/com.discordapp.Discord: line 17: 5 Segmentation fault (core dumped) env TMPDIR=$XDG_CACHE_HOME zypak-wrapper /app/discord/Discord $FLAGS "$@"
2024/06/03 05:15:18 socat[3] W exiting on signal 15

```

I guess this Discord package does not support Wayland?  
Or, is there a different way to change the settings?

---

<div class="post-metadata">

### Author: ![mel226](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/mel226/32/1577_2.png) [@mel226](https://universal-blue.discourse.group/u/mel226)
#### Post date: [June 3, 2024, 5:48am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/2 "2024-06-03T05:48:45Z")

</div>

Flatpak Discord runs on Wayland on my machine without me needing to add any flags. Have you enabled the toggle for Wayland within Flatseal?

Also I believe `UseOzonePlatform` is no longer needed by Chromium-based browsers and Electron apps, `--ozone-platform-hint=auto` should be enough. `--ozone-platform-hint=auto --enable-features=VaapiVideoDecodeLinuxGL,WebRTCPipeWireCapturer` enables Wayland and HW acc for me on Chromium, Slack, and Webcord, for example.

---

<div class="post-metadata">

### Author: ![Blaise](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/blaise/32/1130_2.png) [@Blaise](https://universal-blue.discourse.group/u/Blaise)
#### Post date: [June 3, 2024, 5:51am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/3 "2024-06-03T05:51:14Z")

</div>

Ok, I’m not familiar with flatseal, maybe that’s my problem.

---

<div class="post-metadata">

### Author: ![Blaise](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/blaise/32/1130_2.png) [@Blaise](https://universal-blue.discourse.group/u/Blaise)
#### Post date: [June 3, 2024, 5:57am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/4 "2024-06-03T05:57:42Z")

</div>

oh wow, flatseal has lots of options. ,Discord uses wayland now, Thank you!

So for the others, I guess I look in Flatseal for references to

```auto
 --ozone-platform-hint=auto --enable-features=VaapiVideoDecodeLinuxGL,WebRTCPipeWireCapturer 

```

?

---

<div class="post-metadata">

### Author: ![mel226](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/mel226/32/1577_2.png) [@mel226](https://universal-blue.discourse.group/u/mel226)
#### Post date: [June 3, 2024, 6:15am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/5 "2024-06-03T06:15:16Z")

</div>

I believe Discord will launch under Wayland by default if the Wayland socket toggle is enabled, so you shouldn’t need to do anything else.

For browsers, such as Chromium, it’s easier to create a `.conf` file containing those files, so f.ex, for Flatpak Chromium it would be like this:

```auto
│ ~
│ cat ~/.var/app/org.chromium.Chromium/config/chromium-flags.conf 
--ozone-platform-hint=auto
--enable-features=VaapiVideoDecodeLinuxGL,WebRTCPipeWireCapturer

```

This also works for Ms. Edge, just replace the folder name with `com.microsoft.Edge` and the file name with `edge-flags.conf`. Also, I don’t think `WebRTCPipeWireCapturer` is actually required for browsers, so you’re free to just use `VaapiVideoDecodeLinuxGL`.

It’s also possible to use the `flags.conf` method with Slack or Webcord for example, but AFAIK you have to name the file something like `electron[version]-flags.conf`. It’s easy to keep track of which Electron version if you build the package yourself, but with Flatpak it’s kind of a hassle because you’ll have to track the build specs from Github. Because of this, I typically use [Main Menu](https://flathub.org/apps/page.codeberg.libre_menu_editor.LibreMenuEditor) to add the flags to the desktop entry, so it looks like this:

```auto
Execution Command
/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=com.slack.Slack --file-forwarding com.slack.Slack --ozone-platform-hint=auto --enable-features=VaapiVideoDecodeLinuxGL,WebRTCPipeWireCapturer @@u %U @@

```

Basically just put the flags after the app ID, in this case `com.slack.Slack`. In this case I added `WebRTCPipeWireCapturer` because in my personal experience, screen sharing becomes much more reliable

One thing to remember is that if you uninstall the app, the modified desktop entry will not be automatically removed. You have to manually remove it from Main Menu.

Add.: On Flatseal I typically enable Wayland here so I don’t have to manually enable it for all possible apps. 😉

 ![2024-06-03_13-17](https://global.discourse-cdn.com/free1/uploads/univeral_blue/original/2X/4/4c6760b50ecd0572bbb628fc1f7514a95f6197e8.webp)

---

<div class="post-metadata">

### Author: ![Blaise](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/blaise/32/1130_2.png) [@Blaise](https://universal-blue.discourse.group/u/Blaise)
#### Post date: [June 3, 2024, 7:35am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/6 "2024-06-03T07:35:13Z")

</div>

exemplary response, thank you.

---

<div class="post-metadata">

### Author: ![mel226](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/mel226/32/1577_2.png) [@mel226](https://universal-blue.discourse.group/u/mel226)
#### Post date: [June 3, 2024, 7:53am UTC](https://universal-blue.discourse.group/t/changing-flatpak-app-startup-settings/2075/7 "2024-06-03T07:53:14Z")

</div>

Much appreciated 🥳

Your post actually inspired me to do some digging, and apparently now you can set `ELECTRON_OZONE_PLATFORM_HINT=auto` instead as an environment variable via Flatseal in place of the `--ozone-platform-hint=auto` flag.

 ![Screenshot from 2024-06-03 14-45-38](https://global.discourse-cdn.com/free1/uploads/univeral_blue/original/2X/3/3f5884dff75b7ba6ddb58f354c18f436ef52f72a.png)

In curiosity I tried to set `ELECTRON_ENABLE_FEATURES=VaapiVideoDecodeLinuxGL` as well, but it didn’t work. Tested by playing a video on Slack and monitoring `sudo intel_gpu_top` - with. So you still have to use the `--enable-features=` flag within the execution command.

I still think it’s easier to use Main Menu to add both `--ozone-platform-hint=` and `--enable-features=`. But now you (and I) know there’s an alternative for Electron apps!
