Category Archives: zA High-Tech Blech!

Computers got you down? Microwave wristwatch talking back again? Survival solutions abound.

An IT professional in confessional.

Opera flickr Workaround

I have been having trouble signing into flickr for a long time now.  As a matter of fact, I mostly stopped using flickr because of this issue.

My initial tests pointed to a third-party cookie issue.  It seemed that either flickr was requiring them or Opera was misinterpreting non-third-party cookies as though they were third-party cookies.

A recent test has shown this to be incorrect.  The problem does relate to the cookies but in the end you will be able to sign into flickr with third-party cookies globally disabled using Opera.

Here is my workaround.  It is very simple.

When you attempt to sign into flickr you will be taken to a page showing this:

Cookie Error Page
Cookie Error Page

Clicking on the login link or returning to flickr’s home page and clicking the login link or just going to the login page directly will all take you into this silly loop from which you will not be able to extract yourself.

What you may not notice is the small redirect page which flashed just before this cookie error page.  Go back one page (using a keyboard shortcut, a mouse gesture, or your browser’s back button) and you will see a page which reads:

If you are seeing this page, your browser settings prevent you from automatically redirecting to a new URL.

Please click here to continue.

Click there.

You have successfully worked around the issue.  Congratulations.

Share

Slipped Clutch; Blew Transmission

Haha!  Oh, how I love breaking things.  It’s a how-to for fixing them.

I didn’t like the fact that I had a drive without a name (officially it was named “disk” and when it was mounted it appeared as “160 GB Disk” or some such).  I wanted to give it a name.

I opened GParted, unmounted the drive, and renamed it:

  1. System —> Administration —> Partition Editor
  2. You will be asked to enter your password
  3. Select the drive from the drop-down at the right of the button bar within the GParted
  4. Be sure you have selected the correct drive or you can really screw things up
  5. Right-click on the partition/drive in question (below the button bar) and choose Unmount
  6. Again, right-click on the partition/drive in question (below the button bar) and this time choose Label
  7. Name the drive whatever you want
  8. Close GParted

This worked wonders.  However, it breaks anything formerly linked to objects on that drive/partition.  This should come as no surprise.  It may come as a bit of a shock that you’ll have to open the hood to fix a couple of these.

I decided the easiest way to remount the drive was to merely reboot.  You may be able to choose the new drive by its new name from your Places menu, but it probably won’t hurt anything to go ahead and reboot as I did.

Now, I use Transmission for BitTorrents.  My BT download folder was located on that newly renamed drive.  When I subsequently opened Transmission it was a little lost, understandably.  So I told Transmission where the download folder was now located.

It basically ignored me.  I mean, in all the places one would care to look Transmission said it was going to use the new location, but when I opened the log file (Help —> Message Log) it was throwing errors which related to the old location (specifically to it not being found).

A little research told me that this information was kept in a file:

  • /home/[username]/.config/transmission/settings.json

I opened that file in a text editor (choose any you’d like) and changed all occurances of the former path to the new path.  Yours might look something like this:

  • OLD: “/media/disk/DownloadFolder”
  • NEW: “/media/TorrentDrive/DownloadFolder”

Sounds basic enough, yes?

Well, it will cause a new kind of havoc.  This is the correct solution, but before you do that (or like me after you’ve done that a few times) you will want to do one other thing:

  1. Copy your current torrent files by right-clicking on /home/[username]/.config/transmission/torrents
  2. Paste a copy of this folder some place safe—I chose my desktop
  3. Remove all torrents from Transmission by right-clicking each or all of them and choosing “Remove
  4. Close Transmission
  5. The Important Step: Now go back and perform the editing steps to change the path as mentioned above
  6. Open Transmission
  7. Some of your torrents may reload themselves, but toss all of the torrent files from the copy we made in step 2 into Transmission (drag and drop works nicely)—the duplicates will not be reloaded
  8. I manually told Transmission to Start and Verify Local Data, but it will likely do both all on its own

Hope you find this time-saving.

Share

The Hyphen, Hyphen, Double-Dash Dilemma

If you have been following along with my recent posts, you know that I had some difficulty in posting a bit of html code recently. The reason for the difficulty is that WordPress (which powers my blog) doesn’t like to display certain non-alphanumeric characters in duos. In particular it sometimes truncates double spaces (  ) and double hyphens (–) by only displaying a single space or hyphen.

