Is it possible to play 1080p MKV files on iPad2 over uPnP? I have just configured my Drobo FS to be a uPnP server on which I have lots of 1080p MKVs.

My little boy loves his movies (Nemo / Cars / etc), so I was hoping to be able to let him watch them on the iPad streamed from the Drobo.

Am I dreaming the impossible dream here?

Or have I hit some hardware limitation of the iPad and/or the bandwidth limits of my wifi?

EDIT

The files are mostly AVC for video and DTS for audio

EDIT 2

Since I already had plex installed on my iPad (which I bought on iTunes) I re-enabled the software on my PC server and just pointed it to my Drobo movie share. I was really hoping to not have to transcode, but I guess that will have to wait until I've got faster wifi and a more capable tablet ;)

EDIT 3

I was having a play this morning as I would quite like to watch some 720p TV shows I have (stored on my DroboFS) on my iPad2. But it seems I cannot even watch those. About the only things I can watch smoothly are SD AVIs (very low bitrate)

Personally, I do this with a DLNA intermediary running on a Windows machine. In my case I use ZumoCast. It has a server-side component (I run the Windows-based component on but you could use the Mac one if you have a Mac in your house) and then an iDevice player that connects up to it. The server-side component does transcoding on the fly for you and I've certainly been able to use it with high-resolution files that are in MKV containers without any issues.

At its heart, ZumoCast is a DLNA server and client that just kind of keeps it all within the family. The ZumoCast client will only talk to ZumoCast DLNA servers.

There are app store apps that purport to any DLNA or uPnP server for streaming. I have no experience with them though. Some are free so you can try risk-free at least. For example:

AirPlayer
media:connect for DLNA and UPnP media streaming\
GoodPlayer

Those are just a few that showed up in a quick search.

How well they work? Hard to say. It's going to be very dependent on your device and your network. A 1080p video+audio stream over your WiFi network might push it to the limit. Add transcoding and resolution downsampling (your iPad 2 only has 1024 x 728 pixels so it has to resample 1080p content to fit it on the screen) on the iDevice and you may not get the greatest viewing experience.


Is there an iOS app that measures/reports the battery charging current? I suspect my fake lightening cable charge my iPhone 5 much slower than my original lightening cable on the same charger. Is there an app that will display the current battery draw/charging current and also plot it over time?

The battery doctor HD app by KS moblie tells me the charging current for my iPad 2.  However the battery doctor app for iPhone 4s does not appear to give this information.


copy/paste of large amount of text to terminal leads to scrambled/missing characters I work with TextMate and R over the terminal.
When pasting a lot of code (CMD+C/CMD+V, e.g. 60 lines) it sometimes happens that few characters in the code are scrambled, which then leads to error messages and wrong code execution.

