Ubuntu Linux unable to mount non-journaled hfsplus drive for write

I have a drive from a Macbook that I made into a USB drive to share files between Linux and Macs. To do this I of course disabled journaling on the drive before removing it from the Macbook, and all was well. Both Linux (a Debian desktop machine) and various Mac machines could both read and write to the drive. However, I got a new notebook, which I installed Ubuntu on, and found it could only mount this non-journaled hfsplus USB drive as read only, though “mount” shows it mounted rw, for read and write. I tried many things and read many blogs and forum posts and decided to try the tools that come with in the “hfsprogs” package, and specifically “fsck.hfsplus” as someone speculated that the drive might have been become corrupt during an unmount.  The command I ran was:

sudo fsck.hfsplus /dev/sdb2

This check did indeed find some errors and report it had correct them and afterwards I could once again write to the drive.

I hope this helps the next person searching for this issue. I tried to get all the terms I was searching for, unsuccessfully, into title of this post to help folks locate it. Searching for this issue seems to turn up 99.9% responses about “You have to turn off journaling before mounting with Linux” which I knew already and was not part of the problem at all.

Add a KDE like "Open Terminal here" command to Mac Finder

2011 edit

As of Mac OS X 10.7 (Lion),  this can now be done as a Service (not exactly like KDE, but better than nothing). Go to:

System Preferences > Keyboard > Keyboard Shortcuts > Services

Then check the box to enable “New Terminal at Folder”

Then when you are in the Finder and want to open a terminal right there, right click on the folder name and at the bottom of the menu you will see the “New Terminal” link. You can also  drag the folder and drop it onto the terminal icon.

————– 2009 post ————

Before OSX came along, making the Mac usable, I was always mainly a Linux user and became very used to the KDE and Gnome UI and features. When getting into the OSX, I really missed certain things and just had to figure out how to add em, to be comfortable. This is one big one. Though I usually use a Shell and Midnight Commander to get around in my Linux systems, from time to time I would end up in the KDE GUI File browser thing, and end up using their cool “Open a terminal here” command, to get to the Shell and do stuff. Since we are mostly in a GUI environment when using OSX, this feature was killing me. But, there is a simple way to add this thanks to the Automator and Apple Script. Here is what I found (though I do not remember where) when looking at how to do this.

  • Launch Automator
  • Create a new Workflow (or a new Service if using Snow Leopard)
  • (If in Snow Leopard, at the top of choose “Folders” from the first select control, and “Finder” from the second)
  • Choose Finder, then drag “Get Selected Finder Items” to the work area (under “Files and Folders” in Snow Leopard or use the search feature to search for “Get Selected Finder Items”)
  • Choose Applications, then drag “Run Apple Script” toe the work area below the Finder action you just added.(in Utilities in Snow Leopard, or you can use the search feature to search for “Run Apple Script”)
  • Replace the default Apple Script it generates for you, with the following
    on run {input, parameters}
    
    	tell application "Finder"
    		set winOne to window 1
    		set winOnePath to (quoted form of POSIX path of (target of winOne as alias))
    		tell application "Terminal"
    			activate
    			tell window 1
    				do script "cd " & winOnePath
    			end tell
    		end tell
    	end tell
    
    	return input
    end run
  • Then from the Automator menu, choose “File”, then “Save As”. If not Snow Leopard then you have a workflow and need to save it to the place the OS can pick it up, so if not already defaulting to this location, navigate to:
    [user home]/Library/Workflows/Applications/Finder

    and name the file something that you want the Menu to show when you go to use this new Automator command (I used “term-here” for instance)

    But if you are in Snow Leopard, then you have a service and “Save-As” only prompts you for a name. I entered “term-here”.

Once these steps are completed and the file saved, you should be able to open the Finder, navigate to a directory you wish to open a Terminal in, right click in the directory, choose “Automator” and see you new command there. Choosing the command should pop up a new Terminal with the working directory set to the directory you were in.

NOTE, of course if you are on Snow Leopard it is different. Here you need to choose the dir you want with the pointer and right click. To get the current directory, I choose to view the path bar from the Finder’s View menu, and then I can choose the dir I am in and click. I also created a keyboard shortcut for it. To create a keyboard shortcut, when in the Finder, choose Services from the Finder menu, then Services Preferences, then scroll down to find your new service. Click into the white space to the right of your service to get the entry box for your shortcut, and then use the keys you want to be the shortcut, as if you were trying to launch it right now, and it will store them in the box for you.

Enjoy

j

Follow

Get every new post delivered to your Inbox.