Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flameshot not working on ubuntu 24.04 LTS #3700

Open
aman2talk opened this issue Aug 27, 2024 · 14 comments
Open

Flameshot not working on ubuntu 24.04 LTS #3700

aman2talk opened this issue Aug 27, 2024 · 14 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.

Comments

@aman2talk
Copy link

aman2talk commented Aug 27, 2024

Flameshot Version

Flameshot v12.1.0 (Debian 12.1.0-2build2)
Compiled with Qt 5.15.12

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), Snap from Snapcraft

Operating System type and version

ubuntu: 24.04 LTS

Description

The app doesn't get installed from snap store. if you try to install using the apt, It gets installed but when you start the app and try to capture the screenshot it says "Unable to capture the screen".

Steps to reproduce

No response

Screenshots or screen recordings

image

System Information

linux: 6.8.0-41-generic

@aman2talk aman2talk added the Unconfirmed Bug The bug is not confirmed by anyone else. label Aug 27, 2024
@Kev-Prime
Copy link

+1 this having the same issues on arch most recent updoot nuked flameshot.

@Kev-Prime
Copy link

Anyone having issues with 12.1.0 on Linux just check all your packages for updates apply them and restart.
Fixed for me hope it works for you.

@aman2talk
Copy link
Author

I installed the fresh OS ubuntu 24.04 LTS with all the available updates. But it does not launch. But I am able to trigger the app via command line 'flameshot gui'. I even tried it compiling from source but same issue.

@aman2talk
Copy link
Author

Hi Everyone, I found the solution for the above issue. Actually the problem is, By default Ubuntu 24.04 is using the Wayland as GDM (GNOME Display Manager) and flameshot and upwork time tracker require Xorg to function properly. You have to use the Xorg instead. To Switch from Wayland to Xorg follow the steps below.

1. Edit GDM(GNOME Display Manager) Configuration

a) Open the GDM configuration file using a text editor with root privileges
sudo nano /etc/gdm3/custom.conf

b) Uncomment or add the following line under the [daemon] section
WaylandEnable=false

2. Restart GDM:

Restart the GDM display manager to apply the changes:
sudo systemctl restart gdm3
Alternatively, you can reboot your system.

3. Verify the Change

To confirm you're now using Xorg, open a terminal and run
echo $XDG_SESSION_TYPE
This should output x11 if you're successfully running on Xorg.

Now restart the flameshot app and try to take the screenshot. It will work flawlessly :)

@Kev-Prime
Copy link

I just confirmed it works on both my X11 environment and wayland.

Falmeshot supports both.

If one isn't work certainly feel free to try the other of course.

@jonathanhirschman
Copy link

jonathanhirschman commented Aug 29, 2024

Having same/similar issue - Flameshot works on x11 no problem, has issues in Wayland. In case it matters, I'm using Nvidia proprietary drivers. Update: same issue on another machine using open drivers for Intel Xe graphics, so it ain't because Nvidia.

Here's what I'm seeing:

  1. Via hotkey

I have a hot key defined in Ubuntu prefs for Flameshot grabs:
image

Using the hotkey under Wayland results in this:

image

This works on x11, and has always worked for me in the past.

  1. From command line:
    $ /usr/bin/flameshot gui

Results in a screen flash, a bit of a pause, and then flameshot works as expected. It remains in the tray.

  1. From tray icon menu:

Selecting "Take Screenshot" works as per the command line.

Version is 12.1.0 installed via apt, all updates applied.

image

@eNg1ne85
Copy link

eNg1ne85 commented Sep 4, 2024

I have the same issue on Ubuntu 24.04.1 Wayland Gnome session

2024-09-04T09:24:46.696152+02:00 nbdgajda xdg-desktop-por[3966]: Failed to associate portal window with parent window 2024-09-04T09:24:46.698601+02:00 nbdgajda xdg-desktop-por[3958]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog 2024-09-04T09:24:46.725625+02:00 nbdgajda org.flameshot.Flameshot.desktop[16566]: flameshot: error: Unable to capture screen

@jdmallen
Copy link

jdmallen commented Sep 4, 2024

Hi Everyone, I found the solution for the above issue. Actually the problem is, By default Ubuntu 24.04 is using the Wayland as GDM (GNOME Display Manager) and flameshot and upwork time tracker require Xorg to function properly. You have to use the Xorg instead. To Switch from Wayland to Xorg follow the steps below.

