<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marcelo Facio Palin</title>
    <description>The latest articles on DEV Community by Marcelo Facio Palin (@marcelopalin).</description>
    <link>https://dev.to/marcelopalin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F290576%2F5d87f1c3-71eb-4cf3-a0b5-27cf7324b0fc.jpeg</url>
      <title>DEV Community: Marcelo Facio Palin</title>
      <link>https://dev.to/marcelopalin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marcelopalin"/>
    <language>en</language>
    <item>
      <title>How to enable user passwordless sudo in WSL2 - Linux</title>
      <dc:creator>Marcelo Facio Palin</dc:creator>
      <pubDate>Thu, 14 Nov 2024 13:56:02 +0000</pubDate>
      <link>https://dev.to/marcelopalin/how-to-enable-user-passwordless-sudo-in-wsl2-linux-38f7</link>
      <guid>https://dev.to/marcelopalin/how-to-enable-user-passwordless-sudo-in-wsl2-linux-38f7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3x5r5fvpiko3i7rz1ek8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3x5r5fvpiko3i7rz1ek8.png" alt="Image description" width="694" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Linux is a powerful and secure operating system, widely used by developers, system administrators, and enthusiasts. One key aspect of its security is its user permission model. In Linux, there is a distinction between regular users and the &lt;strong&gt;root user&lt;/strong&gt; (administrator), who has the highest level of permissions. To perform administrative tasks, regular users need elevated privileges, which are granted via the &lt;code&gt;sudo&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;By default, the &lt;code&gt;sudo&lt;/code&gt; command prompts the user for their password, ensuring that administrative actions are intentional. However, in some development environments, such as &lt;strong&gt;Windows Subsystem for Linux 2 (WSL2)&lt;/strong&gt;, you may want to configure your user account to bypass the password prompt when using &lt;code&gt;sudo&lt;/code&gt;. This can simplify workflows, especially for frequent administrative tasks.&lt;/p&gt;

&lt;p&gt;In this tutorial, we will walk you through enabling passwordless sudo for your user account in WSL2.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before proceeding, ensure that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You have WSL2 installed and configured on your Windows system.&lt;/li&gt;
&lt;li&gt;You have administrative rights on your WSL2 Linux distribution.&lt;/li&gt;
&lt;li&gt;You understand the security implications of enabling passwordless sudo.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Steps to Enable Passwordless Sudo
&lt;/h2&gt;

&lt;p&gt;Follow these steps to grant your user account passwordless sudo access:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Verify Your Current User
&lt;/h3&gt;

&lt;p&gt;First, verify which user account you are currently logged in as. Open your WSL2 terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;whoami&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will display your username. For this tutorial, we’ll refer to your username as &lt;code&gt;$USER&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Edit the Sudoers Configuration Safely
&lt;/h3&gt;

&lt;p&gt;To allow passwordless sudo for your user, we will create a custom configuration file under &lt;code&gt;/etc/sudoers.d&lt;/code&gt;. This is the recommended approach because it avoids directly editing the main &lt;code&gt;sudoers&lt;/code&gt; file, reducing the risk of misconfiguration.&lt;/p&gt;

&lt;p&gt;Run the following command in your WSL2 terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$USER&lt;/span&gt;&lt;span class="s2"&gt; ALL=(ALL:ALL) NOPASSWD: ALL"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/sudoers.d/dont-prompt-&lt;span class="nv"&gt;$USER&lt;/span&gt;&lt;span class="nt"&gt;-for-sudo-password&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Explanation of the Command
&lt;/h3&gt;

&lt;p&gt;Let’s break down the command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL"&lt;/code&gt;: This outputs a rule that allows the current user (&lt;code&gt;$USER&lt;/code&gt;) to execute any command as any user or group without being prompted for a password.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo tee /etc/sudoers.d/dont-prompt-$USER-for-sudo-password&lt;/code&gt;: This writes the rule to a new configuration file in &lt;code&gt;/etc/sudoers.d&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By creating a separate file, we keep the main &lt;code&gt;sudoers&lt;/code&gt; file intact, ensuring better maintainability and avoiding potential syntax errors that could lock you out of administrative privileges.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Test Your Configuration
&lt;/h3&gt;

