noscript noshow

If you're using the firefox extension "noscript", you're probably as annoyed by the forced redirection upon noscript updates as everybody else. Well, look for noscript.firstRunRedirection in about:config, and turn it to false.

Other than that, the noscript author is currently under heavy fire. Rightfully, I think.

Size matters

Last week a friend asked me for help with a rather simple LaTeX problem (he wanted to include an image and rotate it, which you can achieve with the angle option of the \includegraphics command). Of course, you'd find this solution also in the manual of the graphicx package, and I thus recommended to install the texlive documentation. Rather thoughtless, as it turned out. He later informed me that he didn't intend to waste more than 10% of the limited storage capacity of his netbook just for 'fucking manuals'. Hey, I understand! I wouldn't do that myself. ๐Ÿ˜’

However, what I regularly do is to check the size of the package I'm planning to install. All package managers I know offer this possibility. Try for yourself. ๐Ÿ˜‰

Mandriva

urpmq -y <name>
urpmq -i <exact-name>

Debian

wajig search <name>
wajig detail <exact-name>

Arch

pacman -Ss <name>
pacman -Si <exact-name>

Suse

zypper search <name>
zypper info <exact-name>

Most likely, the texlive documentation will turn out to be by far the largest package avaliable for your distribution. On Mandriva, for example, it is 500 MB in size. No, you probably won't want to install this package on a netbook equipped with a 4 GB SSD...

I can get no ... resolution

VirtualBox is getting increasingly popular, and with that, frustrated users of virtual machines having netbook-like screen resolution are getting more and more frequent. That's not really anybody's fault. From version 1.5, Xorg defaults to an automatic, zero-interaction configuration. It's attempting to guess the actual resolution of the connected display at boot time and does not rely on the trusted xorg.conf (which is generated, but contains just a few dummy entries). For a VirtualBox display, anything is possible in terms of resolution, and Xorg thus falls back to a conservative 1280x768.

This whole scenario is not even worth mentioning for experienced users of Linux, but for newcomers, who are not used to edit their xorg.conf, this current situation manifests an unsurmountable problem. Yet, it is really very easy to overcome. All you need to do is a little editing of your xorg.conf. ๐Ÿ˜‰

xorg.conf

Debian Squeeze, Gnome 2.22, Amaranth theme, 1400x1050. ๐Ÿ˜Š

All right, here you have the relevant subsection for copy and paste: ๐Ÿ˜„

Subsection "Display"
    Depth 24
    Modes "1400x1050" "1280x960" "1024x600"
EndSubsection

Adjust the resolution according to your needs. ๐Ÿ˜‰

For experts only

In modern software design, the assumption that users are morons and shouldn't be allowed to do anything with their system tends to get more and more popular. This policy is certainly well-founded and complemented by plenty of experience, but in some cases, the results are at best humorous or just plain bizzare. The best-known example is the warning of firefox upon an about:config request:

This might void your warranty! ๐Ÿ˜

I guess that's intended to be funny. Geek humour or something like that. Seen better, though. And most people find it simply annoying.

This example, however, is nothing compared to what Mandriva does to its users. Undoubtedly, the heart of any Linux distribution is its package management, and the sources (or repositories in Ubuntish) are its veins. In Mandriva, the GUI for configuring the software sources is drakrpm-edit-media:

Updates are greyed out ๐Ÿ˜’

See what I mean? The essential possibility to mark certain sources as "update" is greyed out. Even drakrpm-edit-media --help doesn't provide any helpful hints as to how to change this ... limitation ๐Ÿ˜. That's because it's not a bug but a feature.

drakrpm-edit-media --expert

Now you are an expert.

Search the package

Another short note in the series "useful package-manager commands" ๐Ÿ˜‰ .

Every serious user of Linux has experienced the problem of a missing shared library when compiling the sources of a third-party program. Now, you may know that you'd need lib64xyz.so.n for a successful compilation, but you may not know which (not installed!) package actually contains this particular library.

I know only two package managers which would deliver this information in a straightforward way:

Mandriva:

urpmf <exact_filename>

Debian:

wajig whichpkg <exact_filename>

(this one needs lynx and fping)

In Archlinux, pacman -Qo only searches local packages, as does OpenSuse's pin. ๐Ÿ˜ž

Update 2019-04-24: All major distributions have learned how to do that now. See my corresponding post from today.

Orphans

Modern package management systems do not only update and upgrade our system. They also clean it up. ๐Ÿ˜Š

