Category: Mac OS X Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 6:10 pm on April 30, 2017 Permalink | Reply  
    Categories: How To, Mac OS X ( 30 )

    How to mount and unmount drives in macOS and OS X from the command line 

    Unmounting external drives on a Mac is usually done quick and simple by either dragging drive icon to the trash, or by using the eject symbol in a Finder window. Mounting usually happens automatically when a new drive is inserted into a USB port or SD card slot.

    However, there is a way to do this via the command line, of which I am a big fan. Fire up a Terminal session and see how to do it.

    Listing available drives

    To see what’s currently attached to your Mac, let’s use the diskutil command, followed by the word list. You’ll see output like this:

    diskutil list
    
    /dev/disk0 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *512.1 GB   disk0
       1:                        EFI EFI                     209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh SSD           511.3 GB   disk0s2
       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
    
    /dev/disk1 (internal, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *1.0 TB     disk1
       1:                        EFI EFI                     209.7 MB   disk1s1
       2:                  Apple_HFS Mac HDD 1TB             999.9 GB   disk1s2
    
    /dev/disk2 (external, physical):
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *1.0 TB     disk2
       1:                  Apple_HFS VM Drive 
    

    Attached drives are listed with their physical locations on the left (i.e. /dev/disk0, /dev/disk1, etc), as well as with their respective partitions if available on the right (like disk0s1, disk1s2, etc). Make a mental note of the latter: you’ll see that we have a physical disk (like disk0), on which several partitions may have been created. It is those partitions we’ll mount and unmount, NOT the physical drive.

    Unmounting an attached hard drive

    On my system I have two internal hard disks (disk0 and disk1), and one external USB drive (disk2). Let’s unmount that USB drive now:

    diskutil unmount /dev/disk2s1
    
    Volume VM Drive on disk2s1 unmounted
    

    Note how we use the unmount command. We need to specify the location of the partition with its full path (i.e. /dev/disk2s1).

    Mounting an attached hard drive

    To mount the drive again, without having to take it out and plugging it in again, I can issue this command:

    diskutil mount /dev/disk2s1
    
    Volume VM Drive on /dev/disk2s1 mounted
    




     
  • Jay Versluis 5:54 pm on April 12, 2017 Permalink | Reply
    Tags:   

    Categories: Linux, Mac OS X, Windows ( 90 )

    What’s the difference between the Logitech M325 and the M325c 

    The Logitech M325 and M325c are both wireless USB mice. Their design appears to be identical (except for the various colourful variations of course), and their prices vary from anything between $12 and $60 – depending the layout and seller. Even the packaging is identical.

    So what’s the difference between these two models? Is it precision? Is it the build quality? Is it the year of production? Is it something else?

    Actually no, the two mice are absolutely identical and both work with Windows, macOS and Linux. The only difference is in the wireless receiver that Logitech give you with each model.

    The difference is the wireless receiver

    The M325 comes with a Logitech Unifying Receiver. You can tell by the little “sunshine” logo on the side. This type of receiver allows us to use the Logitech Unifying Software to operate several devices over a single receiver (say a mouse and a keyboard). It’s a little clunky to setup more than once device, but it certainly saves valuable USB slots on our machines.

    Note that for this to work, all decides must be Logitech unifying devices, and all must display that little sunshine logo.

    The M325c on the other hand does NOT come with a unifying receiver, and instead comes with a standard USB receiver. Only this one device will work with said receiver. As you can imagine, the receiver does not bear the unifying logo on the side. Therefore you may find the M325c a little cheaper than the M325.

    Note those that the M325c mouse itself IS a unifying device, and it DOES bear the unifying logo on the underside. Hence you can use the M325c mouse with another unifying receiver just fine.

    So there you have it – that’s the big secret difference between these two mice. I have both, and I couldn’t tell the difference at first. Just in case it too drives you crazy 🙂





     
  • Jay Versluis 11:06 am on November 5, 2016 Permalink | Reply
    Tags:   

    Categories: Mac OS X, Windows ( 32 )

    How to fix problems with Logitech Unifying Receivers 

    screen-shot-2016-11-04-at-17-12-10I’ve recently bought a new Logitech K360 keyboard for my HP Z600 workstation. I also had a Logitech M325 mouse, both of which came with Unifying USB receivers. I could plug both receivers in, and both devices would work great.

    However, I heard great things about these little receivers and wanted to free up a USB port, and thought I’d connect both devices to the same receiver. Apparently you can connect up to 6 devices to one receiver and store any spare ones inside the mouse or keyboard. Being an all-efficient belt-and-braces kinda guy, I tried my luck.

    Turns out it was relatively easy to pair both devices to the same receiver, thanks to a small piece of software that can be found here, along with instructions on how to use it:

    It all worked fine on my Windows 10 machine, until I wanted to use the mouse (not the keyboard) with my Mac. I know, it’s exotic, and perhaps I should have just bought another mouse. But really, there’s only so much space on my desk, and I really don’t need more clutter in front of me for just an occasional switch.

    I regretted pairing both devices to the same receiver and wished I hadn’t done that, for this very eventuality. So now I had to figure out how to UN-pair both devices again and put them back to how things used to be (before I started messing with them). (More …)





     
  • Jay Versluis 10:54 am on November 4, 2016 Permalink | Reply  
    Categories: Mac OS X, Screencast ( 32 )

    How to launch a Mac App with Command Line Parameters from the Dock 

    In this video I’ll show you how to launch a Mac App from the Command Line, so that we can pass parameters. I’ll also explain how to wrap up such a command into your own app and add an icon to it, so that you can launch it from the dock with a single click.

    This can be useful if you need to convince Google Chrome or any other app to launch with certain parameters and modify its behaviour somehow. In my example I’m using Blender, and I’m using a startup parameter to change its default render engine upon launch. The same principles apply to any app you need to launch with startup parameters.

    The process is as follows:

    • find out the full path of the app you want to launch
    • try launching your app from the command line
    • now add parameters to the end of the launch command
    • create an Automator App
    • change its icon from from the generic Otto Icon to your desired app’s icon
    • drag your new launcher app into the dock

    I’ll explain all the gory details in this video.

    Enjoy!





     
  • Jay Versluis 4:29 pm on August 23, 2016 Permalink | Reply  
    Categories: Mac OS X ( 32 )

    How to kill a Mac App via the Command Line 

    Sometimes it’s’ necessary for us to force-close an app on our Mac if it’s no longer responding to our commands. Usually we’d do that by pressing CMD+OPT+ESCAPE, which brings up a handy window from which we can choose a troublesome app.

    Screen Shot 2016-08-23 at 16.10.14

    But sometimes, this keyboard combination won’t work – for example, if we’re dealing with a remote Mac to which no physical keyboard is attached. In such cases, we can choose to force-close an app via the command line. Let me show you how to do that.

    Connect to your Mac via SSH using a Terminal Session and find out what apps are currently running. We’ll so that with the top command:

    top -u

    Using the -u switch tells top to list the app with the highest CPU usage over time first. The command will display a list of running processes, much like this:

    Screen Shot 2016-08-23 at 16.15.04

    Take a look at the list and make a note of the troublesome app. In my case it’s Carrara, using 165% of my CPUs resources. By definition impossible, but let’s not worry about that. The important thing is this app’s PID (Process ID). Write it down or take a screenshot, we’ll need it in amount to kill the app (mine is 5964).

    Press CTRL+C to stop top and return to the command line. Now issue the following command, replacing 5964 with your own PID:

    kill -9 5964

    And that’s it: the troublesome app has been force-closed and should vacate your system sharpishly. For more information on both top and kill, check out their respective man pages on your Mac.





     
  • Jay Versluis 5:43 pm on August 7, 2016 Permalink | Reply
    Tags:   

    Categories: iOS, Mac OS X ( 222 )

    How to make Notes App sync properly on iOS 

    ios9-notes-app-iconHave you ever wondered why some notes seemingly sync just fine between your iOS devices, but others do not? Wether a note is not fully updated, or you find a duplicate entry in the list, it can be an exercise in frustration.

    But fret not, it doesn’t have to be! This is not a bug in the Notes app; it’s the way we’re using it.

    Let me show yo what you can do to avoid such problems, and how they can happen in the first place.

    Why do we sometimes get random duplicate notes?

    This has to do with the way the app stores data in the cloud. Notes saves your content only when you close the note, or when you switch away from it. Your note is not saved while you’re typing it.

    Likewise, iOS can only “save over” the current note if you’re not actively editing it. Leaving it open, even if you’re only looking at it, means your note is locked for edits from other devices.

    When you make a change on device A, and the same note is opened and edited on device B, then iCloud cannot save your changes to the current note. Hence it creates a duplicate entry. This is a safety mechanism so that your changes are saved rather than lost, and you can decide which copy you’d like to keep when you’re done.

    How to avoid sync trouble on iPhone

    So on iPhone, the solution is simple: always return to the list view of all your notes. Do not leave a note open. That way, another device can edit its contents without trouble.

    How to avoid sync trouble on iPad and Mac?

    On the iPad as well as your Mac, things are a little different due to the nature of the Split View Controller. It displays both the list of your notes, as well as a note next to it. Even when you hold your iPad in portrait mode and cannot see the list view, one note is ALWAYS open and displayed, and therefore cannot be edited by another device. That’s usually when and why iOS (or macOS) saves a duplicate.

    To avoid this situation, make sure you switch to a note that you’re unlikely to edit from another device. Perhaps create a “dummy note” without content and switch to it when you’re finished with the Notes app.

    Remember you can look at a note even if it’s open on another device – it’s just that when editing an open note, trouble keeps in.

    Hope this helps 🙂





     
    • juliav305 8:26 pm on August 7, 2016 Permalink | Reply

      Another great article thank you – another part of the system that made me think I was going slightly crazy with duplicate notes of the same thing or not syncing up at all. Mystery solved 🙂

      • Jay Versluis 8:33 pm on August 7, 2016 Permalink | Reply

        Thanks Julia 🙂

      • Jay Versluis 8:34 pm on August 7, 2016 Permalink | Reply

        Thank you, Julia 🙂

  • Jay Versluis 11:41 am on March 14, 2016 Permalink | Reply
    Tags: , Beta   

    Categories: Mac OS X ( 32 )

    How to switch off Developer Beta Downloads on Mac OS X 

    A while ago I thought it would be fun to run the OS X Developer Betas on my MacBook Pro. That was before El Captain was released. Once the buzz had died down I grew a little tired of the bi-weekly point release downloads that took about an hour to install.

    So how can we tell a Developer Beta Mac to become a “normal” non-beta Mac again?

    While forum posts suggest that it’s an impossible feat, it’s actually no trouble at all. Simply head over to System Preferences – App Store and find a button that reads “your computer is set to receive pre-release Software Update seeds”.

    mac-beta-versions

    Click it and an overlay window is shown, allowing you to “not show pre-release updates” anymore. Be warned however that when you do this, the option to bring up this dialogue disappears – so once switched off, there’s no going back easily (unless you install another beta from scratch, like you did when you first obtained yours).

    Note that when you switch this feature off, your Mac will remain on the beta you have currently installed, until a new release comes out and replaces it. This option will not remove beta files from your machine, nor will it turn your beta system into a non-beta system instantly: you’ll have to wait for the next release and use the regular update option for that.

    You can always check what’s currently installed by heading over to the Apple Icon and select About This Mac.





     
  • Jay Versluis 2:05 pm on January 16, 2016 Permalink | Reply
    Tags: Dolphin, Gamecube, Xbox Controller   

    Categories: Mac OS X ( 32 )

    How to connect your Xbox 360 Controller to Dolphin for Mac 

    DolphinI’ve been experimenting with the marvellous Dolphin Emulator recently. It’s an open source project that allows us to play Nintendo Gamecube and Wii games on modern hardware. Dolphin is available for Windows, OS X and Linux.

    I have a wireless Xbox 360 controller for Windows at my disposal, but the only Windows hardware I have is the first generation Surface Pro. While the controller connects without issues, the Surface sadly just isn’t fast enough to run Dolphin.

    My more powerful hardware is Mac based, and Dolphin runs great on my Mac Mini. But I had no idea how to connect my Xbox controller to it.

    Turns out it’s actually a breeze to setup: let me show you how it worked for me on OS X El Capitan.

    (More …)





     
  • Jay Versluis 2:47 pm on December 12, 2015 Permalink | Reply
    Tags:   

    Categories: Mac OS X ( 32 )

    How to check the Fan Speed on your Mac 

    Sometimes you may want to know how fast your fans are spinning, more as a “number value” rather than a “noise value”. While you can hear when your Mac in front of you is working hard, it’s impossible to tell how fast those fans are spinning when you’re miles away from your Mac in a data centre.

    Thankfully there is an easy way to read out the fan speed with a small built-in utility we can access from the command line. Launch a terminal session and issue spindump as admin user:

    sudo spindump
    
    Password:
    Sampling all processes for 10 seconds with 10 milliseconds of run time between samples
    Sampling completed, processing symbols...
    Spindump analysis written to file /tmp/spindump.txt
    

    It’ll take a few seconds, at the end of which a file is produced that tells you a lot more than just the fan speed. To filter this info out, issue the following:

    cat /tmp/spindump.txt | grep "Fan speed"
    Fan speed:       3151 rpm (-317)
    

    And there you have it! Execute this command under low load, then try again under heavy load to see your low and high spin numbers to get an impression how how busy your Mac’s fans are.

    To remove that temporary file and avoid your hard disk from being clogged up, issue this when you’re done:

    sudo rm /tmp/spindump.txt
    

    This may not be the most elegant way to read out your fan speeds, but it works without installing additional utilities. The spindump command is computationally expensive, so don’t do it continuously – there are better tools for that (such as smcFanControl, or others – see the link below).





     
  • Jay Versluis 11:31 am on December 2, 2015 Permalink | Reply
    Tags:   

    Categories: Mac OS X ( 32 )

    How to disable System Integrity Protection on OS X El Capitan 

    System Integrity Protection was introduced in El Capitan to add another layer of security to OS X. The system prevents the root user from doing things that are potentially harmful. Apple did this because any app at any time may ask for the administrator password and execute commands with elevated permissions, which is a big security risk on single user systems.

    There are downsides to yet another layer of security, and much like Gate Keeper, System Integrity Protection brings us one step closer to a completely locked off system like iOS. I guess that’s the long term plan.

    Until then, and if you need it, you can disable System Integrity Protection. Here’s how to do it:

    • boot into the Recovery Partition (hold down CMD + R during boot)
    • this takes a little longer than usual
    • when the system is back, select Utilities – Terminal
    • now type “csrutil disable”
    • close Terminal and restart the system

    You can check at any time if this feature is on or off by typing

    csrutil status
    
    System Integrity Protection status: disabled.
    

    Enable it again during a Recovery session by typing “csrutil enable” and El Capitan is secured again.

    To see what else this command has to offer, type csrutil without parameters:

    csrutil
    
    usage: csrutil <command>
    Modify the System Integrity Protection configuration. All configuration changes apply to the entire machine.
    Available commands:
    
        clear
            Clear the existing configuration. Only available in Recovery OS.
        disable
            Disable the protection on the machine. Only available in Recovery OS.
        enable
            Enable the protection on the machine. Only available in Recovery OS.
        status
            Display the current configuration.
    
        netboot
            add <address>
                Insert a new IPv4 address in the list of allowed NetBoot sources.
            list
                Print the list of allowed NetBoot sources.
            remove <address>
                Remove an IPv4 address from the list of allowed NetBoot sources.
    




     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel