Sunday, February 15, 2015

Terminal Refresh - Chromebook Users and Terminal

Years ago, I wrote a terminal cheat sheet over on pretendertothepower.com I think it is time for an update.
One command that I misunderstood from the beginning was sudo. This concept troubled me as there is a root account, which is sort of analogous to being an admin on Windows. Windows is bad news, because the admin account is so handy, or worse, required to do many standard things. This is not the case in all the various forms of Linux. xPud is a notable exception as you are always logged in as root.
By way of example, in Windows, the Admin account will not allow you to delete critical files from your system. At least, not without a lot of effort. Linux will happily allow the root user to delete ANYTHING!
Linux Rule One: If you don't know what outcome you need, root is NOT the tool for you.
On the other hand, you can gain temporary access to elevated privileges with the sudo command. This is actually the correct method for gaining privileges. Let's say you want to install some software, and you intend for all users to access it. The sudo command allows a user to gain privileges using their own password, not the root account password. The process creates a log of what is done in /var/log/auth.log; if mistakes are made, you can easily figure out what and when it was done.
In this example of sudo, we are going to install gedit. But we need to get ready for it.
sudo apt-get update
This command will tell your system to go and check what versions you have against what versions are available on the servers. It installs nothing. This is very important, because your linux computer has a local list of software available and it could be out of date. Update, update, Update!
The command for installing is:
sudo apt-get install gedit
Linux is made up of packages of software, in discrete chunks to make it more useable. The command apt-get install will put these packages on your system and make them useable.
You can go ahead and try to run both commands without the sudo. It will throw a nasty looking error.
Ok. Now we have gedit installed. We can open gedit without the sudo command. Type
gedit
As you can see, gedit is a very basic editor. We are going to use our elevated privileges and use gedit to do something a normal user cannot do. I am using a Chromebook with Crouton and I would like my Linux system to default to the $HOME/Downloads directory.
Let's fix this. Type sudo gedit .config/user-dirs.dirs to open the protected .config file.
What is not shown is all the activity in the terminal. At this point, since terminal opened gedit with elevated privileges, you should not close the terminal window.
Go ahead and change the text $Home/Desktop to $Home/Downloads.
I changed them all, but obviously you don't need to do that. Click save. You should see some activities in the terminal window.
Tomorrow we will look at using sudo for other purposes.

Sunday, January 4, 2015

GoDaddy and WordPress Error - The Problem, The Work-a-round and The Fix

Friday evening, I was hit by series of errors from WordPress.
When uploading images, I was confronted by these error messages:
“Unable to create directory wp-content/uploads/2015/01. Is its parent directory writable by the server?”
“The uploaded file could not be moved to wp-content/uploads/2015/01″
Obviously, my permissions were off, but I couldn't figure out where.
The quick and dirty work around was to log into GoDaddy's file management tool and create files and upload images via the tool. Back in WordPress, I needed to select a previously existing image and edit the code to match the files and directories I created in the previous step.
That is not optimal.
The correct answer is to correct the permissions on the server via the file management tool. I made several attempts, but it didn't seem to work:
After calling GoDaddy, I found where I was going wrong.
First and always, log out of WordPress. Second, the items Web Visible and Web Writable need to be ticked on the WordPress upload folder. The directory location is: /wp-content/uploads/. You likely don't have permission to edit the webroot directory, and you shouldn't give that much permission that high up.
In the image above they are not checked, because the Inherit tick disables those options. Untick it.
The other two become active. You can see the problem right away, the folder isn't Web Writable. Tick it.
Yesterday morning, I was not really happy with GoDaddy as the first tech via chat had the correct basic idea but didn't realize that "Inherit" tick disabled my visible/writable ticks. He added insult to injury by telling me he was having my permissions reset. He did not seem to know if this would fix the problem or enable my ability to fix the problem. His "solution" would take 30 minutes to four hours.
Obviously, nothing happened and I called support. These guys are much better. The next agent walked me through the exact same troubleshooting as before, this time informing me that the Inherit boxed disabled the other options. I was on hold longer than it took to fix the problem.
I am general happy with GoDaddy, but the tech I chatted with really didn't know what he was doing. He also didn't actually "reset my permissions" after promising. He also created a bunch of duplicate folders on my peice of their server and didn't delete them. I guess that is easily fixed, but I am annoyed.
The phone tech did every thing I needed, first time but I shouldn't have experienced this problem in the first place. I can't really fault the techs as someone else flipped the wrong switch on me and it certainly wasn't either of them.
At the end of the day, I can't really suggest chat as a support option. 

Monday, December 22, 2014

Maps – The Stave Church

Last week, I did a quick drawing of a Norse-themed building. 

Today, for the winter solstice, I knocked out a floor plan for a fantasy-themed stave church. When sketching this church, I imagined that the parishioners are followers of a river goddess and that the church is very old. 