Normally this is pretty innocuous.  At worst I have to paste in a dash when I want more than one hyphen displayed.  I use this all the time (—).  That works fine when I am using the dash as a grammar element.  However, when I am displaying code for users to copy—or merely to read—I can’t simply substitute the dash for the double hyphen.

I was pointed to a new WordPress plugin called SyntaxHighlighter Plus (here and here).  This is based on SyntaxHighlighter by Alex Gorbatchev.

This plugin allows me to surround various kinds of code in a new tag as follows:

Code Goes Here

Using this method will produce a formated code box with numbered lines of code:

[CODE=”HTML”]


Hello, World!


[/CODE]

The sourcecode tag supports at least the following code types: cpp, csharp, css, delphi, html, java, jscript, php, python, ruby, sql, vb, and xml.  I’m not clear how much the code type you enter matters because I used html for my code which contained both html and php. The type will adjust the format highlighting; however, there are some issues with getting things looking just so and your results will vary.

Best of luck.

Share

What the Hell are Darkly Glasses?

Realizing my category names are oftentimes a bit cryptic, I have been seeking a way to ensure my readers were able to decipher them.  Here is my version of how to add category descriptions to WordPress (category) archive pages. I worked this out with the help of another WP user over at their forums. I also made use of this page at WP.

Basically, what it comes down to is adding one line of code to your post loop. Initially, I thought a plugin was required, but this method requires no additional plugin—merely the addition of one line of code (in the aforementioned loop).

I decided that the best location for this category description adding code was in my archive.php file. I use the deafult theme (slightly modified) and your theme may or may not have an archive.php file. You will have to work out for yourself where to place this line of code. If you are, like me, using the default theme, I recommend making a copy of the default theme (I called mine defaultMod) so that you can always refer back to the original default theme and its code.

In your archive.php file you will find the following line of code:

<h2 class=”pagetitle”>Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>

Following that, I added a new line of code to include the appropriate description:

<?php
$category = get_the_category();
echo category_description();
?>

I wanted to make some other wiggles, and so my final product actually looks like this:

<!--  Default category title code  -->
<!--		<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>  -->

<!--  Modified category title and added description code  -->

<h2 class="pagetitle"> <?php single_cat_title(); ?> </h2>
<center>
<?php
$category = get_the_category();
echo category_description();
?>
</center>
<br />

<!--  Back to default  -->

As you can see, I like my modifications to be well documented. I also chose to center my description.  (I should probably put that centering into a css but I haven’t.)

Once you have made this change, your category descriptions should appear on any category archive page; they will appear above the first post. I have tested this against posts with multiple categories and against cases where the description is empty and against categories and sub-categories. It seems to be working as expected all around.

Share

Dell Joins (One of) My Movement(s)

It’s hard to believe that I have two concurrent movements under my wings, but what can I say?  I started Luxagraphia years ago and have even written a manifesto.  More recently I began advocating Linux for Anybody and encouraged others to join along.

Dell has, unbeknownst to me, joined along.  Maybe it’s just ego, but I would have liked an e-mail or a phone call, just a little “hey, we thought you should know” but oh, well.

Dell has been selling a tiny laptop among a line of small laptops (so called netbooks) all of which come with the option of being outfitted by the manufacturer with Ubuntu 8.04—a line of laptops starting at about $250.  They are branded as Inspirons carrying the model signatures Mini 9 (8.5 inch display), Mini 10 (10 inch), and Mini 12 (12 inch).  (The 10 and 12 start about $300.)

You can read an interesting article (with a great comment thread) here.  The claim by Dell is that these Ubuntu installed netbooks are accounting for fully one-third of their total netbook sales in the US.  (The Mini 10 and Mini 12 are too new to be included in these statistics, and Dell is currently only offering Ubuntu as an option to their US market.)

As they say: a walk will give us a run.  Thanks, Dell.

Happy hunting, you crazy squirrels.

Share

Ubuntu Sends a Print-Job to WindowsLand

Another of the more basic computing needs is the ability to print to a shared printer.  Now if you are running all Ubuntu systems, that’s certainly a boon for you.  But what happens if you have that old, clunky Windows box you are using as a sort of private server for your music hard drive and your printer?  You will want to set your Ubuntu machine up to print through the Windows shared printer, that’s what.

