Friday, September 8, 2023

Arch Linux 2023.09 Brazilian language - Install UEFI or Not

Install Arch Linux 2023.09 x86_64 UEFI (or Not) for Brazilian language.

#loadkeys br-abnt2

#pacman -Syy


Set time:

#timedatectl set-ntp true

If you want to use UEFI, create a disk:

  # fdisk /dev/sda

    Create a GPT partition (option g)

    Create new partitions (option n) with the following specifications:

sda1 - 300MB - Type EFI File System (option 1)
sda2 - 16GB - Type SWAP (option 19)
sda3 - the rest of the disk space - Type Linux Filesystem (root partition) (option 20)

    Finish with (option w)

  # mkfs.fat -F32 /dev/sda1

If you don't want to use UEFI, create a disk:

 # cfdisk /dev/sda

sda1 - 16GB - Type SWAP
sda2 - the rest of the disk space - Type EXT4 (root partition)

  Set sda2 bootable

  save

Regardless of your choice, execute:


# mkswap /dev/<partition of swap>
# swapon /dev/
<partition of swap>

# mkfs.ext4 /dev/<root partition>

# mount /dev/<root partition> /mnt

# pacman-key --init

# pacman-key --populate

 

edit /etc/pacman.conf and uncomment ParallelDownloads = 5

# nano /etc/pacman.conf 

 

ParallelDownloads = 5

 

and Save

# pacstrap -K /mnt linux linux-firmware base base-devel nano

# genfstab -U -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt

# nano /etc/locale.gen


uncomment a line that you need. ie. pt_BR.UTF-8 UTF-8 and en_US.UTF-8 UTF-8

save

# locale-gen

# ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime

 

# echo LANG=pt_BR.UTF-8 > /etc/locale.conf

# echo KEYMAP=br-abnt2 > /etc/vconsole.conf

# echo FONT=lat1-16 >> /etc/vconsole.conf

# echo FONT_MAP=8859-1 >> /etc/vconsole.conf

# hwclock --systohc

# echo ArchLinux >> /etc/hostname


#passwd

 
# nano /etc/hosts

127.0.0.1  localhost
127.0.1.1  ArchLinux
::1        localhost

save

#pacman -S dhcpcd

#systemctl enable dhcpcd

# mkinitcpio -P
 

If appear WARNING, after finish this tutorial, you need to install firmware modules. Search in AUR.

Microcode Install:
For AMD processors, install the amd-ucode package.
#pacman -S amd-ucode

For Intel processors, install the intel-ucode package.

#pacman -S intel-ucode

#pacman -S grub dosfstools os-prober mtools ntfs-3g freetype2

#nano /etc/default/grub

insert or uncomment

GRUB_DISABLE_OS_PROBER=false

save
 
(in UEFI case)
   #pacman -S efibootmgr

   #mkdir /boot/EFI
 
       #mount /dev/sda1 /boot/EFI #Mount FAT32 EFI partition
 
   #grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck /dev/sda

(NOT in UEFI case)
    #grub-install /dev/sda
 
Regardless of your choice, execute:
 
#grub-mkconfig -o /boot/grub/grub.cfg

#exit

#umount -R /mnt
#reboot


# pacman -S bash-completion openssh rsync exfat-utils mc p7zip zip unrar unarj net-tools

# nano /etc/sudoers

uncomment this line # %wheel ALL=(ALL) ALL

save


User

# useradd -mg users -G wheel -s /bin/bash thiago
# passwd thiago

Install Grafical User Interface - GUI (KDE)

$ sudo pacman -Syu

$ sudo pacman -S xorg

$ sudo pacman -S plasma-meta

$ sudo pacman -S kde-applications-meta

$ sudo systemctl enable sddm

$ sudo systemctl enable NetworkManager

 
Others

$ sudo pacman -S vlc hunspell hunspell-en_GB gimp libreoffice chromium firefox dialog nmap git

For Bluetooth:

# pacman -S blueman
# pacman -S bluez
# pacman -S bluez-hid2hci
# systemctl enable bluetooth.service
# systemctl start bluetooth.service

Tips:
Some programs need to resolve DNS with a limited time and show a timeout error. To resolve this, activate the local DNS resolver.

systemctl enable systemd-resolved.service

Friday, April 7, 2023

Latex - Comments and Strikethrough

Commands for placing comments and strikethrough words in PDF text created by Latex.

Comandos para colocar comentários e tachar palavras nos texto gerados pelo Latex.

\usepackage{xcolor}

% strikethrough words - tachar palavras
\usepackage[normalem]{ulem}
\newcommand\Riscafora{\bgroup\markoverwith
{\textcolor{red}{\rule[.5ex]{2pt}{1pt}}}\ULon}

