Posts tagged: debian

Install Netbeans on Debian Stable

2017-05-11 20:48:32 ][ Tags: java debian

Netbeans is a great open source Java IDE. For some reason it is missing from the current stable repository on debian. In order to get it installed as a regular desktop application in Debian Jessie (using GNOME) you should do the following:

  1. JDK 8 is required in order to use netbeans. The default-jdk package on Jessie installs jdk7. First you must enable debian backportsand then you You can install it with sudo apt install -t jessie-backports openjdk-8-jdk
  2. Download the latest version from the releases page. There are a couple different flavors. I usually choose the one that contains everything. This will download a bash installer script.
  3. Open up a terminal and navigate to wherever you downloaded the script from Step 2. Execute the script with sh netbeans*.sh
  4. This will run some pre-flight checks and then fire up an installation wizard that will guide you through the rest of the process.
  5. Once Netbeans has been installed you can launch it by clicking on the icon that should now be on your desktop.

Anjuta "You must have libtool installed"

2017-05-09 18:35:00 ][ Tags: debian gnu

Anjuta is an excellent IDE specifically when it comes to writing applications for GNOME. On Debian stable, there seems to be a bug having to do with a missing dependency. When you create a project for the first time using the new project wizard and then try to execute it; Anjuta will complain that you must have libtool installed. I already have libtool installed, but it is looking specifically for some tools found in the libtool-bin package. Installing this package resolves the issue.

sudo apt-get install libtool-bin

Help Out With Packages You Use in Debian

2017-05-03 20:31:13 ][ Tags: debian

Many new and existing Debian users want to help make the distribution  better but do not quite know where to begin. Debian comes with a very handy package called how-can-i-help which tells you after each apt invocation the current bugs that are associated with packages on your system. The "Work-Needing and Perspective Packages" (WNPP) listing is a bit overwhelming for new contributors. What better way to figure out what packages need your help than by seeing a list of them each time you use apt.

The first time you run apt after installing this package it will likely spit out a long list of packages that need your help. Each subsequent time it will only show new packages or changes. In order to see the master list again you can use the how-can-i-help --old command to see all packages that need your help. I think this is a great way to get engaged with the software that you rely on each day.

Although getting started with Debian development is not trivial, this lowers the barrier a bit and provides some clear direction on what to work on since the list includes packages that you are using every day.

Using Owncloud Client for Nextcloud Server on Debian Stable

2017-05-02 23:33:48 ][ Tags: debian

There is no official debian package for the nextcloud client. There have been a handful of RFP bugs reported but it looks like no one has taken this on yet. I want to get more involved with debian packaging so this might be a great first package to maintain. For the time being, the owncloud client is still backwards compatible with nextcloud. Unfortunately, the version that ships with Debian stable (8, jessie at the time of writing) is a bit old. When I tried to connect to my nextcloud instance it complained that my password was incorrect. Luckily, there is a slightly newer version available in jessie-backports  which has no trouble connecting to nextcloud. The steps to get a working version of owncloud-client to work with the latest stable version of Nextcloud are as follows:

  1. If you have not already, enable jessie-backports
    1. Open up /etc/apt/sources.list
    2. Append deb http://ftp.debian.org/debian jessie-backports main to that file.
  2. Run sudo apt-get update
  3. Install the latest version of owncloud-client with sudo apt-get install -t jessie-backports owncloud-client

You should now be able to connect to nextcloud without any issues.

Change the Default Terminal Editor in Debian

2017-04-28 13:49:31 ][ Tags: debian

Debian comes with a very handy utility called update-alternatives that helps to set default tools for various tasks.

It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice for an editor to invoke if the user has not specified a particular preference.

On Linode, it seems that the default editor is nano, I prefer to use vim for editing git commits, visudo, and other things that use the default editor which is symbolically linked through /usr/bin/editor. The update-alternatives package basically changes the symbolic links for you. In order to change your default editor, you simply need to run the following command:

sudo update-alternatives --config editor

The output of this command is shown below. You will see a list of all of your editors that you currently have installed and will be asked to make a choice.

There are 3 choices for the alternative editor (providing /usr/bin/editor).

Selection Path Priority Status
 0 /bin/nano 40 auto mode
 1 /bin/nano 40 manual mode
 2 /usr/bin/vim.basic 30 manual mode
* 3 /usr/bin/vim.tiny 10 manual mode

Press enter to keep the current choice[*], or type selection number:

Behind the scenes you can see that all this does it updates the symbolic links.

levlaz@dev:~$ ls -al /usr/bin/editor
lrwxrwxrwx 1 root root 24 Feb 10 20:49 /usr/bin/editor -> /etc/alternatives/editor
levlaz@dev:~$ ls -al /etc/alternatives/editor
lrwxrwxrwx 1 root root 17 Apr 28 18:56 /etc/alternatives/editor -> /usr/bin/vim.tiny

There are many other things that can be configured this way. For more information reading the man page for update-alternatives is worthwhile.

Installing LXQt on Debian Testing

2016-07-10 22:30:50 ][ Tags: debian


Ever since I read about the merger of LXDE and Razor-Qt into the LXQt project I have been patiently waiting for it to be available on Debian. Razor-QT was a beautiful, clean, and fast desktop environment, and LXDE has always been my go to choice for low power hardware. I have tried installing LXQt a few times in the past running sid, but the experience was never as good as I would have liked it to be. This weekend I finally got a chance to install it with the latest version of Debian Testing, and I am excited to announce that its wonderful. I have been growing disillusioned with the state of the Linux Desktop for a while now. Back in the GNOME2 days I could always count on my Linux Desktop being as fast, responsive, and sane. But GNOME3, Unity, and even KDE 5 feel clunky and slow (especially in a Virtual Machine). I want my Desktop Environment to get out of my way and let me do my work, and LXQt lets me do just that.


Installation is pretty straight forward. I would recommend starting fresh, and install Debian Testing "standard" (i.e. no Desktop Environment at all). Once you have gone through the regular installation process, you should find yourself in a shell. Install xorg and lxqt with the following commands:
apt update
apt install xorg lxqt -y
This may take a while, but once this process is complete you can reboot and you will find yourself in a beautiful, modern, fast, and productive desktop environment.

Post Installation

You will find yourself in a pretty bare bones environment. I would suggest installing firefox, emacs (or whatever other text editor you like), a mail client (check out Sylpheed), Dropbox, and LibreOffice.

Parting Thoughts

My absolute favorite part of LXQt so far is that it comes with the awesome qterminal application which has simple horizontal and vertical splitting similar to iTerm2. This is the first time that I have been exposed to this emulator and I love it so far. Kudos to the LXQt team for an amazing release, and thank you to the Debian maintainers for packaging this up nicely. I am looking forward to continue to see LXQt improve. If you are looking for a fast, traditional desktop experience, I would highly recommend giving LXQt a try.

Installing the Latest Version of Eclipse IDE (Mars) in Debian

2015-09-01 18:21:06 ][ Tags: debian

The version of Eclipse that currently comes in Debian (even in “Unstable”) is pretty old. There have been tons of awesome development in this kitchen sink IDE over the last few years. Luckily, installing the latest version of Eclipse in Debian manually is not that difficult.

  1. Download the latest release form the release page. There are a bunch of different versions that are tailored for Java, C/C++, PHP, developers along with other use cases. The one you pick does not really matter since you can install any features you want in any of these versions. Picking the Java one is a sensible default.
  2. Once you have downloaded Eclipse, navigate to the Downloads folder in a terminal and untar it. tar xf eclipse*.tar.gz

  3. Move eclipse to the /opt directory Opt is where things that are not installed by your package manager are “supposed to go”. I usually throw things in there. sudo mv eclipse /opt

  4. Create a symbolic link to make launching eclipse a breeze. sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

  5. You can now launch eclipse by typing eclipse in a terminal window.

  6. The last (optional) step is to make a Desktop Icon. Create a file called eclipse.desktop in /usr/share/applications The file should look something like this: sudo vim /usr/share/applications/eclipse.desktop

    [Desktop Entry] Name=Eclipse IDE Comment=Java Integrated Development Environment Exec=/usr/local/bin/eclipse Terminal=false Icon=/opt/eclipse/icon.xpm Type=Application Categories=Development;IDE

Save this file and you will see Eclipse IDE show up in your list of installed applications. Click on it and you are now all set to use the latest version of Eclipse. Nice work! Now that you have Eclipse installed, you should check out Java: The Complete Reference to brush up on your Java skills or learn some new ones.

Using Virt-Manager on Debian

2015-08-15 18:15:30 ][ Tags: debian

Virt-Manager is an awesome front end for running QEMU VMs on top of KVM. This is a great alternative to VirutalBox and since the latest version of Virtualbox has been moved to the “contrib” section in Debian (due to a non-free compiler that is required to builds the BIOS) it is one of the only 100% free software GUIs for managing virtual machines. To get virt-manager working debian you will need the following:

apt-get install qemu-kvm libvirt-bin virt-manager

Even though the [Debian Doc] states that adding your user to the kvm and libvirt groups will allow you to create Virtual Machines, when you try to do so you may be confrtonted with an error message that reads:

Could not access KVM kernel module: Permission denied failed to initialize KVM: Permission denied

This makes this application fairly useless so lets get this fixed. The problem is that libvirtd starts qemu with whichever user:group is defined in /etc/libvirtr/qemu.conf 1 by default this is nobody so this is why the error message occurs. In order to fix this, edit this file and add your username and group to this file. The file should end up looking something like this:

# The user for QEMU processes run by the system instance. It can be 215 # specified as a user name or as a user id. The qemu driver will try to 216 # parse this value first as a name and then, if the name doesn't exist, 217 # as a user id. 218 # 219 # Since a sequence of digits is a valid user name, a leading plus sign 220 # can be used to ensure that a user id will not be interpreted as a user 221 # name. 222 # 223 # Some examples of valid values are: 224 # 225 #       user = "qemu"   # A user named "qemu" 226 #       user = "+0"     # Super user (uid=0) 227 #       user = "100"    # A user named "100" or a user with uid=100 228 # 229 #user = "root" 230 user = "username" 231 # The group for QEMU processes run by the system instance. It can be 232 # specified in a similar way to user. 233 #group = "root" 234 group = "groupname"

After this, restart the libvirtd service and you will be able to create virtual machines with virt-manager.

systemctl restart libvirtd.service

References:\ 1https://github.com/voidlinux/void-packages/issues/1095

Installing Powerline in Debian

2015-06-18 17:52:15 ][ Tags: debian

Powerline is an awesome status bar that tells you additional information about various things in bash, vim, and tmux. It comes in handy and makes your terminal look sweet. It is a little bit of a PITA to install, but it is totally worth it. I got most of the way there with this very helpful Stack Overflow answer. But I ran into an issue with vim in Debian. I was getting an error telling me that vim needs to be compiled with python support in order for powerline to work. This seemed silly to me because you should not have to recompile vim in order to use this little plugin. Luckily the solution was easy. There are like 20 different vim packages in debian. The default vim package gives you a bare bones vim install. In order to take advantage of this plugin and other goodies you should install the vim-nox package. In order to install powerline in debian you should do the following. This will install everything system wide.

  1. Install pre requisites

    sudo apt-get install vim-nox git python-pip
  2. Install Powerline

    sudo pip install git+git://github.com/Lokaltog/powerline
  3. Install the required fonts

    wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf wget https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf sudo mv PowerlineSymbols.otf /usr/share/fonts/ sudo fc-cache -vf sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/
  4. Add the following to your \~/.vimrc

    set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/  " Always show statusline set laststatus=2  " Use 256 colours (Use this setting only if your terminal supports 256 colours) set t_Co=256
  5. Add the following to your \~/.bashrc

    if [ -f /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh ]; then source /usr/local/lib/python2.7/dist-packages/powerline/bindings/bash/powerline.sh fi
  6. Add the following to your \~/.tmux.conf

    source /usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf set-option -g default-terminal "screen-256color"

Restart your terminal and you should see powerline working now. Open up vim and prepare to be amazed.

Debian LXDE hide other menu directory

2015-01-07 01:43:13 ][ Tags: debian

LXDE is an awesome, light weight, and customizable desktop environment that gets out of your way and lets you get to work! By default in Debian, the LXDE menu has an “Other” category which is filled with a whole bunch of stuff that does not fall into any other category. In my opinion this option is useless and just adds more clutter to an otherwise clean desktop environment. I found an easy way to get rid of this menu item that is a bit hacky but gets the job done. Basically, we are just going to comment out the entire menu item in the configuration file. The configuration file lives in /etc/xdg/menus/lxde-applications.menu Find this file, and locate the part that refers to the Other directory. Then proceed to comment the entire thing out. The end result should look like this:

137     <!-- Other  138     <Menu> 139         <Name>Other</Name> 140         <Directory>lxde-other.directory</Directory> 141         <OnlyUnallocated/> 142         <Include> 143             <And> 144                 <Not><Category>Core</Category></Not> 145                 <Not><Category>Settings</Category></Not> 146                 <Not><Category>Screensaver</Category></Not> 147             </And> 148         </Include> 149         </Menu> End Other -->

Once you save this file, this menu item will be gone and you will have a nice clean Menu.

Built in PDF Magic in Debian

2014-11-30 01:35:44 ][ Tags: debian

Debian has some awesome PDF tools built right in via the poppler-utils package that I never knew about. In my previous post I talked about how to make beautiful documents with code snippets using various Sublime Text extensions to convert markdown into PDF. One issue that I ran into was getting a cover page created. As far as I know There is really no easy way to make a nice cover page in markdown. Specifically in Github Flavored Markdown (which is what I am using) there is not a good way to make a page break. The easy solution would be to simple write up your entire document in Markdown, and then make a separate cover page. The problem is how to merge these two files together to make one document. Thanks to the built in PDF tools in debian this becomes very simple! The poppler-utils package has the following utilities built in:

In order to combine a coverpage with another document we can simple run the following command inside a terminal.
pdfunite coverpage.pdf content.pdf final.pdf
This will create a document called final.pdf (of course you should change coverpage.pdf and content.pdf to match your actual files). Warning: be sure to include the final output file or pdfunite will replace the last file that you type will all over the previous files!