Mac

Posts tagged with Mac.

Sudo com Touch ID no macOS

16 Jun 2024

Configurar o sudo para usar o Touch ID no macOS Sonoma em apenas alguns passos é muito fácil.

Localize o arquivo /etc/pam.d/sudo_local.template e faça uma cópia conforme o exemplo abaixo:

sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local

Em seguida, edite o arquivo e remova o caractere # do início da linha 3, ele deve ficar assim:

# sudo_local: arquivo de configuração local que sobrevive a atualizações do sistema e é incluído para sudo
# descomente a linha a seguir para habilitar o Touch ID para sudo
auth sufficient pam_tid.so

Passos detalhados para editar o arquivo

Para editar o arquivo, use um editor de texto como nano ou vim. Por exemplo, com o nano:

Sudo with Touch ID on macOS

05 Jun 2024

Setting up sudo for use with Touch ID on macOS Sonoma in just a few steps is very easy.

Locate the file /etc/pam.d/sudo_local.template and make a copy as shown in the example below:

sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local

Then edit the file and remove the # character from the beginning of line 3, it should look like this:

# sudo_local: local config file which survives system update and is included for sudo
# uncomment following line to enable Touch ID for sudo
auth sufficient pam_tid.so

Detailed Steps to Edit the File

To edit the file, use a text editor like nano or vim. For example, with nano:

Install lxml on MacBook with Apple Silicon

03 Jan 2023

pip install error when installing lxml

Today I needed to install lxml into a python project I’m working on my local machine, but I got the following errors when xmlsec, that is a library dependency, was being installed:

Building wheels for collected packages: xmlsec  
Building wheel for xmlsec (pyproject.toml) … error  
error: subprocess-exited-with-error  
× Building wheel for xmlsec (pyproject.toml) did not run successfully.  
│ exit code: 1  
╰─> [13 lines of output]  
running bdist_wheel  
running build  
running build_py  
creating build  
creating build/lib.macosx-13.0-arm64-cpython-310  
creating build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
copying src/xmlsec/py.typed -> build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
copying src/xmlsec/tree.pyi -> build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
copying src/xmlsec/**init**.pyi -> build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
copying src/xmlsec/constants.pyi -> build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
copying src/xmlsec/template.pyi -> build/lib.macosx-13.0-arm64-cpython-310/xmlsec  
running build_ext  
error: xmlsec1 is not installed or not in path.  
[end of output]  
note: This error originates from a subprocess, and is likely not a problem with pip.  
ERROR: Failed building wheel for xmlsec  
Failed to build xmlsec  
ERROR: Could not build wheels for xmlsec, which is required to install pyproject.toml-based projects

So to install it, on my MacBook machine with Apple Silicon and macOS Ventura, I needed to execute the following commands:

Enabling Click and Drag on MacBook

09 Jun 2021

I’m using macOS again, and of course that I’ll forget this tip, so I’ll write this post to help me another day in the future.

If you want to enable the click and drag option on MacBook, just go to: System Preferences → Accessibility → Pointer Control → Mouse and Trackpad → Trackpad Options → Enable Dragging.

Erro incômodo com o Postgresql no Mac

02 Oct 2016

Esse é um post bem curto que resolvi escrever depois de me incomodar com um erro esquisito no Postgresql no Mac após a atualização para o MacOS Sierra.

O servidor do Postgresql estava funcionando OK mas o client cli me retorna o erro abaixo sempre que eu o executava:

WTF?

Eu costumo usar o homebrew para instalar a maioria das coisas no meu mac, primeiramente eu pensei que fosse algum problema com algum link simbólico incorreto, então eu executei o comando abaixo para ver se resolvia: