Configuring a QNIX QX2710 for Debian Jessie

I already got a lot of the necessary information from a post by Pat Regan that you should definitely read before starting to play around with your settings!

At first I tried to configure my new QX2710 with my old monitor connected, but I figured I might aswell just do it remotely. So I connected to my computer from my laptop via SSH and played around with the xorg.conf. After applying the changes I'd restart lightdm (sudo service lightdm restart) until it worked.

In the meantime my monitor showed me this:

I ended up using HorizSync 89.52 - 160.0, VertRefresh 59.96 - 120.0 and a Modeline generated by cvtHere's the xorg.conf.

Here's a comparison of screen resolutions before - after:

I can finally watch 1080p videos without downscaling!1!!


User Startup Programmes in Debian

I've always loved to start programmes automatically. Just boot up the computer, maybe even log in automatically if it's a desktop at home, and start all the programmes you need. It took me quite a while, but I figured out the one and only, perfect way to do that: *.desktop files.
Let's go to our applications folder, which should contain most of the *.desktop files responsible for your Applications menu.
cd /usr/share/applications/
Let's assume you want to autostart guake. Check for folder contents with ls or find the programme you want to auto start with ls | grep guake. Then, copy that file to your autostart folder.
cp guake.desktop ~/.config/autostart/

Also check out the Desktop Application Autostart specification if you're interested.

Originally published on 2013-01-31 08:19.


FIX: You are missing 32-bit libs: libGL.so.1

So I've been getting an error when trying to start Steam.

Luckily, I know how to use a search engine and quickly found a promising post by frankster. This did not fix my problems - I had to run this line to get Steam to work on my laptop:
sudo apt-get install libgl1-nvidia-glx:i386
Works like a charm. :)


The future of GoldSrc mapping on GNU/Linux

I like GNU/Linux and the fact that Valve is releasing their Steam and Team Fortress Classic clients on it.
I also like mapping for TFC and just recently picked it up again. Due to my recent decision to move to Debian Wheezy on my gaming / desktop computer I have been denied the pleasure of mapping with native mapping tools so far. The Valve Hammer Editor (formerly Worldcraft) is a win32 programme, other editors could be an option, but I prefer the "offiical" tools.
I wrote Alfred Reynolds [Steam] [GitHub] an e-mail about this, since he's currently one of the main GoldSrc developers at Valve. While I was happy for a quick response, his words saddened me. I'd like to share them with you.
Hammer is a very win32 specific tool and we have no plans on making it run natively on Linux at this time, I suspect your best bet here will be to use Wine to let you run it.
Well, is my best bet Wine? I haven't tried Wine/VHE yet.
I've always preferred native programmes, it just feels right. And I know there are Linux-based mapping tools our there for the Quake engine, which should be fairly compatible to GoldSrc, which itself is "just" a QuakeWorld modification. I haven't found a proper, as in easy to use and fairly to fully compatible to the GoldSource RMF or MAP format, map editor.
If anyone knows of any, please leave a comment or write me. I'll post something as soon as I find a solution.

How to find the MSSQL version in a backup file

Okay, so I had this SQL dump, but no idea which Microsoft SQL server version it came from.
It's not that difficult to make a good guess though; In the file it shows the original database paths. If you're lucky, you didn't completely change the instance's folders and your instance folder is named somewhat like these.
  • SQL Server 2005 uses MSSQL.<n> (counting up, starting at 1, n+1)
  • SQL Server 2008 uses MSSQL10.<INSTANCENAME>
  • SQL Server 2008R2 uses MSSQL10_50.<INSTANCENAME>
So, open the SQL backup file in a text editor of your choice and search for .mdf. That should put you at the end of the path you need. Just check the path against the list above.

Why the NVIDIA graphics driver should be available in repositories

It's not that big of a deal, but would it really be that big of a problem to deliver a proper .deb package for the driver installation? I had to let the Nvidia installer disable my Nouveau driver, I had to manually stop LightDM and I also had to correct the /usr/bin/gcc link, since Nvidia apparently doesn't care about my CC environment variable.
sudo service lightdm stop
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc
What's up with that?


Installing Debian with Mate

Preparing your installation medium

First you need to put your Debian image on a USB stick. You can do this by using the dd command; if is the input file, of is the output file. We are going to use the ISO as input and the USB device address as output.
dd if=/home/orangensaft/Downloads/debian-wheezy-DI-rc1-amd64-netinst.iso of=/dev/sdb
When it's done you'll see a new line, ready for input. At that point, you may restart your system and boot from USB.

Installing Debian & initial setup

I recommend keeping a second USB stick around to conveniently deliver missing firmware to the installer, although this is optional if they aren't essential network or display drivers. Put the missing firmware files or its packages into the root, or a firmware/ folder on your installation media or a second USB stick.
When the system is running, we'll switch to root..
su root
.. and install sudo, vim (or your favourite text editor) and bash-completion (to get the convenient tab feature).
apt-get install sudo vim bash-completion
After that, add your user to the sudoers group.
adduser username sudo
And let's restart.
shutdown -r now

