The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

Introduction

I just faught for a few hours trying to get the WNetAddConnection2() to work in my program and found out two things that I did not see explained anywhere in the documentation...

Folder that Works

I'm not too sure whether that's a new thing at the company I worked in to implement this function or whether that's every time, although I've seen other posts on the Internet with the same sort of path so I would imagine that this is a "normal" Microsoft network feature.

The fact is that to connect you have to use the name of the server followed by some ...

That took me forever because I could not find the place where my Unity icons where to edit them in order to add the necessary LC_TIME definition. This being said, it's relatively easy except that you have no real control over the exact formt, only the locale.

So...

I created a file named starter under my thunderbird folder, if you don't have such (because you're using the stock version of thunderbird) then you may want to create a bin folder as in:

mkdir ~/bin

The starter file is just a text file with a shell script like this:

#!/bin/sh
LC_TIME=en_DK.utf8
export ...

Strangest thing happened to me today! I'm working on a project with VC 2005 (yeah! pretty old version for 2012, I know!)

I use the Search in files which usually works great but today I got this strange error:

No files were found to look in. Find was stopped in progress.

And no real reason why it would say that!?

Searched on the Internet and found a page mentioning the problem.

When searching it is possible to stop the process with Ctrl-C or Break or, it seems, Ctrl-Scroll Lock.

In my case my bag was a bit on the keyboard pressing on one or more of those keys! Moving my bag was ...

As I'm working on a server I need dates in UTC. By default, the QDateTime object generates dates in local time.

How do you change that? There is a toUTC() but my input data is already UTC so using toUTC() would mess up the date and I'd get the same result anyway.

The idea is actually pretty simple. The toUTC() creates a QDateTime object in UTC mode. This is done like this:

QDateTime utc(QDateTime().toUTC());

Now the utc object is in UTC mode and can be used with your Unix dates as in:

utc.setTime_t(time(NULL));

and the string output can be generated with toString() as in:

 ...

Just got told that one of my servers was running WebDAV. I used that before so I thought it was turned on. Checking at the server, I could not find anything about DAV that was turned on in my server...

So, how could they detect WebDAV and not me??

The fact is that by default Drupal doesn't check the HTTP query method. It should! In fact, Drupal happily answers all methods with an HTML page. So I did not have WebDAV, just a flaky CMS.

How can you test methods that your server supports?

Knowing your IP address and port, use telnet like this:

telnet IP port (i.e. telnet 1.2.3.4 80)

...

As I was porting wpkg to Windows so it would compile under Microsoft IDE version 10, I ran in a problem with variables named min and max. Windows wanted to see them as the min(a,b) and max(a,b) macros.

That started happening when I included Windows.h which I needed for handling files (CreateFileA, CloseHandle, etc.).

Since these are macros, i.e. defined with #define ..., they take priority over anything in your C++ code (since that's handled with your preprocessor.)

One way to get rid of them is to undefine those macros after the #include, something like this:

#include ...

Today I tried to run WinXP on my newly upgraded Linux Ubuntu 12.04. It did not work... that's because the aqemu graphical interface tries to run qemu which was replaced with specially named emulators: qemu-i386, qemu-system-x86_64, etc. (try ls /usr/bin/qemu* to see a complete list on your system.)

So... I got the command line from the aqemu graphical interface, did a copy / paste and replaced the name with qemu-system-i386 and got the emulator started as expected. That worked fine, but then the window remained small (640x480) which I wouldn't care much if I weren't really using ...

You may also be interested by my new page:

Ubuntu 18.04 keyboard and mouse tricks and setting them up

I love Linux and use Ubuntu, but all of a sudden you don't have support for Gnome. Instead they now force you to use Unity. It's probably a good idea to go with the flow because trying to maintain Gnome is probably a hell of a lot of work so...

Losing your settings all the time? Check out When I lose gnome settings...

I have to have a few things in my window system:

1) Menus MUST be attached to the window I'm using. I don't like the Macintosh way. Sorry. To remove ...

Versions 11.04, 11.10, and 12.04

Okay! That one took me too long!?

I was searching for "Waiting up to 60 more seconds for network configuration..." and just couldn't find where the heck that was hidden. It's in /etc/default/failsafe.conf and if you look at that file you'll see a few sleep in there.

I'm not too sure what that's really used for, but having to wait 2 minutes for the server to boot seems dramatic when before it used to start immediately and worked just fine.

So, edit the file, scroll down and remove the sleeps... I do not recommand you do that ...

Today I noticed that I had quite a few 404 errors on one of my websites. That one uses Wordpress that I got from someone else. Because I wanted to include a blog, I had to change the login name and Wordpress does not allow you to do that by default.

So to change the login and password, I directly edited the database makeing user 1 me, essentially.

I replaced the user_login and user_nicename with my own name. This worked just fine. At least at first it looked like everything was working right. Then I noticed that the author link had my name in it. The one with the space. Something like ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.