1. Edit GDM(GNOME Display Manager) Configuration

a) Open the GDM configuration file using a text editor with root privileges sudo nano /etc/gdm3/custom.conf

b) Uncomment or add the following line under the [daemon] section WaylandEnable=false

2. Restart GDM:

Restart the GDM display manager to apply the changes: sudo systemctl restart gdm3 Alternatively, you can reboot your system.

3. Verify the Change

To confirm you're now using Xorg, open a terminal and run echo $XDG_SESSION_TYPE This should output x11 if you're successfully running on Xorg.

Now restart the flameshot app and try to take the screenshot. It will work flawlessly :)

Confirmed this fixed the issue for me on Ubuntu 24.04. Thanks!

@pvbcoelho
Copy link

Hi Everyone, I found the solution for the above issue. Actually the problem is, By default Ubuntu 24.04 is using the Wayland as GDM (GNOME Display Manager) and flameshot and upwork time tracker require Xorg to function properly. You have to use the Xorg instead. To Switch from Wayland to Xorg follow the steps below.

1. Edit GDM(GNOME Display Manager) Configuration

a) Open the GDM configuration file using a text editor with root privileges sudo nano /etc/gdm3/custom.conf

b) Uncomment or add the following line under the [daemon] section WaylandEnable=false

2. Restart GDM:

Restart the GDM display manager to apply the changes: sudo systemctl restart gdm3 Alternatively, you can reboot your system.

3. Verify the Change

To confirm you're now using Xorg, open a terminal and run echo $XDG_SESSION_TYPE This should output x11 if you're successfully running on Xorg.

Now restart the flameshot app and try to take the screenshot. It will work flawlessly :)

This worked for me, thanks :)

@bvdvb
Copy link

bvdvb commented Sep 10, 2024

Hi Everyone, I found the solution for the above issue. Actually the problem is, By default Ubuntu 24.04 is using the Wayland as GDM (GNOME Display Manager) and flameshot and upwork time tracker require Xorg to function properly. You have to use the Xorg instead. To Switch from Wayland to Xorg follow the steps below.

1. Edit GDM(GNOME Display Manager) Configuration

a) Open the GDM configuration file using a text editor with root privileges sudo nano /etc/gdm3/custom.conf

b) Uncomment or add the following line under the [daemon] section WaylandEnable=false

2. Restart GDM:

Restart the GDM display manager to apply the changes: sudo systemctl restart gdm3 Alternatively, you can reboot your system.

3. Verify the Change

To confirm you're now using Xorg, open a terminal and run echo $XDG_SESSION_TYPE This should output x11 if you're successfully running on Xorg.

Now restart the flameshot app and try to take the screenshot. It will work flawlessly :)

Works, super thank you

@roland-ewald
Copy link

If you want to keep using wayland, this workaround may help too: #3712 (comment)

@eNg1ne85
Copy link

If you want to keep using wayland, this workaround may help too: #3712 (comment)

Yes, it is working now on wayland, thank you.

@Duduxs
Copy link

Duduxs commented Sep 12, 2024

If you want to keep using wayland, this workaround may help too: #3712 (comment)

This workaround is working on wayland without any problems.

image

Thanks.

@oleh-mordach
Copy link

Hi Everyone, I found the solution for the above issue. Actually the problem is, By default Ubuntu 24.04 is using the Wayland as GDM (GNOME Display Manager) and flameshot and upwork time tracker require Xorg to function properly. You have to use the Xorg instead. To Switch from Wayland to Xorg follow the steps below.

1. Edit GDM(GNOME Display Manager) Configuration

a) Open the GDM configuration file using a text editor with root privileges sudo nano /etc/gdm3/custom.conf

b) Uncomment or add the following line under the [daemon] section WaylandEnable=false

2. Restart GDM:

Restart the GDM display manager to apply the changes: sudo systemctl restart gdm3 Alternatively, you can reboot your system.

3. Verify the Change

To confirm you're now using Xorg, open a terminal and run echo $XDG_SESSION_TYPE This should output x11 if you're successfully running on Xorg.

Now restart the flameshot app and try to take the screenshot. It will work flawlessly :)

Ubuntu24.04
Flameshot v12.1.0 (Debian 12.1.0-2build2)
Compiled with Qt 5.15.12

Works for me. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.
Projects
None yet
Development

No branches or pull requests

10 participants