Tips & Tricks

Although we’re in the business of helping organisations make the most of technology, we recognise that you may sometimes encounter issues which you’d like to deal with yourself, if only you could find useful documentation to guide you.

Documentation on almost everything exists on the internet, the problem is finding what you want; searching can be effective but what we hope to provide here is easy access to guidance to achieve useful tasks.

We are keen to expand this by adding information that is useful to our clients. Sometimes we write a howto, other times we provide links to good sources.

If you don’t find help on a particular issue that concerns you, by all means drop us an email and we’ll try to point you in the right direction.

——————————————————————————————————————–

Accessing Android phone media in Debian

To get Debian to communicate with your Android phone so that you can download/backup your photos, videos, documents, etc onto your computer, you need to install a couple of packages. Open a Terminal and type:

sudo apt-get install jmtpfs gvfs-backends

Make sure when you connect your phone to your PC that (on your phone)  you choose Media device (MTP), not Carera (PTP).

You should now be able to access media on the device by just clicking it on Thunar (file manager).

Don’t forget to Unmount/Eject the drive in Thunar BEFORE removing the USB cable, in the same way you would do with a USB stick.

How to resize/convert images in Debian using ImageMagick

ImageMagick is a powerful image manipulator, best used in a terminal in Linux.

For complete instructions see:  http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/

In brief, for width (preserving the aspect ratio) (change the 200 for your desired width in pixels):

convert example.png -resize 200 example.png

for height (still preserving the aspect ratio):

convert example.png -resize x100 example.png

It is also possible (and easy) to process several images at the same time. For example, the following command would take all PNG files in the current directory, give the all a width of 600px and save a new copy of each with “-600px” added to the beginning of each file name. The directory will now contain the old and the new image files.

for file in *.png; do convert $file -resize 600 600px-$file; done

For complete instructions see:  http://www.howtogeek.com/109369/how-to-quickly-resize-convert-modify-images-from-the-linux-terminal/ (repeated for emphasis!)

See alsoman convert in your terminal or visit http://www.imagemagick.org/Usage/ for a multitude of things that can be done with imagemagick.

Using pacpl to rip CD’s in Debian

First you need to install pacpl. Open a Terminal and type:

sudo apt-get install pacpl

Any dependencies, as usual with Debian, will also be installed.

Ensure that your CD is in the drive, and decide in which directory you want to put the resulting MP3 tracks – I would suggest your Music directory which will probably be /home/[yourname]/Music.  It’s a good idea to create a directory here with the name of the artist, so the files will be put directly into /home/[yourname]/Music/[ArtistsName] as they are copied & ripped.

Then type:

pacpl --rip all --to mp3 --outdir /home/[yourname]/Music/[ArtistsName]

If you want to check the manual, just type:

man pacpl (q to close it)
or
pacpl --longhelp (q to close it)

Updating and Upgrading packages in Debian

Open a Terminal

Firstly you have to update the package list. Type:

sudo apt update

Then, when that has run, you need to upgrade your machine:

sudo apt upgrade

Then to throw the wrapping paper away(!):

sudo apt clean

That’s it, although after a kernel upgrade (ie where a “linux-image” package has been upgraded), it’s a good idea to restart your system so the new kernel can be loaded.