Flameshot is a powerful and easy-to-use screenshot tool for Linux users. It allows you to capture any region of your screen, annotate it with various tools, edit it on the fly, and upload it to online services or save it locally. Flameshot is also highly customizable, with options to change the appearance, behavior, and shortcuts of the tool.
However, after the rise of the Wayland desktop server, users are experiencing an issue to capture screens under the Wayland Session. In this blog post, I will provide you three solutions for the issue of being unable to capture screens with Flameshot
Solution 1: Switch to Xorg from Wayland
One of the easiest ways to solve Flameshot unable to capture screen problem is to switch to Xorg from Wayland. Xorg is the older and more stable display server that works well with most applications, including Flameshot. Wayland is the newer and more secure display server that offers better performance and compatibility with some hardware, but it may cause issues with some applications that rely on Xorg.
To switch to Xorg from Wayland, you need to follow these steps:
Disable Automatic Login
Before you can switch to Xorg from Wayland, you need to disable the automatic login feature in Ubuntu. This feature allows you to log in to your system without entering your password, but it also prevents you from choosing the display server at the login screen.
To disable the automatic login feature, open the Settings app from the app launcher or the system tray. Then, scroll down to the Users section in the left pane and click on Unlock in the top-right corner. Enter your password to authenticate and then turn off the Automatic Login toggle.
Choose Xorg at the Login Screen
Once you are at the login screen, click on your user profile and then look for the gear icon at the bottom-right corner of the password field. Click on the gear icon and you will see two options: Ubuntu and Ubuntu on Xorg. The first option means Wayland and the second option means Xorg. Select Ubuntu on Xorg to switch to Xorg from Wayland.
That’s it! You have successfully switched to Xorg from Wayland in Ubuntu and solved the Flameshot screenshot problem. You can now enjoy the full functionality of Flameshot as a powerful and easy-to-use screenshot tool for Linux.
Soltuion 2: Create a Custom Launcher
Another way to solve Flameshot unable to capture screen problem is to create a custom launcher to use it from tray icon. This method allows you to launch Flameshot from the app launcher or the tray icon, and access its different features, such as taking a screenshot, opening the configuration, or launching the history. You can also customize the icon and the name of Flameshot according to your preferences.
To create a custom desktop icon for Flameshot from gnome settings, you need to follow these steps:
Open a Terminal and Create a Desktop File
To create a custom desktop icon for Flameshot, you need to create a desktop file that contains the information and commands for Flameshot. To do that, open a terminal and type the following command:
nano ~/.local/share/applications/org.flameshot.Flameshot.desktop
This will open a text editor where you can enter the contents of the desktop file.
Copy and Paste the Contents of the Desktop File
To copy and paste the contents of the desktop file, you can use the reference that you provided or the one below. The desktop file consists of several sections and fields that define the properties and actions of Flameshot. You can modify some of the fields, such as the name, the comment, or the icon, according to your preferences. However, do not change the exec or the type fields, as they are essential for Flameshot to work properly.
[Desktop Entry]
Name=Flameshot
GenericName=Screenshot tool
Comment=Powerful yet simple to use screenshot software.
Keywords=flameshot;screenshot;capture;shutter;
Exec=/bin/sh -c "/usr/bin/flameshot" > /dev/null &
Icon=org.flameshot.Flameshot
Terminal=false
Type=Application
Categories=Graphics;
StartupNotify=false
[Desktop Action Configure]
Name=Configure
Exec=/bin/sh -c "/usr/bin/flameshot config" > /dev/null &
[Desktop Action Capture]
Name=Take screenshot
Exec=/bin/sh -c '/usr/bin/flameshot gui' > /dev/null &
[Desktop Action Launcher]
Name=Open launcher
Exec=/bin/sh -c "/usr/bin/flameshot launcher" > /dev/null &
After copying and pasting the contents of the desktop file, you need to save and close the file. To do that, use the Ctrl + O
write the file and Ctrl + X
to close the file.
Update the Desktop Database
After saving and closing the desktop file, you need to update the desktop database to make the changes effective. To do that, type the following command in the terminal:
update-desktop-database ~/.local/share/applications
This will update the desktop database and register the new desktop file for Flameshot. Then Restart your computer to start using flameshot.
That’s it! You have successfully created a custom desktop icon for Flameshot and solved Flameshot unable to capture screen problem. You can now enjoy the ease and convenience of using Flameshot as a powerful and easy-to-use screenshot tool for Linux.
Solution 3: Custom keyboard Shortcuts
Another way to solve Flameshot unable to capture screen issue is to create custom keyboard shortcuts for Flameshot from gnome settings. This method allows you to assign any key combination to any Flameshot command, such as taking a screenshot, opening the configuration, or launching the history. You can also override the default screenshot utility or the print screen key with Flameshot.
To create custom keyboard shortcuts for Flameshot from gnome settings, you need to follow these steps:
Open the Keyboard Shortcuts Settings
To open the keyboard shortcuts settings, go to Settings -> Keyboard. Then select view and Customize Shortcuts.
then you can see the list of default shortcuts you can modify or disable them. To add custom shortcut scroll down to the bottom and selct custom shortcut.
Add New Shortcu
To enter the name, command, and shortcut for your custom keyboard shortcut, fill in the following fields:
Name: This is the name of your custom keyboard shortcut that will appear in the list. You can choose any name that describes the function of your shortcut, such as “Flameshot screenshot”
Command: This is the command that will be executed when you press the shortcut. You can use any Flameshot command that you want, to take screenshot with gui use the following command
/bin/sh -c '/usr/bin/flameshot gui'
Shortcut: This is the key combination that will trigger the command. You can use any key combination that you want, such as Super + Print
or Shift + Print
. You can also use the print screen key (PrtScr
) to override the default screenshot utility with Flameshot. To enter the shortcut, click on the Set Shortcut button and then press the key combination on your keyboard.
Conclusion
In this blog post, we have shown you how to troubleshoot and solve Flameshot unable to capture screen issue on Linux. We have explained the possible causes and solutions for this problem, and provided some examples and screenshots to help you apply them to your system. We have also shown you how to create custom keyboard shortcuts and desktop icons for Flameshot, and how to disable the desktop notification.
By following the methods and steps in this blog post, you should be able to use Flameshot as a powerful and easy-to-use screenshot tool for Linux. You should also be able to customize and optimize Flameshot for your needs and preferences.
We hope you have found this blog post useful and informative. If you have any feedback, comments, or questions, please feel free to share them with us.
Source: Flameshot unable to capture screen when triggered through Gnome shortcut
Hi Ashiqur!
This great post really helped me out as I like to use Flameshot on a regular basis, but couldn’t get it to work in Ubuntu 24.04. Excellent!
Best regards from Denmark
Lars Bech
I have checked it on Ubuntu 24.04 and it works. You need to restart your computer and it will works.