Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Placeholder info for AppleTV in Profile Manager OS X Server
While importing a placeholder for some iPads into Profile Manager I was peeking through profilemanager.log, when I found this gem.
[351] [2014/05/22 16:17:21.942] I: Imported placeholder device "MH-Gary Ho_iPad Mini45", SerialNumber=F7NMXXXXXX84, IMEI=, MEID=, UDID=, DeviceID=, AirplayPassword=
What I did next was add a new column AirplayPassword= to the placeholder CSV file and put a password in. I then uploaded the placeholder for an AppleTV and it added the Airplay password to my AppleTV Device in ProfileManager.

Just yesterday I added 20 AppleTVs to Profile Manager, I could have saved a few steps with this hint.

[crarko adds: If you don't know about Apple Profile Manager for OS X Server here is a description of it's capabilities. Perhaps they've noticed penetration of AppleTV's into business and college conference rooms. I've been seeing more of them used basically as portable projectors.]
  Post a comment  •  Comments (0)  
  • Currently 1.04 / 5
  You rated: 1 / 5 (24 votes cast)
 
[7,858 views] Email Article To a Friend View Printable Version
10.9: Convert gitolite managed git repositories to Xcode Server OS X Server
So you finally want to take the plunge and convert from gitolite managed repositories and Jenkins to doing everything with Mavericks' Xcode Server? It turns out it's actually not that hard.

Disclaimer: I just figured this process out, everything appears to work (pulling the repository, committing/pushing back to the repository after making changes. I think that everything should be working properly outside of my very basic tests, but they were very limited.

Converting gitolite repositories for Xcode server.
  • Find your repositories folder (for me i had a special 'git' user so the repositories folder was in /Users/git/repositories).
  • Create a tarred gzip file (as admin with following settings) to create carbon copies of the directories preserving ownership and permissions:

    sudo tar cpz -P --exclude .DS_Store -f repositories.tgz /Users/git/repositories

  • Copy this tgz file to the new server (if it is in fact a new server).
  • Extract the file to your Desktop.
  • Change the owner to the proper owner expected by Mavericks' Xcode server:

    sudo chown -R 94:70 ~/Desktop/respositories/

  • Change the directories to have the proper permissions:

    sudo chmod -R 0777 ~/Desktop/repositories

  • Each repository has a config file inside it, gitolite gives different default configs than Xcode server, and it's important that they match up with what Apple expects. For my gitolite config files they all looked like this:
    	[core]
    		repositoryformatversion = 0
    		filemode = true
    		bare = true
    		ignorecase = true
    		precomposeunicode = false
    
    While an example test repository made from scratch with Mavericks' Xcode Server is:
    	[core]
    		repositoryformatversion = 0
    		filemode = true
    		bare = true
    		ignorecase = true
    		precomposeunicode = true
    		sharedrepository = 1
    	[receive]
    		denyNonFastforwards = true
    
    So I replaced all the config files contents for every repository with that and everything appears to work seamlessly as if Xcode had created the repositories.
  • Make sure the server app is NOT running and then move all of your repositories into /Library/Server/Xcode/Respositories/git/
  • 9. Open the Server app, choose the Xcode option in the sidebar and then choose the Repositories tab and all of your repositories SHOULD be visible. This will keep your commit histories intact (I havent tried reverting to them or anything, but I assume it should work)
For the more curious, this is how I determined the gid's for _teamserver and _www:

dscl . -list /Users UniqueID

[crarko adds: I haven't tested this one, but I am planning to set up such a server so it would be great to hear what people think of Xcode server in general, as well as the specifics of this hint.]
  Post a comment  •  Comments (0)  
  • Currently 1.17 / 5
  You rated: 1 / 5 (35 votes cast)
 
[6,977 views] Email Article To a Friend View Printable Version
Bypass Chromes SSL/certificate blockades Apps
There's something with Chrome (and Firefox as well) that has driven me crazy for some years: when browsing the web via a proxy server while at work I can't access some pages via the HTTPS-protocol.

Chrome and Firefox are showing error messages like this one and this one (sorry, both are in German). Safari just shows a blank page and I'm not able to open that specific web site although I'm sure that this site is not going to harm my computer or myself. For example this problem appears when I try to access my router at home or some other sites having problematic certificates - but they play fine when I'm at home.

Finally I found a solution for the problem.

Unfortunately there's neither a visible setting to set Chrome to warn me but allow the warning to be ignored, nor is that one in about:flags. But you can start Chrome with the flag --ignore-certificate-errors. That's not very comfortable but it works (last tested with Chrome 34).

Assuming Google Chrome is in your Applications folder, go to the Terminal and type following command:

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --ignore-certificate-errors &> /dev/null

That will open Chrome as usual but lets you browse any HTTPS site that has a problematic certificate and was blocked before.

I wouldn't do online banking this way; there I would be encouraged when Chrome tells me that there's something wrong with the site.

Maybe not many people will need this hint. I guess this problems only exist in rare circumstances with some proxy servers between your computer and the Internet.

[crarko adds: Yes, this probably is a rare case, although I've seen a lot of weird behavior out of Chrome lately. At first glance this sounded like a firewall/proxy config where the submitter worked, but that must not be where the proxy server is. I assume this only works for the specific session you launch using the command, but I'd make sure before using it. I don't use a proxy so I could not properly test this.]
  Post a comment  •  Comments (4)  
  • Currently 1.05 / 5
  You rated: 1 / 5 (104 votes cast)
 
[8,669 views] Email Article To a Friend View Printable Version
We're back Site News
As I'm sure most of you have noticed, MacOSXHints was not in action since mid-May. There was an issue with the site software, but I'm really happy to say that is now fixed, and I look forward to resuming publication of new hints. This is especially pleasing as the Public Beta of OS X Yosemite approaches, and the new goodies in iOS 8 as well.

I'll just say it's good to be back.

Craig A.
  Post a comment  •  Comments (13)  
  • Currently 2.00 / 5
  You rated: 5 / 5 (18 votes cast)
 
[7,045 views] Email Article To a Friend View Printable Version
iOS: Maps wrong destination Work-around Phones
It just so happens that the building where I work has no street address, as it is part of a university campus. When I asked Siri where I was, it gave me an address, which I put as my work address in my contact card. However, whenever I asked Siri to give me directions to work, it would lead me astray - about a mile down the road. Yet when I double-checked by asking Siri where I was, it aid I was at the address previously reported. I also discovered that if I manually touch the address in my contact card and touch Directions to here I would get directed to the correct spot! I played around with Siri today and figured out a work-around so that I could ask Siri for directions to work and get there properly.

I believe this is all due to some sort of Apple Maps bug. Manually touching to get directions versus asking Siri for directions to the same address should give you directions to the same place. I suspected that Siri was using different address mappings than Maps was using, so I tried methodically asking Siri to give me directions to slightly different addresses on the same road to see if I could pinpoint the address that Siri thought my building was located at. This turned out to be an incorrect assumption. I discovered that if I ask Siri these 2 questions, I get two different destinations:
  • Give me directions to xxx Road.
  • Give me directions to xxx Road, City.
The first gave me directions to the correct destination and the second gave me directions to a place on the same road about a mile away. My Contact card had the full address: city, state, zip and country included. I first tried removing all but the street address, but that gave me wildly inaccurate results.

In order for me to be able to ask Siri for directions to work and get the correct result I had to delete only the city from the work address in my Contact card.

This problem is probably location specific; an issue with the map data itself, or possibly with the Maps app, so most people probably won't have this problem. I have submitted this issue to Apple via their feedback form and via the report a problem link in the Apple Maps app.

[crarko adds: Definitely sounds buggy to me, although I have noticed similar behavior in Google Maps and MapQuest before too. Anyway for future reference (if you don't have these) to report a bug in OS X go here and for iOS go here. If you're in the Developer program, you have access to other tools, of course.]
  Post a comment  •  Comments (5)  
  • Currently 1.75 / 5
  You rated: 1 / 5 (16 votes cast)
 
[6,629 views] Email Article To a Friend View Printable Version
Creating custom shortcuts with apostrophes System
I'm running OS X localized in French and recently started using custom keyboard shortcuts extensively. But I've come across a few menu items for which I could not create a shortcut. I realized that all these items contained apostrophes. Not the same apostrophe as the one on the keyboard though (’ vs. ' which is a single quote, ascii 39).

I managed to find the right char in a *.strings file inside the Ressource/French.lproj folder of the application package (Teminal.app in this case), which I could then copy and paste in System Preferences » Keyboard » Shortcuts.

I know the solution provided here is not very elegant. Maybe you will figure out something better.

[crarko adds: And if someone does have an alternative solution, please share it in the comments.]
  Post a comment  •  Comments (8)  
  • Currently 1.25 / 5
  You rated: 1 / 5 (44 votes cast)
 
[10,302 views] Email Article To a Friend View Printable Version
10.9: Disable App Nap System Wide System 10.9
The Finder/Get Info checkmark for preventing App Nap sometimes disappears, seemingly at random. Maybe the app updates itself, or just writes something to the application directory and the checkmark is gone. The next day your overnight render is at 10%. So in Terminal, type:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
This seems to prevent App Nap completely, looking at the Activity Monitor » Energy » App Nap column. Running programs need to be restarted for the change to take effect.

[crarko adds: I tried the command; not sure if it's really made a difference. I don't do overnight renders, but if people who do leave lengthy processes going care to comment, we care to listen. I'm really curious about the check box resetting itself.]
  Post a comment  •  Comments (4)  
  • Currently 1.45 / 5
  You rated: 4 / 5 (20 votes cast)
 
[14,221 views] Email Article To a Friend View Printable Version
10.9: Assigning Tags by keyboard shortcut in Finder Desktop
I'm not sure if this has been covered sufficiently already, but I've heard lamentations by various writers about the lack of a keyboard shortcut to bring up the file-tagging popup in the Finder. While none is provided by default, one can easily be set up.

In previous versions of OS X, the File menu had Label: followed by the row of colored cells. In Mavericks, the row of tags is still there, but the un-selectable Label: has changed to the selectable Tags…, which opens the tagging popup menu next to the selected file.

This process may already be familiar to MacOSXHints readers. Go to System Preferences » Keyboard » Shortcuts » App Shortcuts and click on the + button.

In the window that appears, set the Application to be the Finder, and enter Tags… in for the Menu Title. (To type the ellipsis character, use Option+semicolon, rather than three periods.) And then, of course, set your preferred shortcut. I like using Cmd+Opt+T.

[crarko adds: Handy. I hope this kind of customizing does not disappear in Mavericks' successor. I fear the worst.]
  Post a comment  •  Comments (5)  
  • Currently 1.36 / 5
  You rated: 2 / 5 (44 votes cast)
 
[14,707 views] Email Article To a Friend View Printable Version
Creating a kill switch for the OSX VPN client Network
I live in China so I have to use VPN all the time if I want any kind of stable connection to sites in the west. Unfortunately the VPN will at times randomly disconnect and then all traffic will immediately start going over chinese Internet again. While this is not a big deal really, I would just prefer not to be logged in to Facebook or Gmail and have my traffic open to be sniffed by the great firewall. It also occurred to me that many people use VPNs in the states in order to safely torrent.

I know some VPN providers have 'Internet kill switches' for their VPN that will cut your Internet connection incase of a disconnect and make sure you are not leaking anything. The problem with these is that they are almost all using openVPN, while I use L2TP over IPSec for my VPN. I searched for a long time for a way to do this and could not find one so I thought of a way to do it on my own. The following is how I set my system up. Please keep in mind that I am not an experienced Terminal user or power user so if anyone knows of a better way to do this please let me know.
read more (1,035 words)   Post a comment  •  Comments (0)  
  • Currently 1.19 / 5
  You rated: 4 / 5 (54 votes cast)
 
[11,371 views] Email Article To a Friend View Printable Version
Automator Service to toggle the alias bit System 10.9
Aliases in OS X are identified to the system by an attribute referred to as the alias bit. This hint provides a very simple way to be able to toggle the alias bit of selected files within the Finder.

There may be some need to be able to toggle the alias bit of files from within the Finder. For example, I found that using Bittorrent Sync to keep files synchronized across multiple devices is very useful and a real time saver, but suffers from a bug in the OS X version, that causes aliases to lose their status as aliases. I traced the problem to the alias bit not syncing and though the developers continue to promise to fix it, I got tired of waiting.

So I put together an Automator action that installs as a service in OS X. It adds a Service to the contextual menu that will toggle the alias bit on any file or folder in the Finder. It works on multiple files at once. Just select what you want, right click, and choose 'Toggle Alias Bit.' I made it a toggler rather than a setter so you can undo it if you accidentally turn a regular file into an alias.

I'm hosting it via my Google Drive if you want to download it.

To install, unzip it, double click it, done (sort of). If you don't have Xcode installed, the first time you try to use it there will be a short pause, then you'll be prompted to download and install Xcode developer tools. This will happen automatically, you just need to OK it. The reason for the developer tools requirement is the use of the GetFileInfo and SetFile commands, which are part of that.

If you want to do it yourself in Automator, here are the relevant steps:
  • Open Automator and choose Service as the type of new document.
  • Drag Run Shell Script to the workflow. Make sure the Service receives selected files or folder in Finder, are checked for the options. Shell should be /bin/bash and pass input as arguments
  • Copy and paste the following into the 'Run Shell script' box:
    #This script will toggle the alias bit for a file  
    
    for f in "$@"  
    do  
    
    #GetFileInfo -aa should return 1 for alias, 0 for not alias  
    
        if [ `GetFileInfo -aa "$@"` == "1" ] # if it's an alias  
        then  
          SetFile -a "a" "$@" # set it to not be an alias  
        else  
          SetFile -a "A" "$@" # otherwise, it's not an alias, so make it one  
    
        fi  
    
    done
    
  • Save it as something useful like 'Toggle Alias bit.'
  • Use as described above.
Apologies if this is not the most simple or efficient scripting. It is the first bit of programming I have done in about twenty years. Also, this will likely work in older versions of OS X, but how far back, I do not know.

[crarko adds: I haven't fully tested this one. I had some problems working with the downloadable version, so I'd recommend creating the Service from scratch using the code above. I already have Xcode installed so I did not get the prompt to install it, as expected.]
  Post a comment  •  Comments (2)  
  • Currently 1.12 / 5
  You rated: 2 / 5 (100 votes cast)
 
[9,145 views] Email Article To a Friend View Printable Version