How To Run App On Mac From Command Line
The commands you enter during a session are saved so you can repeat a previously used command without retyping it. In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return. The same can be accomplished from the command line using two commands, hdiutil and cp. The following steps show the installation of a popular VNC client for OS X called 'Chicken of the VNC'. It can be used as a remote desktop client for Linux, Mac, or Windows hosts.
Are you sure your log in account is an Admin account? Check that in Users & Groups preferences.
- Once your command resembles start programname, doing so will run the 'start' command for your selected program. You should see the program open within a few seconds of entering the command. If your selected program won't run, it is most likely in a folder that isn't in the Command Prompt's search path.
- If you, like me, are an old-time Unix command-line fanatic now doing iOS development, you've probably wondered if you can build an iPhone app from scratch, entirely outside of XCode. After all, Mac OS/X is a.nix, and all the familiar tools — Make, cc, ld — are all there.
- Opening Mac OS X Applications from the Command Line. The Terminal command to launch OS X gui apps is appropriately called ‘open’ and here is how it works at it’s most simple: open -a ApplicationName. That will open the defined app named “ApplicationName”. But open is much more powerful than that.
What are the associated permissions for the program's file in your Applications folder and what permissions are associated with Applications folder itself? They should be, respectively:
- System r/w; Wheel r/only; Everyone r/only
- System r/w; Admin r/w; Everyone r/only
Check these and, if needed, change them by selecting the file or folder. Press COMMAND-I to open the Get Info window. The Sharing & Permissions panel is at the bottom. To make a change you first need to click on the little lock icon and authenticate with your admin password.
Jun 21, 2014 1:02 PM
Disclaimer: I am not on the .NET Core Team. I used the tools available publicly and have no insights into the future of .NET Core. It looks very bright though. :)
The working source code for this project can be found here.
Intro
A complete list of post in this series is included below :
In this post, we’re going to look at running the app from the command line and then the Mac.
Running the App in the Windows Command Prompt
While you can obviously run the app inside of Visual Studio with the F5 command. You should also know that you can run the app inside of the console. Before we begin, make sure you have the app found here. After opening the app or downloading it, open the folder containing the project in the command prompt.
You can run your application here by simply typing :
You will the following output :
The exact same result from running the console app in Visual Studio.
Using dotnet publish to get the app ready for Mac
Go ahead and type dotnet publish
on the command prompt and then type tree
to look at your directory listing as shown below :
You should see the publish directory. Navigate into it and list out the files in the directory :
Take note that the dlls listed below are related to the package reference that we added in the last blog post.
- Newtonsoft.Json.dll
- System.Runtime.Serialization.Primitives.dll
This only leaves the NetCoreConsoleApp.dll which is the Console application that we can run on a Mac (or any other platform that supports .NET Core).
Running the app on a Mac
Finally! It is about time you might say. I agree. Before you can run the app on your Mac, you’re going to need to head back over to the .NET Core downloads page and install OpenSSL and then the SDK (or runtime) if you remember the difference from the first post.
To run this on your Mac, you’ll need to copy the ‘publish’ folder to your Mac. Then open Terminal and you can run the app by just typing :
See Full List On Wikihow.com
This is awesome! Now you have an app that run on another platform and you used your existing .NET skillset to create it. I’m LOVING .NET Core!
How To Run App On Mac From Command Line Linux
Wrap-up
Cached
OK, I’m going to take a break and I’ll be back next week. As always, thanks for reading and smash one of those share buttons to give this post some love if you found it helpful. Also, feel free to leave a comment below or follow me on twitter for daily links and tips.