Categories
Computers

Linux Printing- An Important Detail

A long time ago, right here in this galaxy I wrote a post detailing how to setup a CUPS client for printing through a CUPS server. For the post in question, it dealt with a USB printer connected to a CUPS server. I’ve had exactly zero problems with the setup since I figured it out.

We also have a network based printer that the Wife uses in her office. In order to ease setup issues(oh the irony of those words), I also setup the CUPS server to work with her printer. So now, from the server, I could print to either printer.

But for the longest time I have not been able to get a client to work with this printer using the CUPS server. It’s made no sense to me in all this time because I’ve been following the above mentioned post, double checking everything along the way.

I’ve taken shots at making it work off and on for many months now. It was always been a thorn in my side because it made no sense that I couldn’t make it work. I’ve always ended up walking away from the problem in disgust, unable to figure it out.

Finally today, I figured out the problem. And it just hits home a little debugging heuristic that I always seem to forget: the more baffling the problem, the more likely it’s the result of missing something simple. In other words, rather than having some strange imagined problem involving the network, the problem was a rather simple configuration setting.

Turns out, the printer has to be shared on the CUPS server. This is a simple checkbox option that appears during the printer setup process in CUPS. How I missed something that basic for so long, I just don’t know.

Categories
Computers

Moving Linux to a New Hard Drive- a HowTo

About a week ago, I discovered that my primary hard drive was starting to enter its death throws. I was consistently receiving I/O errors and in one case, I had to reboot the system and perform an fsck on the root file system to repair the errors. Fortunately, the system was stable enough for long enough that I was able to come up with a replacement drive.

Yesterday, I set about migrating everything to the new hard drive. FWIW, it’s a 500GB, 3Gb SATA Barracuda from Seagate. Searching around, I came up with 2 articles (here and here) to guide me a bit. The hard part ended up being getting GRUB2 installed properly.

I’m happy to report that I’ve got everything running. After the jump is the process I used. The advantage for this process is that everything is done from the shell. There is no need to separately run an install program on the new drive or to figure out esoteric grub commands. If that sounds good to you, then let’s proceed…

Categories
Computers

Weird Apache2 Error

A couple of days ago, I was trying to update my older netbook, which is now the kids netbook, and I got a bunch of strange errors during the update. A little later that morning, I discovered that my internal web server had stopped working. It’s a pretty vanilla apache install from the debian/wheezy repo. The only mods I’d made were to allow for support of the public_html folder in user directories as well as setting it up for WordPress.

I’d performed an update over the weekend and my guess is that is when it got zooted. When I tried to restart the server I got the following error message:

/usr/sbin/apache2: 1: /usr/sbin/apache2: Syntax error: ")" unexpected
Action 'configtest' failed.

This meant next to nothing to me. I mean, it looks like an error in the compiled image, but that makes no sense. I had an even more cryptic error in the error.log file which I can’t reproduce because I deleted it in the process of getting it running again. But it read similar to the above with a bunch of what looked like Unicode characters after it- in other words, no text but a bunch of symbols. Very weird. Oh, and Google was no help. I seem to be the only one to have encountered this problem.

Ultimately, I was able to get it back by uninstalling and purging all the packages related to apache2. It’s possible it had something to do with the apache2.2-bin package, but I can’t really be sure. All I know is that until I removed everything webserver related, followed by reinstalling, I was unable to get it running again. Before I did that, I archived the configuration directories for apache, php and wordpress so all I’d have to do, hopefully, is replace the stock configuration with my archived settings. As it turned out, that worked.

Ultimately, not a very satisfying conclusion. But it’s running again, so I’ll take it.

Categories
Computers

Check Your Drive Boot Priorities

I don’t normally reboot my Linux machine. But this morning I was forced to because I installed a hard drive that the Wife’s desktop machine was no longer recognizing properly. It’s a 1.5TB Caviar drive from Western Digital. I installed it many moons ago (at this point) to store some of her home video work. At the time, it worked fine. It was only ever a backup drive so usage was minimal and somewhere along the way, Windows refused to recognize it as anything more than a 500GB drive that was inaccessible because Windows wanted to reformat it. This may or may not be related to the computer’s BIOS, which also only recognizes it as a 500GB drive.

Rather than be so hasty, I figured I’d try it out on my machine to see if the drive itself was bad, or if Windows was bad (my money was secretly on Windows.) So I shutdown my computer, installed the drive, plugged in all the cables and rebooted.

And was summarily dumped into grub rescue mode with a wonderfully cryptic message “Symbol not found: grub_divmod64_full.”

My initial reaction was … unprintable. All I can say is there was no physical violence, though it was touch and go for a couple seconds. Alas, the same cannot be said for my mouth.

On the chance that the newly installed hard drive was at fault, I powered down and disconnected the power and the data cables. Unfortunately, I ended up in the same place after re-powering.

After calming down, I futzed with things for a bit and quickly concluded that the problem was that grub was not attempting to boot the correct drive. I was somewhat flummoxed as to how that happened, but it seemed clear enough. The whole circumstance felt eerily familiar.

I had actually resolved myself to fixing the problem via a USB stick install medium. Towards that end, I rebooted into the BIOS setup to check the boot priorities. The computer was already configured properly in terms of device, so then, on a lark, I checked the hard drive boot priorities.

There is where I found my problem. The hard drive boot priorities had been shuffled and the drive with grub on it was no longer the 1st device. After ordering the drives properly, I rebooted and was happy to see a proper bootloader screen followed by everything loading up without issue. I can only conclude that installing the new drive caused the BIOS to shuffle the drive priorities around thus, breaking my system.

On the plus side, the hard drive works great. I don’t think I’ll be un-installing it any time soon though.

Categories
Computers

HDMI on the 1015PN

Necessity is the mother of invention. In this case, it’s the mother of learning how to make HDMI work on my netbook.

If you’re a fellow traveler eschewing desktops like Gnome or KDE for the relative compactness of a window manager this post might be of interest. I wasn’t really surprised to learn the HDMI port didn’t “just work” on my 1015PN. I was surprised at how straight forward it ended up being. It just took a fair amount of research, and a little luck following links from Google searches. I’ll skip the blow-by-blow and get right to the point describing the setup.

Categories
Computers

Graphics Switching Returns

Within the past couple of days, the alternatives system for debian/wheezy has been updated to support nvidia again. That means it’s once again possible to graphics switch on the 1015PN. There are a few changes as packages have changed names and dependencies have changed as well. Details after the jump.

Categories
Computers

1015PN Graphics Switching

UPDATE 7/21/2011:
Except for the xorg.conf files, this post is outdated. I’ve written an update here.

This thread shows how to accomplish graphics switching for ubuntu on the 1015PN. I’ve managed to apply it to the debian/wheezy install on my 1015PN. After the jump are the scripts I created as well as some simple directions.

Categories
Computers

How To Setup Printing to a Remote CUPS Server

UPDATE 5/10/2012: A further server side configuration detail is to make sure the printer in question is shared. This setting can be accessed during the printer modification dialog.

I’ll spare the blow-by-blow and just get right to the requirements. Suffice it to say that I spent way too much time figuring this stuff out. However, throwing it out there may spare someone else the frustration of banging their head against this stuff. As I’ve observed before- Linux printing sucks.

Categories
Computers

1015PN Status

Progress continues. I’ve yet to configure Samba or a new window manager, but I’ve continued to bring it along.

More info after the jump.

Categories
Computers

Opera 11 and Java

I guess this shows how little I actually go to sites that use java. When I finally encountered one yesterday, I learned that java was broken on my computer where my browser was concerned. I use Opera and anyone who has used it for any time knows that this happens regularly with Opera. Especially when it comes to updates. It’s annoying, but the advantages of Opera over other browsers makes it worth the minor hassle.

I’ll spare the blow-by-blow and get right to the solution. Assuming that the sun-java-plugin is installed and linked to properly, there is one system setting that needs to be adjusted. In the /etc/sysctl.d/bindv6only.conf file the net.ipv6.bindv6only setting should be 0 instead of 1. (I suppose I should mention that I’m running a 64-bit debian/testing setup.) Networking had to be restarted after making the change.

See here for details.

Categories
Computers

php5 and apache2 and public_html directories

I finally got around to setting up WordPress on my home server for purposes of tinkering. I decided to install the blog in the public_html directory in my home. The apache2 webserver was already installed and I knew that browsing to the public_html folder worked just fine.

But when I tried to access the WordPress install page, all the browser wanted to do was download it as a text file.

Hmmm.

So I stuck a php file with phpinfo() in the public_html folder and tried to access it. Same result.

OK. So I check for a few things using aptitude and checking the enabled modules in the apache2 setup directory and it looks like everything should work. So I decide to stick the phpinfo() code into a file under /var/www since that’s the document root.

VOILA! The PHP info page pops into view. So, for some reason, PHP is disabled for public_html folders on my machine (a debian/testing installation). Some quick googling turned up the culprit. It was 5 lines in the php5.conf file under the apache2/mods-available directory:

<IfModule mod_php5.c>
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch "\.phps$">
        SetHandler application/x-httpd-php-source
    </FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.    
#    <IfModule mod_userdir.c>
#        <Directory /home/*/public_html>
#            php_admin_value engine Off
#        </Directory>
#    </IfModule>
</IfModule>

As can be seen, there’s even a handy little explanation! After commenting them out and running /etc/init.d/apache2 restart I was finally able to install WordPress on my home machine. Kinda blew the whole “5 minute install” thing though.

Categories
Computers

Grub Rescue Mode on AMD64

We had a little power outage last night so when I came down this morning, the computer was, naturally, off. Turn it on, wait for boot process to complete only to see the wonderful words:

Attempting to enter rescue mode

error: the symbol ‘grub_xputs’ not found

grub rescue>

Lovely way to start the weekend.

Categories
Computers

More EEE Touchpad Nonsense

Oh for F!@#$%’s sake.

Another update to the xserver and my touchpad is broken. After googling for about 10 minutes, I come up with this thread from just a few days ago. Apparently udev configuration is out and the xorg.conf is back in.

This is definitely a weak point in open source stuff. Changes like this should be documented better or some kind of warning or explanation that current configuration techniques are about to be broken should be available.

I suppose this is what I get for using the ‘testing’ distro.

UPDATE:

Here’s the relevant section to add to xorg.conf:

Section "InputClass"
    Identifier  "Synaptics"
    driver      "synaptics"
    MatchProduct    "ETPS/2"
    MatchDevicePath "/dev/input/event9"
    Option      "VertEdgeScroll"    "1"
    Option      "MaxSpeed"      "1"
    Option      "AccelFactor"       "0.05"
    Option      "TapButton1"        "1"
    Option      "TapButton2"        "2"
    Option      "TapButton3"        "3"
EndSection

See the InputClass section of the xorg.conf man page.

UPDATE II:

The two Match lines can be replaced with a MatchIsTouchpad "1" line. I don’t know if this is better or not- but it seems like it might be preferrable since InputClass sections are applied to anything that matches according to the man page. At least it’s limited to touchpads this way.

Categories
Computers

Installing ProFont on Debian

I wish I could say it was a rewarding experience, alas, I cannot. At least not without descending into maniacal laughter for a few moments.

One of my personal quirks is an inability to let something go. Especially if it’s computer related. Being unable to just let-it-go has it’s pluses as minuses. On the plus side, I’ve solved some pretty tricky computer related problems and learned some interesting lessons along the way. On the minus side, I can waste hours working the problem, finding a solution and feel like I’ve wasted that time.

This experience goes in the minus column.

Categories
Computers

Debian Updates?

I’ve got apt-mirror setup here to serve updates for my debian based computers here at home. The update script hasn’t downloaded an update for AMD64 squeeze or my EEE laptop for almost a week. I’ve done sanity checks as well by swapping out my sources.list file to pull directly from the debian servers and I get the same result. Very odd for that amount of time to pass with no updates.

