About this blog
We present the latest IT news and tips, and information about our IT courses. Brought to you by Dr. Daniel Wong and Mr. Jude How
Latest news and events
November 2017
M T W T F S S
« Oct    
 12345
6789101112
13141516171819
20212223242526
27282930  
Facebook like box

Archive for the ‘Mac OS’ Category

Apple is going to introduce warmer screen colours for night time to make it easier on users’ eyes in the next update, iOS 9.3.

The change will see the phone’s screen begin to emit warmer colours during darker hours in the hope of causing less disruption when users go to sleep after prolonged use.

Typically iPhone screens emit blue light but the new feature, with assistance from the phone’s clock and geolocation, will change the type of light it sends out after sunset.

“Night Shift uses your iOS device’s clock and geolocation to determine when it’s sunset in your location. Then it automatically shifts the colours in your display to the warmer end of the spectrum, making it easier on your eyes,” Apple said.

 

Click here to read more

Post to Twitter

 

Android-powered smartphones extended their lead in the global marketplace in the third quarter, helped by growth in emerging markets, a survey showed Wednesday.

The Google-powered operating system was used in 84.7 percent of smartphones sold worldwide in the quarter, up from 83.3 percent a year earlier, the Gartner survey showed.

 

Click here to read more

Post to Twitter

Often, when we try to connect to a machine/server with ssh (for a secure connection), the ssh client will not know if the public key it is receiving is indeed from the machine/server it is intending to establish the ssh connection with, so you will get the infamous message along the lines of

The authenticity of host ‘server.name.com (192.168.1.2)’ can’t be established. RSA key fingerprint is 5a:33:…[a-fingerprint]. Are you sure you want to continue connecting (yes/no)?

You should preferably not blindly say yes unless you can verify the fingerprint. How can this be done?

In the case where the machine/server is on MacOS, and you have some other way to access the machine (e.g., sitting at the machine), you can easily obtain the finger print, since we know:

a) the public key is stored in /etc/ssh_host_rsa_key.pub (at least, in MacOS X 10.4 till at least 10.7, as we checked)

b) ssh-keygen can generate the fingerprint for you

Thus, we can open a terminal window and type

$ ssh-keygen -l -f /etc/ssh_host_rsa_key.pub

to obtain the RSA key fingerprint. Then we can check that it matches the one seen when you try to ssh to the machine.

Post to Twitter

Let’s say you have a Mac running OS X Lion or Mountain Lion, and you want to use git and other command line developer tools. You open a terminal window, and type “git” and it doesn’t find it.

Turns out that when you install Xcode (at least, Xcode 4.5.2 — I haven’t verified this with all versions of Xcode), it puts git and other developer tools in /Applications/Xcode.app/Contents/Developer/usr/bin , but it doesn’t add that directory/folder to your path. So, assuming you are running bash (the default shell), you can add it as follows

export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin

for the current shell. If you wish it to be “permanently” added, you can add this line to your .profile (where the bashrc looks for customizations whenever it starts). If this is a new Mac that doesn’t have .profile in your home directory yet, just create a new .profile file, and put the line there.

For more information and related details, see stackexchange

Post to Twitter

One of the advantages of using Macs is the power of the underlying Linux shell. If you are in a folder and you wish to grep something, to diff something, etc., or even quickly create a text file, you might wish to quickly open a terminal window in that current folder. But how? It’s easy. Here’s how:

1) Go to System Preferences > Keyboard > Keyboard Shortcuts > Services

2) Select either “New Terminal at Folder” or “New Terminal Tab at Folder”

3) (optionally) assign a shortcut key to the service

That’s it! It should be enabled now. Whether or not you assigned a shortcut key, you can right click on a folder and find the “New Terminal at Folder” or “New Terminal Tab at Folder” (or both) service available in the drop down menu. Enjoy!

If you’re like me, coming from a Windows background, this is kind of like adding various windows components (e.g., SNMP client) that are disabled by default, but which one could just add if only one knew that they were available and useful! In the Mac OS world, these are called Services.

Related information can be found on stackoverflow

 

Post to Twitter

You may know that Mac OS is unix-based, and so you can set environment variables like the PATH (search path for running programs) in a unix-style way. However, how exactly might you do that? Mac OS provides a bash shell, so you can read about how to set the PATH on a Mac. For example, you might need to do that if you have some command line tools that you wish to run and they are located in a particular path.

Specifically, it seems that the “best practice” way is to edit your .bash_profile and set it. To get you going if you need it, here’s an example of a .bash_profile on a Mac.

 

Post to Twitter