The Linux Page

How to only upgrade packages with a security requirement in Ubuntu/Debian?

Today I wanted to upgrade some packages that had security issues. Ubuntu (like Debian) provides the apt-get tool that allows you to do upgrades the easy way:

sudo apt-get upgrade

However, that upgrades all the packages present. In some cases, you may want to skip on some packages because you know they are not ready (i.e. your own packages).

In order to only upgrade security issues, you want to get a list of packages that are to be upgraded for security issues:

apt-get -s dist-upgrade | grep "^Inst" | grep -i securi

That apt-get command line lists all the packages ready for ...

xhtml2pdf generating an error under 14.04+

Note: This bug is fixed in Ubuntu 16.04

Working on a website I have to convert invoices to PDF so end users have the ability to print and share the invoices from the website.

In order to do that, I generate an HTML page with the invoice which also gets displayed in the website, and then convert that HTML to PDF with xhtml2pdf. I use that tool instead of whtmltopdf because it does not require X11 to work. The other tool is said to require Qt and X11 and we do not want those things on our backend servers.

So... I upgraded to 14.04 and the tool stopped working with an ugly error:

 ...

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

As I upgrade to 14.04, I started seeing this error in my console:

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Quite cryptic if you ask me, but the "leaking memory" did sound bad.

The error would in particular appear when I used sudo for whatever reason, for example:

sudo iptables -L -nvx

So... something to do with sudo?

I found the answer on the Ubuntu forum. The solution is to turn off a feature of samba. Run the samba setup tool in your console:

sudo pam-auth-update

That opens a curses window in your console. You should then see an option ...

Update to Ubuntu 14.04, huge problems with the display!

Oka, so today I finally got the chance to upgrade to Ubuntu 14.04, hopefully soon to 14.10 too.

I have to say that in general, it looks like they've done a good job as things seem to work better...

However, the display setup got lost. My HP 2509m monitor is connected through a KVM and because of that, it does not always work as expected. That is, the nVidia card does not get to read the monitor information. It took me a while, but I found a way to fix the problem.

First of all I connected the monitor directly to my computer. That gave me the ability to change the resolution to 1920x1080 ...

Cannot connect my Host system to Cassandra running on my Guest VM

I found a different way which is to use the:
Local Network or Host-only Network on your Virtual Machine

Today I did my first full install of Snap on a VM in my Ubuntu development system that runs VirtualBox.

This took me about 1h between getting all the files ready from our own APT repository, and then finding out all the setups needed (we have a few working installations, but we added all the necessary magic with time and did not clearly document all the steps yet... argh! so much to do!)

At some point, I wanted to setup the "domains" and "websites" tables on the VM. ...

Performance Monitor under MS-Windows

I recalled reading somewhere that you could see the performance of NVidia cards under MS-Windows. Looking around I could not really see how that would be done. Today, though, I found out that perfmon does it all!

To start perfmon, click on your Start button and enter perfmon and click Run. You may also start it from a command line although perfmon is a graphical tool.

Once in there, click on ":Performance Monitor", it should appear under Monitoring Tools.

That won't give you the GPU information though, not by default.

When you right click on the area with the graph, you see ...

CRON Drupal says "HTTP/1.0 302 Found" about "/cgi-bin/ipdiags.ha" (AT&T U-Verse)

I run a few Drupal website and once per hour I run the cron.php script. I do it only once per hour because nothing changes so often on my websites so it would require faster refreshes.

Once in a while (relatively rarely now) I get a list of errors from CRON saying that the checks failed. The errors look something like this:

HTTP/1.0 302 Found
Location: /cgi-bin/ipdiags.ha
Pragma: no-cache
Content-Type: text/html

<html><meta http-equiv=Refresh content=0;url=/cgi-bin/ipdiags.ha>
<body></body></html>

As you can see, this is a 302 so a temporary error. ...

Right Alt key not working at all, why?

It has been a while that my right Alt key acted as the Level3 key instead of a right Alt key. I never cared for the AltGr on my QUERTY keyboard, but it kept popping up as the Level3 key even though I clearly removed that option in the keyboard settings under /etc/default/keyboard

XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
#XKBOPTIONS="lv3:ralt_switch"
XKBOPTIONS="compose:caps"

I commented out the level3 definition and instead put "compose:caps" which makes my CAPS Lock key work as a compose key (i.e. if you press ...

Display a line number in a table (i.e. subform of records)

I was ask by a customer to add line numbers to each entry in a table shown in an invoice.

The concept is pretty simple, but really, how do you do that properly in MS-Access?

Microsoft actually has a solution (see link below) and it comes down to writing a function that counts the number of items from that item's current position to the beginning of the table (i.e. going backward). It works, it is just really bad if you have very large invoices since it will tend to slow down as you start getting many items.

There is the function, we can see the counting in the do until near the end ...

[ODBC Driver Manager] Data source name not found and no default driver specified

As I was working on a MS-Windows installation, I ran in this weird error: Data source not found and no default driver specified...

This was output when I was running the following in a command line prompt:

osql -E

The result should have been an MSSQL prompt instead!

The problem on the computer was that I uninstalled MSSQL 2005 that was automatically installed by Visual Studio C++ and was not compatible with our application, so I first uninstalled that but that uninstallation is really not proper. It leaves a LOT of things behind.

After that I installed MSSQL 2014 which was reported as ...