% comments - colocar comentarios
\newcommand{\Comentarios}[1]{
    \noindent\centerline{\fcolorbox{red}{pink}{\begin{minipage}[t]{\textwidth}\underline{\textbf{Comentário:}}\\ #1\end{minipage}}}
}
% ---

Usage examples:


 







Font: StackExchange

Wednesday, February 8, 2023

Arch Linux 'consolefont' build hook warning

 If appears this error in mkinitcpio -P or when you install something:

 
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 

For Brazilian language change /etc/vconsole.conf

KEYMAP=br-abnt2

FONT=lat1-16

FONT_MAP=8859-1


Source: IEC_8859, MAN Arch Linux

Merge PDF files in a directory to one PDF file

This script merge files with spaces in the name and sorts them by name.

Enter in a directory with PDFs and execute:

 

ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'
 

Source: Stackoverflow

Sunday, February 5, 2023

Joining any files in PostScript or PDF

gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=bla.ps -f foo1.ps foo2.ps

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=bla.pdf -f foo1.pdf foo2.pdf

or

pdfunite foo1.pdf foo2.pdf result.pdf
 

or

all files (pdf) in directory:

 
ls -v *.pdf | bash -c 'IFS=$'"'"'\n'"'"' read -d "" -ra x;pdfunite "${x[@]}" output.pdf'
 

Thursday, February 2, 2023

ISO 2 USB using dd with progress

 
dd bs=4M if=/path/to/linux.iso of=/dev/sdx oflag=sync status=progress

Monday, February 14, 2022

Arch Linux Retore Grub - UEFI or Not

ArchLinux Retore Grub - UEFI or Not

#loadkeys br-abnt2

# mount /dev/<root partition> /mnt

#arch-chroot /mnt

#nano /etc/default/grub

insert or uncomment

GRUB_DISABLE_OS_PROBER=false

save

(in UEFI case)

  #mount /dev/sda1 /boot/EFI #Mount FAT32 EFI partition


  #grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck /dev/sda
 

 (NOT in UEFI case)

    #grub-install /dev/sda
 
Regardless of your choice, execute:
 

#grub-mkconfig -o /boot/grub/grub.cfg

#umount -R /boot/EFI

#exit
#umount -R /mnt
#reboot

Friday, January 14, 2022

To clear the package cache in Arch Linux

 To clear the package cache in Arch Linux

  • Check how many cached packages are available in your cache folder and the occupied size:
$ sudo ls /var/cache/pacman/pkg/ | wc -l
$ du -sh /var/cache/pacman/pkg/ 
  •  Use the pacman command to remove all uninstalled packages that are still in cache:
$ sudo pacman -Sc
  • To completely remove all packages (whether they are installed or uninstalled) from the cache:
$ sudo pacman -Scc
 
Font: OSTechNix

Thursday, November 11, 2021

Touchpad Problems Arch Linux

Touchpad without clicking in Arch Linux

Check that xf86-input-synaptics has been installed:

# pacman -Ss xf86-input-synaptics

otherwise, install it:

# pacman -S xf86-input-synaptics

But if you included the package and it didn't work:

Edit file /etc/default/grub

# nano /etc/default/grub

add in line GRUB_CMDLINE_LINUX_DEFAULT: pci=nocrs

save

Execute: # update-grub

reboot

pci=nocrs => Discard pci ACPI information. May fix boot problems.

Monday, August 16, 2021

Proxy to Command-line

These proxy server settings are used by the almost all Linux command-line utilities: ftp, wget, curl, ssh, apt, pacman, yum and others.

 

Edit the file /etc/profile and add this lines:


# vi /etc/profile

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.


Edit the file /etc/environment and add this lines:

# vi /etc/enviroment

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.

Restart the system.

Thursday, March 4, 2021

Onedrive-Abraunegg "Cannot connect to Microsoft OneDrive Service - Network Connection Issue"

 I use the onedrive-abraunegg in my ArchLinux, and sometime I get the message:

Cannot connect to Microsoft OneDrive Service - Network Connection Issue


To resolve this, make sure that your local DNS cache is enabled on your system.

$ sudo systemctl is-active systemd-resolved.service


To active:

$ sudo systemctl enable systemd-resolved.service

$ sudo systemctl start systemd-resolved.service



To clear the Systemd Resolved DNS cache:

sudo systemd-resolve --flush-caches



Font: GeekFlare, Linuxize

Friday, January 11, 2019

Hostapd

Hostapd to share eth0 connetion

Hardware Requirements

iw list

Look at the section:

software interface modes:
               * AP/VLAN
               * monitor

Slackware Packages

  • dnsmasq
  • iptables
  • wireless-tools
  • iw
  • hostapd

Install Hostapd: https://slackbuilds.org/repository/14.2/network/hostapd/

Create or Change the Scripts file as ROOT (#):

vi /home/thiago/makeHotspot.sh

#! /bin/sh
IPTABLES=/usr/sbin/iptables
EXTIF="eth0"
INTIF="wlan0"

ifconfig $INTIF up 192.168.0.1 netmask 255.255.255.0

dnsmasq

echo "1" > /proc/sys/net/ipv4/ip_forward

$IPTABLES -F nat
$IPTABLES -F FORWARD

$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

if [ "$1" != "" ]; then
   echo
   echo ">>>> Anyone <<<"
   echo
   /usr/sbin/hostapd /etc/hostapd/hostapd_any.conf
else
   echo
   echo ">>>> Private <<<"
   echo
   /usr/sbin/hostapd /etc/hostapd/hostapd.conf
fi

Save!

Change or add...

vi /etc/hostapd/hostapd.conf

interface=wlan0
ssid=HotSlck
wpa=3
wpa_psk_file=/etc/hostapd/hostapd.wpa_psk
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 WPA-EAP
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_group_rekey=600
wpa_gmk_rekey=86400
wpa_ptk_rekey=600

Save!

In this file put all MAC and the "wifi" password

vi /etc/hostapd/hostapd.wpa_psk

2b:ad:a2:16:bc:32 slackware14.2

Save!

vi /etc/hostapd/hostapd_any.conf

interface=wlan0
ssid=HotSlck
wpa=3
wpa_psk_file=/etc/hostapd/hostapd_any.wpa_psk
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 WPA-EAP
wpa_pairwise=TKIP
rsn_pairwise=CCMP
wpa_group_rekey=600
wpa_gmk_rekey=86400
wpa_ptk_rekey=600

Save!

In this file put the "wifi" password.

vi /etc/hostapd/hostapd_any.wpa_psk

00:00:00:00:00:00 slackware14.2

Save!

This file define the wlan ip range.
vi /etc/dnsmaq.conf

interface=wlan0
dhcp-range=192.168.0.10,192.168.0.200,12h

Save!

chmod +x /home/thiago/makeHotspot.sh

To run:
#./home/thiago/makeHotspot.sh
 

Saturday, January 27, 2018

Slackware64 14.2 - Ideapad Flex

Instalação Full.


Instalação do driver Nvidia

No DVD do Slackware instale o extra/xf86-video-nouveau-blacklist/xf86-video-nouveau-blacklist-noarch-1.txz

Baixe:
http://us.download.nvidia.com/XFree86/Linux-x86_64/340.76/NVIDIA-Linux-x86_64-340.76.run

Instale: ./NVIDIA-Linux-x86_64-340.76.run


Configurando o Cedilha para o sistema de arquivos.

No lilo.conf modifique para 1

# nano /etc/lilo.conf

append="vt.default_utf8=1"

# nano /etc/profile.d/lang.sh e

Comente a linha
export LANG=en_US

e descomente a linha

export LANG=en_US.UTF-8

Acertando a velocidade do processador:

Adicione no final do arquivo /etc/rc.d/rc.local

# nano /etc/rc.d/rc.local

# CPU-frequency scaling
cpufreq-set --cpu 0 --governor conservative
cpufreq-set --cpu 1 --governor conservative
cpufreq-set --cpu 2 --governor conservative
cpufreq-set --cpu 3 --governor conservative

echo 1 > /sys/devices/system/cpu/cpufreq/boost


Thursday, January 25, 2018

Trocando Tetex pelo TexLive no Slackware64 14.2

Recentemente tive problemas com alguns arquivo feitos no Miktex e ao tentar compilá-los no Tetex vários erros ocorreram.

Para trocar o Tetex pelo TexLive faça:

1. Instale o texlive através do site ou siga os passos 1.x abaixo.

1.1. Baixe o http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz 

1.2. tar -xzvf  install-tl-unx.tar.gz

1.3. cd install-tl-20180118  (ou o diretório que for criado)

1.4. ./install-tl

Digite i para instalar.


2. sudo /sbin/removepkg tetex tetex-doc

Verifique o diretório criado em /usr/local/texlive/ 

3. Crie /etc/profile.d/texlive.sh e /etc/profile.d/texlive.csh

3.1. sudo nano /etc/profile.d/texlive.sh

#!/bin/sh
# Add PATH and MANPATH for texlive2017:
PATH="$PATH:/usr/local/texlive/2017/bin/x86_64-linux"
MANPATH="$MANPATH:/usr/local/texlive/2017/texmf/doc/man"

INFOPATH="$INFOPATH:/usr/local/texlive/2017/texmf/doc/info"


3.2. sudo nano /etc/profile.d/texlive.csh

#!/bin/csh
# Add path and MANPATH for texlive2017:
set path = ( $path /usr/local/texlive/2017/bin/x86_64-linux )
setenv MANPATH ${MANPATH}:/usr/local/texlive/2017/texmf/doc/man
setenv INFOPATH ${INFOPATH}:/usr/local/texlive/2017/texmf/doc/info


4. sudo chmod 755 /etc/profile.d/texlive.sh

5. sudo chmod 755 /etc/profile.d/texlive.csh


6. Reinicie o sistema!

Fontes: TUG e Chirokhan

Monday, January 22, 2018

Slackware64 14.2 Matlab Error PAM

To solve the Matlab error libpam.

http://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware64-14.2//linux-pam-1.3.0-x86_64-1gds.txz

tar -xJvf linux-pam-1.3.0-x86_64-1gds.txz

As root:

cp usr/lib64/libpam.so.0.84.2 /usr/local/MATLAB/R2017a/bin/glnxa64/

cd /usr/local/MATLAB/R2017a/bin/glnxa64/

ln -s libpam.so.0.84.2 libpam.so.0


Exfat Slackware64 14.2

Downloads:

https://slackbuilds.org/slackbuilds/14.1/development/scons.tar.gz

http://downloads.sourceforge.net/scons/scons-2.4.1.tar.gz

https://slackbuilds.org/slackbuilds/14.2/system/fuse-exfat.tar.gz

https://github.com/relan/exfat/releases/download/v1.2.7/fuse-exfat-1.2.7.tar.gz

As root:

tar -xzvf scons.tar.gz

cd scons

cp ../scons-2.4.1.tar.gz .

./scons.SlackBuild

upgradepkg --install-new /tmp/scons-2.4.1-x86_64-1_SBo.tgz

cd ..

tar -xzvf fuse-exfat.tar.gz

cd fuse-exfat

cp ../fuse-exfat-1.2.7.tar.gz .

./fuse-exfat.SlackBuild

upgradepkg --install-new /tmp/fuse-exfat-1.2.7-x86_64-1_SBo.tgz 

Wednesday, November 22, 2017

Fix EXT4-fs error loading journal

If occurs an  EXT4 filesystem error to loading journal, use the e2fsck to solve an inodes problems.

e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean. Hence, for filesystems that use journalling, e2fsck will normally replay the journal and exit, unless its superblock indicates that further checking is required.

change X for the number os partition (i.e. /dev/sda2)

# e2fsck -C0 -p -f -v /dev/sdaX

used options:

-C fd


This option causes e2fsck to write completion information to the specified file descriptor so that the progress of the filesystem check can be monitored. This option is typically used by programs which are running e2fsck. If the file descriptor number is negative, then absolute value of the file descriptor will be used, and the progress information will be suppressed initially. It can later be enabled by sending the e2fsck process a SIGUSR1 signal. If the file descriptor specified is 0, e2fsck will print a completion bar as it goes about its business. This requires that e2fsck is running on a video console or terminal.

-p


Automatically repair ("preen") the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts. It may not be specified at the same time as the -n or -y options.

-f


Force checking even if the file system seems clean.

-v


Verbose mode.

Font: e2fsck(8) - Linux man page

Friday, August 25, 2017

Proxy Exceptions - Ubuntu 17.04

How to add proxy exceptions on Ubuntu desktop
$ gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.0/8', '192.168.1.0/24', 'xmodulo.com', '::1']"

Font: XModulo

Monday, August 21, 2017

Latex Ubuntu

Install packages to Latex

apt-get install texlive-lang-portuguese texlixe-fonts-extra texlive-science xzdec

Tuesday, July 12, 2016

Install Matlab in Slackware 14.2

In Terminal:

Requisits: JDK installed

$ sudo mkdir -p /usr/local/MATLAB/R2016a

$ sudo chmod a+w -R /usr/local/MATLAB/

In the DVD of Matlab:

$ ./install

After this, if you want to create the entry in the system's menu, follow this tutorial.

Icon of the Matlab in Slackware

For create the icons after matlab installed:

# cd /usr/local/bin/

# ln -s /usr/local/MATLAB/R2016a/bin/matlab matlab

Create in the system's menu the Matlab item and, in the Command item, put:


matlab -desktop -nosplash

-desktop is a flag needed to run Matlab without a terminal.

-nosplash is a flag preventing the splash screen from showing and taking up a temporary space in your task bar.

To download the icon:


$ curl https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -o /usr/share/icons/matlab.png

Fonts: Matlab Answers e ArchWiki

Thursday, July 7, 2016

SBOPKG in Slackware 14.2

This tutorial was tested in Slackware 14.2.

The version used in this tutotial was the 0.38.0. Look in the official site for know current version.

1 - get the SBOPKG package for Slackware of official site:
$ wget https://github.com/sbopkg/sbopkg/releases/download/0.38.0/sbopkg-0.38.0-noarch-1_wsr.tgz
2 - install the downloaded package:
$ installpkg sbopkg-0.38.0-noarch-1_wsr.tgz
or
$ upgradepkg sbopkg-0.38.0-noarch-1_wsr.tgz

Now, you can install all packages of the Slackbuilds.org using this Software.

Font: SBOPKG

Google Drive in Slackware 14.x

This tutorial was tested in Slackware 14.2.

1 - get the OCAML. I used SBOPKG to install.

2 - get the Opam Installer in:
$ wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh

3- execute:
# sh ./opam_installer.sh /usr/local/bin

if you are asked about changes in the profile or bash, answer y (yes).

After this, execute:

# /usr/local/bin/opam init --comp 4.02.1

The number (4.02.1) might change. Read the instructions on the screen.

4 - execute and insert in the file:
# pico ~/.bashrc

eval `opam config env`

5 - open a new prompt.

6 - execute:
# opam install google-drive-ocamlfuse

7 - execute:
# google-drive-ocamlfuse

You will be prompted to enter in your Google account. This will allow the software to access your Google Drive files.

8 - Make a directory to access your file. In this moment will be mounted your Google Drive directory in this directory. Execute:

# mkdir ~/GoogleDrive
# google-drive-ocamlfuse ~/GoogleDrive


Font: Vladimir Bakalov, OPAM

Java plugin for Firefox for Slackware 14.x

This tutorial was tested in Slackware 14.2.

Install the JDK by Slackbuilds.org or by SBOPKG.

# cd /home/usuario/.mozilla/firefox/plugins/

If 32 bits:

$ ln -s /usr/lib/java/jre/lib/i386/libnpjp2.so javaplugin-oji.so
$ cd /usr/lib/mozilla/plugins/
$ ln -s /usr/lib/java/jre/lib/i386/libnpjp2.so javaplugin-oji.so


If 64 bits:

$ ls -s /usr/lib64/java/jre/lib/amd64/libnpjp2.so javaplugin-oji.so
$ cd /usr/lib64/mozilla/plugins/
$ ls -s /usr/lib64/java/jre/lib/amd64/libnpjp2.so javaplugin-oji.so


When the plugin open in Firefox, some dialog boxes asking permission will be opened, just accept them.

Font: Viva o Linux

Monday, July 4, 2016

Google Chrome no Slackware64 14.2

Instalando Google Chrome no Slackware64 14.2

Como root:

mkdir google-chrome
cd google-chrome

Baixe: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Baixe: http://mirrors.slackware.com/slackware/slackware64-14.2/extra/google-chrome/google-chrome.SlackBuild

Edite o arquivo google-chrome.Slackbuild

Faça:
chmod +x google-chrome.Slackbuild

Execute o google-chrome.Slackbuild

Depois instale com:

upgradepkg --install-new /tmp/google-chrome-xxxxxx-x86_64-1.txz

Fonte: DocsSlackware

Criando Sudoers

Para criar um usuário que acesse privilégios avançados através do sudo faça:

# nano /etc/sudoers


Descomente a linha:

# %wheel ALL=(ALL) ALL

execute, trocando pelo seu usuário:

# gpasswd -a wheel

Feito!
Fonte: Slackware Linux

TeamViewer no Slackware64 14.X

Para instalar o TeamViewer no Slackware64 é preciso antes, instalar o compat32 (vide tutorial), pois precisa rodar o wine em 32 bits.

Depois de instalado, faça:

Baixe: http://slackbuilds.org/slackbuilds/14.1/network/teamviewer.tar.gz
ou
Baixe: http://slackbuilds.org/slackbuilds/14.2/network/teamviewer.tar.gz


# tar -xzvf teamviewer.tar.gz

# cd teamviewer

Baixe: http://download.teamviewer.com/download/teamviewer_i386.deb


# ./teamviewer.SlackBuild

# installpkg /tmp/teamviewer--i486-1_SBo.tgz

# chmod +x /etc/rc.d/rc.teamviewerd

Após a instalação, para iniciar o TeamViewer ao iniciar o Slackware edite o arquivo rc.local e no final dele coloque o if...

# vi /etc/rc.d/rc.local:

if [ -x /etc/rc.d/rc.teamviewerd ]; then
   /etc/rc.d/rc.teamviewerd start
fi

Reinicie.

Slackware64 14.X com Multilib (compat32)

Feito para o Slackware64 14.1 ou 14.2!

Digite tudo em uma mesma linha:

lftp -c 'open http://slackware.com/~alien/multilib/; mirror 14.1'
ou
lftp -c 'open http://slackware.com/~alien/multilib/; mirror 14.2'

Espere terminar de baixar tudo.
Após finalizado, encontre o diretório  (14.1 ou 14.2) criado no local onde foi baixado.

Entre no diretório

cd 14.1
ou
cd 14.2

upgradepkg --reinstall --install-new *.t?z

Após terminar de instalar, faça:

upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

ao término, se edite o arquivo /etc/slackpkg/blacklist e insira no final

[0-9]+alien

Antes de instalar um pacote 32bits no Slackware multilib, execute o comando abaixo para ter certeza que não terá problemas futuros.

convertpkg-compat32 -i

O comando verifica a compatibilidade do pacote e o "torna" compatível com o seu sistema.

Fonte: Xathrya Sabertooth

Wednesday, June 1, 2016

Texlive - Erro pacote Babel

Package babel Error: Unknown option `brazil'. Either you misspelled it.

\usepackage[brazil]{babel}

apt-get install texlive-lang-portuguese

Saturday, April 2, 2016

Wednesday, March 30, 2016

Removendo GPT durante a instalação do WIndows



1 - Após ter escolhido o idioma, pressione SHIFT+F10 para abrir o console;

2 - Na linha de comandos, digite:

diskpart --> Este comando permite aceder ao utilitário para gerir partições

list disk --> Mostra todos os discos. Verifica se o disco 0 corresponde ao disco que compraste (basta verificares o tamanho)

select disk 0 --> Vai escolher o disco 0 para efetuar operações sobre ele. Se o disco novo não for o 0, então você deve alterar o número no comando para, por exemplo, select disk 1

clean --> Este comando vai eliminar as informações de configuração existentes no disco

create partition primary --> Este comando vai criar uma partição primária (no disco que selecionou no passo select disk x)

exit --> para abandonar o utilitário diskpart

exit --> para regressar ao programa de instalação;

3 - Agora na tela de seleção de partição, escolhe aquela que acabou de criar. Se continuar a dar erro, reinicia o computador e verifica se o erro desapareceu (de vez em quando é necessário um reboot para que as alterações fiquem visíveis ao setup do Windows);

4 - Antes de instalar o Windows, formate o disco.

Referência: Comunidade Hardware

Tuesday, June 9, 2015

Slackware64 14.1 Problemas com o Audio

cat /proc/asound/cards

Escolha o número do dispositivo que se quer como default.

nano .asoundrc

Colocar no final:

pcm.!default {
type hw
card 0
}

ctl.!default {
type hw           
card 0
}

Em card coloque o número do dispositivo que se quer como default.

Reinicie o Browser.

Fonte: Dalla Rosa

Thursday, June 4, 2015

Google Chrome no Slackware64

Instalando Google Chrome no Slackware64 14.2

Como root:

mkdir google-chrome
cd google-chrome

Baixe: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Baixe: http://slackbuilds.org/mirror/slackware/slackware-14.2/extra/google-chrome/google-chrome.SlackBuild

Faça:
chmod 755 google-chrome.Slackbuild

Execute o google-chrome.Slackbuild

Depois instale com:

upgradepkg --install-new /tmp/google-chrome-xxxxxx-x86_64-1.txz

Fonte: DocsSlackware

Thursday, April 9, 2015

MATLAB no UBUNTU

Depois de instalado o MATLAB faça:

apt-get install matlab-support

Com isso, sera colocado no PATH e o ícone na barra.

Copy files from multiple sub-folders to 1 folder

Create the new destination folder (this example = k:\1folder).

This command copies all files found in c:\test to k:\1folder.

Bring up elevated cmd/DOS prompt - START | type cmd.exe | RIGHT-click on cmd.exe above under "Programs" | select "Run as Administrator | Paste this command -


for /f "tokens=*" %a in ('dir /b /s /a-d "c:\test"') do @copy "%a" "k:\1folder"


Fonte: TechSupport

Wednesday, April 8, 2015

Okular com Google Translator

Selecione a palavra a ser traduzida;

Configure Web Shortcuts...



http://translate.google.com/?q=\{@}

Monday, April 6, 2015

Matlab MEX Linux

Problemas com Matlab para rodar o mexa (Matlab no Linux)...

failed to map segment from shared object: Operation not permitted

Se estiver trabalhando em uma partição Windows (NTFS, EXFAT,etc) é preciso inserir o exec na montagem do /etc/fstab

UUID=F4B664646C02A51D /mnt/c ntfs users,defaults,exec 0 0

Fonte: Short IT recipes

Thursday, April 2, 2015

Redução de Tamanho de Imagens via Prompt

Reduzir o tamanho de imagens em 40%.

mkdir resized

for image in *.jpg; do convert $image -resize 40% -quality 80 resized/$image; done

Fonte: a little place of calm

Wednesday, February 4, 2015

Montagem Pasta Compartilhada do VirtualBox

Para montar a pasta compartilhada no Linux (Guest) faça:

Criar diretório para montagem:

sudo mkdir /media/vboxshared

Montagem:

sudo mount -t vboxsf /media/vboxshared


Para automatizar acrescente no fstab:

sudo nano /etc/fstab

/media/vboxshared vboxsf noauto,rw,users 0 0


Linha de comando:

usermod -aG vboxsf


Referência: How-To-Geek

Tuesday, June 24, 2014

VirtualBox Host Key

No Slackware o arquivo (VirtualBox.xml) de Configuração está em: /home/usuario/.config/VirtualBox/

Na linha acima coloque o código no lugar do zzzzz

Alt Esquerdo - 65514
Control Direito - 65507

Tuesday, April 22, 2014

Remover mensagem do Teamviewer 9

Para remover a mensagem "Teamviewer is still runinng..." faça:

desligue o teamviewer;

nano ~/.config/teamviewer9/config/client.conf

coloque no final:

[int32] ShowTaskbarInfoOnMinimize = 0

Salve e inicie o teamviewer!




Friday, March 7, 2014

Instalar Pacotes no TexLive - tlmgr

Para instalar pacotes no TexLive faça:

tlmgr install nomedopacote

para listar os pacotes que precisam ser atualizados:

tlmgr update --list

para atualizar os pacotes:

tlmgr update --all

Caso ocorra o erro: "cannot setup TLPDB in..." faça:

tlmgr init-usertree

Testado no Slackware64 14.1 e Ubuntu 14.04.2 LTS

Referência: TUG

Wednesday, January 29, 2014

Proxy no Slackware

Para deixar o proxy ativo permanentemente para utilizar, por exemplo no slackpkg, faça:

Edite o arquivo /etc/profile e acrescente as linhas de proxy:

# vi /etc/profile

http_proxy="http://meuproxy.com:3128"
HTTP_PROXY="http://meuproxy.com:3128"
ftp_proxy="http://meuproxy.com:3128"
FTP_PROXY="http://meuproxy.com:3128"

Salve e reinicie.

Feito!

Wednesday, December 18, 2013

Slackware64 14.1 no Ultrabook Inspiron 14z 5423

Instalei o Slackware64 14.1 no Ultrabook Inspiron 14z 5423.

A instalação ocorreu normalmente e reconheceu todos os hardwares.

Apenas foi preciso acertar o áudio. Faça:

#alsactl init

Alguns problemas em relação à instalação do drive da placa de vídeo. Ao baixar o drive conforme o artigo "Instalando driver da ATI Radeon 7500M/7600M no Ultrabook Inspiron 14z", o mesmo não funcionou no Slackware64 14.1. Não sou adepto da utilização de "betas", porém para que funcione é necessário instalar a versão Beta do driver.

Os pacotes abaixo foram compilados para o Slackware64 14.1 kernel 3.10.17.




Desabilitando o DHCP no Boot do Slackware

Para desabilitar o DHCP no momento do Boot faça:

sudo vi /etc/rc.d/rc.inet1.conf

na linha

USE_DHCP[0]="YES"

troque o "YES" por ""

Feito!

Sunday, November 24, 2013

Slackware 14.1 - Reconfigurar X

Este comando é válido para o Slackware 14.1 e derivados anteriores que não tenham o xorg.conf "escrito".

Para configurar o X11, anteriormente, editava-se o arquivo /etc/X11/xorg.conf, porém de um tempo para cá, o X já identifica automaticamente as configurações de vídeo e teclado.
No meu caso não funcionaram as configurações e para acertá-las, faça:

X -configure

Normalmente ele consegue identificar tudo e será gerado um arquivo xorg.conf no diretório home do seu usuário.

Edite o arquivo, pois muitas vezes aparecem diversos drivers e monitores genéricos. Deixe apenas o drive da sua placa de vídeo e um monitor.

Copie este arquivo (xorg.conf) para /etc/X11.

Reinicie o X.


KDE com Português Brasil

Para deixar o KDE, no Slackware, em Português do Brasil, faça:

slackpkg install aspell-pt_BR
(instalará o dicionário - spellchecker)

slackpkg install kde-l10n-pt_BR


Tuesday, September 17, 2013

Referências de Páginas no BibTex

Utilizando o abntex2

@misc{Ribeiro,
    author = "Thiago Pirola",
    title = "Teste de Referencia",
    url = "http://thiagopirola.blogspot.com",
    year = "2013",
    urlaccessdate = "setembro de 2013"
}


Ficará:

RIBEIRO, T. P. Teste de Referencia. 2013. Disponível em: http://thiagopirola.blogspot.com. Acesso em: setembro de 2013.

Saturday, September 14, 2013

Erro no Lilo após atualizar Kernel

No Slackware64 14.0 após a atualização do kernel (3.2.45) pode ocorrem o erro ao iniciar o boot: "EBDA is big...."

Nesse caso, dê boot pelo CD e no console faça:

mount -o rw /dev/sda1 /mnt
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
chroot /mnt /bin/bash

mkinitrd -c -k 3.2.45 -m ext4 -f ext4 -r /dev/sda1

vi /etc/lilo.conf inclua na seção do boot do Slackware:

initrd = /boot/initrd.gz

Salve e:

lilo

Reinicie e pronto!

Fontes: Jorge Núñez Pérez e LinuxQuestions

Wednesday, June 12, 2013

Instalando driver da ATI Radeon 7500M/7600M no Ultrabook Inspiron 14z

No Slackware64 14.0, para instalar o driver da ATI Radeon 7500M/7600M no Ultrabook Inspiron 14z faça:

Baixar o Driver.

Descompacte o driver:

unzip amd-driver-installer-VERSION-x86.x86_64.zip

No meu caso baixei a versão 13-4.

Como root:

sh amd-driver-installer-VERSION-x86.x86_64.run

Abrirá uma tela informando que encontrou o Slackware e depois se quer instalar o gerar pacote.
Escolha instalar!

Depois de terminado, edite o arquivo /etc/modprobe.d/blacklist-fglrx.conf e coloque:

blacklist radeon
blacklist radeonhd

Feche a salve.

Execute:

aticonfig --initial

Edite o arquivo /etc/X11/xorg.conf e insira na Section "Device"

Option "SWCursor" "true"

Reinicie.

Entre no modo gráfico e digite no prompt:

fgl_glxgears

aparecerá um cubo rodando em OpenGL.

fglrxinfo

deve aparecer algo semelhante:

display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 7500M/7600M Series
OpenGL version string: 4.2.12217 Compatibility Profile Context 12.104

Feito.

Slackware How-to

obs.: estes passos foram feitos para o Slackware 14.0

Thursday, May 2, 2013

Octave no Slackware64 14.0

Baixe o Lapack

installpkg lapack-3.4.2-x86_64-1sl.txz

Baixe o SlackBuilds do Octave

tar -xzvf octave.tar.gz 

cd octave

Baixe o Octave

./octave.SlackBuilds

installpkg /tmp/octave-3.6.4-x86_64-1_SBo.tgz

Feito.

Kbibtex no Slackware64 14.0

Como não há pacotes para o Slackware64 14.0 do Kbibtex, faça:

Baixe o SlackBuilds para o Kbibtex

como root faça:

tar -xzvf kbibtex.tar.gz 

cd kbibtex


Baixe o Source do Kbibtex

./kbibtex.SlackBuild

installpkg /tmp/kbibtex-0.4-x86_64-1_SBo.tgz

Instalado!

Flash Player no Slackware64 14.0

Para instalar o Flash Player no Slackware64 14.0 faça:

Baixe o Flash Player no caso o 64 bits

Descompacte o arquivo:

tar - xzvf install_flash_player_11_linux.x86_64.tar.gz

como root:

cp -r usr /usr

cp libflashplayer.so /usr/lib64/mozilla/plugins

Flash instalado no Firefox.

Para o Konqueror, abra o mesmo e no menu:
Settings -> Configure Konqueror -> Plugins

Escolha a aba Plugins e clique no botão Scan for Plugins.

Deve aparecer na janela abaixo do botão clicado o plugins do libflashplayer.so


Friday, April 26, 2013

SUN JDK no Slackware64 14.0

Baixar do site oficial o JDK: link

No caso utilizei o jdk-7u21-linux-x64.tar.gz

Copie do diretório /extra/source/java que está no DVD do Slackware 14.0 o arquivo java.SlackBuild

Como root faça:

chmod a+x java.SlackBuild

./java.SlackBuild jdk-7u7-linux-x64.tar.gz

Ao terminar será exibida a mensagem: Slackware package /tmp/jdk-7u21-x86_64-1.txz

Digite para instalar:

upgradepkg --install-new /tmp/jdk-7u7-x86_64-1.txz

O java foi instalado em /usr/lib64/java

Para colocar no PATH:

vi /etc/profile

coloque no final do arquivo

export JAVA_HOME=/usr/lib64/java
export CLASSPATH="$JAVA_HOME/lib"
export PATH="$PATH:$JAVA_HOME/bin"
export MANPATH="$JAVA_HOME/man"


Fonte: Slackware Docs

Tuesday, April 23, 2013

Slackware 14 Rede Gigabit do Inspiron 14z 5423

Para instalar a Rede Gigabit do Inspiron 14z 5423 no Slackware 14 - Kernel 3.2.29 - faça:

Baixe o arquivo compat-drivers-2013-03-04-u.tar.bz2

Descompacte-o:

tar -xvf compat-drivers-2013-03-04-u.tar.bz2

cd compat-drivers-2013-03-04-u

./scripts/driver-select alx

make

sudo make install

Drive instalado!

Fonte: The Linux Foundation

Criando initrd no Slackware

Como root faça:

cd /boot

mkinitrd -k 3.2.45 -m ext4

No caso do Slackware64 14.0 é o kernel 3.2.45

lilo

Um bom esquema de partição

Um bom esquema de partição para utilização de SSD e HDD.

32 GB SSD (/dev/sdb) e 500 GB HDD (/dev/sda):

Partition Size Type Mount Point

/dev/sda1 2G   swap 
/dev/sda3 200G ext4 /home 
/dev/sda5 50G  ext4 /var 
/dev/sda6 50G  ext4 /usr 

(Sobrou 248 GB livres em /dev/sda)


/dev/sdb1 512M  ext4 /boot

/dev/sdb2 30.5G ext4 /


Feito para um Dell Inspiron 14z 5423

Fonte: $cat /dev/blog

Monday, April 22, 2013

Removendo GPT via linux

Para remover o GPT, acesse um prompt de comandos de um GNU/Linux.

Como root digite:

parted /dev/dispositivo

dispositivo pode ser sda ou sdb, etc... o disco que está com raid.

dentro do parted, digite

mktable

Ao ser questionado sobre: "New disk label type?" digite

msdos

Os dados serão destruídos. Continuar? 

yes

quit

GPT removido.

Este tutorial foi feito para um Ultrabook Dell Inspiron 14z 5423.

Fonte: Digital52