Linux packages

Gabor Szarnyas edited this page Aug 17, 2018 · 40 revisions

Tools

Basic packages

sudo apt-get update
### ssh
sudo apt-get install -y ssh
### version control and build automation
sudo apt-get install -y git gitk subversion mercurial maven cloc
### configuration
sudo apt-get install -y compizconfig-settings-manager
### system (for formatting USB drives)
sudo apt-get install -y gparted
### text editors & related applications
sudo apt-get install -y mc vim dos2unix
### SSH server and cluster SSH client
sudo apt-get install -y ssh clusterssh zssh
### network
sudo apt-get install -y network-manager-openvpn-gnome curl
### terminal
sudo apt-get install -y guake
### utility
sudo apt-get install -y unrar htop meld xmlstarlet silversearcher-ag graphviz screen tmux
### clipboard utility
sudo apt-get install -y xsel xclip parcellite
### ebook
sudu apt-get install -y fbreader
### file sharing
sudo apt-get install -y dropbox owncloud-client
### media
sudo apt-get install -y vlc
### MySQL
sudo apt-get install -y mysql-server
### misc
sudo apt-get install -y zip unrar p7zip-full pdftk
### graphics and video
sudo apt-get install -y gimp gthumb inkscape ffmpeg
### remote desktop
sudo apt-get install -y remmina remmina-plugin-rdp
### LaTeX
sudo apt-get install -y texlive-full biber
### okular
sudo apt-get install -y okular kdelibs-bin kdelibs5-data kdelibs5-plugins oxygen-icon-theme
### p2p
sudo apt-get install -y qbittorrent
### fun
sudo apt-get install -y sl cowsay xcowsay cmatrix toilet libaa-bin
### pre-16.04, libaa-bin was called aafire
### also, don't forget to install asciiquarium from source and add the command line "wttr applicaiton":
### alias wttr='wget -q -O - "$@" http://wttr.in/
### Microsoft fonts for the brave (it tends not to work with some applications :-))
#sudo apt-get install -y ttf-mscorefonts-installer
### the xml2 R package requires this
sudo apt-get install -y libxml2-dev
### Python
sudo apt-get install -y python-pip python3-pip
### Pandoc
sudo apt-get install -y pandoc

Google Chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable

One-liner:

(wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -) && (sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list') && sudo apt-get update && sudo apt-get install -y google-chrome-stable

Oracle JDK

JDK8:

### prerequisites
sudo apt-get install -y software-properties-common
### on Mint 17.1, do not install software-properties common, instead use
# sudo apt-get install -y mintsources

### accept licenses
sudo bash -c "echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections"

### install
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-java8-installer

One-liner:

sudo apt-get install -y software-properties-common && sudo bash -c "echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections" && sudo add-apt-repository -y ppa:webupd8team/java && sudo apt-get update && sudo apt-get install -y oracle-java8-installer

Some older distributions may require python-software-properties instead of software-properties-common.

To set the JAVA_HOME environment variable, add the following lines to the .bashrc file (setting the PATH variable is optional):

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$PATH:/usr/lib/jvm/java-8-oracle/bin

To install Java 7, just issue:

sudo apt-get install -y oracle-java7-installer

Maven (latest version)

Install it from the binary archive, or use a PPA (https://launchpad.net/~andrei-pozolotin/+archive/ubuntu/maven3).

Dropbox

  • GNOME:

    sudo apt-get install -y nautilus-dropbox
  • Cinnamon:

    sudo apt-get install -y nemo-dropbox
  • MATE:

    sudo apt-get install -y caja-dropbox

Sublime Text

sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install -y sublime-text-installer

There is also a PPA for Sublime Test 2:

sudo add-apt-repository -y ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install -y sublime-text

An install script based on http://www.technoreply.com/how-to-install-sublime-text-2-on-ubuntu-12-04-unity/ for Sublime Text 2

#!/bin/bash

tar xf Sublime\ Text\ 2.0.2\ x64.tar.bz2
sudo mv Sublime\ Text\ 2 /opt/
sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/subl
### create the configuration directory in .config as a regular user
subl
sudo subl /usr/share/applications/subl.desktop
sudo sed -i s/gedit/subl/ /usr/share/applications/defaults.list

exit

### copy this to the subl.desktop file
[Desktop Entry]
Version=1.0
Name=Sublime Text 2
### Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
### From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor

Exec=subl
Terminal=false
Icon=/opt/Sublime Text 2/Icon/48x48/sublime_text.png
Type=Application
Categories=TextEditor;IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow

[NewWindow Shortcut Group]
Name=New Window
Exec=subl -n
TargetEnvironment=Unity

Annotated PDFs

The default Document Viewer application (evince) does not show all PDF annotations correctly. For such documents, use Okular:

sudo apt-get install -y okular

Unfortunately, Okular crashes on non-KDE environments (source: http://askubuntu.com/questions/529907/okular-crashes-ubuntu-14-04). To overcome this, install Okular with the following packages:

sudo apt-get install -y okular kdelibs-bin kdelibs5-data kdelibs5-plugins oxygen-icon-theme

Basic image processing

gThumb (gthumb) is capable of editing images. Open the image end press E. If you use Linux Mint, it is probably already installed. If not, the install script is:

sudo apt-get install -y gthumb

Shutter (Collabshot alternative)

Collabshot does not work on Ubuntu 16.0. An alternative is: Shutter.

sudo apt-get install -y shutter

On older systems, you may use a PPA:

sudo add-apt-repository -y ppa:shutter/ppa
sudo apt-get update
sudo apt-get install -y shutter

Create bootable USB stick to install Windows

UNetbootin

Install and use UNetbootin as described here: http://www.webupd8.org/2010/10/create-bootable-windows-7-usb-drive.html

sudo add-apt-repository -y ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install -y unetbootin

WinUSB

Another, less reliable solution is WinUSB:

sudo add-apt-repository -y ppa:colingille/freshlight
sudo apt-get update
sudo apt-get install -y winusb

To install it on newer systems (Ubuntu 16.04+):

sbt

See the sbt Reference Manual

Gradle

The Gradle included in the Ubuntu APT repository is pretty old, you should use a PPA repository instead:

sudo add-apt-repository -y ppa:cwchien/gradle
sudo apt-get update
sudo apt-get install -y gradle
gradle -v

TeXstudio

sudo add-apt-repository -y ppa:blahota/texstudio
sudo apt-get update
sudo apt-get install -y texstudio

LibreOffice

If LibreOffice is not installed, use the following command:

sudo apt-get install -y libreoffice libreoffice-gnome

It's important to install the -gnome (or -kde) package as well to have a proper GUI.

ownCloud

For Ubuntu 14.04, based on https://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client

cd /tmp
wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key
sudo apt-key add - < Release.key  
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
sudo apt-get update
sudo apt-get install -y owncloud-client

GUI for version control

If you would to use something similar to TortoiseSVN/TortoiseGit on Windows, use RabbitVCS:

# for the Nemo app in GNOME/Unity
sudo apt-get install -y nemo-rabbitvcs
# for the Nautilus tool in Cinnamon
sudo apt-get install -y rabbitvcs-nautilus

Guake

Guake (https://github.com/Guake/guake) is a Quake-like terminal emulator for the GNOME desktop environment. Guake may not work properly on dual monitor systems, in this case use the solution provided here (http://brightbyte.de/page/Guake_on_the_right_screen):

In short, (as a superuser,) edit the /usr/bin/guake script by replacing the get_final_window_rect method with the following code.

def get_final_window_rect(self):
    """Gets the final size of the main window of guake. The height
    is the window_height property, width is window_width and the
    horizontal alignment is given by window_alignment.
    """
    screen = self.window.get_screen()
    height = self.client.get_int(KEY('/general/window_height'))
    width = 100
    halignment = self.client.get_int(KEY('/general/window_halignment'))

    # future we might create a field to select which monitor you
    # wanna use
    #monitor = 0 # use the left most monitor
    monitor = screen.get_n_monitors() - 1 # use the right most monitor

    monitor_rect = screen.get_monitor_geometry(monitor)
    window_rect = monitor_rect.copy()
    window_rect.height = window_rect.height * height / 100
    window_rect.width = window_rect.width * width / 100

    if width < monitor_rect.width:
        if halignment == ALIGN_CENTER:
            window_rect.x = monitor_rect.x + (monitor_rect.width - window_rect.width) / 2
        elif halignment == ALIGN_LEFT:
            window_rect.x = monitor_rect.x
        elif halignment == ALIGN_RIGHT:
            window_rect.x = monitor_rect.x + monitor_rect.width - window_rect.width

    window_rect.y = monitor_rect.y
    return window_rect

If the above does not work, try this (source: http://askubuntu.com/a/504509).

    def get_final_window_rect(self):
        """Gets the final size of the main window of guake. The height
        is the window_height property, width is window_width and the
        horizontal alignment is given by window_alignment.
        """
        screen = self.window.get_screen()
        height = self.client.get_int(KEY('/general/window_height'))
        width = 100
        halignment = self.client.get_int(KEY('/general/window_halignment'))

        # get the rectangle just from the first/default monitor in the
        # future we might create a field to select which monitor you
        # wanna use
        monitor = 1 # use the right most monitor
        window_rect = screen.get_monitor_geometry(monitor)
        total_width = window_rect.width
        window_rect.height = window_rect.height * height / 100
        window_rect.width = window_rect.width * width / 100

        if width < total_width:
            if halignment == ALIGN_CENTER:
                window_rect.x = (total_width - window_rect.width) / 2
                if monitor == 1:
                        right_window_rect = screen.get_monitor_geometry(0)
                        window_rect.x += right_window_rect.width
            elif halignment == ALIGN_LEFT:
                window_rect.x = 0
            elif halignment == ALIGN_RIGHT:
                window_rect.x = total_width - window_rect.width
        window_rect.y = window_rect.y = 0
        return window_rect

Troubleshooting for Guake:

  • Problem: you have F12 twice to open Guake
  • Solution: go to Guake Preferences, General, Main Window and tick Hide on lose focus.####

IRC clients

HexChat

sudo apt-get install -y hexchat

See also: https://help.ubuntu.com/community/InternetRelayChat

IRSSI

IRSSI is az IRC client for Linux. Install screen, irssi and start them.

First time IRSSI setup: for auto logging, connecting to Freenode and the #drools channel.

/SET autolog ON
/server add -auto -network Freenode irc.freenode.net 8001
/network add -nick <your-nick> Freenode
/network add -autosendcmd "/msg nickserv identify <password> ;wait 2000" Freenode
/channel add -auto #drools Freenode
/save
/quit

From now after starting irssi logging and connecting to #drools on Freenode should be done automatically.

First time Freenode setup, if not done previously:

/set nick <nick>
/set real_name <Real Name>
/connect irc.freenode.net 8001
/msg nickserv REGISTER <password> <email>
/msg NickServ SET HIDEMAIL ON

Remote desktop client (RDP)

Use Remmina with the RDP plugin. You may need to reboot your system to access the plugin. You can list the availabe plugins in Remmina in the Tools | Plugins menu.

Screencasts

SimpleScreenRecorder is an excellent choice for Ubuntu-based systems: http://www.maartenbaert.be/simplescreenrecorder/

sudo add-apt-repository -y ppa:maarten-baert/simplescreenrecorder
sudo apt-get update
sudo apt-get install -y simplescreenrecorder

Asciiquarium

Grab the source of Asciiquarium, untar (tar xf) and follow the readme file.

To install the Term::Animation module, use the following commands (source):

sudo apt-get install libcurses-perl
cd /tmp
wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
tar -zxvf Term-Animation-2.4.tar.gz
cd Term-Animation-2.4/
perl Makefile.PL && make && make test
sudo make install

Troubleshooting R

On Ubuntu 18.04 / R 3.4, many package installs fail with the following error message:

libicui18n.so.52: cannot open shared object file: No such file or directory

Solution:

install.packages("stringi")

Troubleshooting PostgreSQL

Errors:

/usr/lib/postgresql/10/bin/psql: symbol lookup error: /usr/lib/postgresql/10/bin/psql: undefined symbol: PQencryptPasswordConn

or

/usr/local/pgsql/bin/psql: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory

Solution: this is a tricky one. The solution for me was to remove the /usr/local/pgsql directory (to be safe, just rename it first).

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.