Skip to content

Instantly share code, notes, and snippets.

@ricardopedias
Last active December 21, 2023 19:55
Show Gist options
  • Save ricardopedias/a0f0af14c0818fa46a62fa0e377e599e to your computer and use it in GitHub Desktop.
Save ricardopedias/a0f0af14c0818fa46a62fa0e377e599e to your computer and use it in GitHub Desktop.
Configuração do Fedora

Configurando Fedora

Ativar os repositórios Nonfree ou:

sudo dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm 
sudo dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Nvidia

Para instalar o módulo do Kernel:

sudo dnf update
sudo dnf install akmod-nvidia
sudo dnf install xorg-x11-drv-nvidia-cuda

Após o reboot, verifique se o módulo está funcionando corretamente:

modinfo -F version nvidia

https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/6/

https://www.youtube.com/watch?v=1RYCFT1t_yI

https://github.com/devangshekhawat/Fedora-39-Post-Install-Guide

Aparência

Icones

sudo dnf -y install papirus-icon-theme
wget -qO- https://git.io/papirus-folders-install | sh
papirus-folders -C grey --theme Papirus-Dark

Gnome Terminal

Para adicionar margem mais agradável ao Gnome Terminal:

cat <<EOF > ~/.config/gtk-3.0/gtk.css
VteTerminal,
TerminalScreen,
vte-terminal {
    padding: 20px 20px 20px 20px;
    -VteTerminal-inner-border: 20px 20px 20px 20px;
}
EOF

Fonte mais agradável:

sudo dnf -y install fira-code-fonts

Para usar o estilo "Starship" no Gnome Terminal:

curl -sS https://starship.rs/install.sh | sh

No arquivo ~/.bashrc, adicionar:

eval "$(starship init bash)"

Para usar o "Oh My ZSH" no Gnome Terminal:

sudo dnf -y install zsh util-linux-user
chsh -s $(which zsh)
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting;

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions;

Ajustar o arquivo ".zshrc":

cat <<EOF >> ~/.zshrc
ZSH_THEME="robbyrussell"

plugins=(
    git
    zsh-autosuggestions
    zsh-syntax-highlighting
)
EOF

Para efetivar a configuração sem reiniciar o termial:

source ~/.zshrc

Utilidades do Sistema

Flatseal

Gerenciador de permissões para apps instalados via Flatpak

sudo dnf install flatseal

Appimage Launcher

Integra facilmente aplicações Appimage ao Gnome

wget https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.2.0/appimagelauncher-2.2.0-travis995.0f91801.x86_64.rpm -O appimagelauncher.rpm
sudo dnf install -y appimagelauncher.rpm
rm -f appimagelauncher.rpm

Video

sudo dnf -y install obs-studio

Codecs

sudo dnf -y install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel
sudo dnf -y install  lame\* --exclude=lame-devel
sudo dnf group upgrade --with-optional Multimedia

Softwares para Programação

Pencil

wget https://pencil.evolus.vn/dl/V3.1.0.ga/pencil-3.1.0.ga-1.x86_64.rpm
sudo dnf -y install ./pencil*
rm -f ./pencil*

StarUML

wget https://staruml.io/download/releases-v4/StarUML-4.0.1.x86_64.rpm
sudo dnf -y install ./StarUML*
rm -f ./StarUML*

Visual Studio Code

Para instalar o editor:

sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
dnf check-update
sudo dnf -y install code fira-code-fonts

Para adicionar as extenções:

code --install-extension zhuangtongfa.Material-theme
code --install-extension wwm.better-align
code --install-extension eamodio.gitlens
code --install-extension hakcorp.php-awesome-snippets
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension coozieki.php-implementor
code --install-extension MehediDracula.php-namespace-resolver

Para usar o zsh no VSCode (apenas se tiver sido instalado via Flatpak)

{
    "terminal.integrated.defaultProfile.linux": "bash",
    "terminal.integrated.profiles.linux": {
        "bash": {
        "path": "/usr/bin/flatpak-spawn",
        "args": ["--host", "--env=TERM=xterm-256color", "zsh"]
    }
}

Para usar SSH no VSCode (apenas se tiver sido instalado via Flatpak)

No flatpak '/usr/bin' contém binários de sandbox em vez do total '/usr/bin' encontrados no sistema host. Isso não pode mudar. Se queremos instalar algum pacote executando sudo dnf install meu-pacote no terminal do VSCode, ele falará que sudo não existe.

Falta resolver isso

Docker

sudo dnf -y install dnf-plugins-core; 
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf -y install docker-ce docker-ce-cli containerd.io
sudo groupadd docker; 
sudo usermod -aG docker ${USER}; 
sudo systemctl enable docker.service;
sudo systemctl enable containerd.service; 
sudo systemctl start docker

Para instalar o Docker compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose; \
sudo chmod +x /usr/local/bin/docker-compose

PHP Cli

sudo wget https://rpms.remirepo.net/fedora/remi-release-34.rpm -P /tmp
sudo dnf -y install /tmp/remi*.rpm; sudo rm -f /tmp/remi-*.rpm
sudo dnf module disable php; sudo dnf module enable php:remi-8.0;
sudo dnf update; sudo dnf install php-cli

Softwares interessantes

Google Chrome

sudo dnf -y install fedora-workstation-repositories
sudo dnf config-manager --set-enabled google-chrome
sudo dnf -y install google-chrome-stable

Utilidades Gráficas

sudo dnf -y install flameshot gimp inkscape

LibreOffice

sudo dnf -y install libreoffice-langpack-pt-BR
wget -qO- https://raw.githubusercontent.com/PapirusDevelopmentTeam/papirus-libreoffice-theme/master/install-papirus-root.sh | sh

Mailspring

wget "https://updates.getmailspring.com/download?platform=linuxRpm" -O mailspring.rpm
sudo dnf -y install ./mailspring.rpm
rm -f ./mailspring.rpm

Teams

wget "https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=rpm" -O teams.rpm
sudo dnf -y install ./teams.rpm
rm -f ./teams.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment