Tag Info

New answers tagged

0

Looks like networksetup and airport are your best bets. run ifconfig to find network interfaces, then airport scan to find available networks, and then networksetup -setairportnetwork INTERFACE SSID PASSWORD where INTERFACE, SSID, and PASSWORD are replaced by the proper items. It's not the most elegant method, but it works.


0

As a user of the Danish Apple keyboard, I face similar issues. Most of the time I — unfortunately — have to remap keyboard shortcuts through System Preferences > Keyboard > Shortcuts. I researched a bit and wasn't able to find the native way to do this combo on a Scandinavian keyboard. However, you might be able to create a service through Automator that ...


1

This should be all you need to create an SMB share point: root@host:~# sharing -a /path/directory It will also be available via AFP & FTP by default. Alternatively, you can specify SMB only instead, like so: root@host:~# sharing -a /path/directory -s 010 Check for success by listing all share point records: root@host:~# sharing -l ...


3

Just type: mdfind <target_file_name.ext> If there are any matches, you will be presented with the relevant associated path(s). If there's more than one, choose whichever is appropriate and hardcode it. For example: me@MacBook-Pro:~$mdfind "VMware Fusion.app" /opt/homebrew-cask/Caskroom/vmware-fusion/7.1.2-2779224/VMware Fusion.app Or ...


2

Two quick and easy options: You can use Spotlight (mdfind) via command-line for high level items: appLocation=$(mdfind Fusion.app) echo $appLocation /Applications/VMware Fusion.app Or if you use the locate binary (pre-requisite command to enable it will be noticed first time you use it). appLocation=$(locate vmrun) echo "Found at " $appLocation Found at ...


4

I have just created and uploaded a GitHub Gist GitHub Gist which may help you out. The main functionality is: function get_apps_folder () { mdfind -0 -onlyin / \ 'kMDItemKind=="Application" && kMDItemDisplayName="'"${1:-TextEdit}"'"' \ | xargs -0 -I{} dirname {} } function open_apps_folder () { open $(get_apps_folder "$1") } ...


2

I believe this is what you're looking for: alias vmrun=\"`osascript -e 'tell application "Finder" to get POSIX path of (application file id "com.vmware.fusion" as alias)'`/Contents/Library/vmrun\" Now when I type vmrun, without any arguments, in a Terminal and press Enter it outputs the internal help file, as it should. This works on my system, however ...


0

You have to add: alias vmrun='/Applications/VMware\ Fusion.app/Contents/Library/vmrun' to your ~/.bash_profile, save the file and source ~/.bash_profile. In the future you just have to type vmrun to launch the tool. If you need quick access to any more commands from this directory you can add: :/Applications/VMware\ Fusion.app/Contents/Library/ to ...


0

OS X is different in this case. If you aren't getting a FQDN out of hostname, you need to set a FQDN first. The Mac tool is scutil scutil --get HostName # same as hostname scutil --get LocalHostName # same as hostname -s scutil --get ComputerName If you want jvf-imac.fritz.box then simply: sudo scutil --set HostName jvf-imac.fritz.box ...


1

So the following script will send the text to the pipe, in the background, and if the background job does not exit after a second it will kill it. This should stop the script from blocking... #!/bin/sh echo $1 > $2 & sleep 1 # Following is necessary. Seems to need it or # job will not complete! Also seen at # ...


1

I would comment, but I don't have enough coinage. We need to figure out what is wrong: The packages do not exist in a known path that you have. We know this. So what is causing it? Either it's not being installed, or it is being installed and the binary is not in PATH. First, make sure it is being installed properly by pip. Do a pip install and let us ...


1

Here is a shell script that will do what you want - for both Apple's Terminal or iTerm (we have users of both). For your tabs that you open, this will execute another batch file in each tab, such as one for tomcat, one for you db, etc. #!/bin/bash function tab () { local cmd="" local cdto="$PWD" local args="$@" if [ -d "$1" ]; then ...


0

In the shell you may use the command dsmemberutil to get at least the user SID: Example to get the SID of a user by username: % dsmemberutil getsid -U username


1

This answer neatly summarises what ideally belongs in each of ~/.bashrc, ~/.profile, and ~/.bash_profile. In summary: ~/.bash_profile should be super-simple and just load .profile and .bashrc (in that order) ~/.profile has the stuff NOT specifically related to bash, such as environment variables (PATH and friends) ~/.bashrc has anything you'd want at an ...


1

The short answer is: (generally) Add it to ~/.bash_profile echo 'alias ep="cd $HOME/Dropbox/CurrentProject"' >> ~/.bash_profile NOTE: There shouldn't be any space between the alias/variable and the equals sign ("=") and the value. If your value has spaces then the whole value should be put in quotes. A better answer is: (probably) Try setting an ...


0

I don't have an answer to this issue, just an observation. I have observed this symptom on a number of freshly installed OS X 10.0.X systems. On both occasions the systems worked fine until a restart was required after installing software from a package. Both times the packages were simple printer drivers. Both occasions occurred during a Mac Yosemite ...


1

As far as I know, you can't do it using open command. But, you can do it using a combination of keyboard shortcuts and Terminal profiles. Define a new profile on your Terminal app (let's call it ssh) and add your ssh command on Shell tab under Run command:. Then your can define a shortcut on System Preferences - Keyboard - Shorcuts - App Shortcuts like ...


0

In my case, after trying the above on my work machine without success, I found that the culprit was Active Directory. The fix was to go into Directory Utility and edit the AD service settings (double-click on "Active Directory") to enable "Create mobile account at login": This apparently causes the AD credentials to be cached locally, so the system no ...


0

Also check out Reflection (free) which has both iPhone and iPad versions. Unfortunately, it has no MOSH support and doesn't do VNC but its a solid SSH client.


1

I created Homebrew-command-not-found just for that. It works exactly as you would expect, and supports 4800+ Homebrew formulae. We currently support Bash and Zsh, and there’s an open pull-request for Fish support. However it’s currently limited to correct spellings, e.g.: $ ghc The program 'ghc' is currently not installed. You can install it by typing: ...


1

I'd been wondering about this as well. I have my App folder in the side dock which gives me an unwieldy list of names longer than the screen heigth. The solution I tried attacks the problem from another angle. Instead of cleaning out the App folder, I made a new folder and put in alias's of just the programs I use. You can then drag the folder off to your ...


0

I found my answer using AppleScript: https://support.shotgunsoftware.com/entries/127152-Launching-External-Applications-using-Custom-Protocols-under-OSX Create an AppleScript that uses on open location this_URL Save as Application Edit the Info.plist of the Application with: <key>CFBundleURLTypes</key> <array> <dict> ...


-1

Easy – rename it. You have to put a dot before the filename of the app (or any file for that matter). This hides the app (or file) from being viewed in the folder, but it will still be present there. You won't have permission to do this to the OS X default apps normally. But we'll use root for that. So fire up the Terminal app, and type: sudo mv ...


1

You can use AppCleaner to do it, although you first need to uncheck [] Protect default apps in its General Preferences. AppCleaner Preferences AppCleaner showing deleting the Chess.app, which will work the same for other Apple installed Apps providing the preference mentioned is unchecked.


5

You can hide files from the UI using chflags command. Assuming you want to hide iBooks app, start your terminal app do the following: $ cd /Applications/ $ sudo chflags hidden iBooks.app And you are almost done. Start finder app and in Applications folder you won't see iBooks app. But it's still in visible in the Applications Dock folder. You have to ...


0

This is not a direct answer although I hope the information presented herein will help you get to a direct answer. I can tell you what changes in which file when you change the default keyboard shortcut for Mission Control from Control-Up Arrow to Control-Option-Up Arrow. It's the "Item 2 Number" of the "parameters" Array in the "value" Dictionary of the ...


1

Just removing the Server.app (3.2.2) for 10.9 Mavericks isn't enough. You also have to unload several launch daemons. By comparing all "System LaunchDaemons" in a basic Server.app install and an LDAP/VPN environment in two different VMs I assume that the following system launch daemons have to be unloaded permanently: org.openldap.slapd ...


0

You need nmap, it's an ideal tool for this. The official website. The download link. Now check to see if downloads from unidentified developers are allowed in System Preferences in the Security & Privacy section. If not – allow them. Now run the installer (I highly recommend that you do not install ZenMap alongside), and now you can run nmap from ...


2

Probably the best you can get is netstat -f inet -n | grep .port or netstat -f inet | grep .servicename Examples: machine:~ user$ netstat -f inet -n | grep .443 tcp4 0 0 192.168.114.5.58471 192.111.0.25.443 ESTABLISHED tcp4 0 0 192.168.114.5.57990 192.111.0.25.443 ESTABLISHED tcp4 0 0 ...


1

Problem sovled This issue was caused because I had imported a time machine back which was made using snow lepoard. Doing this had overwrote the mountain lion libraries. I just had to reinstall mountain lion over the existing install and then xcode and homebrew and it worked fine.


3

You can start Firefox directly in a private window, at least two ways, in a Terminal. The first is using the open command. open -a Firefox --args -private-window In a Terminal, type man open and press Enter for a synopsis of the open command. Note: When passing command line arguments to the application being opened by the open command they go with and ...


1

