Difference between revisions of "Mac Tips"

From CsWiki
Jump to: navigation, search
(Latex)
 
(27 intermediate revisions by 4 users not shown)
Line 4: Line 4:
  
 
=== Hebrew Support ===
 
=== Hebrew Support ===
On the dock (gray stuff on the bottom) go to System preferences => International => Input Menu Tab and check Hebrew (not Hebrew QWERTY).  
+
On the dock (gray stuff on the bottom) go to System preferences => Languages & Text => Input Sources Tab and check Hebrew (not Hebrew QWERTY).  
 
In order to switch the language using the keyboard shortcut, goto System preferences => Keyboard & Mouse => Keyboard Shortcuts. Check "Input Menu", and uncheck "Spotlight". Now Cmd+Space switches languages.
 
In order to switch the language using the keyboard shortcut, goto System preferences => Keyboard & Mouse => Keyboard Shortcuts. Check "Input Menu", and uncheck "Spotlight". Now Cmd+Space switches languages.
 +
 +
Microsoft Office for Mac does not have Hebrew support. Neither does Apple's iWork suite. One option is to use Microsoft Office for Windows on a virtual machine (Parallels Desktop, VMWare, etc.). Another option is to use Open Office.
  
 
=== The Mouse ===
 
=== The Mouse ===
Line 11: Line 13:
  
 
You might want to have the regular 3-button mouse that we all know and love from Linux or Windows. So, go to Finder -> Go Menu -> Applications -> System Preferences -> Keyboard & Mouse. Choose the "Mouse" tab. Change the left button to be Primary button, the right to be Secondary button, and the middle to be Button 3. Your mouse has two buttons on the sides. If you squeeze both of them it starts "Expose". Try it and see...
 
You might want to have the regular 3-button mouse that we all know and love from Linux or Windows. So, go to Finder -> Go Menu -> Applications -> System Preferences -> Keyboard & Mouse. Choose the "Mouse" tab. Change the left button to be Primary button, the right to be Secondary button, and the middle to be Button 3. Your mouse has two buttons on the sides. If you squeeze both of them it starts "Expose". Try it and see...
 +
 +
Also, selecting the text doesn't put it inside the "selection clipboard" like in linux: you need to use Cmd+C to copy and Cmd+V to paste. If you know how to change this behavior, please update this section.
  
 
=== The Keyboard ===
 
=== The Keyboard ===
There is no Home and End keys. Press Cmd+left for going to the beginning of the line, and Cmd+right to the end of the line in most of the applications. For some reason, it doesn't work in Gmail. The workaround is to use Ctrl+e to go to the end of the line, but I'm not aware for any other shortcut that would bring you to the beginning of the line...
+
There is no Home and End keys. Press Cmd+left for going to the beginning of the line, and Cmd+right to the end of the line. If someone is aware of how to keybind these keys to the Linux/Windows usual mapping, please update this section. For some reason, Cmd+left/right doesn't work in Gmail. A workaround is to install [https://addons.mozilla.org/en-US/firefox/addon/9796 KeyFixer].
Alt+left and Alt+right skip words.
+
Alt+left and Alt+right (should) skip words.
  
 
Generally speaking, use the Cmd button, whenever you are used to the ctrl button (such as cmd+C to copy, and cmd+T to open a new tab) etc. Ctrl is only used for linux shortcuts in the terminal, and rarely elsewhere.
 
Generally speaking, use the Cmd button, whenever you are used to the ctrl button (such as cmd+C to copy, and cmd+T to open a new tab) etc. Ctrl is only used for linux shortcuts in the terminal, and rarely elsewhere.
  
=== Finding Your hard disk using the terminal ===
+
=== The Terminal & your local Hard Disk ===
 
If you are used to using the terminal, OS X has one. Start Finder -> Applications -> Utilities -> Terminal. Note that it has mutliple tab support (press cmd+T to start a new tab).
 
If you are used to using the terminal, OS X has one. Start Finder -> Applications -> Utilities -> Terminal. Note that it has mutliple tab support (press cmd+T to start a new tab).
 
The local hard disk is located in a strange place: /private/var/netboot.
 
The local hard disk is located in a strange place: /private/var/netboot.
I suggest doing the following:
+
I suggest creating a soft link to the hard disk from your home directory:
cd ~
+
ln -s /private/hd/netboot hd
+
  
Whenever you want to go your hard-disk, you can do cd ~/hd .
+
cd ~
 +
ln -s /private/hd/netboot hd
 +
 
 +
Whenever you want to go your hard-disk, you can do:
 +
cd ~/hd  
  
 
And another tip: If you want to go to the top Finder widnow, type cdf in the shell. If you want your finder top window to go to the current terminal directory, type fdc (the opposite cdf, it is easy to remember).
 
And another tip: If you want to go to the top Finder widnow, type cdf in the shell. If you want your finder top window to go to the current terminal directory, type fdc (the opposite cdf, it is easy to remember).
  
And second tip: If you want to open an application, say firefox, then typing firefox won't work. In mac you need to do: open Firefox. I hate that! Quicksilver (see below) is a nice replacement.
+
=== Opening an application from the terminal ===
 +
If you want to open an application, say firefox, then typing firefox won't work. In mac you need to do: open -a Firefox. I hate that! Quicksilver (see below) is a nice replacement.
  
 
=== Applications and the Dock ===
 
=== Applications and the Dock ===
 
Some of the non-apple applications are at CS-applications, which is located in the Applications directory (open Finder, and press Cmd+Shift+A). You might want to add some of them to your dock: just drag them to the place that you prefer.
 
Some of the non-apple applications are at CS-applications, which is located in the Applications directory (open Finder, and press Cmd+Shift+A). You might want to add some of them to your dock: just drag them to the place that you prefer.
 +
 +
I also recommend to move the dock to the left side of the screen: On the dock (gray stuff on the bottom) go to System preferences => Dock and choose "Position on screen" to be left.
  
 
=== Quicksilver ===
 
=== Quicksilver ===
This is a nice application launcher. You can find it in the CS-applications directory. After you start it, press Ctrl+space and start writing an application name or a file. It will find it... Google quicksilver to see all the magics it can do.
+
This is a nice application launcher. You can find it in the CS-applications directory. On initial startup, simply click "continue" until you're finished. After you start it, press Ctrl+space and start writing an application name or a file. It will find it... Google quicksilver to see all the magics it can do.
  
 
=== Spotlight ===
 
=== Spotlight ===
Line 43: Line 52:
 
Your mac has a bluetooth connection. You might want to use it to sync stuff with your mobile phone. I'll update this section later on.
 
Your mac has a bluetooth connection. You might want to use it to sync stuff with your mobile phone. I'll update this section later on.
  
=== Quota, Door and some other commands ===
+
=== Firefox ===
Currently the commands door, nquota, stquota, and some other commands that were created by the system for linux, don't work on mac. You can always rsh to inferno, and run the command there.
+
==== Firefox Profile ====
 
+
=== Firefox Profile ===
+
 
+
 
You can use the firefox profile that you used in linux.
 
You can use the firefox profile that you used in linux.
  
Line 53: Line 59:
  
 
Open the terminal, and type:
 
Open the terminal, and type:
> cd ~/.mozilla/firefox
+
cd ~/.mozilla/firefox
> ls
+
ls
 
You will see a directory which might be something like cnojy200.default (the cnojy200 shoud be some random string).
 
You will see a directory which might be something like cnojy200.default (the cnojy200 shoud be some random string).
 
We will call this directory YourLinuxProfile.
 
We will call this directory YourLinuxProfile.
  
> ~/Library/Application Support/Firefox/Profiles
+
~/Library/Application Support/Firefox/Profiles
> ls
+
ls
 
Again, you will see a directory which might be something like gabum400.default.
 
Again, you will see a directory which might be something like gabum400.default.
 
We will call this directory YourMacProfile.
 
We will call this directory YourMacProfile.
Line 65: Line 71:
 
