Wednesday, 8 October 2014

Mavericks Black Screen with Cursor (mouse)

Just encountered two Mac Mini's which, when turned on, show a black screen with a cursor which moves when you move the mouse. cmd + alt + esc doesn't do anything.

Tried:
  1. reset PRAM
  2. SafeBoot (hold down shift)
  3. hold down cmd + s and type "/sbin/fsck -yf"
I gave up and reimaged these macs.

Did a bit of research afterwards and found this apple discussions on it. There were two suggested fixes. One involved blindly logging in which isn't an ICT Technician friendly fix. However, Spiro.r suggested:

1. ssh 192.160.0.1 -l username
2. sudo rm /Library/Preferences/com.apple.loginwindow.plist
3. sudo rm /Library/Preferences/loginwindow.plist
4. sudo rm /private/var/db/.AppleUpgrade
5. reboot


As ssh is by default turned off, you could also do this in single user mode (hold down cmd + s).

Apparently it is a problem with updates. It basically wants you to log in and OK an update, but seems to stop the login screen appearing. Not entirely sure anyone knows what's happening, but deleting these preference files and .AppleUpgrade fixes it. I shall try it next time I see it.

Monday, 6 October 2014

Apple Remote Desktop ARD preferences and presets transfer

It's always good to have a backup of all the preferences and tasks you have saved in ARD. I thought I had it sussed,  just need the file:

~/Library/Prefeences/com.apple.remotedesktop.plist

Turns out as of version 3.7 it's all been 'sandbox'ed. That means these prefences files have been moved to:
~/Library/Container/com.apple.remotedesktop/Library/Preferences/com.apple.remotedesktop.plist

But not only this, it has to have the right ACL's (permissions)

What I tried to do is copy this file between accounts and it ended up replacing the copied file with a blank one every time. It wasn't until I read this post which mentioned resetting ACL's. THis is the command they suggested using:

{ sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
So first I copied the com.apple.remotedesktop.plist file to  
~/Library/Container/com.apple.remotedesktop/Library/Preferences/com.apple.remotedesktop.plist

I then ran the command in terminal.

Then I logged out and back in again.

Crash bang wollop it worked.

Cheers

Thursday, 2 October 2014

Inventory and job logging database

Over the years I have been working, I've realised a searchable database of jobs done and using which inventory items would be very useful for both large organisations, and also for individuals as well.

The important things to log are (in no particular order):
When: Time frame
Who: The person or persons involved
Where: the locations involved
What: The objects involved
How: The process that was performed (e.g. replace, fix, switch off and then on)

What the database would require are:
Time
People
Places
Objects
Processes

One other aspect of this database that would be useful is booking equipment. But this could be thought of as a process?

Time:
Start time
Predicted end time
End Time

People
Login Name
Contact Details

Places:
Geographical
Room Number

Objects:
Serial Number
Make
Model
Specifications

Processes:
Type of process


An few working examples to help design the database:

A new iMac has just been delivered to the college and is put in a computer suite:

  1. The database is logged onto with Username and Password
  2. A process is selected called: Add item to inventory
  3. User adds:
    1. Make
    2. Model
    3. Serial Number
    4. Organisation made Serial Number
    5. Specifications
    6. Room
A student would like to borrow an iPad:
  1. The database is logged onto with Username and Password
  2. A process is selected called: book out item
  3. User selects
    1. type of item:
      1. Make: Apple
      2. Model: iPad 2
    2. Time from: Today at 12:15
    3. Time until: Today at 16:00
  4. User is show whether any iPad 2's available for that time
  5. User confirms booking
  6. User sees instructions
Well, just having another look at the database and found this nice little helpful question and answer about querying a database to find 'free' items. Also describes the database very nicely using MySQL (need to learn this)

I'm thinking about making it in Access and then exporting it to MySQL? Or perhaps I should just delve straight in?



Ready made alternatives:

Here is a list of starting points for different systems:
Drupal - Merci module - this looks good!!
Drupal - Resource booking
Drupal - Resource conflict

Sunday, 21 September 2014

Drying clothes = price + running costs (when will it pay off)

Running cost per year= price per kWH * kWH per cycle * 365 / 2 (i recon we'll run it once every other day)
price per kWH = 13.7p
362 / 2 * 13.7p /100 (convert to pounds) = 25

Tumble dryers:

A++ energy rating
Cost = £599
Running cost = £46

A+ Rating
Cost = £479
Running cost = £73.75

B Rating
Cost = £299
Running cost = £85

C Rating
Cost = £150
Running cost = £91

You could work out how many years the more economic will start paying off over the other by doing some algebra:

A++ energy rating cost + (running cost * years) = C energy rating cost + (running cost * years)

a + (b * x) = c + (d * x)

a - c = dx - bx
a - c = (d-b)x
(a-c)/(d-b) = x

A++ compared with C
(599-150)/(91-46) = 9.99 years

A+ compared with C
(479-150)/(91-73.75)= 20.1 years

B (other) compared with C
(299-150)/(91-85) = 24.8 years

A+ compared with B
(479-299)/(85-73.75) = 17.6 years

So, it looks like C rating is better then all of the above up until 9 years. How long will we have it for? I guess the washing machine has lasted 10 years so far and it's still going strong.

Of course if you double the amount of time you use it, you half the number of years. So after 5 years A++ will be paying off better.

Lets compare to some interesting inventions:

JML Dri Buddi
Cost = £45
running cost = (1.2kW * 3 hours = 3.6kwh) * 25 = £90

Lets compare with C rating:
(150-45)/(91-90) = 105 years

Compared with A++
(599-45)/(90-46) = 12.6 years

It's basically the same running costs as the C energy rating, but 1/4 the initial cost. Probably double up as a heater. Must be noted that it probably isn't as good as a tumble dryer though.

Because of the price difference, I think it doesn't hurt to try the Dri Buddi first. If it's rubbish, I've only really lost £70 inc running cost at most.

Another problem is the humidity problem, and we get very bad damp problems. With a dryer it gets dealt with by either vent or internally condenses it. An idea I've had is to put the JML Dri Buddi in the greenhouse. The humidity will escape through the many gaps in the greenhouse. The only problem is that it'll be colder in the winter, what will happen is the clothes will be warmer then the surroundings, and the main points are that the humidity will be low, and the surroundings will want to 'steal' the warmth via evaporating the water. Still worth giving it a go.

Final path should besites/all/libraries/infobubble/src/infobubble-compiled.js error in drupal 7

So I'm just looking through the logs and found this error in the status report:

You need to download the infobubble plugin and extract the entire contents of the archive into the sites/all/libraries directory on your server. Only the src folder is required. Final path should besites/all/libraries/infobubble/src/infobubble-compiled.js

the Link takes you to here. I'm basically going to do exactly what it says here. Sounds simple enough:

Create the file path
download infobubble-compiled.js
put in folder

Easy. Here's what happened.

Saturday, 20 September 2014

Drupal Backup and Migrate - how to (in progress)

So, I have a drupal website. I'd like to write down the process of backing up and then restoring upon a complete failure.

So, to backup just use the default backup and set to download. Save these somewhere safe. Just to be safe I also did the same for Public Files Directory and Private Files Directory.

I guess thats the easy part. For the next part I've found it hard to find any documentation on restoring from a complete failure. Here's what I have found:

http://www.anexusit.com/blog/how-restore-backup-migrate-file-using-drush
http://drupal.stackexchange.com/questions/40490/how-to-restore-a-site-from-a-backup-done-with-backup-and-migrate-module-using-dr

Both are related to drush which is a command line shell and scripting interface for Drupal.

My best guess for restore is to install drupal, install drush and run the restore command line.

If you also lose files, then you have to make sure you have backup of all files as well.

I think what I'd really like is the backup utility used with Joomla, Akeeba. This is much easier. I don't even think you need to install Joomla to reinstall. And it backs up all files. There must be a reason it isn't as easy. Oh well.


Wednesday, 10 September 2014

Mavericks "The software for the printer was installed incorrectly" error

After reimaging a computer suite with Mavericks and installing a networked printer via "Profile Manager" mobileconfig files, the printer had an exclamation mark next to it in the print dialogue box. When a print was sent to the queue, the print queue would load up and prompt the error:

"The software for the printer was installed incorrectly.
Would you like it to be repaired?"

After clicking "Repair" you are prompted with an Administrator Username and Password dialogue box.

I needed to find a way of "repairing" all these machines via ARD or Profile Manager. Looking in console, I found that the error was due to:
"/Library/Printers/hp/filter/hpPostProcessing.bundle/Contents/MacOS/hpPostProcessing" has insecure permissions (0100775/uid=0/gid=80)"

I found this forum which mentions the fix which is to change owner and permissions.

I ran a few commands to first change the owner, which needs to be Wheel, and the permissions with need to be 755. After doing so, I needed to reboot to see if it had fixed it, only to come up with more errors due to insecure permissions of the containing folders. After continuously doing this it finally fixed it.

I ended up running a command which changed the permissions for the whole /Library/Printers folder recursively:

chmod -R g-w /Library/Printers/
chown -R root:wheel /Library/Printers/

This needs to be run as root, which is an option in ARD, or you can put "sudo" before each line.