I’m assuming that ‘squeeze’ is in the process of being frozen and this has also temporarily frozen the ‘testing’ repo. I actually pull updates from ‘testing’ as opposed to ‘squeeze’ so I’m a little surprised that I’m affected. More than likely this is a consequence of my ignorance regarding the actual management of the repos. I haven’t seen any announcements regarding freezing the current testing code, so that’s my main cause for confusion.

Hopefully we get back to normally scheduled updating soon.

UPDATE: Apparently a main server has failed so updates are frozen for the time being. Thanks to Willian in the comments.

UPDATE 4/4/10: Cool beans- repo’s available again. Back to regularly scheduled updating.

Categories
Computers

Building xpdf for Debian

For whatever reason, xpdf has disappeared from the Debian testing repository. It’s a nuisance since it seems to be the best combination of fast and usable among the various non-adobe pdf readers. It appears that a version has been reintroduced to sid, but it’s been awhile now and I wanted a working pdf reader.

So I opted to build it from source.

Categories
Computers

apt-mirror Update

The download took all night. It ended a little after 7 this morning, which pegs it at about 14 hours to download 65GB. My internet connection is a 10Mbit cable line, so there’s a bench mark of sorts.

When I embarked on this little project, my goal was to come up with a way to force apt-cacher-ng to update all of its cache on a schedule. For the native machine/architecture all that is required is to schedule an apt-get update which can be done by enabling it in the apt config files. But I couldn’t figure out how to force the same thing for a foreign architecture (ie- for another computer running i386 based stuff) so the files would already exist on the network.

The more I thought about it, I realized there wasn’t any bandwidth savings to be had because, though both machines run debian/testing, they both required different sets of package files because of the different architectures. Therefore, anything I was doing was going to be for creating a more convenient update process by having the files already present on the local network. The apt-mirror package isn’t ideal since it downloads an entire repository for a debian branch rather than caching and updating just the packages I need. However, it’s better than a full-blown mirror and, once it’s initially setup, the downloading is merely a matter of updating the local repository. In the end, it seemed like the best compromise.

Categories
Computers

apt-mirror

Prior to the server mobo dieing I had been using apt-cacher-ng to minimize internet traffic. The setup worked well since both my EEE and my server were running i386 packages from the testing distribution.

With the new mobo in the server, all the packages are amd64 based packages. Thus, I’m not really gaining any advantages with apt-cacher since different packages are going to the two computers. So I’m trying out the apt-mirror package since it can be configured to download packages for different architectures.

Since it’s a mirror as opposed to a caching application, it’s downloading all of the packages related to testing for both i386 and amd64. I started it about 5:15PM. The download size is ~65GB. It’s still downloading.

More later… once this step is complete.

Categories
Computers

EEE Framebuffer

The other day I was debugging my awesome configuration and I zooted it. I had missed a comma in a table and the Lua stuff puked on me and awesome stopped working. So I went and dropped into a tty console to fix the problem.

Except my tty console was blank!

I tried all 6 of them and they were all blank. I was able to fix the configuration problem using other means, but I resolved to investigate where my tty consoles had gone.

Categories
Computers

Awesome 3.4

Given my last post related to upgrading awesome to the 3.4 version, I figure it’s only fair to give credit where it’s due. I subscribed to the user mailing list hoping for some help. I got it.

Quick … kudos to the mailing list guys.

The documentation is, unfortunately, lacking in this area. However, when creating a progressbar widget, which is all the my battery indicator is, the widget itself has a default layout of leftright. This setting is not overridden by the wibox setting it is placed in. To change it, specify a “layout” arg when creating the progressbar widget. Like so:

pb = awful.widget.progressbar({ layout = awful.widget.layout.horizontal.rightleft, … })

Now the widget is located where I want it in the wibox.

Also, when trying to attach mouse buttons to the progressbar widet, you have to access the buttons method through the widget as follows:

pb.widget.buttons(awful.util.table.join(awful.button…

So there you have it. Thanks to the mailing list for helping me out with this stuff.