We will move the Mac profile (you can delete it if you don't need it...), and will create a soft link to the linux profile.
 
We will move the Mac profile (you can delete it if you don't need it...), and will create a soft link to the linux profile.
  
>mv YourMacProfileName YourMacProfilename.old
+
mv YourMacProfileName YourMacProfilename.old
>ln -s ~/.mozilla/firefox/YourLinuxProfile YourMacProfile
+
ln -s ~/.mozilla/firefox/YourLinuxProfile YourMacProfile
 +
 
 +
==== Downloading files using firefox ====
 +
When you open files using firefox, you will notice that the files are only saved to the Downloads directory, but they are not opened.
 +
 
 +
This seems to be a bug in firefox when trying to save files to network
 +
filesystems. This version of firefox, will save temporary downloads (such as
 +
your pdfs) to the ~/Downloads folder (seems like you can't override
 +
this). You can choose to do a soft link to a directory which is on the local hard drive:
 +
cd ~
 +
cp Downloads ~/hd/Download
 +
mv Downloads Downloads.old
 +
rm -rf Downloads.old
 +
There might be some .nfs files remained in your Downloads.old files, but they shouldn't bother you.
 +
 
 +
If you choose to make this link you should be careful not to save there important data.
  
 
=== Quota problems ===
 
=== Quota problems ===
 
The "Library" directory contains all your data. This directory, unlike linux, can become pretty large.
 
The "Library" directory contains all your data. This directory, unlike linux, can become pretty large.
If your quota is exceeded (you can see your file quota by running nquota on a linux machine: use rsh for that), you might want to move your Caches directory to your local hard drive, and create a soft link to that. '''This might prevent you from using browsers on a different mac than your own'''.
+
If your quota is exceeded (you can see your file quota by running nquota on a linux machine: use rsh for that), you might want to move your Caches directory to your local hard drive, and create a soft link to that. Follow the same guidelines as in the [[Mac_Tips#Firefox Profile|Firefox Profile]] section.
 +
 
 +
'''This might prevent you from using browsers on a different mac than your own'''.
  
 
=== Running windows apps: VMWare ===
 
=== Running windows apps: VMWare ===
 
In the CS-applications, there is a program called CS-VMWare. I think that it is better than the Fusion VMWare program that is installed in the Applications directory. This runs a windows virtual machine on your mac. I didn't play with it too much. If you know whether there is a way to save changes of the configurations (such as the default printer, adding the home directory, adding stuff to the desktop, etc.) please update this section.
 
In the CS-applications, there is a program called CS-VMWare. I think that it is better than the Fusion VMWare program that is installed in the Applications directory. This runs a windows virtual machine on your mac. I didn't play with it too much. If you know whether there is a way to save changes of the configurations (such as the default printer, adding the home directory, adding stuff to the desktop, etc.) please update this section.
 +
 +
In order to print from windows, you will need to add a printer.
 +
Go to Control Panel=>Printers and Faxes. Right click, and choose Add printer. Choose "Add a network printer", click next. Then, choose "Connet to this printer, and add the name: //cifsserver/gr .
 +
 +
In order to work on your home directory, open file explorer, and change the address to: //cifserver/yourlogin .
 +
Then you can map it as a drive, by right clicking the directory, and choose map network drive.
 +
Thank to Elad for this tip!
  
 
=== Latex ===
 
=== Latex ===
Use Texshop (Applications->Tex->TexShop) - it's great. Press Cmd+click on a point in the source to move to the pdf, and vice versa.
+
Use Texshop (Applications->Tex->TexShop) - it's great. Press Cmd+click on a point in the source to move to the pdf, and vice versa. There are two great features: Command completion and autocompletion (two different things). The CommandCompletion.zip from [http://homepage.mac.com/herbs2 here] is a great resource to start from (see the documentation inside the zip file).
 +
 
 +
If you would like to have autosave, then run this in your terminal:
 +
defaults write TeXShop KeepBackup YES
 +
This way, if your TeXShop crashed while you were working on example.tex, your work will be saved in example~.tex .
  
 
=== Keyboard Shortcuts ===
 
=== Keyboard Shortcuts ===
 
Keyboard shortcuts for all of the applications can be configured: go to System Prefreneces -> Keyboard & Mouse and press the Keyboard Shortcuts tab.
 
Keyboard shortcuts for all of the applications can be configured: go to System Prefreneces -> Keyboard & Mouse and press the Keyboard Shortcuts tab.
 +
 +
=== The power button ===
 +
The power button is located in the back side of your screen, in the bottom left corner.
 +
 +
=== Install Python Modules ===
 +
Since you have no administrator permissions, you needs to specify the installation directory. For example, using easy_install:
 +
easy_install --install-dir ~/Python/ somemodule
 +
Don't forget to add the directory to your PYTHONPATH environment variable.
 +
 +
== Known Issues ==
 +
If you know about things that don't work, and the System are aware of it, and can't find a fix, please add it to this section.
 +
 +
=== Quota, Door and some other commands ===
 +
Currently the commands door, nquota, stquota, and some other commands that were created by the system for linux, don't work on mac. A workaround: rsh to inferno ( > rsh inferno ), and run the command there.
 +
 +
=== Office Hebrew Support ===
 +
The office suite doesn't have Hebrew support. Use VMWare and run it using windows (see VMWare above).
 +
 +
Or you can use LibreOffice which support Hebrew.
 +
 +
[[Category: Mac]]

Latest revision as of 16:49, 31 December 2017

This list was compiled by Or Sattath from the Theory lab. Please fix unclear/incorrect/incomplete stuff that you find.

Recommended Configuration after a fresh install

Hebrew Support

On the dock (gray stuff on the bottom) go to System preferences => Languages & Text => Input Sources Tab and check Hebrew (not Hebrew QWERTY). In order to switch the language using the keyboard shortcut, goto System preferences => Keyboard & Mouse => Keyboard Shortcuts. Check "Input Menu", and uncheck "Spotlight". Now Cmd+Space switches languages.

Microsoft Office for Mac does not have Hebrew support. Neither does Apple's iWork suite. One option is to use Microsoft Office for Windows on a virtual machine (Parallels Desktop, VMWare, etc.). Another option is to use Open Office.

The Mouse

The mouse should be connected to the keyboard (There is a USB port in both upper corners of the keyboard, from the bottom).

You might want to have the regular 3-button mouse that we all know and love from Linux or Windows. So, go to Finder -> Go Menu -> Applications -> System Preferences -> Keyboard & Mouse. Choose the "Mouse" tab. Change the left button to be Primary button, the right to be Secondary button, and the middle to be Button 3. Your mouse has two buttons on the sides. If you squeeze both of them it starts "Expose". Try it and see...

Also, selecting the text doesn't put it inside the "selection clipboard" like in linux: you need to use Cmd+C to copy and Cmd+V to paste. If you know how to change this behavior, please update this section.

The Keyboard

There is no Home and End keys. Press Cmd+left for going to the beginning of the line, and Cmd+right to the end of the line. If someone is aware of how to keybind these keys to the Linux/Windows usual mapping, please update this section. For some reason, Cmd+left/right doesn't work in Gmail. A workaround is to install KeyFixer. Alt+left and Alt+right (should) skip words.

Generally speaking, use the Cmd button, whenever you are used to the ctrl button (such as cmd+C to copy, and cmd+T to open a new tab) etc. Ctrl is only used for linux shortcuts in the terminal, and rarely elsewhere.

The Terminal & your local Hard Disk

If you are used to using the terminal, OS X has one. Start Finder -> Applications -> Utilities -> Terminal. Note that it has mutliple tab support (press cmd+T to start a new tab). The local hard disk is located in a strange place: /private/var/netboot. I suggest creating a soft link to the hard disk from your home directory:

cd ~
ln -s /private/hd/netboot hd

Whenever you want to go your hard-disk, you can do:

cd ~/hd 

And another tip: If you want to go to the top Finder widnow, type cdf in the shell. If you want your finder top window to go to the current terminal directory, type fdc (the opposite cdf, it is easy to remember).

Opening an application from the terminal

If you want to open an application, say firefox, then typing firefox won't work. In mac you need to do: open -a Firefox. I hate that! Quicksilver (see below) is a nice replacement.

Applications and the Dock

Some of the non-apple applications are at CS-applications, which is located in the Applications directory (open Finder, and press Cmd+Shift+A). You might want to add some of them to your dock: just drag them to the place that you prefer.

I also recommend to move the dock to the left side of the screen: On the dock (gray stuff on the bottom) go to System preferences => Dock and choose "Position on screen" to be left.

Quicksilver

This is a nice application launcher. You can find it in the CS-applications directory. On initial startup, simply click "continue" until you're finished. After you start it, press Ctrl+space and start writing an application name or a file. It will find it... Google quicksilver to see all the magics it can do.

Spotlight

Currently, spotlight only works on files which are on the hard drive (and not on your home directory). The system have some technical explanation for that, in case you're interested. Spotlight is like google desktop for mac, and you can use it by pressing the magnifier glass on the upper-right corner.

Bluetooth & iSync

Your mac has a bluetooth connection. You might want to use it to sync stuff with your mobile phone. I'll update this section later on.

Firefox

Firefox Profile

You can use the firefox profile that you used in linux.

Run firefox at least once, and exit completely (press Cmd+Q inside firefox).

Open the terminal, and type:

cd ~/.mozilla/firefox
ls

You will see a directory which might be something like cnojy200.default (the cnojy200 shoud be some random string). We will call this directory YourLinuxProfile.

~/Library/Application Support/Firefox/Profiles
ls

Again, you will see a directory which might be something like gabum400.default. We will call this directory YourMacProfile.

We will move the Mac profile (you can delete it if you don't need it...), and will create a soft link to the linux profile.

mv YourMacProfileName YourMacProfilename.old
ln -s ~/.mozilla/firefox/YourLinuxProfile YourMacProfile

Downloading files using firefox

When you open files using firefox, you will notice that the files are only saved to the Downloads directory, but they are not opened.

This seems to be a bug in firefox when trying to save files to network filesystems. This version of firefox, will save temporary downloads (such as your pdfs) to the ~/Downloads folder (seems like you can't override this). You can choose to do a soft link to a directory which is on the local hard drive:

cd ~
cp Downloads ~/hd/Download
mv Downloads Downloads.old
rm -rf Downloads.old

There might be some .nfs files remained in your Downloads.old files, but they shouldn't bother you.

If you choose to make this link you should be careful not to save there important data.

Quota problems

The "Library" directory contains all your data. This directory, unlike linux, can become pretty large. If your quota is exceeded (you can see your file quota by running nquota on a linux machine: use rsh for that), you might want to move your Caches directory to your local hard drive, and create a soft link to that. Follow the same guidelines as in the Firefox Profile section.

This might prevent you from using browsers on a different mac than your own.

Running windows apps: VMWare

In the CS-applications, there is a program called CS-VMWare. I think that it is better than the Fusion VMWare program that is installed in the Applications directory. This runs a windows virtual machine on your mac. I didn't play with it too much. If you know whether there is a way to save changes of the configurations (such as the default printer, adding the home directory, adding stuff to the desktop, etc.) please update this section.

In order to print from windows, you will need to add a printer. Go to Control Panel=>Printers and Faxes. Right click, and choose Add printer. Choose "Add a network printer", click next. Then, choose "Connet to this printer, and add the name: //cifsserver/gr .

In order to work on your home directory, open file explorer, and change the address to: //cifserver/yourlogin . Then you can map it as a drive, by right clicking the directory, and choose map network drive. Thank to Elad for this tip!

Latex

Use Texshop (Applications->Tex->TexShop) - it's great. Press Cmd+click on a point in the source to move to the pdf, and vice versa. There are two great features: Command completion and autocompletion (two different things). The CommandCompletion.zip from here is a great resource to start from (see the documentation inside the zip file).

If you would like to have autosave, then run this in your terminal:

defaults write TeXShop KeepBackup YES 

This way, if your TeXShop crashed while you were working on example.tex, your work will be saved in example~.tex .

Keyboard Shortcuts

Keyboard shortcuts for all of the applications can be configured: go to System Prefreneces -> Keyboard & Mouse and press the Keyboard Shortcuts tab.

The power button

The power button is located in the back side of your screen, in the bottom left corner.

Install Python Modules

Since you have no administrator permissions, you needs to specify the installation directory. For example, using easy_install:

easy_install --install-dir ~/Python/ somemodule

Don't forget to add the directory to your PYTHONPATH environment variable.

Known Issues

If you know about things that don't work, and the System are aware of it, and can't find a fix, please add it to this section.

Quota, Door and some other commands

Currently the commands door, nquota, stquota, and some other commands that were created by the system for linux, don't work on mac. A workaround: rsh to inferno ( > rsh inferno ), and run the command there.

Office Hebrew Support

The office suite doesn't have Hebrew support. Use VMWare and run it using windows (see VMWare above).

Or you can use LibreOffice which support Hebrew.