You are here

Linux

security.debian.org timing out during apt-get/aptitude updates

Submitted by Druss on Fri, 2016-09-09 02:23

On a fresh Debian 8 (Jessie) install, I found that I couldn't update the package repository using apt because security.debian.org was always timing out. While I initially thought this was because of a mirroring issue oslt, it turns out that it's because I was trying to access it via the IPV6 that my VPS was using. Turns out that the fix is reasonably straightforward. You simply tell apt not to bother with ipv6 and simply use ipv4 … like so:

echo 'Acquire::ForceIPv4 "true";' >> /etc/apt/apt.conf.d/99force-ipv4

MongoDB on Linux with pecl "configure: error: Cannot find OpenSSL's libraries"

Submitted by Druss on Sun, 2015-12-06 21:29

Edit: Skip this and scroll down for a proper fix!

Just tried installing MongoDB support for PHP on Kubuntu 15.10 via pecl and ran into the following error message which caused the installation to fail:

configure: error: Cannot find OpenSSL's libraries

While this can probably be fixed using some magickery, in my case, I did not want SSL support on a dev server. I just wanted to get the fucker up and running. To this end, I discovered that the issue was that I was using:

Kubuntu 15.10 / KDE not automounting partitions

Submitted by Druss on Tue, 2015-12-01 19:42

So I upgraded my Linux box to the latest Kubuntu 15.10 (Wily Werewolf!) and it's been an interesting few days ironing out niggles. One of them has been the missing partition manager icon which (IIRC) was present in 14.04 and where I could control which partitions were automounted at login. From the looks of it, there is no easy solution for this like installing a package or some weird Plasma widget. The only solution I was provided on IRC was the following roundabout-borderline-hack:

Installing a fresh copy of a program under Wine

Submitted by Druss on Thu, 2015-10-22 00:34

So here I was happy with my installation of program foo.exe under Wine in Linux (Kubuntu if you must know). All of a sudden, the program starts whining a little, wobbling a touch, and generally exhibiting wonky tendencies. While I could have uninstalled it and tried to reinstall it to see if that fixes the problem, there's a neater solution that is only available for Wine users.

Joining multiple PDFs together on Linux

Submitted by Druss on Wed, 2015-08-26 22:44

A quick and easy way to join or merge multiple PDFs together on Linux (Kubuntu 14.10):

pdfunite toc.pdf chapter1.pdf chapter2.pdf  book.pdf

This doesn't resample pages or any other nonsense like that either :) pdfunite is provided by the poppler-utils package which should already be installed.

If you want to do the opposite, i.e. split a unified PDF file into multiple ones, poppler-utils also provides the aptly named pdfseparate.

Hope this helps :)

Sed: invalid reference \1 on `s' command's RHS

Submitted by Druss on Mon, 2015-07-06 13:46

If you see something like the following error message when you run a sed command:

invalid reference \1 on `s' command's RHS

then it (probably) means that your regex capture group has not been escaped properly.

So, if you are using a command like:

sed "s/foo(bar)[123]/baz\1/"

then it needs to be escaped like so:

sed "s/foo\(bar\)[123]/baz\1/"

In other words, round parentheses/brackets need to be escaped while the square brackets do not :|

Mouse Marks: Weird red marks on screen when pressing the Windows Meta Key and Shift

Submitted by Druss on Fri, 2015-03-20 18:36

For the last few weeks, I've noticed weird red dots/lines or similar marks on my Kubuntu screen. I'd attributed them to a graphics issue that I'd recently sorted out, particularly because I was mainly noticing these marks when resuming the system from sleep mode. Turns out I was wrong. Very wrong.

Resuming after sleep mode, terminating/hanging up a frozen SSH session in Linux

Submitted by Druss on Fri, 2015-03-20 11:55

So, I am often SSH'd into a remote server from my Kubuntu desktop. I also rarely switch off my desktop and prefer to just hit sleep instead. One of the things that can be annoying when I resume the desktop is that the previous SSH session is now unresponsive/frozen as SSH believes that it is still connected to the remote server while the server has given up on the old session long ago. No amount of CTRL + C or CTRL + Z banging is going to terminate the session which can take an inordinately long wait to time out.

Kubuntu: Audio plays in the wrong tty/terminal

Submitted by Druss on Thu, 2015-03-05 01:18

This has happened to me on a number of occasions where I've found that my system audio only plays when I switch to a different tty. I don't know exactly how to duplicate the issue . But essentially, if I switch from my Kubuntu 14.10 KDE desktop to a different tty (using something like CtrlAltF5) and then switch back to the KDE tty, I find that I can hear no audio. However, if I switch again to the command-line tty, I can hear that audio that ought to have been playing in KDE. Rather weird, huh?

Typing an ellipsis and other exotic characters in KDE/Kubuntu

Submitted by Druss on Wed, 2015-02-18 20:11

I can sometimes be rather picky (some would say 'anal') when I write, for example, an e-mail. I get annoyed if I have to resort to typing three periods for an ellipsis rather than achieving it with just the one character. Doing something with one character instead of three is also a skill that has carved itself a niche in this age of Twitter. So how would one go about it?

Pages

Subscribe to RSS - Linux