Show/hold/unhold packages

Sometimes, for various reasons not covered in this post, you may need to stop a package/program from upgrading to a later version. Here’s how to do it. In these examples I’ll use teamviewer as the package. Obviously you need to change the package name to suit you!

To hold a package:

sudo apt-mark hold teamviewer

To show held packages:

sudo apt-mark showhold

To unhold a package (allow it to install to latest version):

sudo apt-mark unhold teamviewer

TypeCatcher for Google webfonts

TypeCatcher is a font manager with which you can search, browse, and download Google webfonts to use offline on your Linux workstation or in your website. It is created by Andrew and licensed under the GPL 3.0 and runs natively on any Debian-based distributions.

To install TypeCatcher and add it to your repository type these three commands into a terminal, one at a time :

  • sudo add-apt-repository ppa:andrewsomething/typecatcher
  • sudo apt-get update
  • sudo apt-get install typecatcher

Download videos from YouTube

Youtube-dl is a brilliant small command-line program (for Linux) which enables quick and simple downloading of videos from YouTube and a several more sites (eg Facebook, Twitter, Vimeo, NBC, ABC, CNN, FOX NEWS, etc, see supported sites). It can even convert the videos to MP3’s within a single command.

To install

If you’re running MX-21, or other recent Debian-based operating systems, youtube-dl will be in their repository. To install, open a Terminal and type (or copy and paste):

sudo apt install youtube-dl

Yes, that’s it! You can start to download those videos now.

OR if it’s not in your repository, you should download directly from youtube-dl’s repository. Open a terminal and type and execute the following command (you can copy and paste), then press Enter:

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

Then execute this command in your Terminal (to grant you permission to use it):

sudo chmod a+rx /usr/local/bin/youtube-dl

Downloading videos with youtube-dl

Youtube-dl is now installed on your system and you can download a video from YouTube (or elsewhere) by typing youtube-dl in a terminal, followed by a space and then the URL of the video. For example:

youtube-dl https://www.youtube.com/watch?v=3JdABGVooko

You will find the resulting video in whichever directory your terminal was in when you downloaded it, which, if you’ve just opened your terminal, will usually be your home folder. If you want to download a film directly into your Videos directory, you should change the directory in your terminal (eg:cd Videos) before downloading.

Convert YouTube videos to audio on-the-fly

If you want to extract the audio from a YouTube video in the form of an mp3, you can do this while downloading by adding a few options within the command. For example:

youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=f0LUh2TK-fs

Updating youtube-dl . . . very important!

Because of the way it installs independently, youtube-dl does not update along with other programs in your system. You will know when it needs updating because it will error when you try to use it to download a video from YouTube !! Remember this!! However, updating is simple. Just type sudo youtube-dl -U in your terminal and it should be fixed.

Be careful – case is very important when using the Terminal: -U and -u will do very different things!

Download an entire YouTube Playlist and convert it to MP3 tracks

And this is amazing! The code below will download your chosen playlist from youtube, then strip all the video and convert each track to good quality MP3’s.

Just copy the code into a Terminal, and replace the URL in the code with the URL in the browser address bar of your chosen youtube playlist.

