meta data for this page
  •  

This is an old revision of the document!


Linux/Prepare

Basic

Usefull software

sudo apt-get install wireshark cups
sudo usermod -G lp,lpadmin,dialout,sudo,audio,video,netdev,vboxusers,wireshark,kismet,i2c user_login

parallel packers

sudo apt-get install pigz pbzip2 pxz lbzip2

To force using paralle packers system-wide:

ln -s /usr/bin/lbzip2 /usr/local/bin/bzip2
ln -s /usr/bin/lbzip2 /usr/local/bin/bunzip2
ln -s /usr/bin/lbzip2 /usr/local/bin/bzcat
ln -s /usr/bin/pigz /usr/local/bin/gzip
ln -s /usr/bin/pigz /usr/local/bin/gunzip
ln -s /usr/bin/pigz /usr/local/bin/zcat
ln -s /usr/bin/pixz /usr/local/bin/xz

or use bash aliases:

.bashrc
alias gzip='pigz'
alias gunziip='unpigz'
alias bzip2='pbzip2'
alias bunzip2='pbunzip2'
alias xz='pxz'

add i386 architecture

dpkg --add-architecture i386
apt-get update
apt-get install gpm tcpdump bmon tinc ppp pptpd mc links2 gparted hdparm smartmontools smart-notifier valgrind openssh-server
apt-get install wireshark mtr

etckeeper

apt-get install git 
git config --global user.name "my name"
git config --global user.email myemail@address.pl
apt-get install git-cola etckeeper kdiff3

Disable PC speaker

echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf

resolv.conf

apt-get install resolvconf

Add own nameserver into /etc/resolvconf/resolv.conf.d/base

nameserver 8.8.8.8

and execute

sudo resolvconf -u
Polish & locales
apt-get install console-data
dpkg-reconfigure console-data
dpkg-reconfigure locales

add

  • pl_PL
  • pl_PL.UTF-8

In Debian, locales are handled in /etc/default/locale. File /etc/environment is deprecated.

grep pam_env.so /etc/pam.d/*
...
/etc/pam.d/login:session       required   pam_env.so readenv=1
/etc/pam.d/login:session       required   pam_env.so readenv=1 envfile=/etc/default/locale
...

= X11 = Based on XFCE

misc
apt-get install browser-plugin-vlc
Power management

sudo apt-get install acpi-support

Turn off monitors command and lock: xset dpms force off xscreensaver-command –lock

Control minitor brightness

xrandr --output HDMI2 --brightness 0.5
xrandr --output VGA1 --brightness 0.5

Using Brighntess Controller

sudo apt-get install python-wxgtk3.0 python-pyside

Download and install latest version from http://lordamit.github.io/Brightness. Do not use Ubuntu's deb because it contain old version.

Using Indicator Brightness

apt-get install libappindicator1 libdbusmenu-gtk4 libindicator7 python-appindicator python-gobject apt-get install notify-osd

wget http://launchpadlibrarian.net/196377180/notify-osd-icons_0.8%2B15.04.20150202-0ubuntu1_all.deb dpkg -i dpkg -i notify-osd-icons_0.8+15.04.20150202-0ubuntu1_all.deb

wget http://ppa.launchpad.net/indicator-brightness/ppa/ubuntu/pool/main/i/indicator-brightness/indicator-brightness_0.4~bzr11~ubuntu15.04.1_all.deb dpkg -i indicator-brightness_0.4~bzr11~ubuntu15.04.1_all.deb

sudo apt-get install software-properties-common python-software-properties sudo add-apt-repository ppa:indicator-brightness/ppa sudo apt-get update sudo apt-get install indicator-brightness

Open PDFs in okular

Force system to ask how to open file:

mimeopen -d file.pdf

or

xdg-mime query filetype document.pdf
xdg-mime query default application/pdf
xdg-mime default okularApplication_pdf.desktop application/pdf 
# or kde4-okularApplication_pdf.desktop

see

cat /usr/share/applications/mimeinfo.cache and defaults.list 
cat  ~/.local/share/applications/mimeapps.list 

sudo update-mime-database /usr/share/mime

Multimonitor

use xrandr to list available outputs. Example output:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
VGA1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
...
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+
...
DP1 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)

To set layout of monitor:

xrandr --output VGA1 --right-of HDMI2

You need to create startup script with above command, and configure XFCE to run it at start (read more below).

There is also graphical UI available:

apt-get install arandr

To make settings permanent, use Layout –> Save as This will create executable script in ~/.screenlayout/your_name.sh

Then add above executable script to autostart of XFCE: Application Menu –> Settings –> Session and Startup

remote VNC access

Start VNC after first user login (from autostart):

$ sudo apt-get install x11vnc
$ mkdir -p ~/.config/autostart
$ cd ~/.config/autostart
$ cat > X11VNC.desktop

And paste following content:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -httpport 5900
StartupNotify=false
Terminal=false
Hidden=false

Finish pasting with CTRL+D

Password file (~/.vnc/passwd) you can create using vncpasswd command.

vnc4server

in file ~/.vnc/xstartup

add before executing x-session:

~/.vnc/xstartup
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
	eval `dbus-launch --sh-syntax –exit-with-session`
	echo "D-BUS per-session daemon address is: \
	$DBUS_SESSION_BUS_ADDRESS"
fi

Sound

apt-get install pavucontrol pavumeter

Trackball/mouse

apt-get install xinput

For touchscreen, please install also xinput-calibrator

xinput list # to see device list and ids
xinput list-props 10 # list props for device id=10

For logitech devices there are additional packets:

sudo apt-get install lomoco solaar

https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse