Log in


Today I learned that the "users" option in the /etc/fstab file is what causes drive icons to appear on the desktop/in the "computer folder".

Also that you need the ntfs-3g (not ntfs) filesystem type to mount ntfs partitions rw

Also that umask=0000 (unmask no bits) may also help allowing users to write to ntfs partitions by overriding which permission bits are set/unset.

Gentoo and Apache2

Just posting here about a problem I was having with Apache2 under Gentoo that no-one had any real answer to. Actually, there was one guy, but he didn't post the answer, just that he'd found it.

Solution at the bottom for those who tl;dr

Emerged Apache onto a fairly fresh installation of Gentoo. Tried to run it from the get-go:
#> /etc/init.d/apache2 start
 * Starting apache2 ...
apache2: apr_sockaddr_info_get() failed for GoldGentoo
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
 * start-stop-daemon: failed to start `/usr/sbin/apache2'

Hmmm, okay. Not especially useful. Try running Apache directly, then; see where that would get us.
#> /usr/sbin/apache2
no listening sockets available, shutting down
Unable to open logs


All the forums said that something was probably already using, and thus blocking, port 80. Fine, let's see if anything's already listening on port 80
#> lsof -i :80

Well, quite. Google searches suggest that there are multiple "Listen 80" commands in /etc/apache2/httpd.conf and/or the /etc/apache2/vhosts.d/*.conf files. More symptomatic with the "make_sock: could not bind to address" error, but let's see anyway.
#> grep -r "80" /etc/apache2/httpd.conf /etc/apache2/vhosts.d/*.conf
/etc/apache2/vhosts.d/00_default_vhost.conf:Listen 80
/etc/apache2/vhosts.d/00_default_vhost.conf:NameVirtualHost *:80
/etc/apache2/vhosts.d/00_default_vhost.conf:<VirtualHost *:80>


Again, nope. One Listen, one NameVirtualHost, the actual VirtualHost info and a commented-out line. Useless. Maybe there's a firewall blocking ports or something?
#> ipchains
bash: ipchains: command not found

Of course, I don't even have it. Fresh Gentoo install, remember? Well, that was the Internet more or less out of ideas.
Then, someone, somewhere, points out that "no listening sockets" is a funny way of saying that Apache's not been told to listen to anything, because they'd just nuked their httpd.conf file.


Add Listen 80 into /etc/apache2/httpd.conf, restart Apache.
It works! The web-browser won't load anything, but there aren't any virtualhost settings, so that's to be expected.
Remove the Listen 80 again (it's just a quick hack) and delve into /etc/apache2/vhosts.d/00_default_vhost.conf, where the virtual host settings are meant to be.

[Note: There's a section in /etc/conf.d/apache2 that sets options for when Apache runs:
Note the "-D DEFAULT_VHOST" part. That's used to tell Apache to load the default vhost file that comes with Apache (under Gentoo?), /etc/apache2/vhosts.d/00_default_vhost.conf]

Out of guided curiosity, comment out the <IfDefine DEFAULT_VHOST> and </IfDefine> lines, restart Apache.
Woah! Two in a row! Looks like Apache2 wasn't defining DEFAULT_VHOST. Uncomment the lines again, restart Apache again..

Wait a minute! Apache's still working?!
I don't know why, but now it listens to the DEFAULT_VHOST settings. Go figure.
Anyway, hope this helps someone out there.

Manual GTK with Wacom problems

Just a quick post for the latest discovery.

My Wacom tablet lost its pressure sensitivity (myPaint even suggested that "no pressure sensitive devices could be found"!) for some reason that took me a small while to figure out.
Apparently, it was because I was building source versions of GTK+ (for Pidgin 2.8.0 needed versions not in the main repo).

Turns out, to keep tablet sensitivity, you need to "./configure --with-x --with-xinput" before you make and install.

This is probably my shortest journal yet.

Adobe Flash sound problems

Wow. Lost a day on an apparently few-month-old bug (yes, I'm calling it a bug). Hope this journal helps anyone else who's getting hit by it.

The Symptoms:
Adobe Flash (at least the 64-bit test version 10.3, but I hear the 32-bit is similarly affected) plugin for Linux started messing up certain audio-streams (mostly audial artifacts). YouTube and certain other sites were fine, but BandCamp, GrooveShark, et. al. weren't.

The Technical:
Turns out it's because they're relying on a trick wherein they copy some data to a position slightly before the source, but close enough that the two blocks overlap, for (presumably) performance reasons (I believe they were using memcpy for a memmov job because memcpy is supposedly quicker). Recent updates to glibc allow memcpy to copy blocks backwards under certain situations for speed, which of course broke this trick.

I found this out when I installed Valgrind, which came with its own updated glibc, but Fedora 14 already has it, and it's only a matter of time before the other Distros get their version (Uninstalling Valgrind didn't solve the problem, by the way, although that's probably a good thing).

The Fix:
There were a couple of fixes in this thread, of which the latter worked for me.
  1. From Comment 94 of the above thread:
    Downloading this script, and running it (i.e. ./fix-flash.sh libflashplayer.so). The script goes through the supplied libflashplayer.so binary and replaces each memcpy instruction with a memmov. This didn't work for me, but subsequent commenters seem to have yielded success, so it might work for you.

  2. From Comment 55 of the above thread:
    Copy-pasting the following into a terminal, verbatim:
    ---Cut below---
    cat > $HOME/Downloads/linusmemcpy.c <<EOF
    #include <sys/types.h>

    void *memcpy(void *dst, const void *src, size_t size)
    void *orig = dst;
    asm volatile("rep ; movsq"
    :"=D" (dst), "=S" (src)
    :"0" (dst), "1" (src), "c" (size >> 3)
    asm volatile("rep ; movsb"
    :"=D" (dst), "=S" (src)
    :"0" (dst), "1" (src), "c" (size & 7)
    return orig;
    cd $HOME/Downloads
    gcc -O2 -c linusmemcpy.c
    ld -G linusmemcpy.o -o linusmemcpy.so

    ---Stop cutting here---
    (Don't forget to press enter if the ld line hasn't been run) This compiles the above memcpy C++/assembly hybrid code into a new object file in your $HOME/Downloads directory (essentially aliasing memcpy to memmov).

    You will need to preload it with everything you run that needs the fix (i.e. anything that uses Adobe Flash). You can do this by using (for FireFox):
    LD_PRELOAD=$HOME/Downloads/linusmemcpy.so /usr/bin/firefox &
    (Or, for Chrome: LD_PRELOAD=$HOME/Downloads/linusmemcpy.so /opt/google/chrome/google-chrome &).
    This worked for me. Unfortunately, you'll need to preload the file every time you run your browser until Adobe fix the problem (I assume they're going to...).

    I just put it in my /usr/bin/firefox script:
    export LD_PRELOAD=/home/goldelite/Downloads/linusmemcpy.so
    exec /usr/lib64/firefox_601/firefox "$@"

    (You'll want to change the /home/goldelite/Downloads and /usr/lib64/firefox_601 to where-ever your linusmemcpy.so file and FireFox instance live, respectively).

  3. Hope this helps anyone!
    Many thanks to Magnus Glantz (Commenter 55) and Ray Strode (94) for the fixes, and everyone else who helped solve this mess.

    Anywho. Haven't been on here in ages (read: years!); journal inbox seems surprisingly empty. My previous stylus fix doesn't work any more, which is a shame, and I've yet to discern a method that does. How is everyone?
More Linux-y goodness! After getting my tablet to work and subsequently breaking it, I move onto weird printing problems. My Epson Stylus SX405 worked before my upgrade to Debian SID, but not now. The programs'd send a document, but it'd never reach the printer and no error would be reported.

Usefully, the IRC guys just told me that I shouldn't be running SID unless I was a developer or tester. Yeah, thanks guys.

After some deliberation, and testing with "lp -d Styuls-SX405 output.pdf", I found there were error messages -- "Unsupported format 'application/postscript'!" and the like. More testing, and I found that it would print images (tested with a .png), but not text, etc (.pdf, .txt, .ps, etc.).

After a fair amount of messing around, I `# apt-get install cups*` everything (broad strokes, I know). Unfortunately, the command line stopped reporting errors (still no printing, though).
The printer under the CUPS web-administration system (http://localhost:631), though, reported that the PPD file was of the wrong version for my CUPS version.

Thus, to fix that, I opened "/etc/cups/ppd/Stylus-SX405.ppd" (your filename may differ) and edited the "*FileVersion" and "*NickName" lines to use the requested version (in my case,

Et voila. A quick restart of CUPS later and I can now print properly once more.
Hopefully this'll help others out there. Simply being told that you're running an OS that isn't a standard setup isn't helpful. Especially when there are things that can still be done without recompiling stuff. =\

At the beginning, but further on.

OKAY. Got my tablet working after not having it and then having Linux not recognise it for so long. I've noticed that Google seems to index my LiveJournal entries, so I figure that I'll share the path my horrific journey cut to getting it working in the hopes that others not have to cut their own.

First of: it is a WCK-C121-HT, some nameless £50 brand that DOES require the Wacom drivers to run. I'm running it in Debian SID/Experimental, but for these purposes, Ubuntu's Jaunty/9.04 should be similar, because it's XOrg's upgrade to version 1.5+ that throws a spanner in the works -- it uses the new HAL layer to configure stuff now, not xorg.conf anymore.

$ hal-find-by-capability --capability input.tablet | xargs hal-device
Should give you all the information you want about your tablet. Particularly, note the "info.product" and "info.udi" lines.

To set up the HAL stuff, you'll need to create/modify /etc/hal/fdi/policy/10-aiptek.fdi (the file itself can be called anything [.fdi] -- My tablet was mapped as an Aiptek 6000U back in the udev days, I just kept the naming) to read something like:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<match key="info.product" contains="$!$">
<merge key="input.x11_driver" type="string">wacom</merge>
<merge key="input.x11_options.Mode" type="string">absolute</merge>
<merge key="input.x11_options.SendCoreEvents" type="string">true</merge>
<merge key="input.x11_options.USB" type="string">On</merge>
<merge key="input.x11_options.TopX" type="string">0</merge>
<merge key="input.x11_options.TopY" type="string">0</merge>
<merge key="input.x11_options.BottomX" type="string">20000</merge>
<merge key="input.x11_options.BottomY" type="string">12500</merge>
<merge key="input.x11_options.Type" type="string">stylus</merge>
<merge key="input.x11_options.Cursor" type="string">stylus</merge>

The $!$ part (near the end of the 4th line) needs to be replaced with whatever you read for "info.product" previously. Next, remove all information regarding the tablet from your xorg.conf.
Usually all you'd need to do now is restart HAL and X to get the tablet working. BUT, because the guys in charge of the Wacom drivers felt like arbitrarily removing support for non-official tablets, we've a bit more work cut out for us -- this' the part that took me so long to find (MANY thanks to the guy behind this bug report, who gave light when there was none: https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/392825)

Sooo....go somewhere, maybe the desktop, I don't care, and become root. `# apt-get source xserver-xorg-input-wacom` to get the wacom driver source. From where you are, open "wacom-tools.x.y.z/linuxwacom/src/xdrv/wcmUSB.c" (obviously, "x.y.z" is the version you happen to have downloaded) in a text editor, find the line that reads:
if (sID[1] == 0x056A)
and replace it with
if (sID[1] == 0x056A || sID[1] == 0x172F)

[From here, replace 0x172F with whatever the Xs read in your info.udi line, "/org/freedesktop/Hal/devices/usb_device_XXX_yyy_noserial" (Mine was XXX=172f, yyy=34, yours may vary)]
Save the file and go back up to the linuxwacom folder.
From there, `# ./configure && make && make install`

Restart HAL and X (if you don't know how, a reboot'll suffice. But I expect those to have made it so far to know this:P

ET VOILA. Your tablet should be working. And not just as a mouse, as an actual tablet! (Yes, using the evdev driver did confuse me for so long. If you're here because your tablet's running in relative mode, it's probably because you're using the evdev driver instead of the proper one [aiptek, wacom, hyperpen, etc.]).

Now, with that over, I'm going to figure out if there's a solution as to why the damned thing is jittering so much. But for now I'm happy to have gotten it working again...why the driver guys thought it'd be useful to disable the tablet I'll never know...

[EDIT] The jittering is apparently caused by a loose connection in the wire. The tablet doesn't want to be taken apart it seems, but resting it on a cd case (such that it's angled) works, and is probably better for my RSI, too. Yay.
So yeah. Tried to get Compiz working properly on my system (it ran fine, but didn't have the plugins enabled for some reason that no-one could figure out). Uninstalled, re-installed. Ooops, no Compiz anymore! WHAT.

Numerous uninstalls, reinstalls, tweaking of files. Nothing.
Upgrade to SID (Testing) Nothing.
Reinstall from a newly-burned Debian Squeeze CD. Install slightly borked, so I installed a base system, configured apt manually and continued. System essentially froze on shutdown -- apparently, most internal systems need a loopback address ( active, so I fixed that. Still no Compiz, though.
Maybe it was a new version being broken. Compile from the previous-version's source. Nope.
Try the next oldest version. Nope. Next? Nope. Damn. Time for guru support.

Tried to get help from the #Compiz chatroom on FreeNode. They couldn't figure out what was wrong, either.
Found out that the ISO actually had broken packages, which is why the install broke.
Re-burned a new CD, this time from a known working Lenny ISO (I tested it in a virtual machine before burning it, so I knew it worked). Success! Installed nVidia drivers. Compiz's back! YAY.

Well...except, I have no Emerald theme, only the standard GTK-Window-Decorator. And Debian isn't providing Emerald packages...so I'll have to look into that, later. But hey, I have wobbly Windows, a rotating cube desktop and plugins I didn't have before. AND 10 DUAL-SCREEN DESKTOPS. FLOOD, HOW I MISSED THEM! 4 is not enough. Especially when they don't animate between each other.

Next, Dist-Upgrade from Lenny (Stable) to Squeeze (Unstable), because stable's so boring. Success!
Well, I need uinput enabled for some of my G15 keyboard's features, and figured I'd build a brand new kernel ( with the AIPTEK tablet drivers already compiled. Built successfully, but no initrd.img file, so I couldn't boot into it. Couldn't even link to the existing ones for my 2.6.26 kernel, for that failed, too.
And Squeeze, in all its glory, decided not to have a package that lets you create your own. WHAT.

So....Dist-upgrade to SID (Testing)! Compiz broke again, but I found that `nvidia-installer --upgrade` worked wonders and it was all up again, this time with a nice new 2.6.29-2 kernel! But it wasn't good enough. for 1) My kernel needed some custom options enabled, 2) 2.6.29-2 is of a version less advanced than, eurgh, and 3) Not being able to install a custom kernel for no reason is like telling me I can't do something. And anyone who knows me knows that that's challenge speak.

BUT! SID /did/ have the mkinitramfs packages, so I could now create an initrd.img file, put it into GRUBs menu.lst and away we go! Thus, I'm writing this journal from my new custom kernel under Debian SID. (I feel it necessary to note, in case others find this journal in hope of answers to something, that the nVidia drivers broke again [a standard when using new Kernels]. `nvidia-installer --force-update` fixed that, 'update' wouldn't work, because it already thought it had the latest drivers.)

UInput doesn't seem to have changed anything, so I'll need to look into that, and my tablet's still not working. I have it partially active under GNOME, but it's working in relative mode, like a mouse. I need absolute, otherwise it's going to get very annoying, very quickly.
/And/, Apache's now stopped working. For some reason, it wants to serve files from /htdocs, not /var/www, which is STUPID. But I can't seem to change that -- I've even compiled the source from scratch. And Google doesn't want to differentiate "/var/www/htdocs" from "/htdocs", which makes searching for an answer very hard indeed. Damn you, Google, I know what I'm searching for. Stop paraphrasing!

So yeah, that's the state of things at the moment. Unstable distro with kernel running Compiz without the Emerald themes. No uinput, no tablet, Apache on the fritz.

I think I need a tea.

Oh well, I'm sure I'll get there at some point. At least now I'm much more experienced with Linux. It would have probably been a much tougher experience a few months ago....

KDE4: First impressions

So yeah. AWESOME. I finally got KDE fully up and running; tracking down dependencies, and trying to compile files that were taken from a repository that was being updated at the same time...what are the chances?

But yeah, I'll admit it was a bit of a mind-fsck to learn that KDE was in fact an entire host of applications, rather than just the desktop and fundamental mechanics. But all the same, I got it all loaded, and after much ado about nothing finally got the workspace running. And now have a link to that listed on GDM. Funky stuff.

It looks quite nice, and everything fades, blur fades and has transparency for no decent reason. Which is, aesthetically, very pleasing. It introduces something new: displaying desktop icons in a panel, rather than having them just on the desktop entirely. It's a nice idea, because it lets you move the icons in one go, or hide them completely with a click of the mouse, but I guess I'm old fashioned in that I like my icons anchored to the monitor.

Also, it let me change desktop settings -- I toyed around mainly with the wallpaper. But the cool thing is that I could (had to) set each monitor's wallpaper separately! It's a bit clunky in that I had to do it like that, but nothing else has given me the freedom to have /two different wallpapers/ running at the same time! Cool stuff.

Unfortunately, very little had icons. I'm not sure why, whether it's me compiling it wrong or the fact that it's still an unstable version (I did download from bleeding-edge subversion repos, after all...). And while it looks very nice, I'm gonna be sticking to my Gnome 2.22 for now; I've always known KDE to be very slow, and this instance is no different, even though I'm running quite a powerful box. Ho hum.

In other news, I still haven't managed to get Amarok compiled and running. Well, apparently, it's compiled. Running is a different matter. I guess that's next on the list of KDE stuff to get working. I've started using XMMS2 a bit more of late, just so that I can reset gnome sessions while keeping my music playing in the background. One of the wonders of Linux, y'see =D

I notice that I seem to update this more with the loss of the Cartographer. Maybe this is in fact a good thing, I seem to have become more productive, for given values of productive. Oh well, back to the code!

Not dead, just dying

So I looked back at this thing and realised that I hadn't posted since the beginning of March and it is now the beginning of May and I think I should post something, preferably starting with a really long sentence so that hopefully people will read it out loud and die from suffocation or something.

Okay, people. Breathing time.

Also found out that it's been about as much time from my trying to get KDE4 running on my system. No success, yet. Oh well.

Also, got scanner part of my all-in-one printer working, finally. Yay, Linux drivers. Now I have absolutely no reason to return to Windows. Successorz. Errm. What else have you people missed out on. Hmm. I had something, but I have forgotten it. So have some air-borne rashers of swine flu, instead. It is pandemically delicious.

Not really in the mood for some long journal today, so I'll let you all get on with your lives. Well; those who survived the first sentence, anyway. I'm going to go get a tea before I have to leave to partake in a night's worth of World Tour.

Oh yeah. I really wish website owners would set font colours so that when viewed using a dark theme, which displays white text on a black background, and setting the background to white, they also set the text to something that isn't white. THIS MEANS YOU, LIVEJOURNAL PEOPLE. I CANNOT READ YOUR OPTION BOXES. D:<

[Edit] They censored my entry. Now my smilie face just looks like I'm unhappy, not angry and unhappy. I wonder if D:< will work.

[Edit 2] Oh fine, bring the original < back. Make it look like I'm going mad then. Obviously this is censorship and not my accidental wielding of HTML tags.

Mixed Irritation

Okay, so the update went kinda so-so. It was easy enough, but I spent until about 2 in the morning trying to troubleshoot why only half the packages updated. It turns out Virgin Media's repository servers are out of date. How irritating.

Next, KDE won't compile properly. I'm still trying to figure that out. Obviously, due to its dependencies, Amarok 2 is not yet running on my system. How irritating.

Continuing on, I can't figure out how to get graphics in my Final Year Project writeup with Latex. It should be just including "\usepackage{graphics}" in the pre-amble and then "\includegraphics{filename}" in the main text, but for some reason that doesn't work for me. How irritating.

Got replies to the three bugs (well, two bugs and an enhancement) that I filed to the GIMP bug listing. One was accepted, one was closed because they felt it was too trivial to care about, and one was closed because it turns out that it's actually a bug with Compiz-Fusion and not the GIMP. I feel stupid now. How irritating.

Also, what the hell. The Halo novel, The Cole Protocol, which I have been waiting for for many months apparently came out back in November, which explains why there's a huuuge gap in my knowledge of the Covenant Heirachy while browsing the Halopedia. How in the Seven Rings this slipped under my radar I have no idea, but it is entirely infuriating. However, thanks to eBay, a copy shall be on its way to me shortly.



Latest Month

January 2012


RSS Atom
Powered by LiveJournal.com
Designed by Tiffany Chow