(The mp3 tracks will be saved in whichever directory your Terminal is in, so if you want them to save directly into (for example) your Music folder, you must change the Terminal directory to Musiccd Music before you issue the command.

youtube-dl --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist 'https://www.youtube.com/playlist?list=PLDiay1K7Cfis4lA1Gz1OxFxlzLyCSRL_m

More you-tube-dl options and commands

Youtube-dl is extremely versatile; there are loads of options which can be found at their github page here: https://github.com/ytdl-org/youtube-dl/blob/master/README.md#readme.

How to empty the Trash folder in Roundcube webmail

So you’ve responded to the warning message about your inbox being full; you’ve spent a while deleting old messages and your Inbox is now looking much smaller. But bear in mind that those emails are now lurking in the “Trash” folder, still taking up the same amount of disk space on your server! 

Here’s how to remove them completely to create the extra space you’d been hoping to gain:

1. Log into Roundcube.

2. Click/Select the “Trash” folder.

3. In the bottom left corner of the screen you will see the folder options icon.

4. Click the “Cog” icon to show the “Folder Options” menu. Then select “Empty”.

How to back up your Thunderbird email in Windows 10 and Linux

Mozilla’s Thunderbird is a great email program (we use it!) but it doesn’t have any built in backup tools. If something goes wrong, or you want to move your profile to another computer, you’ll need a backup. 

Windows 10

First of all, make sure Thunderbird is not running.

Open Windows Explorer. In Folder Options, enable “Show Hidden Files, Folder and Drives” .

Then browse to C:\Users\yourloginname\AppData\Roaming, where you will see a folder named Thunderbird.

The Thunderbird folder contains all your Thunderbird settings and address book, as well as all your emails, so it is this folder that you need to copy to your external drive, desktop, or wherever, as your backup.  It’s likely to be a very large amount of data so expect it to take a long time!

When you’re done, don’t forget to disable the hidden files view in Windows Explorer by selecting “Don’t Show Hidden Files, Folder and Drives”.

Linux

Make sure that Thunderbird is not running.

Open File Manager (Thunar). Select “Show Hidden Files” from View in the menu bar (or use keyboard combination Ctrl +H) .

In your Home directory (usually your name) look for a hidden directory named .thunderbird (the preceeding dot is part of the directory name and signifies that the directory is hidden) . This is where all your emails, address book and configuration files are stored. It is this directory that you need to copy to your external drive or wherever you want to store your backup. Expect it to take quite a while – it is likely to be a large amount of data.

When you’re done, don’t forget to disable the hidden files view in your File Manager by deselecting “Show Hidden Files” from View in the menu bar (or use keyboard combination Ctrl +H) .

Playing DVD’s in MX-Linux

Assuming that your DVD drive is in working order, it will almost certainly be recognised when inserting a data disc into it. However, it may need a couple of tweaks to enable it to play a DVD movie.

Install codecs to help with the translation of the video media:
This is made very easy using MX-Tools. Click the “Whisker” icon in the bottom-left of your screen and type “Mx tools” in the search bar under your name. In the “Setup” section you will see “Codex Installer”. Click this to run it, enter your “root” password and click OK to accept legal responsibility for this non-opensource package. You only need to install the codex’s once).

Open VLC player
Then click “Media” and choose “Open Disk” from the list. This should open your DVD.

However, if it throws an error, open your file manager. You should see the name of the disk in the left column. Double-click it and in the right column you will see a couple of folders:

Drag the VIDEO_TS folder into the VLC window.

To automatically open DVD movie videos with VLC when you insert them

Open the Whisker-Menu (bottom left of your screen)
Choose Settings -> Removable Drives and Media
-> Tab: Multimedia
-> Video CDs/DVDs:
Click to enable: “Play video CDs and DVD’s when inserted
-> Command: vlc %d
-> Click Close
The above settings will make open VLC automatically on inserting VideoDVD and start playing the Video in VLC.

If you’re still having problems, this 3-page MX-Linux forum thread may provide the help you need: https://forum.mxlinux.org/viewtopic.php?t=47421

Skype Alternative(s) – Update

We recently discovered this great free alternative to Skype which doesn’t need to be installed on your system.  You can access it directly on the web at https://whereby.com.  You can have video conversations with up to 4 people at once and guests to your “room” don’t have to register to join in.

It takes less than a minute to create your room and share the link with someone you want to join you for a video chat.

I suggest you “claim” your room by registering;  this allows you to “lock” your room to stop non-invitees from joining; it also reserves the room for you so that no-one else can claim it. There’s lots of information on their site but essentially it’s a very quick and easy process.

Update: Zoom (https://zoom.us/)

Zoom is a great replacement, not only for Skype, for also for TeamViewer as it can also allow secure remote access for help with your computer!

You need to create and maintain an account via zoom’s web portal. Then you download the app (https://zoom.us/download) and install it into your system – very easy!  The advantage of running the program from your system instead of the via web is that it is much faster than the http(s) protocol, so video and audio work better with less break up.

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.