From the exterior, this church would appear to be several stories high, but the interior shows a largely, airy nave. The church is orientated to the north and is a mirror of a river to the west of the church. Most rivers do not flow north, so this one is special. 

Half Baked Idea - The Demon Core

In my last post, I mentioned a device called the demon core. I know what it looks like, I know that it seethes with power. It is wildly dangerous. 
Aside from that, I know nothing. There was a real device called the demon core. It was 3.5 inch, subcritical mass of plutonium used for testing. In this capacity, it killed two scientists.

Nasty stuff. I may have to revisit this item and flesh it out for use in my campaign.

Sunday, December 21, 2014

Serpent Bay – Five Minute Vignette

A user request from Google Plus – post-apocalyptic maps. I am horrible with colored pencils and I've never tried a post-apocalyptic map. What I ended up with was a sketched vignette.



“They brought the demon core, blood hexes, and shells. They pushed us to the sea. In the woods, we moved like eidolons hunting, as the skies sizzled with hot brass and steel rain. The sea frothed blue and white; the gnashing of frustrated and frenzied selkies. 

“Desperation rose within us, fanned by orisons, curses, and automatic fire. 

“You tell ’em, we held those bastards at Serpent Bay.”

Tuesday, December 16, 2014

Of #Blackstormtroopers or How Right was My Mom

When I was a kid, my parents took me to see Star Wars, The Empire Strikes Back and Return of the Jedi. In the case of the last two, they let my sister and I ditch school. How cool are my parents?

My parents were largely silent on Star Wars. We knew they liked it, but in retrospect, they obviously enjoyed our love of the series more than their own pleasure. They stepped over countless Star Wars toys, sat through endless monologues, and fielded wacky questions about Tie Fighters and X-Wings. Now that I have children, I totally understand this.

However, during our first viewing of Return of the Jedi, my mother offered a singular and powerful opinion. I have to count it as one of the most important formative moments of my life.

Picture it:


Luke is standing over a crippled Darth Vader and Vader's voice is distorted, failing. He requests that Luke remove his mask, ending his life, so that he may look upon his son with his own eyes.

With great sorrow, Luke complies and we see that Sebastian Shaw is the actor playing Luke's father.

My mother was mortified. She spluttered "Where is hell is James Earl Jones!?!"

I hissed: "Mom! James Earl Jones is...."

Then I got it. She knew that James Earl Jones was Mark Hamill's dad. She just knew that was the right thing, and somehow I knew it too. That piece of accidental advice has stayed with me all my life. Skin color doesn't matter.

There is a corollary to this story. My wife purchased a set of Star Wars DVD's for me. One day, the kids and I watched all three movies. This was one of the special edition sets with all of the modifications George Lucas had time to throw in.

I was stunned when Hayden Christensen was cut into Shaw's role as Anakin.

I howled: "What the hell? That should be James Earl Jones!"

Monday, December 15, 2014

Chromebook's Task Manager

I have recently been suffering from some lockups and crashes. The need for a task manager was incredible and I lamented the lack of one.
How wrong I was. The hot key is Esc+Shift. Well. I feel stupid.
What I discovered using the task manager was that Adblock Plus was eating my RAM. Google Drive Sync, the ability to use and edit drive documents offline is also chewing on my memory.
As valuable as I find Adblock, I decided it to turn it off.
We shall see what happens.

Thursday, December 4, 2014

Legacy Formatting - Google Docs vs. Microsoft Office

Many years ago, I decided not to use Microsoft Office any more. Yeah me! But what if you have to use both Microsoft Office and Google Documents? Well, you can.
BUT... it seems that all formatting done in Google Docs IS supported by Microsoft Office while Microsoft Office formatting can be horribly scrambled by Google Docs. Nothing is more annoying than perfecting form in Excel or Word and having Google Docs screw up the formatting.
The obvious and horrendous option is to rewrite the whole document in Google Docs. My answer to that is "Heck no."
The better option is to make sure Google Docs does not try to convert Microsoft Documents when they are upload. There is a trick to this. Google Docs doesn't let you do this. Why? All Google Docs are stored in or on your Google Drive. That is where the setting is.
Annoying, I know.
Go to Google Drive and click the gear.
Click settings. The window that opens has exact four options. Uncheck the first item called "Convert uploads".
Once this is done, you will have your Microsoft Office Format preserved. There is a minor cost for doing this - You may not edit the document. On the other hand, the document has a preview mode available, a conversion option, sharing and email choices, and printing options. Usually this is good enough for most users.
I made a choice not to use Microsoft Office, but do you know why Office exists? Because some people like it and continue to use what they know best. As it should be.
When you need to keep your workflow moving and have all kinds of new tools available glitches happen. I hate it when a new product like Drive or Docs comes a long and breaks old files, forcing you to rework them.
If you find yourself in this set of circumstances, you really should pick one software product and use it exclusively. If you end up picking drive. you will eventually need to rework and reformat your files. But don't let your software dictate when you need to do this.