I’m going to assume you have shared your Windows printer.  You will need some information from that machine, so have it handy (see my article concerning remotely accessing a Windows machine here).

Open your Ubuntu printers dialog:

  • System (menu) —> Administration —> Printing

Now prepare a new printer:

  • New —> Printer

On the New Server dialog under Select Connection choose Windows Printer via SAMBA.  On the left the SAMBA area will appear.  In the “smb://” text field I was successful by entering serverIP/printerShareName (for instance “192.168.1.1/HPPrinter”).  It ought to work also using serverName/printerShareName.  (You can find the share name for your printer on the Sharing tab of the Properties dialog for the printer in question on your Windows machine.)

NOTE: Do not use spaces in your share names; it can only cause trouble.

Neither the “Browse” nor the “Verify” buttons worked for me.  You, I suspect, may safely ignore them.  Instead, once you have entered the information for the server and printer share, click on the “Forward” button.

Now we get to an area that may be more familiar feeling.  Under “Select printer from database” find your specific brand under “Makes” (mine was an HP).  Then click the “Forward” button.

Now locate your specific model under “Model“.  Once you have done so a list of potential drivers will appear under “Drivers“.  Prefer the one listed as “(recommended)” (there ought to be one).

This is the last page of the New Printer dialog.  This is information largely for your benefit and not something Ubuntu or Windows needs to get along.  The Printer Name (short name) field should auto-fill.  You may leave it alone.  The (optional) Description field may be used to give the printer some name you like to call it (Old Mr. Crappy or Sweet Dumpster Laserjet or anything else that strikes your fancy).  The Location field is for if you want to say something like “The printer in the kitchen” or “Pass the printer on the left-hand side”.  Click the “Apply” button and you are ready to send a test page to the printer from your Ubuntu machine.

Happy hunting, you crazy campers.

Addendum:

Well, that worked for a few days and then, for reasons obscure to me, it stopped working. I had to go back and re-create the print queue on my Ubuntu machine this time using the printer port. So now my entry looks more like this:

smb://ServerName:Port#/PrinterShareName

So, either:

MyServer:usb001/HPPrinter

or:

192.168.1.1:usb001/HPPrinter

Ok, now you can have some happy hunting.

Share

Weathering Ubuntu Heights

Some of my friends have mentioned that a lot of what I post as helpful to Ubuntu newcomers tends toward the advanced.  So today I am going to post something simple and which will have a positive impact.

Truth be told, the impact is mostly of a user-satisfactory nature and is not at all performance related.

It is possible to add the weather and temperature to your clock/calendar in Gnome under Ubuntu.  (I use the Gnome desktop environment and not KDE, so there you are.)  In fact, it’s really quite simple.

The first thing you will want to do is open your clock’s preferences by right-clicking on your clock and choosing “Preferences“.  My clock is located in my top panel (tool bar) at the far right.  Since this is user-modifiable, I trust you know where to find yours.

With the Clock Preferences dialog open, click on the Locations tab.  Click on the “Add” button and an unnamed dialog will appear.  I typed Seattle into the “Location Name:” dialog and was offered two options.  I chose the Boeing field entry as this was closer to my location than SeaTac.  You may add additional locations here which could be very useful if you have a laptop with which you travel.  If you are able to use one of the locations offered, the other fields will be auto-filled for you.  Alternatively you can fill in the fields manually.  (Latitude and Longitude are optional.  I don’t know how you’d get any weather information for a manually created location.)

Double check on the General tab to ensure that “Show weather” and “Show temperature” are checked.

You may close this dialog using the “Close” button.  Feel free to add other locations later.

Now that you have at least one location created, if you left-click on the clock to pull down the calendar area you will see that your new location is listed (you may have to click the triagle to the left of “Locations” if that segment is hidden).  Since my location is my home, I set Seattle as my home location by clicking the “Set” button at the right of Seattle under “Locations”.  (Note that you can access the Locations tab of the Clock Preferences dialog by clicking on the “Edit” button at the right of “Locations” in this drop-down area.)

Once this is all done, you will be able to mouse-over your weather symbol, either the one next to the clock or the one under “Locations”, and a balloon will appear with weather information.  Since I live in Seattle, the weather symbol is a raining cloud at the moment—though, oddly, outside my studio window it appears sunny.

As a final note, you can select your units for temperature (including Kelvin) and wind speed.