Installing MATE, LightDM


Follow MATE instructions.


We'll use LightDM as our display manager. It's relatively small, has a bunch of features and.. "why not?".
sudo apt-get install lightdm
By default you'll have a login window with a username and password input. If you'd rather have a list of users to choose from, apply this change.
sudo vim /etc/lightdm/lightdm.conf 
Set greeter-hide-users to false
or, if you haven't touched your ligthdm.conf yet or just don't want to, you may also use the following to append the line to your LightDM config file.
su root 
echo "greeter-hide-users=false" >> /etc/lightdm/lightdm.conf


Depending on your needs and your installed system, you may want to enable other architectures. If you are installing an amd64 system and additionally want i386 packages, this is what you have to do.
sudo dpkg --add-architecture i386 
sudo apt-get update


The sources.list is your system's repository file. If you're often checking other repositories for files or just want more available packages, you should take my own sources.list and replace yours with it for awesomeness.
sudo pluma /etc/apt/sources.list 
Replace it with mine


su root 
apt-get install -y sudo vim bash-completion 
adduser orangensaft sudo 
shutdown -r now
sudo dpkg --add-architecture i386 
sudo vim /etc/apt/sources.list 
> deb http://repo.mate-desktop.org/debian wheezy main
sudo apt-get update 
sudo apt-get install -y mate-archive-keyringsudo 
apt-get updatesudo apt-get install -y mate-core mate-desktop-environment lightdm 
shutdown -r now
sudo pluma /etc/apt/sources.list 
> # https://gist.github.com/kriswema/5431388 contents here, adjust to your needs 
sudo apt-get install -y pidgin pidgin-otr vlc eiskaltdcpp libreoffice gdebi netbeans


Installing Chrome on Intenso Tab 417

Basically.. (2013-01-22)

All you need to do is download the Google Play store *.apk file and install it on your device, then download Google Chrome through the App store.
Solutions found on Intenso Tab 714 – Playstore installieren.

USB connection (2013-01-22)

Start your Tab 417 and connect it to a computer with a USB to Micro USB cable. A notification about an established USB connection will appear on your device in the lower right corner. Click on it and enable the device's USB storage feature. This will enable you to mount the whole drive on your computer and transfer the file if you chose to download it on your computer.

*.APK file (2013-01-22)

Now, download the Play store. Your best option is to just search for "google play store apk" on xda-developers.com, androidpolice.com or your favourite search engine. Depending on where you get it from, you have to change your security settings to allow the installation of unauthorized apps. In any case, you have to restart your device after the installation.


In January I tried to get Chrome running, but it would always close and throw an error message. I digged a little deeper and it was something related to some Java library, as far as I remember. I was unable to resolve this.
After another try today, four months later, it runs smoothly. I'm surprised of how smoothly it runs, with all the nice Chrome features.

Workaround: ZHLT fails to read WAD list properly

So I just recently picked up mapping for Team Fortress Classic again. I hadn't done it for a few years, so I was actually surprised how well everything worked with my new computer, operating system and all. Except one thing: The wad.txt would not be included properly, as seen below.
This happens when your wad.txt looks somewhat like this:
This actually has a very simple fix: Just add a backslash ( \ ) to the beginning of every line and it should work perfectly fine.


Windows 8 clean install with an upgrade license

I really needed a clean Windows installation, so after moving a lot of files I reinstalled it, and all went well so far. But then Windows 8 told me it wasn't activated. I tried entering my key again, but it then told me:
The Software Licensing Service determined that this specified product key can only be used for upgrading, not for clean installs.
 Luckily, I wasn't the only one with this issue. This post in the Microsoft forums describes the solution quite well. Here's a step-by-step tutorial for you.

  • Press [WIN] to open the start menu, type in regedit and press [ENTER].
  • Then, navigate to this folder: "HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/" and set the registry key "MediaBootInstall" from "1" to "0". Close the registry editor.
  • Press [WIN] to open the start menu, type in cmd, right click the "Command Prompt" entry and choose "Run as administrator". Confirm with "Yes".

In the command prompt, type:
slmgr /rearm
Restart your computer and your copy of Windows 8 will run on a clean install with an upgrade license.


A few helpful mail tips

Most of these things never really bothered me on their own, but after some time it just starts to get annoying. Especially when all the mail you get is about how a file exists that you could easily and quickly delete, or how the configuration is just not right for another certain, convenient feature.

How do I read mail? / Which client should I use?

To read your mails, you could use the standard mail application. I suggest you try others, like mutt. It's actually quite nice, if, like me, you just need a client to read local system mail. When it comes to more, you might want to check if your favourite E-Mail desktop application can read the system mail.

Mailing to remote domains not supported

You should be careful with this: If you misconfigure the external access to your mail daemon, you could become a spamhost. Kris Leech posted something about this in 2010, he's also the source of this simple solution.
sudo dpkg-reconfigure exim4-config
Then, select the top entry: "internet site; mail is sent and received directly using SMTP". The next entry may be left at default, which should just be your system's name. In my case, I left it to be JuiceFridge8. The next one is important! "IP-addresses to listen on for incoming connections:" decides, who is able to actually send you mail. Leave this on the local addresses and ::1, that way it's limited to internal mails only. The next one may be left empty, it may also say something like "systemname.localdomain", which should be alright in most cases. The next one should be left empty, it decides which hosts to relay mails for; since we limited the system to receive mails only from localhost, this shouldn't matter. The rest can really be left on default values.

ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size, mail system possibly broken

This actually has a very simple solution: Remove the paniclog file. It took me too long to figure this one out.. I didn't realize it said "has non-zero size", aka. "dude, the file is not supposed to be there".
sudo rm /var/log/exim4/paniclog
After doing this, check if the error still appears.
sudo service exim4 restart 
That's it! :) 

Using XFCE with GDM

If you are using XFCE with GDM and are tortured by the "slow keys"-feature after holding down Shift, you might want to take a look at this: https://bugzilla.redhat.com/show_bug.cgi?id=816764
I don't remember when I had this problem, but I feel it was sitting around as a draft long enough. I hope this can help someone out there! I can't test it anymore, since I've been using MATE for some time now.


Upgrade ownCloud from manual install to repository

I started out with a manual installation on version 4.5.4. It was located in a /home/ folder rather than the /var/www/ directory, which gave me opportunity to think some more. So, let's begin.
Go to the folder your ownCloud installation is in and tar it, in case anything goes wrong.
sudo tar -cjvf owncloud.tar.bz2 owncloud/
Since it's now owned by root because of the sudo, make it yours now.
sudo chown orangensaft:orangensaft owncloud.tar.bz2
Subscribe to the new ownCloud server repository.
sudo vim /etc/apt/sources.list
Add this line at the bottom:
deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/ /
Then add the key, update your repositories and install owncloud.
wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key
sudo apt-key add - < Release.key
rm Release.key
sudo apt-get update && sudo apt-get install owncloud
If your manual ownCloud installation was not in /var/www/owncloud, you need to copy the config file to the new directory.
sudo cp config.php /var/www/owncloud/config/config.php
This is a step I didn't have to do: Copy your owncloud/data/ folder! This folder stores all your cloud files! Since I have it configured to a different mount (my /storage/), I was able to skip this.
Check your httpd config - in my case it's Apache: /etc/apache2/sites-available/ - and replace the old path with the new /var/www/owncloud/.
After you've done this, restart your httpd (sudo service apache2 restart) and you're done.
You should now be on version 4.5.7. :)


MySQL Dump: Access Denied

I needed an SQL dump of my Global GoldSrc Database to continue work locally. Un-/Fortunately, the server owner and sysadmin is very concerned about server security, so I was unable to just dump the database with this:
mysqldump -p -u osaft osaft_gtfcdb4 > osaft_gtfcdb4-20130213.sql
The server wouldn't let me because of insufficient access.
mysqldump: Got error: 1044: Access denied for user 'osaft'@'localhost' to database 'osaft_gtfcdb4' when using LOCK TABLES
Fortunately, there's a simple solution that should work like a charm: --single-transaction.
mysqldump -p -u osaft osaft_gtfcdb4 --single-transaction > osaft_gtfcdb4-20130213.sql
Then just bzip it (or not) and you're done!
tar -cvjf osaft_gtfcdb4-20130213.sql.bz2 osaft_gtfcdb4-20130213.sql


Default File Associations

Setting default programmes is actually very simple and straight-forward.
Open your user's defaults.list.
vim ~/.local/share/applications/defaults.list
Add lines formatted like this:
<mimetype>=<desktop file>
Here are some examples from my file.
The changes will be applied immediately.

Convenient Routing with Dnsmasq

If you're a web developer, you may have this issue: Creating a new virtual host in your HTTP server (I still use Apache, so sue me) works fine, but then there's that hosts file where you always have to add the new domain (e.g. mynewproject.dev) and link it with - but not anymore! There's a very simple way of adding and routing a wildcard domain with a quite powerful programme named dnsmasq. Thanks to tomchuck for this solution.
First, get dnsmasq from your repo.
sudo apt-get install dnsmasq
Then create your config file. Note: All files in this folder are parsed by dnsmasq. This allows easy management of different IP ranges.
sudo vim /etc/dnsmasq.d/my-local
Put this into your config:
Save and close the file, then restart the dnsmasq service.
sudo service dnsmasq restart
Now open your DNS config.
sudo vim /etc/resolv.conf
Add your computer as DNS server. Note: If you're planning to use other domains than .dev, you should put it at the top of the file, or at least higher than other nameserver entries.
To make sure everything worked, ping a .dev domain.
ping test.dev
Oh, and you probably want to create an init.d/ script for the dnsmasq service to start on boot.