urpmi:

urpme --auto-orphans

dpkg:

wajig autoremove

pacman:

pacman -Rs $(pacman -Qtdq)

If you know a way how to do that with zypper, yum, and others, tell me. ๐Ÿ˜‰

Presentations: what you want to use

LaTeX! ๐Ÿ˜Š Perhaps you're already using it for publications, reports, and your thesis. Perhaps not. In any case, I believe that LaTeX and the beamer class is the canonical way to prepare presentations under Linux. More importantly, it's a way free of the troubles and limitations which you'll encounter with office programs such as OpenOffice Impress.

If you don't know LaTeX at all, it's of course not an entirely easy way, to say the least. If you have at least some knowledge of LaTeX, however, you'll find the following tutorials helpful: first of all, the official manual of the beamer class, and second, the guide of Ki-Joo Kim.

For me, the decisive advantage of using the beamer class is that I can simply reuse the eps figures I've produced for a previous report or publication. I thus get a presentation of impeccable quality in the most convenient way. Furthermore, I can prepare the presentation with my favored editor, and display it using any pdf viewer (although only Adobe Reader is able to play back the multimedia content you may embed). From the point of view of functionality, it offers all Powerpoint has and more. Delayed display of content, arbitrary pausing, various transitional effects, sound, video, automatic table of contents, navigational bars, bibliographies, a vast array of distinct themes which can be selected with a single command, and, last but no least, zooming into figures. This latter feature is truly awesome, and most vividly shows the value of scalable vector graphics.

Let me comment on a few key points which often stand in the way of a pleasant beamer experience. First of all, most beamer presentations look way overdone and actually detract from the content of the talk. Look at page 164 of the beamer manual for an example. True, many Powerpoint presentations look similar or even worse. However, the audience will spot right away that your's is not made by Powerpoint, and they will take sadistic pleasure of demanding thousands of tiny changes which are all difficult to do with LaTeX. That makes them feel better, you know! ๐Ÿ˜„ Alternatively, they may just mercilessly hack you to pieces for deviating from uniformity. Believe me, I've seen it happening.

My advice is thus: go first for the most plain appearance possible. That's very easy, because it's the default. Even switch off the navigation symbols (the code comes below). Try next to mimic a design which would be common for presentations of your institution (of course, if you have a very fancy corporate identity, you're out of luck ...). Typically this just invokes a logo and a line below the slide title, or other equally simple design elements at certain locations of the slides.

You might wonder now ... isn't that what LaTeX is all about, not having to care about all this stuff? Isn't there, for example, a \logo command, which triggers an automatic positioning of your logo? Yes, you're right. But at the moment we're trying to customize the slides according to your needs. For this customization I rely on the textpos package, which allows a free positioning of text and graphics anywhere on the slide. If you want to automize that later on, you've got to create your own beamer theme. ๐Ÿ˜‰

Here's the example code:

\documentclass[hyperref={pdfpagelabels=false},compress]{beamer}

\usepackage{multimedia}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{epstopdf}
\usepackage{helvet} % everything but Computer Modern

\usepackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}

\mode<presentation>
{ \beamertemplatenavigationsymbolsempty % no navigation bar

% uncomment the four commands below for an example of theming
  %\usetheme{Madrid}
  %\usecolortheme{seagull}
  %\usefonttheme[onlymath]{serif}
  %\useoutertheme{smoothbars}
% uncomment the four commands above for an example of theming

  %\setbeamercovered{transparent}
  \setbeamertemplate{blocks}[rounded][shadow=true]
  \setbeamertemplate{headline}[default] %no headline
}

% title page logo
\pgfdeclareimage[height=2cm]{biglogo}{logo/logo_big}
\newcommand{\MyBigLogo}{%
\begin{textblock}{55}(40,63)
\pgfuseimage{biglogo}
\end{textblock}
}

% logo on all pages except the first
\pgfdeclareimage[height=0.65cm]{logo}{logo/bare_logo_small}
\newcommand{\MyLogo}{%
\begin{textblock}{7}(120.0,0.7) %without mini TOC
%\begin{textblock}{14}(120.0,4.5)
\pgfuseimage{logo}
\end{textblock}
}

% optional bar for use with plain styles (e.g., default, boxes, Boadilla...)
\pgfdeclareimage[height=0.135cm]{bar}{logo/bar}
\newcommand{\MyBar}{%
\begin{textblock}{300}(0,9)
\pgfuseimage{bar}
\end{textblock}
}

