Category:Architecture/Linux/Debian

From aldeid
Jump to navigation Jump to search

Installation

Prepare bootable USB

No need to use Unetbootin anymore. Now, simply do:

$ sudo dd if=/path/to/iso of=/dev/sdb bs=4M; sync
Warning
Do not include the number at the end of your device (i.e. sdb1). Use /dev/sdb instead.

Microcode

During the installation (netbooting), the installation sometimes requires microcodes. This page describes how to include non-free firmware within Debian netboot images.

Upgrade script

The following script will upgrade Java, Flash and the system packages.

#!/bin/sh

# not needed
#setxkbmap fr

# Check Flash
echo "===================="
echo "CHECKING FLASH..."
echo "----------"
# Obsolete method
#sudo update-flashplugin-nonfree --status
#sudo update-flashplugin-nonfree --install

# New method: manual
FLASH_REMOTE=`curl -s http://www.adobe.com/software/flash/about/ | grep -A2 Linux | sed -e 's/<[^>][^>]*>//g' -e '/^ *$/d' | tail -n1 | awk '{print $1}' | tr -d '[[:space:]]'`
FLASH_LOCAL=`strings /usr/lib/flashplugin-nonfree/libflashplayer.so | grep FlashPlayer_ | sed -e 's/FlashPlayer_//' -e 's/_FlashPlayer//' -e 's/_/./g'`
echo " - Local:  [$FLASH_LOCAL]"
echo " - Remote: [$FLASH_REMOTE]" 

if [ $FLASH_LOCAL != $FLASH_REMOTE ]; then
    echo "UPGRADING FLASH..."
    # download
    wget https://fpdownload.adobe.com/get/flashplayer/pdc/$FLASH_REMOTE/install_flash_player_11_linux.x86_64.tar.gz -O /tmp/flash.tar.gz
    # uncompress
    tar xzf /tmp/flash.tar.gz
    # install
    sudo mv /tmp/libflashplayer.so /usr/lib/flashplugin-nonfree/libflashplayer.so
    sudo mv /tmp/usr/share/pixmaps/flash-player-properties.png /usr/share/pixmaps/
    sudo mv /tmp/usr/share/icons/hicolor/24x24/apps/flash-player-properties.png /usr/share/icons/hicolor/24x24/apps/
    sudo mv /tmp/usr/share/icons/hicolor/48x48/apps/flash-player-properties.png /usr/share/icons/hicolor/48x48/apps/
    sudo mv /tmp/usr/share/icons/hicolor/32x32/apps/flash-player-properties.png /usr/share/icons/hicolor/32x32/apps/
    sudo mv /tmp/usr/share/icons/hicolor/16x16/apps/flash-player-properties.png /usr/share/icons/hicolor/16x16/apps/
    sudo mv /tmp/usr/share/icons/hicolor/22x22/apps/flash-player-properties.png /usr/share/icons/hicolor/22x22/apps/
    sudo mv /tmp/usr/share/applications/flash-player-properties.desktop /usr/share/applications/
    sudo mv /tmp/usr/bin/flash-player-properties /usr/bin
fi

# check Java
echo "===================="
echo "CHECKING JAVA..."
echo "----------"
JAVA_REMOTE=`curl --silent http://java.com/en/download/linux_manual.jsp | grep Recommended | awk -F " " '{ print "1."$4".0_"$6 }' | cut -d "<" -f1`
JAVA_LOCAL=`grep JAVA_VERSION /usr/java/jre-i586/release | cut -d '"' -f2`
echo " - Local:  [$JAVA_LOCAL]"
echo " - Remote: [$JAVA_REMOTE]" 

if [ $JAVA_LOCAL != $JAVA_REMOTE ]; then
    echo "UPGRADING JAVA..."

    ### 32-bit version
    # Download
    wget `curl --silent http://www.java.com/en/download/linux_manual.jsp | grep "Download Java software for Linux" | grep -v RPM | grep -v x64 | sort -u | cut -d "\"" -f4` -O /tmp/java-i586.tar.gz
    # Uncompress
    mkdir /usr/java/jre$JAVA_REMOTE-i586
    tar xzf /tmp/java-i586.tar.gz -C /usr/java/jre$JAVA_REMOTE-i586 --strip-components=1
    # Remove previous java version
    rm -fR /usr/java/jre$JAVA_LOCAL-i586
    # Reconstruct symbolic link
    ln -s -f /usr/java/jre$JAVA_REMOTE-i586 /usr/java/jre-i586

    ### 64-bit version
    # Download
    wget `curl --silent http://www.java.com/en/download/linux_manual.jsp | grep "Download Java software for Linux" | grep -v RPM | grep x64 | sort -u | cut -d "\"" -f4` -O /tmp/java-x64.tar.gz
    # Uncompress
    mkdir /usr/java/jre$JAVA_REMOTE-x64
    tar xzf /tmp/java-x64.tar.gz -C /usr/java/jre$JAVA_REMOTE-x64 --strip-components=1
    # Remove previous java version
    rm -fR /usr/java/jre$JAVA_LOCAL-x64
    # Reconstruct symbolic link
    ln -s -f /usr/java/jre$JAVA_REMOTE-x64 /usr/java/jre-x64

fi

# Standard system updates
echo "===================="
echo "CHECKING PACKAGE UPDATES..."
echo "----------"
sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade

# python pip updates
echo "===================="
echo "CHECKING PYTHON UPDATES..."
echo "----------"
pip freeze --local | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U

# Enable UFW notification
#/usr/local/bin/ufw-block-notify &

Useful packages

Accessories

