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:

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 ...

I am working on an A/V switch with the kids and was annoyed by the fact that the page talking about how to do that did not include anything like a schema (it has some bus drawing... who cares?!) This being said, the concept is perfect and works just fine. It's just hard for me to see that when the person just says connect this here and that there and voilà!

Original A/V switch information:

https://www.engadget.com/2007-03-13-how-to-make-a-solid-state-a-v-switcher.html

The source is a gschem file as created by gEDA Schematic Editor (a free tool you can get on Ubuntu.) Already the free ...

Barnes and Noble Nook (Electronic device to read books anywhere!)Introduction

Today I was requested by my wife to make her Nook work on our wireless network (she usually can use our neighbors but the connection drops all the time.)

The Nook makes use of DHCP only. So on my static IP address only network, it's kinda not going to work as is! (I must have static IP addresses for security so I can setup a strong firewall.)

So I had to go through a few hoops as follow to get everything to work. Interestingly enough I have not found another website that was talking about such things and their solutions on Linux.

Oh! Wait! Nookers are probably not Linux ...

I really want to try that feature! I have been using Incredibuild on MS-Windows and it can make a software compile 5 to 6 times faster. (i.e a software normally compiling in 1h compiles in 10 minutes!)

Under Linux some people worked on the C compiler front end to move the process to other machines as required. This is called distcc (i.e instead of using cc to compile, now you use distcc). This front end has a list of all the C compiler machines and uses them whenever possible.)

From what I can see on the front page, the setup should be a breeze (yeah... I know) and it does not even require ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.