For example:

  col <- ifelse(...

is turning into

  col < col < cse(...

or

  onlyDF

is turning into

  oalyDF

These character-replacements seem very random and it is difficult to predict when it happens.

The problem is also described here for iterm2:
https://gitlab.com/gnachman/iterm2/issues/3160

The explanation provided there is that it is a bug in bash that can lead to buffered input to get lost due to paste speed.

Has anyone experienced these problems and found a work-around for the native terminal app in Mac OS? (e.g. by modifying the paste speed, if that is possible in terminal)

When I need to paste a lot of text into a Terminal application window, I use the cat command to transfer the text to a file. For example, I would enter the command below before pasting the text with the ⌘+V key combination.

cat >myfile.txt

When finished pasting text, enter the control+D key combination. This will terminate the cat command.

  Note: The control+D key combination must be entered at the beginning of a line. If not at the beginning of a line after pasting the text, then press the return key before entering the control+D key combination.


Disable network drive unmounting I've got a pretty specific need - to disable unmounting a network drive through the regular Finder eject function (accessed either by right-clicking the mounted drive on the desktop, or clicking the eject button in Finder). This is on OS X 10.8 Mountain Lion.

Basically I need to stop other users of the Mac unmounting a drive volume. I'm happy if unmounting is still possible by other means (terminal etc.) My users do not purposefully eject the drive, it's usually accidental - e.g. when trying to eject a USB drive, or just a mis-click. I'd like to prevent the ejecting/unmounting entirely.

Anyone have a way to do this? Have been searching for a while, never found a solution.

Edit 1: I should also note this is an smb network drive, but may also need same function for an afp drive

Edit 2 [9/1/13]: I had another idea, albeit problematic. With defaults write com.apple.finder ProhibitEject true I can disable ejecting any volume completely. Unfortunately this won't do in my circumstance, I need users to be able to plug in portable USB drives.

You could open a terminal window and change to the network path so that the file system is marked as in use. You could also open a file or application on the drive.

The users might still choose to force eject, so it's not a proper ban on ejecting the volume, but it adds another roadblock.


Disable Dock Shadow in Mavericks Am I the only one, or is there anyone else who finds that shadow ontop of a nearby window annoying?

You must run this:

defaults write com.apple.dock hide-mirror -bool true; killall Dock

This enables a more transparent dock but also removes the annoying shadow.

Note: this fix is specifically for OS X Mavericks


How do I sell an unopened Macbook Pro? My old MBP broke, which Apple replaced for me. By the time they decided to replace it, I had bought another laptop.

I want to sell the unopened MBP that Apple gave me.

Is there anything I need to be aware of when selling the MBP to something?

For example, is it possible the MBP has been registered with my existing Apple ID, and that I have to unregister it? How do I check?

Also, when advertising the MBP, is it safe to tell potential buyers the serial number?

Personally, I would feel odd buying a laptop from a third-party that is still in the (purportedly) original shrink-wrap. I would take the MBP out of the box, power it up and see that it's fully functional, and then advertise it as "barely used" and "like new." And yes, you need to provide the serial number.


bash variable with spaces why cd "$myvar" results in one parameter, but myvar='"some stuff"' in two? I'm struggling to understand why following does not work as expected in bash:

$ myvar='"some stuff"'
$ echo $myvar
"some stuff"
$ cd $myvar
bash: cd: "some: No such file or directory

I know the canonical way is to (How to use cd with shell variable containing spaces):

$ myvar="some stuff"
$ echo $myvar
some stuff
$ cd "$myvar"

But e.g. here https://stackoverflow.com/a/12258418/881191 answer by Alex for macOS advices to escape quotations, which I also tried and it's the same as putting double quotations inside single ones in my case. Why in one case cd gets two parameters and in other two from as I see it same "some stuff"?

Typically, quotes are strip in a parameter/variable assignment, unless the quotes them self are quoted and they then become part of the string. As in your example "some stuff" is the string attached to $myvar. When you issue the command-

cd $myvar

the command is broken up into tokens- words and operators. The shell parses them into a command and arguments, then parameter/variable expansion takes place on $myvar. Since $myvar isn't quoted the contents are split into two words (known as field or word splitting) -

"some and stuff"

Thus, the error message- bash: cd: "some: No such file or directory. Since cd only accepts one argument stuff" is disregarded.
Even when you quote the variable $myvar it still produces an error message because the directory name is some stuff not "some stuff"-

cd "$myvar"
bash: cd: "some stuff": No such file or directory


How to leave apple developer program on developer.apple.com? I have been a member of a few development teams, but no longer work with them. I would like to leave these organizations, as I use my current account at a new organization and don't want them to have access to the other one's developer program.

I was able to leave 2 organizations using the "leave team" button, however I cannot leave one - I click the leave team button, and the alert just refreshes and stays as is. Currently I have my personal developer program and that other organization available in the "teams" dropdown.

Please help me understand how I can request to leave a team (I'm in the admin role for the team)

It's possible.

Goto:

Scroll down opened page and hit 'Leave':


Selection of Wi-Fi using AppleScript in Big Sur I've tested the code below (from another question) and indeed it works fine, but I have minor problem with it. As my two SSIDs are called "kat" and "kat2", the expression "starts with" won't work for me.  I tried to replace it with "equals" or "ends with" but for these two options I get the result "missing value".
Any thoughts?
From URL: Big Sur 11.1: AppleScript to Automatically Change Wi-Fi Networks
tell application "System Events" to click every menu bar item of menu bar 1 of application process "ControlCenter" whose title starts with "Wi‑Fi"
tell application "System Events" to click every UI element of scroll area of group 1 of window "Control Center" of application process "ControlCenter" whose title starts with "YOUR_SSID_HERE"

It seems I've found the problem. The issue is that the selection of the element, rather than returning "kat", it returns "kat, secure network, 2 bars" and that is why "ends with" or "equals" does not work. To fix that I can use "starts with" but adding a comma after YOUR_SSID_HERE.


Every time I connect my iPad, iTunes wants to back it up Every time I connect my iPad, iTunes wants to back it up. I don't want to back it up, I just want to transfer some files into an app.

This is with the Windows version of iTunes and I keep aborting the back up, because it's very slow. I want iTunes to stop auto-backing it up, is there a setting for that?

Found the solution:

Under Edit / Preferences / Devices, check the "Prevent iPods, iPhones, and iPads from syncing automatically" item.


Change The Default Font & Size In Notes How can I Change The Default Font Size In Notes DefaultFonts.plist onamac 10.9

Go to /Applications/Notes.app/Contents/Resources/en.lproj/

Add myself to read & Write permissions.

But when I open DefaultFonts.plist it stays locked.

How can I put this in?

FontName
Garamond
Size
124

If you are editing the file with an application like TextEdit or Xcode, you also need write permission to the folder the file is in (or en.lproj).

You can also use another editor like nano:

sudo nano /Applications/Notes.app/Contents/Resources/en.lproj/DefaultFonts.plist


3rd party gaming mouse works before login but stops working afterwards I replaced my broken gaming mouse with a new one and it doesn't work. The weird thing is that the mouse works when I reboot but only until I login, then the LEDs turn off and the mouse doesn't do anything (as if it is completely disconnected).

My setup is a MacBook Pro (Retina 15-inch late 2013) macOS Sierra.

The first thing I would do is try booting into Safe Mode.

Boot into Safe Mode

Follow these steps to boot your Mac into Safe Mode:

Fully shut down your Mac
Restart your Mac
Immediately press the Shift key and keep it down
Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
Take a note of what happens (i.e. does the mouse work properly, etc)
Exit Safe Mode by restarting your Mac as normal
Test again when booted normally

Let me know how these steps went and we'll go from there.


cp -R vs Super-duper vs CCC I have my macOS user home on external TB drive. I'd like to keep copies on two different TB drives.

Is there a difference between:

cp -Rv /Volumes/extdrive/myhome  /Volumes/extdrive2

and using Super-duper / CCC to do the same thing?

Yes, there is a difference. In fact, I suspect there are several.

One of the most obvious is that when you delete a file in your Home directory, the cp command won’t know to delete it from the other drives.

Also, cp isn’t smart enough to know if a file has changed or not, so it’s going to copy all of your files each time you run it, which is going to be a huge waste of time for the majority of your data.

Then there are permissions, and special files, and so forth.

So, in short, don’t use cp for this.

rsync would be a much better choice than cp … but, having said that, I should add that I firmly believe there are only 2 kinds of people in the world:

people who have accidentally deleted data with rsync, and
people who have never used rsync.

Which is to say, be careful with rsync, especially when using it to delete files. Start with a small set of files/folders which are either duplicated/backed up somewhere safe or unimportant, and don’t forget to use --dry-run before you run a new rsync command.

Personally, I think CCC or SuperDuper are well worth the money (in fact, I own them both), and would much rather use them than any other method of making a backup.


Why doesn't tar recognize .iso files, even though the documentation says it should? man tar says that OS X's tar implementation should be able to extract .iso files.

  tar creates and manipulates streaming archive files.  This implementation can extract from tar, pax, cpio, zip, jar, ar, and ISO
  9660 cdrom images and can create tar, pax, cpio, ar, and shar archives.

However, tar gives me the following error:

$ tar -xvf test.iso
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.

What's with the discrepancy?

The .iso is created from a .dmg using Apple's hdiutil utility.  poweriso can extract it without issue.

I'm on OS X 10.7.4.  tar --version reports bsdtar 2.8.3 - libarchive 2.8.3.

Chances are that it is not a pure ISO image so tar may not recognize it. I have tested tar on some random ISO images and it could handle them all, so it's likely specific to that particular image. Note that hdiutil can create non-ISO CDR images so you would have to explicitly tell it to use the ISO format (note that the ISO format is somewhat restrictive, so many CDs use a different format either in addition to ISO or instead of it).


Rescue data from Powerbook G4 with forgotten password I have a Powerbook G4 whose owner forgot her password.

(This is a Powerbook 6,8. The install disk says OSX 10.4 but I don't know if it's been upgraded.)

I can't insert the install disk into the optical drive (it encounters a solid resistance - I can't tell if there's another disk in there or not, but pressing Eject does nothing, and I don't see any hole in which to poke a paperclip to try to manually eject it).

I found a recommendation to:

boot into single-user mode
run fsck -fy
mount -uw /
rm /var/db/.AppleSetupDone
reboot

which supposedly would take me through creating a new (admin) user account, which I could then use to reset the owner's password. It rebooted, asked me what language I wanted to use, and after that, nothing (it briefly showed the spinning gear, changed the screen color a couple of times, showed the spinning gear, changed screen color, ad infinitum).

I did manage, from single user mode, to use Unix commands to verify that the owner's home directory still existed. I also inserted a flash drive into a USB port hoping I might use Unix 'cp' to copy the home directory onto it, but it didn't appear in the /Volumes directory.

Now the machine boots up to the window asking what language to use, and goes no further. And as I mentioned, the optical drive doesn't appear to work.

Before I go out and buy a FW 400-800 cable and a FW800-Thunderbolt adapter to try and mount the PB in firewire mode to my 2012 MBP, I wondered if someone could suggest any other things to try.

UPDATE in response to Gordon Davisson:

Output of sw_vers

ProductName: Mac OS X
ProductVersion: 10.4.11
BuildVersion: 8S165

Output of ls /dev/disk*

/dev/disk0  /dev/disk0s1  /dev/disk0s3

Output of ls /dev/disk* after plugging in flash drive

/dev/disk0  /dev/disk0s1  /dev/disk0s3  (same)

Output of diskutil list

Command never completed! (I also tried rebooting and issuing command without flash drive inserted - same result.)

I reran fsck -fy but got a clean bill of health.

[UPDATE]: There is no disk in the optical drive, but a mechanical "stop" that is apparently designed to hold the CD in has moved into place as if a CD were there. This is what is preventing my inserting a CD.

[UPDATE]: All suggestions were useful but were stymied by other unforeseen problems (optical drive problem, etc.). I finally paid about $35 for a Firewire 400-800 cable and a Firewire->Thunderbolt adaptor, booted the laptop into FW target mode, and successfully copied the home folder (about 40GB) onto my Mac. The laptop may be a brick at this point, but the data is rescued. Mission accomplished.

As a first step, I would try ejecting from the Optical drive again. However, this time try this:

Ensure the PowerBook is switched off
Press the mouse button (or trackpad button) down and keep it down
Restart the PowerBook and keep the button down until something ejects or you get the same language prompt again

Assuming this ejects a CD/DVD, then try the Install disk option.

NOTE: If these steps don't work, you may want to try again with a USB mouse if you didn't already (just in case there's an issue with the trackpad).

[EDIT]

If you can't use the Optical drive, then you have two options.

Purchase a FireWire cable (as you've already noted) and use Target Disk Mode
Remove the hard drive altogether and use it in an external case/enclosure

Of course, option 2 will depend on whether the intention was to still use the PowerBook and whether or not you feel comfortable with the hard drive removal.

If you'd like to determine your willingness to do this, here are the instructions for doing so with that PowerBook (based on your description).

One advantage of this approach (besides the fact you can pick up external cases for next to nothing) is that you can potentially still use the hard drive as an external drive once you've recovered the data. You can also then choose to reformat and reinstall the system and replace it back into the PowerBook (if there is still a purpose for it), or place another HD into the PowerBook.


iPhone has photos/videos which I didn’t take, has it been hacked? When looking around in my setting, General, or anywhere else in my iPhone 6 Plus, what is it I should be looking for, that could tell me my phone has been hacked? I already know it has been.

Someone has taken remote access of my camera. They accidentally left 6 recorded videos in my Saved pictures/videos, showing when they got the camera to innitially turn on, and showing as it zoomed in and out, even twitched the picture from one angle, to another in a single frame.

Things that are impossible for me to do myself? When I am operating my camera. Are there any specific terms/etc I should be looking for?

The camera can be used from the lock screen without unlocking the device. Access to existing photos is unavailable without unlocking, but new photos and videos can be taken without unlocking the iPhone. Your device has almost certainly not been ‘hacked’.

From the lock screen, swipe from right to left to access the camera. Photos taken here are added to your camera roll as if you’d taken them unlocked.


Adding a google account without gmail on iPhone I have two google accs with two different calendars. I want to use them both in the calendar app. However when I try to add the second google account, after entering the google acc details it just jumps back to the calendar settings. Are multiple google accs supported for the iPhone? I can do it with no problems on my mac.

iPhone 6, 10.2

[EDIT]

The problem actually seems to be with the fact that the google account I wanted to add didn't have a gmail address associated with it. So for the purposes of the calendar what I did was adding CalDAV account instead.

I'll leave this open as a differently formulated question in case someone wants to elaborate on why it's impossible to add a google acc without gmail.

It is supported. This is what it looks like under settings -> calendar:

Try adding the account as a mail account and then turning off mail and turning on calendars. This is what it looks like in the calendars app:


Brand New Mac Mini with OS X Server, Open Directory not working I have a brand new Mac Mini I have installed the OS X Server app on it.

DNS Settings report no problems.

OpenDirectory will not stay operational.  I never even had a chance to add any users.  Can't get it do do anything but crash.

I haven't figured out how to restart it, I've followed instructions for resetting everything on the server app and received identical results.

Upon "starting" OpenDirectory it appears to start and then immediately stops.

sudo changeip -checkhostname

Reports no issues.

sudo launchctl unload /System/LIbrary/LaunchDaemons/org.openldap.slapd.plist

Tells me it is unable to unload.

I'm completely lost.

As I mentioned I was never able to do ANYTHING with OpenDirectory, so if there's a way I can wipe and reinstall that'd be great.  I have no data to recover or backup.

I had the same problem initially too. But for many months now, though, Open Directory has been working as expected and serves our many users' credentials reliably.
It was only after the following that Open Directory settled down:

I was 100% sure that the OS X Server's DNS and reverse DNS was consistent, as viewed from within and without our network, and
that the DNS records matched exactly the domain name on the SSL Certificate we purchased.

If there are any inconsistencies between these, then the Server app just can't make all the assumptions about its identity that it needs to.
If all this sounds simple - we did not find it so.
This was our experience after several failed attempts and several attempts where we thought things were working but Open Directory flaked out. Yours will be different e.g. if your OS X Server is not internet-facing:

Important Note: All this had to be done on OS X before the Server app was installed successfully and running reliably. This will require special attention if you bought a Mac Mini with Server included. You have to get the OS X identity issues sorted before you go ahead with the step of installing the OS X Server app. It's installation is quite brilliant ... if all its (few) assumptions are met; but can cause a right mess if they aren't!
I had to double and triple check before I realised that I had not told the people selling me our fixed IP Addresses (BT in the UK) the correct FQDN to resolve reverse DNS to.
We decided to use OS X Server's DNS to manage all the domains we manage. So, in the case of our Server's FQDN, we had to tell BT to delegate the DNS to our OS X Server's IP Address.
These interactions with external parties can take from many hours to a few days and should be completed to your satisfaction before you unwrap the Server app. Don't expect instant installation of Server until this is all sorted.
I had to play games with the router to have OS Server's external FQDN name on the local network. In our case (BT Business Hub 3) we had OS X connect to the router with DHCP but the router was set to give OS X the correct external fixed IP Address. This is a quirk with this particular router. Normally you are recommended to use OS X System Preferences Network Settings a fixed IP address; in our case we had to allow the router to give it a fixed IP address.
All this had to be done before OS X Server was installed successfully

An ideal place to start
The perennial advice - that still stands - is to start by running sudo changeip -checkhostname
(Although, ironically, I don't think changeip is there until afer you've installed Server ... so maybe it's only ideal after you've already got things right!)
When you can: run sudo changeip -checkhostname make sure you get the response:

...
The names match. There is nothing to change.
dirserv:success = "success"

and make sure that Current HostName value == the name on your SSL Certificate == the name on the front page of the Server app GUI
Open Ports
Another thing: ensure that your Server can be reached by the ports that it needs. These can be more than you might imagine. I just did this port scan (using the Network Utility on my MacBook) of our Server and you can see what ports it has open to provide its services. See  also Apple support page for Well Known Ports
Port Scan has started…

Port Scanning host: 81.123.123.123

     Open TCP Port:     22          ssh
     Open TCP Port:     25          smtp
     Open TCP Port:     53          domain
     Open TCP Port:     80          http
     Open TCP Port:     88          kerberos
     Open TCP Port:     106         3com-tsmux
     Open TCP Port:     110         pop3
     Open TCP Port:     143         imap
     Open TCP Port:     311         asip-webadmin
     Open TCP Port:     389         ldap
     Open TCP Port:     443         https
     Open TCP Port:     464         kpasswd
     Open TCP Port:     587         submission
     Open TCP Port:     625         dec_dlm
     Open TCP Port:     636         ldaps
     Open TCP Port:     749         kerberos-adm
     Open TCP Port:     993         imaps
     Open TCP Port:     995         pop3s
     Open TCP Port:     1640        cert-responder
     Open TCP Port:     3659        apple-sasl
     Open TCP Port:     4190        sieve
     Open TCP Port:     5900        rfb
     Open TCP Port:     7654
     Open TCP Port:     8008        http-alt
     Open TCP Port:     8443        pcsync-https
     Open TCP Port:     8800        sunwebadmin
     Open TCP Port:     8843
Port Scan has completed…


APN settings keep disappearing I'm on an iPhone 4S, running a fresh install of iOS 6 and I'm encountering a weird problem with my APN settings.

Every now and then, about 2 twice a week, I'll be out and about when suddenly my mobile data stops working. When I check my APN settings (apn, username, password), those fields are empty.
I enter my details and then I'm back online without further issues.

A couple of days later: same thing happens.
I've tried restoring the iOS, wiping and reinstalling but the issue keeps popping up.

Any suggestions?

I have experienced losing APN settings every iOS version upgrade. That was fixed by using a provisioning profile containing the APN settings. Now the APN settings are maintained during iOS upgrades.

Therefore a workaround in your (though different) situation could be to create a provisioning profile for the APN settings using the iPhone Configuration Utility.

And load that APN provisioning profile to the iPhone.


Why does Apple provide the "Ignore ownership on this volume" setting? This seems like a total abuse to the Unix file system ownership principals.  The only reason I can think of that Apple may have implemented this is that non-technical users were probably fighting issues with ownership and Apple wanted a simple solution.  For the technical user (i.e. someone who understands Unix), I see no reason to ever enable this.  Am I missing something?

It's for read/write access on shared drives.
For example, if you have a shared USB drive the permissions will most likely not match your particular credentials.  For you to read/write to that drive, Apple gives you this functionality.
Additionally, given that you must be an Admin to enable/disable this, it doesn't exactly "abuse" the UNIX file system ownership principals.


How do I use say command creatively to prank my coworkers/friends? I'm designing a creative / funny prank for OSX via command line. By running in the background, most users would not notice it when she/he first starts using the computer.

Using say command with creepy voice (Deranged) is my best bet. Setting volume to very low during saying the sentences is even more creepy! My problem is, I don't know how to grab current current volume to set it to the same volume after saying.

sascript -e "set Volume 2"
say "Naaame I see you" -v Deranged -r 20
sascript -r "set Volume 0"
sleep 600
sh thisscript.sh

Can I get the current volume and store it in a variable using unix shell scripts?

You could always get the volume, change the volume, say your line, and then restore the volume within the AppleScript:

#!/usr/bin/osascript
set currentVolume to output volume of (get volume settings)
set volume output volume 1
say "Hello" using "Deranged"
set volume output volume currentVolume


Cannot start MySQL server with AppleScript - Snow Leopard I've sucessfully installed MySQL server (5.5.11) on my MAC Snow Leopard. I can start the server using PreferencePane, using command line sudo /usr/local/mysql/bin/mysqld_safe but cannot use the same command within AppleScript.

This is the output from running sudo /user/local/mysql/bin/mysql_safe:

ngocminh@MBP[304]:~$ sudo /usr/local/mysql/bin/mysqld_safe
Password:
110428 09:52:03 mysqld_safe Logging to '/usr/local/mysql/data/MBP.local.err'.
110428 09:52:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data

Apache2 server can be started using the command sudo apachetl start, then it could be implemented using an AppleScript script like this:

do shell script "apachectl start" password "mypassword" user name "ngocminh" with administrator privileges

However, I can't simply do the same for starting mysql server

do shell script "/usr/local/mysql/bin/mysqld_safe" password "mypassword" user name "ngocminh" with administrator privileges

The apple script result says:

"110428 11:03:06 mysqld_safe Logging to '/usr/local/mysql/data/MBP.local.err'.
110428 11:03:06 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
110428 11:03:06 mysqld_safe mysqld from pid file /usr/local/mysql/data/MBP.local.pid ended"

Then MySQL server cannot be started!

Would anybody tell what's wrong with my script or I've missed something. Any suggestion will be highly appreciated. Thank you!

-- EDIT 1 --

Try to run this script instead

do shell script "apachectl start" password "mypassword" with administrator privileges do shell script "/usr/local/mysql/bin/mysqld_safe > /dev/null 2>&1 &" password "mypassword" with administrator privileges

No error reported by AppleScript but MySQL server is still not loaded according to ps command

ngocminh@MBP[315]:mysql$  ps aux | grep mysql
root      5652   0.0  0.0  2435544    872 s000  T     9:51AM   0:00.04 /bin/sh /usr/local/mysql/bin/mysqld_safe
ngocminh 16127   0.0  0.0  2435120    528 s001  R+    2:30PM   0:00.00 grep mysql
ngocminh@MBP[315]:mysql$  ps aux | grep http
ngocminh 16141   0.0  0.0  2425524    172 s001  U+    2:30PM   0:00.00 grep http
ngocminh 16092   0.0  0.0  2452692    644   ??  S     2:29PM   0:00.00 /usr/sbin/httpd -D FOREGROUND
ngocminh 16088   0.0  0.2  2456532   8960   ??  S     2:29PM   0:00.07 /usr/sbin/httpd -D FOREGROUND
root     16035   0.0  0.2  2452692   9832   ??  Ss    2:29PM   0:00.43 /usr/sbin/httpd -D FOREGROUND

-- EDIT 2-- PROBLEM SOLVED!

I found the way around it. Just creat an AppleScript with sudo inside for mysql server startup

do shell script "apachectl start" password "mypassword" with administrator privileges
do shell script "sudo /usr/local/mysql/bin/mysqld_safe > /dev/null 2>&1 &" password "mypassword" with administrator privileges

PROBLEM SOLVED!

I found the way around it. Just create an AppleScript with sudo inside for mysql server startup

do shell script "apachectl start" password "mypassword" with administrator privileges
do shell script "sudo /usr/local/mysql/bin/mysqld_safe > /dev/null 2>&1 &" password "mypassword" with administrator privileges


What is the data type of background images in a Pages template? I am trying to teach myself graphic design. The templates in Pages are really nice, but I want to be able to make my own. I was stripping apart a brochure template ("Elegant Brochure"), and found that most of everything on the page was a text box or an image. Once I removed all of those elements there was still a pattern in the background. When I clicked on it, I noticed "x's" on the corners that were immobile instead of the usual white boxes for manipulating images or text boxes. I clicked on the inspector and noticed that these were actually jpegs, but I don't know how to remove them, or in the case of wanting to make my own brochure layout, insert background pictures like that that will stay immobile.

After flipping through "iWork:The Missing Manual" and digging a little deeper, I discovered that those watermark style background images were immobile because they were "Locked." So I clicked "Unlock" in the Arrange menu, and then I could delete or manipulate those images.


Time Machine preferences - time estimate wrong, progress bar doesn't show any progress When I start a backup (or when it is automatically started) I get some estimation about volume (394,2 MB of 2,58 GB) and backup time (e.g., "5 Minutes"). But even after hours this estimation does not change and the progress bar does not proceed.

Any idea? Is there any way to check what really is going on between OS X and my Time Capsule?

You can open a Terminal and run the command tmutil status or check Console to see exactly what your Time Machine is up to; you can have a look at James Pond's website for help in interpreting them.

Unfortunately, Time Machine doesn't provide very detailed information on what it is doing, but this might give you a clue that gives you something to search for!


How can I download and install software update on my iPhone without connecting to Wi-Fi? Please help me with installing the software update over mobile data

iOS needs a Wi-Fi connection to download and install software update. It is not possible to download the software update over mobile data, irrespective of speed or data cap. This is by design.

If you do not have a fixed line connection with Wi-Fi access point, you can create a Wi-Fi hotspot on one of the other mobile phones.

Alternatively, if you have access to a Mac, you can download and install the software update via iTunes and update the device.


Can a family member use my iPhone, or does Touch ID lock them out on the iPhone SE? Can we bypass TouchID? I'm getting an iPhone SE and wondering if I can let my kids/family members use my phone if they need to?

I don't know much about Touch ID and am wondering if it can be bypassed, or if I can turn it off so they can use it to call? Also, does Touch ID support multiuser accounts if each person wants their own profile?

You can use your device without enabling TouchID/FaceID.

iPhones (and iPads) are designed for a single user. iOS is unfortunately not multiuser.

With TouchID, you could train one finger for each person allowed to use the phone, but since there's no concept of separate people, all you'll do is make TouchID less reliable for everyone.

If the phone will only be used at home, just don't enable TouchID and be careful not to store any financial or private information on the phone.


Removing iOS original apps As the title says, I'm looking at apps I've moved to the second screen, and wondering if I can remove these. These are the iOS apps that came with a fresh install, so no simple delete option. It would help free up some memory, as I'd never use these.

(for what it's worth, it will be a business phone, used only for the business. I have my regular iPhone with all the apps I want.)

You would need to download Apple Configurator, then configure a profile, connect your device and install this profile, restart phone. I'm sure there will be tutorials how to do this, if you struggle, just reply here. :)


detect powernap from the command line I like to plug in my macbook and SSH to it from my Windows machine to take advantage of my 27" monitors, and do work in the shell and in Vim.

Now i know that supposedly the machine is capable of going into Power Nap mode and still support my SSH session, and I'd like to see this for myself. It does seem like the computer is in some form of sleep mode, as moving my finger over the touchpad does not wake it up; my SSH session is indeed still active. But, the system fan is still on. I guess if it's executing commands, the CPU, RAM, SSD, i guess the whole thing has to be powered on, so that's not surprising.

What commands can I run to view the system power state? Will I be able to detect a difference between "Power Nap mode" and just plain "having the screen off"?

You will not be able to connect to your Mac without waking it up. Modern Macs can be accessed remotely without needing to power on the display; this behaviour saves energy but is not Power Nap.

Apple's Power Nap technical note describes what the state is and how it affects your Mac.

Power Nap does not leave your Mac in a generally usable state; only specifically designed processes are permitted during the power nap state. The permitted processes do not currently include remote connections via secure shell (ssh).


macOS Terminal command to test Internet speed Anyone know what command can I use to check my Internet speed in the Terminal app?

May be I can use curl command and add some IP addresses, like the to check our IP and Country location via curl ipinfo.io command?

There is a CLI version of Speedtest called, appropriately, speedtest-cli.

You can install it via Homebrew:

brew install speedtest-cli

It's also available via MacPorts

Just execute it by running the command:

$ speedtest-cli

Retrieving speedtest.net configuration...
Testing from ACME Cable (xxx.xxx.xxx.xxx)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by ServerPronto (Miami, FL) [22.39 km]: 25.419 ms
Testing download speed............................................................
Download: 70.16 Mbit/s
Testing upload speed............................................................
.Upload: 5.92 Mbit/s


How to always show a Bcc field in Mail I'm trying to send a message in Mail, but I don't have a Bcc field.

How can I show a Bcc field? Is there a way to set it as default, i.e. always show a Bcc field?

For the version of Mail.app included in El Capitan (checked 10.11.5), there is a very nice button dropdown close by:

The setting is maintained across emails and restarts.


macOS 10.12 Sierra will not forget my ssh keyfile passphrase After creating a new encrypted id-rsa key file with ssh-keygen and using it for the first time, I cannot get macOS to forget the passphrase. This is similar to how to make OS X not remember ssh key passphrase question but worse.

I tried rebooting, killing the ssh-agent, locking all my keychains but it still seems to be stored somewhere. However, I cannot find it in any keychains. This seems to be very insecure. The answers to SSH private key password never removed with Keychain/ssh-agent also do not help.

In fact, the dialog that used to appear asking you whether you wanted to store the passphrase or not does not seem to exist anymore.

To disable storing passphrase in keychain you should add following lines to ~/.ssh/config file:

Host *
UseKeyChain no

If you already have passphrase stored in keychain you can delete it using commands:

cd ~/Library/Keychains/<UUID>/
sqlite3 keychain-2.db 'delete from genp where agrp="com.apple.ssh.passphrases"'

If you would like to have a behavior like in OS X El Capitan or earlier (i.e. passphrase stored until logout or restart) simply add to ~/.ssh/config:

AddKeysToAgent yes

You don't need to start ssh-agent.


How do I set permissions on a directory so that all files created there will be read/write/execute for everyone? I have a cache directory in which several different programs owned by several different accounts create/read/write/delete etc new files and directories. I want everyone to have all the possible rights to all of these things in this directory and everything that is ever created in it in the future.

How do I do this?

Right click the directory or Command + I after clicking on it, there will pop up a window like this.

Clink on the padlock in lower right corner and type your password. Now you can change permissions for this directory. If you want everyone to be able to read and write, click on the privilege provided to Everyone and there will appear a dropdown menu from which you can choose what permission to provide.

I hope that helped.


AV cables iPad2 vs iPad3 I use an extension cable with my iPad2 to connect to an external amplifier with a built-in Dock.  I have recently purchased an iPad3 (awaiting delivery) and was wondering if the cable will work with the updated iPad, or do I need to procure one specifically made for the iPad3.

The cable supports AV, so it's not just a matter of charging/syncing.

It sounds like you mean 2nd generation iPad vs 3rd generation iPad, both of those models do use the older 30 pin connector.

3rd generation isn't new tho so maybe you mean iPad MINI...   the mini 2 and mini 3 both use the newer smaller lightning connector.

If it does go from 30pin to lightning tho, apple does have 2 different style of adapters avaialble. Here and here.


Is there a maximum number of AirPlay receivers that I can output to at the same time? If I buy 6 different Airport Express' to have one in each room will they all work together or is there a maximum number of receivers you can use at once? For example if I want to choose between the six rooms or play the music in all the rooms at once will that work?

The maximum number of Airplay receivers are 3 to 6 as noted in iTunes: About playing music with AirPlay

  The maximum number of outputs are three to six in typical conditions. The number that works for you will depend on your environmental conditions (such as building composition and local radio interference), distance to the outputs, and available network capacity relative to your other usage.


I tried to enroll my company to Apple Enterprise program, but get message "Cannot enroll in Apple Developer program" I don't know whether to post this on Stack Overflow or on Ask Different. But please try to help. I know this has been asked on this forum, but none of the answers helps my case.

Here's the situation. I work at a software house which has a client that wants to distribute an app in-house (enterprise). This means the client has to create an Apple ID and enroll to the Enterprise program. The client has created the Apple ID and made sure that the age is over 18. But when they tried to apply for the Enterprise program, they get an error "Cannot enroll in Apple Developer program".

I read from Apple's documentation that a D.U.N.S. number is required. But the problem is, I don't see any field where I should put my D.U.N.S. number. Apple just put a big sentence "Cannot enroll in Apple Developer program" without even providing any solution. I read this article that Apple is supposed to "magically" can pull the D.U.N.S. number from D&B for my client company. Is this the case? The main problem for me is that I don't see any field at all to put the D.U.N.S. number, so in this case I'm worried that I overlooked the important thing or settings to input this, so that the verification process can begin to enable the client's company to create Enterprise account.

Can somebody help me? Thanks.

Yes, you can't specify the DUNS number during enrollment. This is part of the 'due diligence' that Apple has to do themselves, in order to verify that you are really representing a company, instead of 'impersonating' one. They might also get in touch with the person you mentioned to have 'legal authority' for this company.

Basically, with the Enterprise Development Program, you're setting up a legal contract between your company and Apple, and the rules for that are more strict than if you just sign up as an individual.


How to unlock Sierra Refresh Rate for other resolutions less than 4k? I had a MacBook Pro 2017, using a USB-C to HDMI which can support 4K@60Hz.

I ran CoreDisplay patcher to enable 60Hz for 4K resolution:

But  Refresh Rate is still locked at 30Hz for other resolutions. Is there a way to unlock 60Hz for 2560x1440?

HDMI 2.0 4K60Hz might use chroma subsampling (YCbCr422 10bpc)
https://www.rtings.com/tv/learn/chroma-subsampling

You can force RGB by overriding the EDID (limits you to 8bpc)
https://www.mathewinkson.com/2013/03/force-rgb-mode-in-mac-os-x-to-fix-the-picture-quality-of-an-external-monitor

DisplayPort 1.2 is preferred because it has slightly more bandwidth and will allow RGB 10bpc without requiring workarounds.

2560x1440@60Hz HiDPI uses a scaled resolution of 5120x2880. This means macOS draws into a frame buffer that is 5120x2880 and the graphics card scales the frame buffer to the scaled resolutions base which is 3840x2160 in your case (SwitchResX can change the scaled resolutions base). By default, scaled resolutions are created with only one refresh rate/timing. I think the timing used for the base resolution is the last built-in timing having the same resolution as the scaled resolutions base. This is why 3840x2160 30Hz is chosen for the timing.

macOS 10.14.6 has a new hidden preference to enable multiple refresh rates for scaled resolutions (including HiDPI resolutions).

sudo defaults write /Library/Preferences/com.apple.CoreDisplay multiRefreshRateScaledModes -bool true

Each scaled resolution (and its corresponding HiDPI resolution) will then have all the timings that the scaled resolutions base has.
https://www.tonymacx86.com/threads/adding-using-hidpi-custom-resolutions.133254/post-1999528

For older macOS versions, I guess you'll need code to create scaled resolutions with specific timings, and patches to CoreDisplay to allow them. Code for some (but not all) versions of macOS that might do that is in IOGraphicsLib.c at opensource.apple.com


Applescript - how can I select all *non*-folders in an expanded list view window? I am trying to write a script which will select all non-folders in a given Finder window which is in List View and has revealed/expanded all sub-folders (see image).

As there tend to be many more files than folders, my thought is to:

Select all items
Deselect all folders

I am also willing to start with nothing selected and then add non-folders to my selection.

In any case, I'm stumped. Any help would be appreciated.

Desired result would look similar to this:

EDIT: (to answer the xy problem - it's gonna be long, but you asked for it)

I repair computers for a living, which means I do a lot of "Backup data, erase hard disk, install OS, restore data" all the time. Both Windows and Mac, although I do all the backups on my Mac, so the client's data is restored from a Mac volume via the network.

Usually, I just drag entire folders from backup volume to restored Windows PC and wait for it to finish. Sometimes, though, the copy fails, often because "the pathname is too long" or some such nonsense. In such cases, I end up copying smaller chunks at a time until I'm done.

Then I have to check and double check that I haven't missed any files/folders. So, I open two windows, one with the source folder, the other with the destination folder. And I compare folders (Music, Docs, etc.) from each. I look to see if the number of files/folders match and that the amount of bytes used is the same.

Often, because of the .DS_Store in Mac folders, the bytes don't match. If I open the folder and Get Summary Info on just the contents, the byte counts match up perfectly.

So, rather than open dozens or hundreds of folders and subfolders, one by one, what I do is open the Documents folder, for example, in list view, reveal all subfolders (this much I can do in AppleScript already) and then I Select All and de-select the folders, and then Get Summary Info.

In my image above, I could do it manually, of course. But, in many cases, I have folders with hundreds of files and several folders deep. If I do it manually, it takes a long time and inevitably, right before deselecting the last 10 folders, I'll make an errant click and have to start all over.

This is why I want a script to select all non-folders.

If there is another solution, great. Let me hear it.

Unfortunately, Finder doesn't support revealing files in this way.

The following code sets 'theFiles' to the files in the directory chosen, but 'reveal' doesn't support any parameters. If you already have the window open, it selects the files in the root of the chosen folder in that window, but then opens a window for every other folder recursively.

tell application "Finder"
  set theFiles to get every item of (entire contents of folder (choose folder)) whose kind ≠ "Folder"
  reveal theFiles
end tell

I still feel like this is more of an XY problem though.


5Gb of RAM being used with NO software running? My computer (brand new) was using 12 Gb of RAM so after I was done exporting my video I force-quit everything and 8 minutes later it's still using 5Gb or RAM, is this normal?! It seems like so much!

*Note: I only have 1 finder window open and it's just viewing the utilities folder, I used it to get to the "Activity Monitor" app.

Thanks! God bless!

Sometimes the RAM doesn't clear properly - try running "purge" from the terminal - this will (as close as possible) clear the inactive RAM for you.

Also, the more RAM you have, the more your computer will use when idle for the background processes. This is normal and it won't get in the way of your performance.


Home Sharing not working with iPhone 5 iOS 6 Home sharing is not working on my iPhone : I can't see any 'shared' option in both music and videos app while I have activated Home sharing with the same ID on both my Mac and my iPhone.
I have a MacBookPro with the latest version of iTunes and an iPhone 5 with the latest OS.
I have tried to relaunch iTunes, turn off home sharing, sign out on my iPhone and start again the whole process without any result. And there's no issue with my router or firewall, I've checked all this.
Does someone have any idea or tip to solve this problem ?
Thanks a lot !

Edit - 08/10 12:03 GMT
I set up Home Sharing on a second computer (with Windows XP) with the same Apple ID. I can see its library on both my mac and my iphone but I'm still unable to see my Mac library on the other devices. So, I think that the problem may be that my Mac "doesn't want" to share but is able to "receive". Any idea ?  Thanks

It's finally working. I quit all the services syncing over the air such as dropbox, evernote, wunderlist and bitTorrent Sync and restart my computer. It's working fine.
I've still no idea why it was not working before.
Thanks to you anyway


Where does Thunderbird, on OSX, store its offline folders? I marked my Sent folder to be used in offline mode, and asked the messages to be downloaded. I saw the status bar show my messages being downloaded.

But I can't figure out where the messages were stored.

My profile folder doesn't have any new files, nor any that start with the word Sent:

~/Library/Thunderbird/Profiles/l5z5ge4s.default/Mail# ls -l Local\ Folder
# Nothing here named Sent.msf, or Sent.sbd

Where should I look for my downloaded messages?

I'd say you are looking at the right place.

I've configured Thunderbird to use IMAP to sync with Gmail. In that scenario, my sent emails are located at

/Users/<username>/Library/Thunderbird/Profiles/<randomcharacters>.default/ImapMail/imap.googlemail.com/\[Gmail\].sbd/Sent\ Mail

This SuperUser answer has a screenshot which shows how to look up the location for a particular account:


How to start OS X applications from the command line with optional arguments? I am looking for an easy way to start different GUI OS X applications from the command line and with different parameters.

If possible I would like to add them to the system PATH in order to call them easier.

Note:  I tried open -a "Google Chrome" --args --disable-plugins and it started Chrome but without disabling the plugins.

Normally you can find the actual executable in the Contents/MacOS folder of the Application bundle. For Chrome try it like so:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-plugins


Is it possible to use iPhone 6 with FaceTime without a cellular SIM card? I have an iPhone 6 with FaceTime purchased from Saudi Arabia.

I don't have a cellular SIM in my phone, only a data SIM card.

My question now is if I go out of the Kingdom to any other country, will my iPhone get locked? Will my FaceTime stop working even if I'm connected to the internet?

Will I have to have a jailbreak?

I attempted to fix this problem with these troubleshooting steps:

Open Settings -> FaceTime. Enter an Apple ID and login. In the same dialog toggle FaceTime off and then on.
Open Settings -> Messages. Enter an Apple ID and login. In the same dialog toggle Messages off and then on.

I have resolved my problem activating Messages but FaceTime continues to wait for activation. I believe that FaceTime may be waiting for an SMS in order to verify the mobile number. My mobile number shows a busy icon in its Settings dialog.


iTunes Connect - Use different bank account in the Agreement, Tax and Banking I wanted to buy an Apple developer account, I live in Pakistan and my country is not in Apple supported countries.

I asked my friend who lives in the United kingdom to buy an account for me and thanks to him he did. Now, I have an account, but I need to setup Baking and Tax information in iTunes connect. That is where I need your guidance! Can you help with these questions?

Can I set up my bank account instead of my friend (whose credit card
was used to buy account and the account is in his name) to receive
money in? (My Pakistani bank is available in supporting banks)
Do I need to fill US tax form? If yes, then which options I should
select?    I find it very confusing. (I want to sell my apps at all
Over the    World)

Thank you in advance!

Regarding the bank account, see this answer. You would need to consult Apple as to whether the US tax documents are necessary.


Logitech C615 web cam sound control I have a Logitech C615 web cam with a built-in microphone. I want to use a headset with earplugs and a microphone for more private conversations. There are phone out and mic in plugs on my Mac Mini.

However, I can not turn the sound off on the web cam. I can mute it, but the headset mic will not work.

Is there a way to turn off the sound on the web cam, or do I need to buy another one without the mic?

You can easily change which device is used for audio input. Just hold down ⌥ Option while clicking on the Volume menu item:

Alternatively, to get a bit more fine control, open System Preferences (found under  > System Preferences…) and open the Sound preference pane:


How can I verify if SSH is disabled with the Terminal on Sierra? I would like to know the command line to verify the status of SSH on Sierra please.

I tried using systemctl but got a command not found.

Thanks !

sudo systemsetup -getremotelogin

This will return "Remote Login: On" or "Off" depending on the state of the Remote Login option in Sharing.prefpane.

There's no such thing as systemctl on macOS, but systemsetup does many things; check the list with sudo systemsetup -help.


Using Mission Control to switch between Safari and a full-screen Keynote presentation I'm on a MacBook Pro running Lion. During a Keynote presentation that's running in full screen, I'd like to be able to switch to a different desktop with the four-finger-swipe gesture to demonstrate a Web site with Safari.

I tried putting Keynote on desktop 1 and Safari on desktop 2, and then starting the slide show.  The slideshow appears full screen as usual. If I swipe over to desktop 2, Safari is there, but the screen blanks for a moment. When I return to desktop 1, the slideshow isn't there. Keynote is running in the Dock, but no slide appears.

This seems like a pretty common thing to want to do, but I can't figure out how to cleanly swap between the full-screen slide and another app.  We used to Cmd-Tab between Keynote and Safari, but when returning to Keynote, the slide would rebuild instead of being where it had ended up.

Any help would be greatly appreciated!

Make sure you have "Allow Exposé, Dashboard and others to use the screen" in keynote preferences under Slideshow.

Then, before you slide over to Safari, press the "F" key to pause the slideshow. This prevents the slideshow from disappearing.

You can then slide over, or use Mission Control, etc without affecting the slideshow.

There is a bug here, to go back to the slideshow you have to slide back to it or click on the desktop in Mission Control; you can't click the Dock icon or Cmd-Tab back to it.
(Clicking the dock icon / cmd-tabbing will just hide the dock and menubar but not take you back to the presentation)

Also: When you get back to the slideshow, the first key press or mouse click unpauses the presentation, so you will have to click / press again to advance to the next slide.

Side note: instead of having keynote and Safari on separate desktops, you can have them both as fullscreen apps. This hides the Dock and Menubar, so when you show the web page, there is more room for it.


Display's native resolution not registering properly I've got an HP monitor (specs here) that is supposed to display natively in 1080p.  I've used it for years in this setup no problem.

Last night I upgraded my Mini to a newer model, and when it was starting up I realized that I didn't have the HP monitor plugged in, just the secondary monitor, so I connected it via the HDMI port, as I always have.

For some reason, the HP monitor is now thinking that the edges of 1080p are an inch off the screen in every direction when told to use its native resolution in the Displays control panel.  If I use the other options below it (1080p, 720p, and 1600x900), it just gets increasingly worse, only showing a quarter of the actual screen.  Restarting has not fixed this.

Today I was plugging it back into the old Mini to help get it set up for a coworker and it's working normally again.

I'm completely at a loss at this point for why it's misbehaving.  The only way to get it to display at the proper size is to slide Underscan slider halfway across in the display's settings, but that causes other issues due to irregular pixel sizes, etc.

Is there any way to "unregister" this monitor's settings and have it detect them again, perhaps?  Or some other way to get it to detect it properly?

Tried doing an SMC reset, followed by a PRAM reset; neither worked.  Tried switching ports on the mini using an HDMI-Mini DVI dongle and starting up as the only connected monitor on this new setup; no change.

In the end what did work was switching to the monitor's DVI port and using a DVI-HDMI cable that came with a new monitor I'd picked up recently.  Screen now registers at the appropriate size and without scaling.


How can I determine the current brew package count? I tried to get the number of available brew packages by running

brew search | wc -l

but I don't know how accurate this really is. What do I need to take into account to get a more correct number?

PS: macports lists 19,889 packages online here

On June 23, 2019 the soon to be incorrect count of packages is 4804.

Since many people add and remove packages, this count shifts by dozens a day and sometimes hundreds at a time when larger changes move packages out of the mainstream repository into a sub repository that can be "tapped" to increase the count.

Homebrew uses a concept called tap, which is simply a repository containing a list of formulae that it tracks, updates, and installs from. The default installation of Homebrew comes with a tap called homebrew/core but there's no limit to how many or how large a tap you could source packages since they can be self hosted pretty much anywhere.

Running brew [command] [options] runs the command on homebrew/core tap. There are various other official and unofficial taps from which packages can be installed.

The total count of packages in any tap keeps changing as new packages (called formula) are added, deleted or updated. To get the current count, first update the local homebrew/core tap repository by running:

brew update.

Now execute your command-line:

brew search | wc -l

to get the current count of packages in the homebrew/core tap. Running brew search without any arguments lists all the packages (formula).


Using Applescript to append user input to existing note in Notes App I've been using this little utility to save out random thoughts through the day to a text file.
I want to append the user input to an existing note in the notes APP, but can't figure out getting beyond simply calling the notes app.
Any help would be greatly appreciated!
Extra credit: If anyone has experience using Applescript to send data to a Google Sheet, I'd appreciate any resources - I have had a tough time finding any.
Thanks!
Here is my working script that logs user input to a text file.
set f to "/Users/Weston/Desktop/JAT.txt"
set myDate to date string of (current date)
set myTime to time string of (current date)
set myStamp to myDate & " " & myTime

set JAT to text returned of (display dialog "What's on your mind, Weston?" default answer " " with icon note buttons {"Cancel", "Continue"} default button "Continue")

set entry to return & ">" & myStamp & " | " & JAT

set myFile to open for access f with write permission
write entry to f starting at (get eof of f) + 1
close access myFile

quit

This question explains how to modify text on Notes, so here's how that would be implemented in your code:

set noteName to "JAT"
set myDate to date string of (current date)
set myTime to time string of (current date)
set myStamp to myDate & " " & myTime

set JAT to text returned of (display dialog "What's on your mind, Weston?" default answer " " with icon note buttons {"Cancel", "Continue"} default button "Continue")

set entry to return & ">" & myStamp & " | " & JAT

tell application "Notes"
    tell account "iCloud"
        set body of note noteName to (get body of note noteName & entry)
    end tell
end tell

quit

Don't forget to create the note first, though.


Use Goal0 Nomad 7m Solar Panel to charge MacBook Air? I've got a Goal0 Nomad 7m solar panel. It produces ~7 amps @ <22V DC on a regular day.

The MacBook Air has a 45W charger. The markings on the charger say it runs at 14.5V DC @ 3.1 amps. Unless I'm wrong (and I may be, I'm only a beginning EE student ;) those numbers are smaller than the ones on the output of the solar panel. To confirm it another way, P=IV, (P is power in Watts), so theoretically P=7*22=154 watts. 154>45.

The Nomad 7m has a 12v cigarette-lighter style outlet that will fit the MB Airline Adapter. The problem is that it puts out 12v (or so it says, but I'm hoping it's actually around 14) and the Airline adapter needs 14-15 to work right.

What do you guys think? Is this possible? Any recommendations for alternative options (I could always use a 3rd party vehicle adapter if need be). If it puts out this much juice it should also be able to charge a regular MacBook, I think.

If you look at the page for the Goal0 Nomad 7M (click "Tech Specs") It's rated for 7 Watts.

I don't where you got the "~7 amps @ <22V DC on a regular day."

So the sort answer is - That panel won't even keep the MacBook Air running at idle, let alone charge the battery.

Your post got me curious, so I broke out a Kill-A-Watt power meter.
11" MacBook Air Power Draw, battery already fully charged, measured at the wall:

Idle, screen backlight completely off: ~4.7W
Idle, Minimum Screen Brightness: ~4.9W
Idle, Half Screen Brightness: ~5.4W
Idle, Maximum Screen Brightness: ~8.0W

For the active tests, I have the screen set to half-brightness, where I usually use it:

Moving the mouse in circles with the trackpad: ~6.5W
Scrubbing the Dock (with magnification): ~11.2W
HD Video Decoding, GPU accelerated: ~15.6W
SD Video Decoding, GPU Accelerated: ~11.2W
Flash SD Decoding (not sure if it's accelerated): ~12.7W

Ok, these figures are VERY approximate (the Kill-A-Watt is not a high precision instrument), but they do put things in the ballpark.

The theoretical approach -

Insolation is the term for the amount of energy that falls on a set area per set time.
Basically, we can calculate the amount of solar energy which falls on a specific area.
The Photovoltaic array wikipedia page gives us a ballpark figure of ~1Kw/M².

Then, you have to take the efficiency of the Photovoltaic Panel into account.

Wikipedia gives us a best-case mono crystalline panel efficiency of ~25%, shich means that only 25% of the light which falls on the panel is converted to electrical energy, while the rest is dissipated as heat, reflected away, etc...

Therefore, a 1m² panel will, at the equator and with a mechanism that points it directly at the sun, manage ~250 W.

From this, we can tell that a 154W panel would have to be ~0.616 m² (154/250 = 0.616), far larger than what you have.

Examining the 7W panel you have - How big does a panel have to be to produce 7W?

7/250 = 0.028 m², or 280 cm² or about 14*20 cm, which seems pretty accurate, judging from the pictures on the product page.

Anyways, I went of on a bit of a tangent here, because you mentioned you're an EE, which is one of my main interests.


How to manage permissions of files owned by user "_unknown" in Mac OS 10.13.4? I've got permissions problems with files on my MacOS 10.13.4 desktop.

When I try to correct the problems by hand, I see a curious issue:

Matt$ sudo chown Matt:Engineers TestFile
chown: TestFile: Operation not permitted

Matt$ ls -l
-rwx------ 1 _unknown  _unknown     24281 Jul 19 2016 TestFile

This file was copied as part of a large data transfer from another system with different users. However, chmod should still honor root authority, and even with an unknown user ID, should still allow root or a sudoer to change it.

Any ideas on this situation?

How can assert authority over this file, and correct its ownership and permissions?

I have found that 'chmod' is broken on 10.13.4, but 'cp', 'rm' and 'mv' are not.

That is, as a sudoer I can:

use 'cp' to copy the file (I now own the copy)
use 'rm' to remove the file with corrupted permissions
use 'mv' to rename my copy as the original
use 'chmod' and 'chown' to adjust ownership and permissions on the file.

It's a bit clumsy, but I can use a simple BASH script to fix one of these files, when I find it.


How to export my mac terminal theme? I've customized my terminal theme but I'd like to be able to share it with people. I know I've been able to download ".terminal" files, in the past. Where are these files located on a Mac?

Here's how to export a Terminal theme (profile settings) from Terminal->Help->Terminal Help, search for "exporting".

To export a theme (profile settings file):

  Export profile settings

  Choose Terminal->Preferences, then click Profiles
  Drag a profile from the Profiles list to the Finder

  Terminal creates a settings file in the Finder that can be used on
  another computer.

To import a profile setting:

  Import a settings file

  If you want to use the settings from another computer, you can import
  a Terminal settings file from that other computer.

  The file name of the Terminal settings file usually ends with a
  “.terminal” extension.

  Before you can import the settings file, it must be exported from the other system and placed in a location where you can access it.

  Choose Terminal > Preferences, then click Profiles.
  In the Finder, locate the settings file, then drag it to the Profiles list.


Why does it take a long time to upload photos to Flickr using iPhoto '11? I take a lot of photos and use iPhoto to manage everything.  I also have a Premium Flickr account where everything gets sent to in order to have an online presence.

Whenever I use the 'Share' option in iPhoto to send them to Flickr, no matter how many photos I try and upload it takes a very long time.  After a while it doesn't seem to be actually uploading anymore, but something is causing the process to hang, but I can't tell what.  It has currently been about 90 mins and with the absence of any progress bar or indicator I can't be sure when this will end, or why it's taking so long.

UPDATE: After checking my Flickr sets online, two of the sets and several photos (about 50) are not yet uploaded

Does anything have any advice to figure this out?

Maybe try an export plugin and see if it's any faster? Otherwise, it might be a limitation of your connection.

FlickrExport
FFXporter


Search files by size or star-rating using spotlight I'm trying to search files by their size or star-rating using Spotlight. I know it can be done using finder's Command+F, but I cannot figure out which is the syntax I should be using in Spotlight's textbox.

I tried size>0, starrating=4 or starrating:4 but it didn't work (while other properties such as kind:jpeg worked well).

So, how can I achieve this?

I'm trying to search files by their size or star-rating using Spotlight. I know it can be done using finder's Command+F, but I cannot figure out which is the syntax I should be using in Spotlight's textbook.

Here's what you need to do:
Use the search criteria, like this:

If you click on the menu there that says "Kind" (which is the currently selected criterion), you get a popup menu with options:

Choose Other... to get the complete list of possible criteria:

I think the one you're looking for is Rating, which is the user rating value. Click the checkbox on the right, as I have, to add it to the items that show up by default in the popup. Now you can add that as one of the criteria you're using to search, along with Name, Kind, etc. There are some other interesting photography-related criteria in the list: Exposure Time, F-number, ISO speed, etc.
Here's why it won't help:
In order for Spotlight to find files using attributes like Rating, some importer has to first provide data for that attribute to Spotlight. None of Apple's own photo storage applications (iPhoto, Aperture, Photos) seem to provide an importer that does this, and unless your favorite photo app does provide that data, Spotlight won't have any data in its index to search for.


Cannot mount UDF formatted hard disk in OSX I have formated a 2TB external disk with UDF filesystem in Ubuntu. The way I formatted it was:

   sudo dd if=/dev/zero of=/dev/sdc bs=2048 count=1
   sudo mkudffs --media-type=hd --vid=myDisk --blocksize=2048 /dev/sdc

Now I plug the disk in OSX and nothing is automount. The disk is recognized, but nothing else, it's not mounted. I am in OSX Snow Leopard 10.6.8.

diskutil list shows:

 /dev/disk2
 #:                       TYPE NAME                    SIZE       IDENTIFIER
 0:                                                   *2.0 TB     disk2

So first problem is that it doesn't recognize the TYPE NAME is defined in format option (--vid=myDisk). Anyway....

I tried to mount the disk manually:

   sudo mkdir /Volumes/myDisk
   sudo mount -v -t udf /dev/disk2 /Volumes/myDisk/

And I get:

 mount_udf: /dev/disk2 on /Volumes/myDisk: Device not configured

If I try:

 diskutil mount  -mountPoint /Volumes/myDisk /dev/disk2

I get

 Volume on disk2 failed to mount; if it has a partitioning scheme, use "diskutil mountDisk"

If I try:

 sudo mount_udf -b 2048  /dev/disk2 /Volumes/myDisk/

I get

   mount_udf: /dev/disk2 on /Volumes/myDisk/: Device not configured

Any ideas?
Thanks in advance

Details:

I have formated a 2TB external disk with UDF filesystem in Ubuntu. The way I formatted it was:
sudo mkudffs --media-type=hd --vid=myDisk --blocksize=2048 /dev/sdc

This UDF partition on your external disk would not be readable by any non-Linux system. Requirement of UDF filesystem is that disk's logical block size must match UDF filesystem block size.
All hard disks and SSD, including external disks have logical block size of 512 bytes. Note that new disks have physical block size of 4096 bytes, but here is  relevant just logical. CD/DVD/BD optical discs have logical block size of 2048 bytes, so you probably thought that settings for optical discs would work also for hard disks...

So first problem is that it doesn't recognize the TYPE NAME is defined in format option (--vid=myDisk).

Volume label for UDF filesystem is defined by Logical Volume Identifier which is configured by --lvid option in mkudffs.
What you need is to re-format your disk again with correct --blocksize and ideally specify also --lvid for label.
New version 2.0 of mkudffs now automatically set --blocksize to the logical block size. And it also supports option --label which sets correct parameters for volume label.
For more information about compatibility of UDF, mkudffs and other operating systems looks into mkudffs 2.0+ manpage into section COMPATIBILITY and BLOCK SIZE.
Summary:
To format hard disk correctly with mkudffs prior to 1.1 you should do:
sudo dd if=/dev/zero of=/dev/sdc bs=1M count=10
sudo mkudffs --blocksize=512 --lvid="label" --vid="label" /dev/sdc

With mkudffs version 1.1+ you should just do:
sudo mkudffs --label="label" /dev/sdc

If you want your hard disk to be readable also by Windows systems then you need to use at least mkudffs version 2.0.


How can I switch back my start up volume from an external to the internal drive? By mistake my external drive has become the start up volume. How can I revert this?

change your startup disk

Open System Preferences (click the top left Apple icon, click System Preferences
Click the 'Startup Disk' preference pane
Select the drive you want as startup disk

Another method should work as well:

remove your drive and reboot


How can I get my microphone to work on Windows 7 and Boot Camp 2.0? I'm on windows 7 with bootcamp with a bit older iMac. I installed the bootcamp stuff from my Leopard DVD and I updated my bootcamp to 2.0. with Apple Software Update but the Microphone is still not working.

How should I make the microphone work?

Are you sure you have all the bootcamp drivers installed on the PC side of things?

Also, what type of microphone is it? Are there updated drivers for it?

Is Windows even recognizing a device is attached? Can you choose it and tell it to find the newest drivers?

EDIT:

Go to ControlPanel > SoundAndAudioDevices and click the 'Voice' tab. Make sure the 'Voice recording' device is correctly selected and click the 'Test hardware' button. You should be able to adjust the record volume. (One possible extra step: have to go to "advanced" and check-mark a box for "boost mic.")

  I then determined to try the microphone with headphones on. Sound comes through crystal clear to other people with them on. I don't understand why, but just know that it works fine now. So try some headphones for a temporary fix.

If none of this works for you, it seems that there is no fix for this issue yet and it will have to take another update to the Windows Bootcamp drivers for this issue to be resolved.


Transferring pictures off of an iPad, when they are stored in an album I have an iPad Mini that contains several photo albums with unique pictures that I wish to preserve. These albums were created by syncing (using iTunes) from a computer that we've since recycled. (So we've lost the original pictures. The only copy is in the iPad albums created by the original sync process.)

Is there a good way to copy these pictures back from these iPad-resident albums to another PC (or Mac)?

I've connected it to another PC, but iTunes does not appear to offer a way to sync the albums back from the iPad to the PC.
The iPad itself is restricting me from moving the pictures into the Camera Roll, and Google Photos doesn't seem to pick up pictures from anywhere else.
There does appear to be a way to e-mail pictures individually... but there are over 1,000 images, so that process is too manual to be practical.

Any advice would be appreciated.

You can AirDrop the files to another Mac, with Bluetooth to discover the connection and Wi-Fi (direct) to perform the transfer.

Select all the photos to be saved in the Photos app.
You can drag select to select more than one photo.
Tap  Share.
Choose an  AirDrop destination.


Alternatives to Safari for RSS? The 3rd party RSS Feed alternatives to Safari that I've found are cumbersome...in my opinion. Any simple, and good looking ones out there? (using NetNewsWire and it looks/feels bloated). Perhaps there's a Safari Extension?

I use NetNewsWire, but if you're coming from something simple like Safari's RSS reader, I can see how it might feel like overkill. If you don't care for NNW, have a look at Reeder for Mac. It's got a simpler aesthetic, perhaps more to your taste. It's $4.99 on the Mac App Store, and does require a Google account, as it uses Google Reader for the backend.

Google Reader is of course another popular option, if you don't mind a web-app. You could use Fluid to turn it into a bit of a hybrid app if you want a more native feel.


How do I enable the Java console in Firefox? I'm using MacOSX 10.5.8 and the default Java provided by Apple (e.g. /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java). My web browser is Firefox 3.6.12.

I'd like to view the Java console to debug some Java applets which I access with Firefox.

How can I enable the Java console?

This is not done via any Firefox configuration option, but an account wide Java setting:

Open the Java Preferences utility which you can find in Applications -> Utilities.

There, under the Advanced tab, and "Java console", choose "Show console".


iCloud documents in list view (in browser) When viewing my iCloud documents in a browser window, they are displayed by default in icon view.  There doesn't seem to be an option to view them in list view -- which seems astonishing to me.  Am I just missing it?

(Just to clarify:  I am not asking about viewing iCloud documents in a Finder window, or through an iOS app.  I'm talking about viewing iCloud via a web browser, i.e. when logging in to icloud.com.)

No. The iCloud Drive interface does not currently have any settings to change from icon view via the web.


How do I reset link between iPhone and iTunes on a Mac? Quick problem:

My wife takes videos with her iPhone 5S (with iOS 7.1)
She downloads the videos from her camera roll to iPhoto and removes from the phone
She tries to sync the videos back to the phone through iTunes on her Mac (iTunes 11.1.5, Mac OS 10.9.2) but they won't sync

Yes, "Include videos" is checked and the specific album that has the videos in it has 47 videos on the Mac and shows 47 in iTunes but when they are synced to the phone, we see 27.

This happens with brand new videos taken with the iPhone, synced to iPhoto, deleted, and then synced back - they don't make it to the phone. I perform these exact same steps on my phone (same phone, same version of iOS, same iTunes, iPhoto, Mac OS) and the video syncs to my phone.

I've gone back and forth trying to fix this problem and it seemed like I fixed it after messing around with the sync settings for a long time but we had to restore the phone because her work wiped it when she left and I'm not able to replicate what I did this time..

At this point, I'd really like to just reset the connection between iTunes and the phone and try to sync again like it's a brand new phone. Is there a way to do that?

I have had similar problems with music and photos. Often, if you look at the files on the iPhone list via iTunes, they will be listed, but grayed out with a 'sync next time' icon next to them.

Somehow, these get in a halfway state, where the iPhone thinks they are queued for sync, but then they never do.

The only way I have found that resolves this issue is to first backup the phone on iTunes, then restore it, which wipes the phone, reinstalls iOS, then reloads your backup. When I do this, the sync list is cleared, and the files will sync as normal.

Good luck!


Does App Store Review Board allow marking an app free and charging prices some days later? Because of marketing considerations, I think it would be best if I mark my app as free for the first, say, few weeks, and charging a price for it after that period has gone up. I think I've seen this practice on the App Store before, but I just want to make sure. Does App Store allow this? Thanks.

Yes. You can change your app from "free" to "paid" as you desire. Keep in mind users who downloaded the app for free will continue to get free updates even after you change the price (unless those come in the form of in-app purchases).


Speed up the transition between spaces? Is it possible to speed up the transition between spaces?  I often open my applications in full screen mode but I would like the transition to be a bit faster, is there a way to speed this up (i.e. when I hit Ctr rightarrow it moves one space to the other quicker than the default setting).

What you are looking for is TotalSpaces.

The new version has the ability to remove the delay completely. Working great so far.


How to set multihoming for download from multiple Wi-Fi connections? My problem is I want to download from my university's wireless router but it has a speed limitation and I want to bypass this limitation with adding more Wi-Fi connections by different IP address.

Therefore I need a virtual connection to receive my request and split them to multiple Wi-Fi connections and get their response and merge them. Is this possible to increase my download speed?

No, it is not immediately possible.

If you had a server that you control in between you and the server you want to download from, it is theoretically possible.

You would install several wireless network cards (or USB WiFi dongles or whatever) in your computer. Setup these up with different IP-addresses.

The server you control (outside your wireless network - i.e. on the Internet somewhere) would download the file for you, edit the received packets to load-balance between your IP-addresses/ports for the wireless interface you have, and send them on to you.

On your computer you would need a special program to receive those packets and reassemble it as a single TCP stream and pass it on to the actual program doing the downloading.

This could more generally be achieved using some sort of VPN software.

However I don't think anything readily available for Mac OS X exists that has this functionality, so you'll have to build it yourself.

All in all, unless you are very interested in networks and computers, it is not easily  achievable.


is there any way to cache network content and management well by the cache system Many website was blocked from my area, so I want some way to cache network resource to my local machine when I am offline from Inernete or VPN not avaliable. So at that time I could still access to some important resource I needed, for example some kubernetes article and images,or some videos, it needed to management well by the cache system, is there any good way?

You can add them to reading list and have them offline.

https://support.apple.com/guide/safari/keep-a-reading-list-sfri35905/12.0/mac/10.14

It gets tricker to work if it is synced across devices. So I tend to save pages I need using File menu > Export as PDF.. or Save as.. > Web Archive.

Often wget -c site.com is also helpful.

As pointed out by nohillside in comments, youtube-dl can save videos offline too, not just from YouTube, despite its name.

Both of the CLI tools can be managed by brew, cleanly.

https://brew.sh


Idle iPhone and iPad hog upload bandwidth There are 2 iPhones and 2 iPads in our house and every now and then, when no one is using them, they will consume all of the available upload bandwidth of our internet connection for quite a long period of time.

I normally just turn them off or kick them from the wifi when this starts because I don't believe they're doing anything important, I have no idea what could require them to upload so much data.

The iPhones are both running iOS 11.2.6
iCloud backup is turned off on all devices
they upload both when they are plugged into a charger and when they are not.

I have a router running LuCI lede-17.01 branch (git-17.152.82987-7f6fc16) / LEDE Reboot 17.01.2 r3435-65eec8bd5f.

This is a huge problem because once anything is being uploaded all other internet drops (we don't have a great connection), e.g. pings and download speeds for every other device worsen considerably.

I want to prevent the deterioration of internet access for all other devices.

For iCloud, try Settings/ Accounts & Passwords.  iCloud might be shown there as an Account.  If so, select it, and iCloud Backup should be on the list that comes up, showing whether it is on or off.  Other apps that share with iCloud are also listed.


There is a tiny icon on macOS dock that is not clickable! After Visual Studio Code update, its icon on Dock has changed to a very tiny one which is literally inaccessible!

There is no way you can click on it or view options.

Does anyone know how to remove it from the Dock?

macOS: Mojave (10.14)

Edit As pointed by many others (@nitive's comment below) there is a much easier way to fix this and it is killall Dock. Kudos to @nitive

Original long, boring, and not so efficient answer

LOL right after posting it, I found the answer

Fist: open the Dock config (plist):

open ~/Library/Preferences/com.apple.Dock.plist

Second: Find the item in persistent-apps:

Third: Delete the item! In this case, "Item 14"

Forth: Save the file

Fifth: kill the Dock to force it to restart

Honestly, I was expecting it not to have the VS Code icon anymore but magically the icon reappeared there with the right size!


Pages docs from MacBookPro not working in MacBook Air As the title says, I have a bunch of .pages docs from my previous MacBook Pro (running El Capitan), and they are not opening with the pages app on my MacBook Air (running Yosemite).

The error message being displayed is: “Doc_Name.pages” can’t be opened.

Below is the screenshot:

They are opening in the previews app.  But, I want to open and edit them in the pages app.

A list of steps to take in order to analyze and resolve the problems:

Does the pages app open at all? If not, it could be damaged.

Are you copying the app to the external HDD, and then back to your Macbook Air?
If so, that's probably destroying various file permissions within the app bundle.

Can you redownload it from the Mac App store instead? That would be easiest.
If not, try zipping the app on your work computer before copying to your personal computer.

Open the Applications folder on your MBP, right click Pages.app and click Compress. This will take a while, and you'll end up with a Pages.app.zip.

Then copy the Pages.app.zip file to your HDD, then to your Macbook Air.
Unzip it and that should work!

Are you not opening the files in the right app?

Try opening the Pages app first, and from there navigating to file -> Open, and then choosing your file.

Are the files corrupt?

Do you have copies on your work computer which still open in Pages?
Can you copy these to your personal computer without using the external HDD? (hint, try airdrop, or a HFS+ formatted USB Stick.)
People always say NTFS drivers for OS X work well, but I personally have lost data using them, so I don't trust them.

File repair

.pages files are actually zip files which contain all the images and text within the Pages document. If they wont open at all, which I suspect because preview should open them, you could try following these instructions to repair the files:

Copy all the affected files to a folder on your computer. Open this folder in Finder.
Type Command+space, type in Terminal and press Enter. This should open Terminal.
In Terminal, type in cd (including the trailing space). Then, drag the little folder icon from the title bar of the Finder window into Terminal.
The terminal should see cd ~/yourname/directorywithyourfiles/somethingelse/. Press Enter.
Then type in zip -F 'filename' --out 'filenamefixed', where filename is the name of one of your documents.

Probably clearer instructions here.
http://computers.tutsplus.com/tutorials/how-to-repair-damaged-zip-files-with-terminal--mac-49294


There's a "Change what happens when you close the laptop lid" setting in Windows. Is there an equivalent in OS X? In Windows one can usually choose between

Do nothing,
Sleep,
Hibernate.

The Macbook, however, doesn't seem to have this setting. It'll always go to sleep. I would like to set it to "Do nothing" to be able to finish downloads.

Nope, there's no such setting in OS X. This has lead to the creation of a number of sleep-prevention apps:

InsomniaX
Simple app but lets you set options for each:

macosx-nosleep-extension
A preference pane for enabling/disabling sleep-prevention.


Directory names with a dot (.) in macOS I have a problem with folder naming in macOS — I need to name a folder with *.Menu in the end. But if I do that Finder thinks it's some sort of a system file and not a directory. The same goes with *.framework. Is there some setting in Finder to turn off this behaviour?

My solution is to use an underscore. I wanted to have folders like:

domainname.com
 domainname.cc

to store local versions of websites I deploy.

But have settled with underscore instead. That means I don't have to worry about the mac thinking these folders are actually files of some specific type.  If I used .cc, there's a risk the mac would think that folder is a c++ source file :)  So, I'm happy with:

domainname_com
 domainname_cc

such that I know I don't have to worry about that.


How can I set the Mac OS X terminal history to act like linux when using up/down arrows? I'd like for the mac os terminal app to scroll through my command history the same way that it work in linux, if possible. Currently, if I push the up arrow in the terminal, it will scroll through each and every one of my recent commands even if the last 50 were the same exact command. On most linux systems I've used, this behavior will scroll backwards through command history, but most importanlty it will skip duplicate commands. Is this behavior possible in Mac OS X terminal app, or do I need to use a different terminal app? Thanks.

Mark who commented on my questions above was correct. This is a bash setting. If you add the following to your ~/.bash_profile script, you will get this behavior.

HISTCONTROL=ignoredups

You can also ignore any lines that start with a space:

HISTCONTROL=ignorespace

Or do both, by using:

HISTCONTROL=ignoreboth


Changing language in Pages on a Mac? I have a Mac and I'm a Spanish Student. I primarily use Pages in English, but sometimes I work in Spanish and I'd like to have spell check and not have red lines under all my words. I went to system preferences and added Spanish as a second language but that didn't seem to work. Ideas?

Press ⌘ CMD+: to open Spelling and Grammar and change your language there (or go to Edit -> Spelling and Grammar -> Show Spelling and Grammar).


How do I run Gimp on Mountain Lion? I recently upgraded to Mountain Lion and tried to open GIMP.  To my dismay my computer asked me where X11 was.

How do I find X11 and run GIMP?

Apple decided not to include X11 in Mountain Lion: Apple Support Article

But there is now a native version of GIMP for mountain lion which requires no X11:
Gimp Downloads

However, if you need to run the old version of GIMP you can download xquartz as mentioned in the apple support document linked above.

When you try to run GIMP again, you can find Xquartz in

/Applications/Utilities/XQuartz.app

Enjoy GIMP!


How to reedit annotations in Preview on Mac? After PDF was annotated, saved and PDF closed I want to reopen PDF but I can not anymore edit it, can not select annotations, arrows. Any workaround?

I am not really sure, but if you could at least open the file with Preview app, there might be an option to revert to previous version from the File menu.


Is there a way to recover a disk when FileVault is used? I'm trying to restore a crashed hard drive. Using Softtote Data Recovery for Mac, I have recovered 8000+ files. I can't use any of them. Brainstorming with the user, he forgot that he has FileVault enabled.

Is there any way to recover data from a crashed hard drive with FileVault enabled?

The drive in question is an external drive that connects to the Mac using FireWire 800. We are running Mountain Lion so this is a FileVault 2 situation.

Since it's now clear you have an external drive, I don't know how much of this applies, but I'll leave it in case it helps someone in that situation.

I typically boot the mac into Target Disk Mode and use another Mac to enter the password for any account on the FileVault Mac to mount the encrypted core storage drive under OS X. If the Mac was set up with a recovery key, you could also use that to unlock the volume and read from the actual files and not the encrypted data.

At this point, you can read / write to the raw device or use the normal file system tools or run your program or Disk Warrior or Drive Genius to scavenge blocks as if the drive were a normal, non-FileVault 2 drive.

Trying to copy the encrypted raw blocks off the drive is futile without NSA / FBI level of funding, tools and know-how. There are people that do this professionally, but I'm not one of them. Also, since your drive isn't showing the normal "enter your password" to unlock dialog, it's not clear you can do anything but look for other copies of the data or get a quote from a professional data recovery service to see if they are willing to try to get things back.

Personally, if I had a FileVault drive that went bad, I'd probable just call up Kroll Ontrack or another professional firm and get a quote for their assistance. In the end, it would either be data I could restore from backup, write off as a loss, or pay $$$ to get back.


Does clamshell mode affect wireless connectivity? I've been using my early 2014 MBA in clamshell mode connected to an LG Flatron monitor via VGA with no issue. I recently started using HDMI (using this Amazon Basics dongle). I used this with no issue at my folks' house with no issue over the holidays but now back home I'm getting lots of connectivity issues. Here's the rundown:

HDMI Clamshell: Lots of connectivity issues. Web browsing is nigh undoable
HDMI Dual Screen: The connection gets better when I open the laptop but is still spotty to the point of frustration
VGA Clamshell: Some connectivity issues but not horrific
VGA Dual Screen: No connectivity issues
No External Monitor: No connectivity issues

What could be causing these issues? Is it Comcast sucking? Does the laptop being closed block radio waves? I don't know much about wireless networks. I would appreciate some help in troubleshooting this.

It's not so much there's an issue with WiFi while in clam shell mode, is where the laptop is positioned while in clam shell mode.

The WiFi antenna is located in the display assembly itself, so when it's open, you are in effect "raising the antenna."  When closed, you are "lowering the antenna" to a flat position which will affect reception.

There is a possibility that a poorly shielded HDMI cable/adapter will cause WiFi interference.  However, given that you experience the problem while in clam shell mode is indicative of placement.

Consider getting a "[vertical dock][2]" for your MBA so that the antenna is "raised."