Are you sure you have something at the other end of that named pipe actually accepting the data? "do shell script" will not exit until something actually tries to read from the pipe. If you want to work around this, you can use: do shell script "sh -c \"echo " & currtime & " > " & aname & "\" &> /dev/null &" This will keep ...


0

Usually I want to keep the command I've been typing and just not run it. In that case, under Bash, at least, hitting esc-# will add a hash character to the beginning of the line and then (essentially) hit enter, shoving the command into your history. You can then run whatever commands you want, and use your shell history keys to bring back the previous ...


4

pgrep is a fairly new addition to OS X. It may not be available in 10.7 I would use pkgutil and check for a package id and install time or the command is not available in your version OS X. pkgutil --file-info /usr/bin/pgrep


4

No, it's not shipped until 10.8 so you'll need to get it elsewhere for 10.7 and earlier. Starting with OS X 10.8 Mountain Lion, the pgrep command should be in /usr/bin/. In a Terminal type the following and press enter. whereis pgrep Looking at the contents of the InstallESD.dmg from "Install Mac OS X Lion.app", pgrep is not present.


0

Personally I'd not place it forward of the system's $PATH and do it as such. export PATH=$PATH:$HOME/Applications/gradle-2.6/bin If you want it first in the $PATH, then use: export PATH=$HOME/Applications/gradle-2.6/bin:$PATH


1

The path /myusername/Applications/gradle-2.6/bin probably doesn't exist except your personal user folder is in the root of your main volume - which would be very, very uncommon on a *nix system. Depending on where you've installed Gradle the proper path might be: /Users/myUsername/Applications/gradle-2.6/bin or /Applications/gradle-2.6/bin So change ...


0

Thanks for the reply @aaplmath, I actually just found the needed addition which is what you have and it does the job! | grep SMBHome: | cut -c 10- | sed 's/\\\\/\\//g' " Thank you for your input!


1

There are two approaches to solving this problem. One is to use JavaScript for Automation (either by putting your AppleScript into an Automator workflow and then using a separate Run JavaScript action, or by re-writing the entire script in JXA), while the other is to use the sed and cut command line utilities via do shell script. Here's the JavaScript ...


0

Try using Disk Utility to repair did disk permissions. Open Disk Utility, select your drive, select repair and then click Repair Permissions. This may fix your issue.


0

The lowercase "d" should work. If it doesn't, you can install GNU install with Homebrew coreutils which will provide the "D" flag.


1

The lock switch on the card was not locked, but after locking and unlocking it (turning it off and back on) again, it worked fine. Problem solved.


0

Did you definitely use the command line to delete the folder? One behaviour that has struck me as strange a few times on OS X is that if you are working in a folder in the Terminal but then delete it in the Finder, you can continue to work with the folder perfectly happily in the Terminal. Even in it's new home within the Trash. If you try to open the ...


1

Whether zsh checks for new mail can be adjusted through the MAILCHECK parameter as described in zshparam(1). It specifies the interval in seconds between checks for new mail, a zero turns off the checks completely. So just put this into your zsh configuration file: # don't check for new mail MAILCHECK=0


2

I here what you're saying however the only thing I know of is to use the clear command. It keep's the history intact while returning the prompt to the top of the Terminal window. I added an alias for clear to my ~/.profile file. Or ~/.bash_profile file if using it instead. alias c='clear' Now I just press CEnter. Then scroll back into the history as ...


0

You can change the automatically launched program via this command: defaults write com.apple.loginwindow Finder /PATH/TO/ALTERNATIVE.app The alternative program will launch instead of Finder; and the force-quit option will change to "restart", etc. The actual Finder can still be started, but it can also be quit, just as any other normal app.


3

Just disable the LaunchAgent com.apple.finder at /System/Library/LaunchAgents/ with sudo launchctl unload -w /System/Library/LaunchAgents/com.apple.Finder.plist and Finder shouldn't launch at all. Depending on your system this might not be successful. Then download, install and open LaunchControl. Navigate to System Agents -> com.apple.Finder and highlight ...


1

ok, funny, found out that changing Opacity back to 100% the switch goes just like a charm. Leaving this for QoS in here.


0

I've been having problems since OSX 10, now using XQuartz 2.7.7 (xorg-server 1.15.2) and when the X11 Terminal windows opens (the app freezes at this point) I simply close it by typing 'exit' at the prompt. After that, it all works fine for me. Don't try and install the automatic update version - simply download it stand-alone.


1

This seems harmless to me. If you want to clean things up, I would sudo tmutil disablelocal to clean up any local snapshots and then make a new test user and turn off automatic user log in. Reboot and log in as test and make a clean backup interval without your user being logged in or any files open from the main ~ directory. At that point, you can check ...



Top 50 recent answers are included