&lt;p&gt;After running the command, test the passwordless sudo configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo whoami&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If everything is configured correctly, this command should output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you should not be prompted for your password.&lt;/p&gt;




&lt;h2&gt;
  
  
  Important Notes on Security
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use with Caution&lt;/strong&gt;: Enabling passwordless sudo reduces the security of your Linux system. It is recommended only for development environments or scenarios where security risks are minimal.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid in Production&lt;/strong&gt;: In production environments, always use password-protected sudo to ensure a higher level of security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Revert Changes&lt;/strong&gt;: To remove passwordless sudo for your user, simply delete the custom sudoers file:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   &lt;span class="nb"&gt;sudo rm&lt;/span&gt; /etc/sudoers.d/dont-prompt-&lt;span class="nv"&gt;$USER&lt;/span&gt;&lt;span class="nt"&gt;-for-sudo-password&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will restore the default behavior.&lt;/p&gt;




&lt;p&gt;By following this tutorial, you’ve successfully configured your WSL2 user account to execute sudo commands without a password prompt. This can streamline your workflow while working in a development environment. Remember to always prioritize security based on your specific use case!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Automatically Update ChromeDriver to Match Google Chrome Version for Selenium Scripts with HTTP/2 Streaming in Python</title>
      <dc:creator>Marcelo Facio Palin</dc:creator>
      <pubDate>Wed, 01 Nov 2023 03:37:22 +0000</pubDate>
      <link>https://dev.to/marcelopalin/automatically-update-chromedriver-to-match-google-chrome-version-for-selenium-scripts-with-http2-streaming-in-python-2cde</link>
      <guid>https://dev.to/marcelopalin/automatically-update-chromedriver-to-match-google-chrome-version-for-selenium-scripts-with-http2-streaming-in-python-2cde</guid>
      <description>&lt;p&gt;When working with Selenium for browser automation, it's crucial to keep the ChromeDriver version in sync with the installed Google Chrome version. Mismatched versions can lead to errors and failed scripts. That's why I've created a Python script to automate the process of updating ChromeDriver to match the Google Chrome version installed on your system.&lt;/p&gt;

&lt;p&gt;Here's the script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"""
    Description:

    Automatically updates the chromedriver.

    Requirements:

    Need to have sudo command permissions without password. To do this, run:
    echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/dont-prompt-$USER-for-sudo-password
    You will be prompted for the password one last time.

    python3 -m pip install --upgrade pip
    pip install tqdm httpx[http2]


    Author:           Marcelo Facio Palin
    Created:          2023-10-31