\title[Short title]{Long title}
\author[First author]{All authors}
\institute[INST]{}
\date{}
\begin{document}

% Titel
\frame{
  \MyBigLogo
  \frametitle{}
  \titlepage
}

% Inhaltsverzeichnis
\frame{
  \MyBar % comment when using themes with a frame title decoration
  \MyLogo
  \frametitle{Overview}
  \tableofcontents % erzeugt Inhaltsverzeichnis
}

\end{document}

After the first themeless attempts, try some themes. The combination I like is given above, but just find out what you prefer. And once you know how things work, nobody's demands will scare you anymore. ๐Ÿ˜‰

Happy TeXing!

Presentations: what you don't want to use

Fifteen years ago, talks at scientific conferences were exclusively presented with the help of overhead projectors. The slides projected were fabricated by various, and sometimes rudimentary means. Indeed, some people still used handwritten transparencies, which allowed the use of color without the need to purchase a color printer (which were very expensive at that time).

The advent of both inexpensive and performant personal computing as well as affordable video projectors changed this scenario completely. Nowadays, there's one overwhelmingly dominant solution for preparing a scientific presentation: Powerpoint, with the graphs displayed mostly being created by Origin. In (experimental) physics, this combination easily accounts for 95% of all talks. I know Linux users who install Wine for the sole reason of running Powerpoint ...

Not that I can blame them, as it's really convenient. Once you finished the graph in Origin, copy it, and paste it in Powerpoint. Microsoft has introduced an exchange format for vector graphics already with Windows 3.1. This format, despite its shortcomings, allows applications under Windows to seamlessly exchange vector graphics. The graph you just pasted into Powerpoint thus looks as it should also in full-screen presentation mode. The same functionality, by the way, is available when using OpenOffice Impress instead of Powerpoint.

But how's the situation under Linux? Well, in contrast to Windows and Mac OS, Linux still does not offer a vector-based format for exchanging data across arbitrary applications. That means, plain and simple, that a graph created in qtiplot and pasted into OpenOffice will be a bitmap.

In principle, OpenOffice supports the most important vector-graphics formats, namely, eps as well as svg. However, the preview for the former is automatically rendered as (low resolution) bitmap when inserted. One can (under Windows) provide a wmf- or even emf-based preview when creating the eps, and OpenOffice then displays nice, smooth curves. Unless, that is, you are in presentation mode, where the curves simply disappear. Oh, and svgs are only displayed correctly when they were created by OpenOffice itself. Inkscape and Scribus artworks seems to overtax OpenOffice by a large margin (all that applies to the current version, 3.0.1).

But how, you might ask, can we then use OpenOffice for presentations?

The answer is very simple: you can't. At least not for serious stuff. Use it for a presentation of the latest cheerleader costumes in your local football club, but do not use it for anything remotely important.

What you should use instead is the topic of the next post. ๐Ÿ˜„

What a wonderful day

I took a day off since it's my birthday. Wanted to do some shopping, but there's a blizzard out there (well, it snows heavily and it's really quite windy ๐Ÿ˜‰ ). So I decided to work instead. Let's connect to my office with the beloved Cisco vpnclient. Blam, kernel panic. Oooookkkaaaayyyy ... must have been this latest update to 2.6.29. Let's try vpnc instead. The kvpnc frontend (kde 4.2.1) is broken. No problem, let's configure vpnc manually. Oops ... "This version of vpnc was compiled without openssl support". Well, I still have the Mini. Surely the Ubuntu developers are smarter than these blasted crypto-ignorers from Mandriva! ๐Ÿ˜„ "This version of vpnc was compiled without openssl support."

Perhaps I shouldn't try to work today.

Update: Turned out that SSL was not even enabled on our Cisco ASA, so that the openssl support of vpnc did not matter at all. Bummer.

List packages by size

I need that quite often, but keep forgetting the exact syntax (except for Debian, where it's really simple). ๐Ÿ˜‰

RPM-based (Redhat, Fedora, Mandriva, Suse ...)

rpm -qa --queryformat '%{SIZE} %{NAME}\n' | sort -nr | head -20

DPKG-based (Debian, Ubuntu, Sidux ...)

wajig size  | sort -k 2 -nr | head -20

Pacman-based (Arch, DeLi, Chakra)

pacman -Qi | awk '/^Installed Size/{print int($4), name} /^Name/{name=$3}' \
| sort -nr | head -20