At any rate, have fun with that and as always happy hunting.

Share

Ubuntu Gets a Second Friend (or More)

You have your Ubuntu system up and running.  Now you’d like to add a second harddrive to store all of your porn music.  You may know the ropes for this in Windows, but the world of Linux is, as usual, a little different.

Here is my take on adding a second (or third…) drive to your Linux box.  You may want to read through the entire post and then only select out the bits that actually apply to your specific situation.

First we need to install the drive into your machine.  I am only going to look at SATA and IDE drives here.  As regards IDE drives we have to worry about jumper settings.  This is not an issue with SATA drives.

Drives in IDE are attached to a channel.  You can have up to two drives attached to a given IDE channel.  One of those drives is the master and the other the slave.  Most commonly you will set your jumper settings to Cable Select and merely position the drives accordingly (Master closest to the board and Slave at the end of the cable).  There are cases where this arrangement won’t work or isn’t possible, but try that first and see if your drive is recognized.

One important thing to note here is that your OS drive (the drive from which you boot your operating system) must be the Master on its IDE channel.  Also of interest is that when you have a CD drive and a harddrive attached to the same channel you will want to ensure the harddrive is in the Master position (or it may not show up once you log in).

So, arrange your new drive according to these basic rules, and adjust your IDE jumper settings as indicated by the manufacturer.  (Usually the jumper settings are indicated somewhere on the drive but I have in the past had to seek out the jumper settings on-line.  Google is your friend.)

If you are installing a drive that is already partitioned and contains data you can skip this next bit.  If you are installing a new drive (or one which you intend to re-format) you will want to get a new partition created and formatted.

Assuming you have surmounted this little jumper problem you should see your newly installed drive in your system when you run GParted (System —> Administration —> Partition Editor).  This is the dangerous part so be cautious—you can ruin a perfectly good partition, like your OS partition, by choosing the wrong drive here.

At the right of the GParted window you will see a drop down of drives.  It is probably defaulted to your main drive and will perhaps read something like /dev/sda (74.53 GiB).  As you can see from this, my main drive is about 75 GB.  If I click on the drop down I get a list of the other drives installed on this machine (I have two): /dev/sdb (149.05 GiB) & /dev/sdc (465.76 GiB).

Your new drive will likely be sdb, but as I have said you must be cautious.

From the dropdown choose the drive you wish to partition.  We may create more than one partition on the drive but we are going to create a single large partition in this example.

(If a partition already exists and you wish to destroy that partition and all its containing data, you merely select the partition and click the Delete button from the toolbar in GParted.)

Once you have selected the drive you wish to partition from the dropdown, you must then click on the unpartitioned space in the visual display immediately below the toolbar.  This selects the partition/free-space so you can work on it.  Next, click the New button in the toolbar to begin partition creation.

You will have to select a file system.  I typically choose the ext3 file system.  It’s standard to Linux and uses indexing.  Quite fast, really.  There may be concerns about attaching Mac or Windows machines to this drive (should you choose to share the drive to other machines later).  However, since utilities can be had for both of those operating systems which will allow them to connect to ext3 it still stands as a good choice—and in my opinion the best choice.  (If you are certain you don’t need indexing, ext2 will be sufficient.)

(Certain sharing is possible across platforms even using ext3; for instance you can create a Samba share (like a Windows File and Print share) and other computers will be able to read from and potentially write to the file system; the reason for this is that Samba performs a translation and the other system doesn’t actually have to mount, read, or write using ext3.)

(Mac has a hard time writing to NTFS.  For the problems with FAT32 see my ink.  You can read much more about the ext3 file system here.)

Let GParted create the partition (just using the defaults should be sufficient).  In order to write these changes to the disc you will have to click the Apply button.  This is the final safeguard.  Until you click Apply nothing gets written.  Once you’ve gone that far, there is no turning back.

So at this point your drive exists and has a file system on it.  Your system sees it.  Now you will want to tell your system to give you access to the drive by mounting that new drive.

I have been mounting my drives in /media but will listen to altering opinions on the matter.  Open a terminal and change into the /media directory: cd /media .  Once in /media, take a look around: ls -al .  This will display a list of all folders/files in /media which roughly corresponds to all the drives to which you are mounted.  You should at least see your OS drive and your CD drive in there already.  Create a folder for your new drive: mkdir Musica (I called mine Musica because there is music on it, clever eh?).  Name yours anything you’d like but don’t use spaces.

