Showing posts with label Slackware. Show all posts
Showing posts with label Slackware. Show all posts

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.

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

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

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

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

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

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

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.