"""
import subprocess
import platform
import httpx
from tqdm import tqdm
import os
from pathlib import Path
import zipfile
import shutil

def get_chrome_version():
    try:
        version = subprocess.check_output(["google-chrome", "--version"]).decode("utf-8").split(" ")[2].strip()
        return version
    except Exception as e:
        print("Could not determine Google Chrome version. Make sure Google Chrome is installed and in the PATH.")
        print(e)
        return None

def get_platform():
    system = platform.system().lower()
    if system == "linux":
        return "linux64"
    else:
        return system

def get_chromedriver_version(chromedriver_path):
    try:
        version = subprocess.check_output([chromedriver_path, "--version"]).decode("utf-8").strip()
        return version
    except Exception as e:
        print(f"Could not determine ChromeDriver version at {chromedriver_path}. Error: {e}")
        return None

def download_chromedriver(chrome_version, platform):
    url = "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json"
    response = httpx.get(url)
    if response.status_code != 200:
        print("Could not get download information. Status code:", response.status_code)
        return

    data = response.json()
    for channel, channel_data in data["channels"].items():
        if channel_data["version"] == chrome_version:
            for download in channel_data["downloads"]["chromedriver"]:
                if download["platform"] == platform:
                    download_url = download["url"]
                    print(f"Download link for ChromeDriver version {chrome_version} for {platform}: {download_url}")
                    return download_url

    print(f"Could not find ChromeDriver for version {chrome_version} and platform {platform}.")
    return None

def download_file(url, filename):
    with httpx.Client(http2=True) as client:
        with client.stream("GET", url) as response:
            if response.status_code != 200:
                print("Could not download the file. Status code:", response.status_code)
                return

            file_size = int(response.headers.get("Content-Length", 0))
            progress_bar = tqdm(total=file_size, unit="B", unit_scale=True, desc=filename)

            with open(filename, "wb") as file:
                for chunk in response.iter_bytes(1024):
                    progress_bar.update(len(chunk))
                    file.write(chunk)

            progress_bar.close()

    print(f"File saved at: {os.path.abspath(filename)}")

def install_chromedriver(zip_filename):
    extract_dir = "chromedriver_extract"
    with zipfile.ZipFile(zip_filename, 'r') as zip_ref:
        zip_ref.extractall(extract_dir)

    chromedriver_path = None
    for root, dirs, files in os.walk(extract_dir):
        if "chromedriver" in files:
            chromedriver_path = os.path.join(root, "chromedriver")
            break

    if chromedriver_path is None:
        print("Could not find the executable file of chromedriver.")
        return

    # Makes the file executable
    os.chmod(chromedriver_path, 0o755)

    # Installs chromedriver in /usr/local/bin
    try:
        subprocess.run(["sudo", "cp", chromedriver_path, "/usr/local/bin/chromedriver"], check=True)
    except subprocess.CalledProcessError as e:
        print("Could not install chromedriver in /usr/local/bin. Error: ", e)

    dir_path = Path("/opt/chromedriver")
    if not dir_path.exists():
        try:
            subprocess.run(["sudo", "mkdir", str(dir_path)], check=True)
        except subprocess.CalledProcessError as e:
            print("Could not create the directory /opt/chromedriver. Error: ", e)

    # Installs chromedriver in /opt/chromedriver
    try:
        subprocess.run(["sudo", "cp", chromedriver_path, "/opt/chromedriver/chromedriver"], check=True)
    except subprocess.CalledProcessError as e:
        print("Could not install chromedriver in /opt/chromedriver. Error: ", e)

    # Removes the extraction folder
    shutil.rmtree(extract_dir)

    print("Chromedriver successfully installed!")


def main():
    chrome_version = get_chrome_version()
    platform = get_platform()
    if chrome_version and platform:
        download_url = download_chromedriver(chrome_version, platform)

        if download_url:
            zip_filename = f"chromedriver_{chrome_version}_{platform}.zip"
            download_file(download_url, zip_filename)

            install_chromedriver(zip_filename)

            print("Download and installation successful!")
            print("Google Chrome version: ", chrome_version)

            usr_bin_version = get_chromedriver_version("/usr/local/bin/chromedriver")
            if usr_bin_version:
                print("ChromeDriver version in /usr/local/bin: ", usr_bin_version)

            opt_chromedriver_version = get_chromedriver_version("/opt/chromedriver/chromedriver")
            if opt_chromedriver_version:
                print("ChromeDriver version in /opt/chromedriver/chromedriver: ", opt_chromedriver_version)

            print("Platform: ", platform)
        else:
            print("The download was not successful.")

if __name__ == "__main__":
    main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key Features of Our Script:&lt;/p&gt;

&lt;p&gt;Utilizes the httpx library with HTTP/2 and stream to efficiently handle file downloads.&lt;br&gt;
Always matches the ChromeDriver version with your installed Google Chrome version.&lt;br&gt;
Places the ChromeDriver executable in the necessary directories, ensuring your Selenium scripts run seamlessly.&lt;br&gt;
By leveraging the power of HTTP/2, our script provides faster and more reliable file downloads. Plus, with httpx stream, we can efficiently handle large files without consuming excessive memory.&lt;/p&gt;

&lt;p&gt;Before running the script, please ensure you have configured your system to allow sudo commands without a password prompt by running the following command:&lt;br&gt;
&lt;code&gt;echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/dont-prompt-$USER-for-sudo-password&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This step is important because we need to place the ChromeDriver executable in directories that require root permissions, and we want the process to be as smooth as possible.&lt;/p&gt;

&lt;p&gt;Feel free to try out our script and let us know your thoughts. We hope it helps you maintain a seamless testing environment for your Selenium projects.&lt;/p&gt;

&lt;p&gt;Happy testing!&lt;/p&gt;

&lt;p&gt;Best,&lt;br&gt;
Palin&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Resolvendo o problema do Permission Denied do Docker</title>
      <dc:creator>Marcelo Facio Palin</dc:creator>
      <pubDate>Thu, 13 Apr 2023 23:25:24 +0000</pubDate>
      <link>https://dev.to/marcelopalin/resolvendo-o-problema-do-permission-denied-do-docker-19f4</link>
      <guid>https://dev.to/marcelopalin/resolvendo-o-problema-do-permission-denied-do-docker-19f4</guid>
      <description>&lt;p&gt;Olá, amigos nerds! Você já se deparou com o irritante erro "Permission Denied" ao tentar utilizar o Docker? Bem, se você está aqui, eu aposto que sim. Mas não se preocupe, vamos mandar esse erro para o espaço! 🚀&lt;/p&gt;

&lt;p&gt;Cenário do problema:&lt;/p&gt;

&lt;p&gt;O Docker está instalado no seu sistema, mas ao executar comandos como "docker run" ou "docker ps", você se depara com a seguinte mensagem de erro:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Parece complicado, né? Mas não se preocupe, vou te mostrar a solução! 🧩&lt;br&gt;
Inclusive pode encontrar a solução na documentação oficial: &lt;a href="https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user" rel="noopener noreferrer"&gt;https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Aqui está um passo a passo simples e eficaz para resolver esse problema:&lt;/p&gt;

&lt;p&gt;Primeiro, vamos verificar se o seu usuário faz parte do grupo "docker". Execute o seguinte comando:&lt;/p&gt;

&lt;p&gt;$ grep docker /etc/group&lt;/p&gt;

&lt;p&gt;Se o resultado mostrar o seu nome de usuário ao lado de "docker", &lt;strong&gt;você já está no grupo&lt;/strong&gt;! Mas se não, não se desespere, pois temos uma solução!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker:x:999:seu_usuario
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agora, vamos adicionar o seu usuário ao grupo "docker". Abra o terminal e digite o seguinte comando (substitua "seu_usuario" pelo seu nome de usuário):&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo usermod -aG docker seu_usuario&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Se não sabe qual é seu usuário no linux basta digitar:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ whoami&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Parabéns! Você acabou de dar um passo importante para resolver esse enigma!&lt;/p&gt;

&lt;p&gt;Após executar o comando anterior, faça logout da sessão atual e faça login novamente para que as alterações entrem em vigor. Como alternativa, você pode executar:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ newgrp docker&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Este comando iniciará uma nova sessão de shell com a associação de grupo atualizada, mas é recomendável fazer logout e login novamente para garantir que as alterações se apliquem a todas as suas sessões de shell atuais e futuras.&lt;/p&gt;

&lt;p&gt;Finalmente, verifique se o erro foi resolvido executando o comando "docker ps". Se você não encontrar mais o erro, comemore! 🎉 &lt;/p&gt;

&lt;p&gt;E aí está, problema resolvido!&lt;/p&gt;

&lt;p&gt;Outra solução:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo chmod 666 /var/run/docker.sock&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Por quê esta não é a melhor solução?&lt;/p&gt;

&lt;p&gt;Segundo a documentação &lt;a href="https://docs.docker.com/engine/security/#docker-daemon-attack-surface" rel="noopener noreferrer"&gt;https://docs.docker.com/engine/security/#docker-daemon-attack-surface&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A execução de contêineres (e aplicativos) com o Docker implica na execução do daemon do Docker. Este daemon requer rootprivilégios, a menos que você opte pelo modo sem raiz e, portanto, esteja ciente de alguns detalhes importantes.&lt;/p&gt;

&lt;p&gt;Em primeiro lugar, apenas usuários confiáveis ​​devem ter permissão para controlar seu daemon Docker . Essa é uma consequência direta de alguns recursos poderosos do Docker. Especificamente, o Docker permite que você compartilhe um diretório entre o host do Docker e um contêiner de convidado; &lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Resolvendo o problema do popup de recursos do Flameshot no Ubuntu 22.04</title>
      <dc:creator>Marcelo Facio Palin</dc:creator>
      <pubDate>Thu, 13 Apr 2023 22:42:39 +0000</pubDate>
      <link>https://dev.to/marcelopalin/resolvendo-o-problema-do-popup-de-recursos-do-flameshot-no-ubuntu-2204-275j</link>
      <guid>https://dev.to/marcelopalin/resolvendo-o-problema-do-popup-de-recursos-do-flameshot-no-ubuntu-2204-275j</guid>
      <description>&lt;p&gt;O &lt;strong&gt;Flameshot&lt;/strong&gt; é uma poderosa ferramenta de captura de tela para Linux, que permite aos usuários tirar screenshots e fazer anotações diretamente nas imagens capturadas. &lt;/p&gt;

&lt;p&gt;Se você acabou de instalar o Ubuntu 22.04 e está enfrentando problemas para usar todos os recursos do Flameshot, este guia irá ajudá-lo a resolver esses problemas e aproveitar ao máximo esta excelente ferramenta.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Passo 1&lt;/strong&gt;: Instalar o Flameshot&lt;/p&gt;

&lt;p&gt;Abra o terminal e execute os seguintes comandos para instalar o Flameshot:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt update&lt;br&gt;
 sudo apt install flameshot&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Passo 2:&lt;/strong&gt; Configurar o Flameshot para funcionar corretamente&lt;/p&gt;

&lt;p&gt;O Ubuntu 22.04 utiliza o servidor gráfico Wayland por padrão, o que pode causar alguns problemas de compatibilidade com o Flameshot. Para resolver isso, siga os passos abaixo:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Abra o terminal e digite o seguinte comando para editar o arquivo custom.conf do GDM:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;sudo nano /etc/gdm3/custom.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Descomente a linha:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;WaylandEnable=false&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;removendo o símbolo # no início da linha. Em seguida, salve o arquivo e feche o editor pressionando Ctrl + X, seguido de Y e Enter.&lt;/p&gt;

&lt;p&gt;Adicione a variável de ambiente QT_QPA_PLATFORM=xcb ao seu arquivo &lt;strong&gt;.bashrc&lt;/strong&gt; ou &lt;strong&gt;.zshrc&lt;/strong&gt; (dependendo do shell que você está usando). Para fazer isso, abra o arquivo no terminal com um dos seguintes comandos:&lt;/p&gt;

&lt;p&gt;nano ~/.bashrc&lt;br&gt;
ou&lt;br&gt;
nano ~/.zshrc&lt;/p&gt;

&lt;p&gt;Insira a seguinte linha no final do arquivo:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;export QT_QPA_PLATFORM=xcb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Salve o arquivo e feche o editor, como explicado no Passo 2.&lt;br&gt;
Reinicie o computador para que as alterações entrem em vigor.&lt;/p&gt;

&lt;p&gt;Com essas configurações, o Flameshot deve funcionar corretamente no Ubuntu 22.04, permitindo que você use todos os recursos de captura e marcação de tela.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