Ok, so now you have a place to mount the new drive.  Let’s actually mount it.

If you installed a drive from another system, you may run into a permissions issue at this point.  If you do, you will want to take ownership of the entire drive: sudo chown [username]:[usergroup] /media/[harddrive] (use your actual username—your usergroup is presumably also your username).

Mount the drive: sudo mount /dev/sdb1 /media/Musica (make necessary changes to match your actual drive information).  Note the sdb1 in this command.  That is because sdb is the drive while sdb1 is the first partition on that drive.

Again, if you run into permissions troubles try opening the permissions for the drive: chmod 777 /media/Musica (again making appropriate alterations to the code—777 means anybody on your machine has general access to the drive mount but you can still limit permissions on containing folders later).

Perhaps you don’t want to run this mount command each time you login?  Well then, why not set up an auto-mount?

Open your fstab file in GEdit: gksudo gedit /etc/fstab (password required).  You will see a list of drives and you will want to add a couple of lines below that list of drives:

  • # Here is my auto-mount for my Musica drive
  • /dev/sdb1 /media/Musica ext3 defaults 0 0

I have taken to using UUID’s instead of /dev/[drive] because the UUID of a drive will never change (where the drive designation can, the same way that drive letters can change under Windows).  You can get a drive’s UUID easily enough ( sudo blkid ) then substitute UUID=blahblahblah in your fstab entry.

By the way, what comes after the # is merely a notation and may be altered to your whim.  Alter yours as per usual, including the file system type if you didn’t use ext3.  You may add as many drives as is necessary.

Log out and back in and you should be all set to go.

Please let me know if my instructions need work.  I rather cobbled them together from at least this post and this post and this post (many thanks to them).

Happy hunting.

Share

Amarok Control Set

While setting up my Amarok to play from my music collection I came across a post in which the question was asked if it were possible to play from one’s collection while excluding .flac files. I am going to answer that question, in the affirmative, for all file types. Additionally I am going to show how using the advanced filter set in the built in search tool within Amarok one can really narrowly define what gets chosen out of one’s own collection.

So, I am going to assume that you have Amarok up and running and that you have organized your collection and that Amarok is displaying your collection.  If you haven’t made it this far, bookmark this article and come back later.

In Amarok there is a search field and to the right of that search field is a button marked with an ellipse (them’s three periods: ).

Amarok Unfiltered Showing Ellipse Button
Amarok Unfiltered Showing Ellipse Button

If you click on the ellipse button it will bring up an Edit Filter dialog:

Edit Filter: Before
Edit Filter: Before

You may be tempted to select the Exclude radio button (lower left) and then change the Attribute: dropdown from Simple Search to Type.  (If you change the dropdown first, the rest of the dialog greys out and you won’t be able to select Exclude.)  This will for some reason fail.  Instead actually select to search by flac (or whatever you wish to later exclude).  In this condition, Amarok is set to search according to file type.  Now you just have to enter flac (no dot) in the search field (to the right  of the Attribute: dropdown) and you’re all set.

Edit Filter: After
Edit Filter: After

Once you have made these changes you can click OK to close the dialog.  Now Amarok will search for all your flac files.  To change this to an exclusion, merely place a negative sign () in front of the phrase type:”flac” creating instead -type:”flac”.

Amarok Filtered Showing Search Criteria
Amarok Filtered Showing Search Criteria

As you can see, this method can be used for any support file type.  Just enter the extension you wish you filter by or exclude and if it’s for exclusion use the negative sign ().

Once you have your search results displayed (and this could take a moment with a large collection) you can then add those results to a playlist.  Not strictly necessary especially since running the search is fairly simple and it would be constantly in sync with your currently loaded collection.

Have fun with that and happy hunting.

Share

Linux and the Visually Impared: the Sequel

If you enjoyed learning how to transform a single application in Ubuntu into a nagative image of itself (read: reversing all the colors), then you’ll love to read about this newest accidental discovery of mine.

Read the original article here.

I have now discovered that you can make the entire Ubuntu system go negative by using the shortcut super-m (windows-m).

Apparently I mash my fingers all over the keyboard when I type.  Probably due to my frenetic nature.  No grace at all.  Really makes one wonder how I can create such fine and delicate pieces of art.

Share