Installing Fonts on Debian

Soo, I was told that the font I use isn't a proper coding font and I should use Source Code Pro. Fine. But if we're already installing fonts, let's download Source Sans Pro aswell. Source Code Pro is obviously for development environments, while Source Sans Pro is meant for user interface usage.
Installing fonts on a GNU/Linux machine is really simple; you just have to move them to a /usr/share/fonts/ folder and update the font cache. Thanks to Linux And Friends for providing me with this solution. Alright, let's begin.
Download the font packages
wget http://sourceforge.net/projects/sourcecodepro.adobe/files/SourceCodePro_FontsOnly-1.017.zip && wget http://sourceforge.net/projects/sourcesans.adobe/files/SourceSansPro_FontsOnly-1.038.zip
Extract the files
unzip SourceCodePro_FontsOnly-1.017.zip && unzip SourceSansPro_FontsOnly-1.038.zip
Copy the files to appropriate folders
sudo mv SourceCodePro_FontsOnly-1.017/OTF/ /usr/share/fonts/opentype/SourceCodePro/ && sudo mv SourceCodePro_FontsOnly-1.017/TTF/ /usr/share/fonts/truetype/SourceCodePro/
sudo mv SourceSansPro_FontsOnly-1.038/OTF/ /usr/share/fonts/opentype/SourceSansPro/ && sudo mv SourceSansPro_FontsOnly-1.038/TTF/ /usr/share/fonts/truetype/SourceSansPro/
Force (-f) a rebuild of the font information cache and show what's happening (-v)
sudo fc-cache -fv
And that's all! The fonts are now installed for all users on your system.


Network Manager: device not managed

Wait, what's going on? Device not managed? But I didn't even do anything I swear! Here's how to fix it, solution found on ask Ubuntu.
Open up your NetworkManager config file and change the line managed=false to managed=true.
sudo vim /etc/NetworkManager/NetworkManager.conf
Then, restart the network-manager service.
sudo service network-manager restart 
Everything should work fine now.


Installing WinVista on an Acer Aspire 7530G

The main problem was finding a Windows Vista setup disc that fit my needs. It needed to be Home Premium, 64 Bit and German. Luckily, I found this website that provides links to Windows Vista, Windows 7 and Windows 8. After downloading and trying to burn it in my own ways, I created an ISO disk image from the Vista setup files with a programme called WBI Creator 1.2 and burned it with Windows 7's Image Burner.
After putting the CD into the tray and booting the laptop, you will see the Windows Vista setup appear. Just follow through the instructions on the screen.
When Vista was running, I needed to install some drivers - mainly the Ethernet drivers from Atheros. You can get them from the Atheros website. Most drivers can then be downloaded via Windows Update or from the websites of Acer, Nvidia or Synaptic website.
From that point on, I had no further unexpected difficulties with the rest of the installation. Still, installing and running Windows Vista x64 is a pain, since the driver support is poor. If you don't want to fight your way through all the Vista issues, maybe you should try a GNU/Linux distribution instead. Why not Debian?

Booting Win8 to Desktop

Windows 8 Metro is a joke. Luckily, there are a few workarounds to start with the proper desktop shell. My favourite: Scheduling a task that runs explorer.exe after every log in. Since there are enough tutorials out there, I'm not going to bother writing it down here.

Make Windows 8 boot straight to the desktop

Alternatively, you could just download a GNU/Linux distribution. Why not Ubuntu?


Auto-detect monitor unplug

I know of no clean way to detect an unplugged screen, so I figured I'd force re-detection with a cron job.
To detect the monitors I'm using disper, you can get it from the Wheezy and Sid repositories.
Let's open up our crontab.
crontab -e
If you're doing this for other users too, you may use
sudo crontab -eu <username> 
Now add a new entry:
0-59 * * * * DISPLAY=:0.0 disper -ld auto > /dev/null
This will automatically detect (-d auto) and list (-l) all monitors every minute.
Of course, you can also use xrandr:
0-59 * * * * DISPLAY=:0.0 xrandr --auto > /dev/null
Both of these commands will adjust your desktop automatically, which will do just fine for most users. The > /dev/null at the end discards all standard output instead of sending you emails. You will still receive error messages.
Thanks to bammes for pointing me in the right direction regarding the display. 

Use mouse in text mode

All you have to do is install the General Purpose Mouse interface, GPM.
sudo apt-get install gpm
As soon as the installation finishes you're ready to use your mouse.