galculator
Lightweight calculator
ipcalc
parameter calculator for IPv4 addresses
keepassx
Cross Platform Password Manager
medit
Text editor
p7zip-full
7z and 7za file archivers with high compression ratio
recoll
Indexer/client to look for files on your computer
seahorse
GNOME front end for GnuPG
terminator
Very useful terminal that enables to split windows horizontally/vertically and much more

Development

build-essential
Install several useful packages to build from source (e.g. make, gcc, ...)
ghex
Hexadecimal editor
git
Install git
meld
Graphical diff viewer
oathtool
OATH Toolkit oathtool command line tool

Graphics

dia
Diagram editor (like Microsoft Visio)

Internet

browser-plugin-vlc
Support of VLC in browser
enigmail
GPG support for Thunderbird and Debian Icedove
flashplugin-nonfree
Adobe Flash Player - browser plugin
gvfs, gvfs-backends, gvfs-common, gvfs-daemons, gvfs-fuse
virtual filesystem for the GNOME desktop, which allows users easy access to remote data via SFTP, FTP, WebDAV, SMB
liferea
Lightweight RSS reader
pidgin
XMPP client
pidgin-otr
Off The Record (OTR) plugin for pidgin to encrypt communications
remmina
Remote Desktop Client
wicd
Wired and wireless network manager
xchat
IRC graphical client

Multimedia

gtk-recordmydesktop
Graphical frontend for recordMyDesktop screencast tool

Office

INCOMPLETE SECTION OR ARTICLE
This section/article is being written and is therefore not complete.
Thank you for your comprehension.

System

gksu
graphical front-end to su and sudo
gparted
GNOME partition editor
htop
Interactive process viewer
xfce4-goodies
enhancements for the Xfce4 Desktop Environment

Icedove

Extensions

Enigmail
OpenPGP message encryption and authentication
Inverse SOGo Connector
A DAV plugin for keeping addressbooks and events in sync
Lightning
An integrated calendar for Thunderbird

RSSOwl

If you prefer RSSOwl over liferea, first install RSSOwl to /opt/rssowl/ and do as follows:

$ cd /opt/rssowl/xulrunner/
$ chmod 755 $(file * | grep executable | sed 's/:.*//')
$ ./xulrunner --register-user
./xulrunner-bin: error while loading shared libraries: libhunspell-1.2.so.0: cannot open shared object file: No such file or directory
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libhunspell-1.4.so.0 /usr/lib/x86_64-linux-gnu/libhunspell-1.2.so.0

Now, you should be able to start RSSOwl as follows:

$ cd /opt/rssowl/
$ ./RSSOwl

Debian issues

No sound on headphones

Automount CIFS error 101

If you have an error 101 when automounting CIFS shares, it is likely because the Network Manager is started after the network shares are mounted. To fix it, add noauto to your /etc/fstab:

//servername/sharename /media/windowsshare cifs noauto,credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 

And add this script to your /etc/NetworkManager/dispatcher.d/ directory:

#!/bin/bash
#/etc/NetworkManager/dispatcher.d/mount-my-cifs
case "$2" in
    up)
        mount /media/syno_home
    ;;
    down)
        umount /media/syno_home
    ;;
esac

aptitude update error: method driver /usr/lib/apt/methods/https could not be found

When trying to update with aptitude update, if you're stuck with the following error:

$ sudo aptitude update 
Ign http://mirrors.online.net jessie InRelease
Hit http://mirrors.online.net jessie Release.gpg                                                                      
Hit http://mirrors.online.net jessie Release                                                                          
Hit http://security.debian.org jessie/updates InRelease                                                               
Hit http://packages.prosody.im jessie InRelease
16% [Waiting for headers] [Waiting for headers]E: The method driver /usr/lib/apt/methods/https could not be found.

You may need to install the apt-transport-https package:

$ sudo aptitude install apt-transport-https

apt may be broken and in this case, won't install the package. You can then install it manually (go to this page to get the most updated link):

$ wget http://ftp.us.debian.org/debian/pool/main/a/apt/apt-transport-https_1.0.9.8.3_amd64.deb
$ sudo dpkg -i apt-transport-https_1.0.9.8.3_amd64.deb

It should fix the error and you should now be able to update and upgrade.

Impossible to read SD CARD

$ sudo aptitude install exfat-utils

Webex

To make webex work natively on Debian 64 bit, do the following:

Identify missing libraries:

$ ldd ~/.webex/1524/*.so | grep 'not found'
    libXmu.so.6 => not found
    libjawt.so => not found
    libjawt.so => not found
    libXmu.so.6 => not found

$ apt-file search libXmu.so.6
libxmu6: /usr/lib/x86_64-linux-gnu/libXmu.so.6
libxmu6: /usr/lib/x86_64-linux-gnu/libXmu.so.6.2.0

Install missing libraries (i386):

$ sudo aptitude install libxmu6:i386

VLC

In order to open media with VLC directly from a samba share, do as follows:

$ grep -A9 "\[smb\]" ~/.config/vlc/vlcrc 
[smb] # SMB input

# SMB user name (string)
smb-user=****************

# SMB password (string)
smb-pwd=****************

# SMB domain (string)
#smb-domain=

MATE Desktop environment

No volume icon

If you have no sound and the volume icon is not shown in the panel, install the following package:

$ sudo aptitude install pulseaudio

Lock screen

If you need to add a custom shortcut to lock the screen, here is the command you need:

xdg-screensaver lock

Hide icons from the desktop

To hide the icons on the desktop, choose 1 of the below methods:

dconf-editor mate-tweak
  • Download dconf-editor:
$ sudo aptitude install dconf-editor
  • Open dconf-editor and go to org > mate > caja > desktop. Modify values as follows:

  • Download mate-tweak:
$ sudo aptitude install mate-tweak
  • Open mate-tweak from the Control Center and modify values as follows:

Subcategories

This category has only the following subcategory.