Permanently map a network drive on Mac OS X Leopard

This question has received: 25 Votes.

I want to have a mapped drive in Mac OS X which points to my NAS – however I’ve found that I have to do it after every single reboot.

I’m a Mac noob, so would like to just have the drive mapped at all times like Windows does, but instead each time I reboot and forget to map the drive, I accidentally open iTunes and find no music as it’s all stored on my NAS!

Is there a simple way of doing this? Have I missed something really silly?

Wed Apr 14 08:50:53 AST 2010
Answer #: 1
This answer has received: 29 Votes.

Mount a Windows Share in OS X and Have it Reconnect at Login (via http://www.howtogeek.com)

Mounting the Windows Share

When you are in Finder you can click Go and Connect to Server or you can type Command + K to get to the same menu.

In Server Address you will need to put the location of you Windows share with this format smb://server/share where server is the name or IP address of your Windows machine and share is going to be the folder or drive you want to mount.

alt text

If your Windows share requires authentication it will ask you for that info here.

Now if you have Connected Servers showing on your desktop, it will show up on your desktop an in Finder.

Making the Share Mount at Login

To keep the share showing up when you have to log out seems pretty difficult. The internet is littered with ways to write scripts to allow you to do this. But OS X makes it pretty simple if you are just needing to add the share to your machine.

You will need to be in System Preferences for this, which you can get to by clicking on the Apple Menu and then going to System Preferences.

alt text

Then you will go to Accounts.

alt text

Once in Accounts, you will need go to the Login Items tab. Then you will just drag the share from your desktop or Finder window into the Login Items list.

alt text

If your share requires authentication, it may be possible to add the username and password into your keychain with the check box in the authentication window. Some shares will not work with the keychain though.

This is pretty nice if you are working a lot between OS X and Windows, and need to move files between the two.


To solve the issue of a Finder window showing the network drive each time you log in, you can check the Hide box in the Login Items list.

Mon Oct 24 03:31:53 AST 2011
Answer #: 2
This answer has received: 6 Votes.

What kind of NAS are you using?

If it has an IP#, supports AFP and user authentication… maybe try this AppleScript as a start ( Create this with Script Editor ). Replace username,password and IP with your info:

try
    mount volume "afp://username:password@ip_address/sharename"

end try

Save the script as an application

 File -> Save As -> File Format -> Application

Then go to

Sys Prefs -> Accounts -> Login Items

and add that application to your login items.

Wed Apr 14 12:19:11 AST 2010
Answer #: 3
This answer has received: 3 Votes.

I do have a NAS as well, and having switched to Mac about 2 years ago, I found this to be one of the main disadvantages of Mac. Windows is much better for handling network drives. Even on Linux things work out much better than on Mac.

There is a way to automatically map a drive at logon (you can add it to the ‘applications’ to launch at logon, see for example the explanation here), but that isn’t working very well for me (see e.g. the sleep issue below). Other solutions are based on automator scripts, but it is all very clumpsy.

The problems as I experience them:

  • indeed an application, like iTunes or MS Word, doesn’t bring up (mount) the network share automatically when it is not mounted.
  • also, when my mac awakes from sleep, sometimes the network mapping is lost (a dialog tells me “server connection interrupted”); sometimes it keeps on working. I then have to wait for about 10 seconds before I can mount the share again.
  • additionally, when using fast user switching the network share is mounted two times because of user permission issues. As a result, shortcuts to the share sometimes become unusable.

Another solution would be to cache all information from the share locally, like you can do on Windows Vista and higher very easily using Windows Sync (or Windows Offline files as it is also called). This gives the added benefit of a backup copy and ability to work offline. However, no such thing is available on Mac (see here).

So, this isn’t an answer to your question, but I have done the following as a (bad) workaround:

  • I have put a shortcut to the network share on my desktop. I click it whenever I need to work with files on my NAS.
  • I copied my music files to my local hard drive, on both our macs. A very unsatisfactory solution though since these libraries then go out of sync. (The problem is worsened by iTunes not being able to watch a folder for changes). I am still on the lookout for a good media player for Mac. Amarok was promising, but I don’t like their version 2 interface.
  • What concerns photos (which are also on my NAS), I’ve ditched iPhoto and am using Picasa now, which is able to watch a folder for changes. This way, I have only one photo library.

If there is a better solution, I am very curious for it too…

Wed Apr 14 16:42:41 AST 2010
Answer #: 4
This answer has received: 1 Votes.

You may want to look at macmounter, an open source, python project that automatically mounts drives, and keeps them mounted: https://github.com/roubles/macmounter

Tue Jun 09 16:22:29 AST 2015
This question and its answers are found at: Permanently map a network drive on Mac OS X Leopard

Is it possible to sum an entire column without setting explicit cell boundaries in Excel?

This question has received: 35 Votes.

I’d like to sum all the values in a column starting from a certain minimum value, but I don’t want to give an upper bound because any value in the table will be appropriate for summing (minus the header of course) and I’d like to do it the “right” way instead of summing A2:A65535.

Is this possible?

Mon May 17 22:25:12 AST 2010
Answer #: 1
This answer has received: 47 Votes.

Just leave off the row numbers:

=SUM(A:A)

Note that this expression cannot be placed in column A (that would cause an endless recursive summation which Excel won’t allow).

If you instead wanted to sum all of the rows in column A above the current row (say 51) you could do this:

=SUM(A$1:A50)

If you ever move the cell that holds that expression it would change the A50 to whatever is above the current cell while keeping the starting point of the summation (A1) the same.

The same thing can be done if the total is kept above the summed cells in the current row (say row 1):

=SUM(A2:A$51)
Tue May 18 16:08:07 AST 2010
Answer #: 2
This answer has received: 6 Votes.

In my case the fields I didn’t want to include in the range actually did have numbers in them. I was stumped until I figured out that you can just sum the entire column and then simply subtract the fields you don’t want:

=(SUM($B:$B)-SUM($B$1:$B$6))

Where the first six rows of column B are numbers but not relevant to the data I want summed, and column B contains an indefinite number of rows of information.

Sat Nov 24 22:39:37 AST 2012
Answer #: 3
This answer has received: 0 Votes.

I used a strange solution:

I placed the sum in the cell that is located at the top-left of the range that I want to sum. Then used merge cells command to merge the sum cell with the one on its right. Result was like this:

enter image description here

Sat Jan 31 19:36:28 AST 2015
Answer #: 4
This answer has received: 0 Votes.

In the case of Google Spreadsheets you can do the following:

=SUM(C4:C)

It will sum all rows in C column starting from the 4th row.

Tue Oct 27 02:48:57 AST 2015

Is there an “include” procedure in vimrc?

This question has received: 26 Votes.

I have some configuration in my vimrc. Some generic ones, and some other really specific.

I would like to share this config with some co workers, but a lot of them don’t need these specific ones.

Instead of editing a bunch of different vimrc, I would like to know if it’s possible to have an “include” directive – something like a file named “.vimrc_module” and called from vimrc. Is it possible?

Tue Jun 15 12:46:06 AST 2010
Answer #: 1
This answer has received: 39 Votes.

Yes, it is possible, use the :source command:

source .vimrc_module

See:

:help :source

for more information.

Tue Jun 15 15:04:31 AST 2010
Al.
Answer #: 2
This answer has received: 3 Votes.

Plugins serve this purpose.

  • plain plugins are always loaded once,
  • autoload plugins are loaded on demand (they are ideal to define libraries of viml functions),
  • ftplugin are loaded once per buffer (when the ftplugin type matches the buffer type),
  • local vimrcs are loaded on a project-basis (non standard),
  • and so on.
Tue Jun 15 17:52:41 AST 2010
This question and its answers are found at: Is there an “include” procedure in vimrc?

How do I fix a “cannot open display” error when opening an X program after ssh’ing with X11 forwarding enabled?

This question has received: 33 Votes.

After launching the X11 app (XQuartz 2.3.6, xorg-server 1.4.2-apple56) on my Mac (OS X 10.6.8), opening an terminal in X11 and running xhost +, I then ssh -Y to my Ubuntu 10.04 VM (running on VMware Fusion). When I run gedit .bashrc (for example), I get:

(gedit:9510): Gtk-WARNING **: cannot open display: 

set | grep DISPLAY returns nothing.

But if I ssh -Y into my Ubuntu 11.04 machine, gedit .bashrc works. echo $DISPLAY returns “localhost:10.0”.

I tried export DISPLAY=localhost:10.0 while sshed into my VM and then running gedit .bashrc, but I get:

(gedit:9625): Gtk-WARNING **: cannot open display: localhost:10.0

What could be different in the configuration of the two difference Ubuntu machines that would explain why one works and the other doesn’t?

Update: As suggested by Zoredache in the comment below, I ran sudo apt-get install xbase-clients, but I continue to have the same problem.

Wed Jul 13 18:13:00 AST 2011
Answer #: 1
This answer has received: 9 Votes.

Check the server’s sshd_config (normally /etc/ssh/sshd_config), and make sure the X11Forwarding option is enabled with the line

X11Forwarding yes

If X11Forwarding is not specified, the default is no on the Debian machines I have available to check.

Wed Jul 13 23:04:27 AST 2011
Answer #: 2
This answer has received: 17 Votes.

From xhost+ : How to Fix “Cannot Open Display” Error While Launching GUI on Remote Server :

Answer: You can fix the “cannot open display” error by following the xhost procedure mentioned in this article.

Allow clients to connect from any host using xhost+

Execute the following command to disable the access control, by which you can allow clients to connect from any host.

$ xhost +

access control disabled, clients can connect from any host

Enable X11 forwarding

While doing ssh use the option -X to enable X11 forwarding.

$ ssh username@hostname -X

Enable trusted X11 forwarding, by using the -Y option,

$ ssh username@hostname -Y

Open GUI applications in that host

After opening ssh connection to the remote host as explained above, you can open any GUI application which will open it without any issue.

If you still get the “cannot open display” error, set the DISPLAY variable as shown below.

$ export DISPLAY='IP:0.0'

Note: IP is the local workstation’s IP where you want the GUI application to be displayed.

Tue Feb 28 09:11:31 AST 2012
Answer #: 3
This answer has received: 7 Votes.

I’ve had this problem when logging into a Ubuntu VM from Mac OS X as well — it doesn’t seem to like ‘localhost’ in the display variable for some reason. So set the IP manually, as harrymc suggests:

export DISPLAY="127.0.0.1:10.0"

Then X11 programs should be fine. It doesn’t seem like it should be necessary to tell the OS that localhost and 127.0.0.1 are equivalent, but it works, at least.

Fri Jun 29 20:44:03 AST 2012
Answer #: 4
This answer has received: 5 Votes.

I had this problem with my CentOS KVM server, I was missing the “xauth” program.

Mon Oct 22 07:59:02 AST 2012
Answer #: 5
This answer has received: 2 Votes.

When running UXTERM or XTERM just issue

export $DISPLAY 

The variable will be there. Then just set it and export it.

Tue Jul 10 21:28:35 AST 2012
Answer #: 6
This answer has received: 2 Votes.

If you have this problem after some time when running with -X arg. or just ForwardX11 in /etc/ssh/ssh_config, then run $ ssh username@hostname -Y, to enable trusted X11 forwarding, don’t know the exact cause but I’m guessing with -X some features expire after some time, probably to increase security.

Here is what I found online :

If you use ssh -X remotemachine the remote machine is treated as an untrusted client. So your local client sends a command to the remote machine and receives the graphical output. If your command violates some security settings you’ll receive an error instead.

But if you use ssh -Y remotemachine the remote machine is treated as trusted client. This last option can open security problems. Because other graphical (X11) client could sniff data from the remote machine (make screenshots, do keylogging and other nasty stuff) and it is even possible to alter those data.

If you want to know more about those things I suggest reading the Xsecurity manpage or the X Security extension spec. Furthermore you can check the options ForwardX11 and ForwardX11Trusted in your /etc/ssh/ssh_config.

sources:

Fri Oct 17 10:41:35 AST 2014
Answer #: 7
This answer has received: 0 Votes.

On CentOS 6.5, I suddenly lost remote X-programs access after messing with /etc/hosts. Same symptom of empty $DISPLAY variable (no help setting/exporting it manually).

The 127.0.0.1 entry pointing to the actual hostname is necessary; in fact the order seems to be also relevant (put last & it won’t work…)

[root@poseidon /etc]$ cat hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
::1     localhost6.localdomain6 localhost6
127.0.0.1 poseidon.mycampus.edu poseidon
1XX.XXX.XXX.208 poseidon.mycampus.edu poseidon

After fixing this, xeyes, xclock and other X test toys are working again, therefore my needed virt-manager is also back on line.

Tue Jul 15 15:13:51 AST 2014
Answer #: 8
This answer has received: 0 Votes.

I also had this problem with Solaris 10 and found that the listener was not set up.

svccfg –s /application/x11/x11-server listprop options/tcp_listen
svccfg –s /application/x11/x11-server setprop  options/tcp_listen = true
Thu Mar 19 00:23:19 AST 2015

Does the BIOS have some sort of generic ‘drivers’

This question has received: 22 Votes.

How does the BIOS control I/O devices without any form of drivers?

For example how is an image displayed whilst the computer is booting if the BIOS doesn’t have any drivers for the graphics card.

Is there some sort of generic driver that is standard across all BIOSs and hardware that allows the BIOS to perform basic functions no matter what hardware is installed.

Any help would be appreciated.

Thanks.

Tue Oct 15 11:13:07 AST 2013
Answer #: 1
This answer has received: 12 Votes.

Does the BIOS have some sort of generic ‘drivers’

How does the BIOS control I/O devices without any form of drivers?

Standards. All components implement a basic interface, and the BIOS is programmed to use that. Of course because it is a basic interface (that’s what the ‘B’ in BIOS stands for), it can not take advantage of the hardware’s full capabilities; that is left to software to implement via drivers which can access the hardware directly.

Originally, the BIOS manufacturers created a set of APIs that devices were expected to use if they wanted to be compatible. They did this via “interrupts” which is a way for a device to, well, interrupt the program to let it know that something happened and vice versa.

For example how is an image displayed whilst the computer is booting if the BIOS doesn’t have any drivers for the graphics card.

In the case of pre-boot display, the video-adapter’s firmware implements VESA (Video Electronics Standards Association) which is a standard that was created to simplify access to display hardware. The BIOS knows how to access the video-hardware using the standard functions provided. It is somewhat similar to how DirectX was implemented as a higher-level API to hardware so that programmers didn’t have to account for every single hardware configuration.

Is there some sort of generic driver that is standered accross all BIOSs and hardware that allows the BIOS to perform basic functions no matter what hardware is installed.

Sort of. It’s not a driver, but a standard API; a set of programming functions that can be used to do basic things like initialize a device or input and output data.

If manufacturers want to sell their products, they will need to make sure that they at least implement the standard APIs so that they will be compatible. That way, the system can detect the hardware and in the case of boot-critical devices, they can access them at a basic level until a software driver that knows how to access them fully can be loaded.

Tue Oct 15 14:43:39 AST 2013
Answer #: 2
This answer has received: 21 Votes.

The BIOS in a PC was meant to fufill a similar function as the BIOS in an 8-bit CP/M system, popular before the PC took over in the mid-80’s. The BIOS was intended to contain a minimal bootloader and hardware-dependent low-level routines to do input and output to a few devices (screen, disk, tape, COM port). Knowledge to do this was built into the ROM – no driver needed, and of course, no additional hardware supported by this ROM. (Things like power management and ACPI came much later, in the 90’s, after the PC had established itself as an ubiquitous platform.)

(The CP/M “filesystem” was in a component loaded off disk called the BDOS – likewise, knowledge of the FAT filesystem and it’s interfaces is in (at least one of) two hidden files MSDOS.SYS or IO.SYS – not part of the BIOS ROM.)

However … The PC BIOS, unlike CP/M, did support the notion of “Option ROMS” which could be included on an expansion card. So there was at least a minimal mechanism to extend the BIOS. Video cards starting with CGA (MDA, CGA’s predecessor, may have done it too) would have an option ROM that extended or added I/O functions to the BIOS interface. (This is why you see an NVidia message before your BIOS boots.) So did hard controllers and SCSI cards. All of these still do. Many older network cards have a socket for a boot ROM.

Keep in mind also that PC clone manufacturers that arose in the 80’s very quickly decided not to provide only a compatible BIOS interface, but ended up having to copy the PC platform as a whole, including all of the low level hardware such as the timer chip, interrupt controller, etc. (This was relatively easy since little of it was IBM proprietary.) This was because the BIOS was slow to do things and programmers accessed the hardware directly, particularly for games.

Thus, between option ROMs and this consensus of standard hardware that forms the PC platform, as well as the fact it’s been kept backwards compatible throughout the evolution of the PC, something wishing to use the display without a driver can:

  • use standard BIOS interfaces, which may be “hooked” by an option ROM in the video hardware
  • or make assumptions about what hardware is in the system and access basic hardware directly

All PC display hardware still works in a “VGA compatible” mode upon boot. The original IBM VGA adapter had modes compatible with earlier EGA, CGA, and MDA cards. All this means is that something running from the BIOS or outside of an OS can assume it can still read and write the same memory connected to the display now as it could in 1985, through convention.

Tue Oct 15 13:55:56 AST 2013
This question and its answers are found at: Does the BIOS have some sort of generic ‘drivers’

Is it possible to install the Helvetica font on linux?

This question has received: 25 Votes.

I don’t know too much about the licensing issues surrounding fonts, but I would like to install Helvetica on my machine for my own personal use. I haven’t been able to find a whole lot about this on Google. There are a lot of Helvetica alternatives out there, but I want Helvetica itself.

Tue Jan 12 18:54:02 AST 2010
Answer #: 1
This answer has received: 40 Votes.

The simple answer is to buy the font right from the official distributor, Linotype. They sell individual variants for $26, or packages for a variety of prices depending on what they include.

With the basic license (which comes with any Linotype font), you’re free to do whatever you want with any documents you create using the font… personal use, professional use, whatever, it doesn’t matter. The font file itself may be installed on up to 5 computers.

Technology-wise, the font is available in PostScript, TrueType, and OpenType variants; all of these are useable on Linux if you have the right software installed.

EDIT: As far as the dirty details of licensing issues: Fonts have been legally classified as computer software. You’re not buying the actual image of the font, just the code that creates the image. (This is why other companies can create fonts that look so incredibly like Helvetica without infringing on the copyright.) Like Microsoft Word, once you buy it, any content you create with it is entirely your own.

The license agreement, by allowing installation on multiple computers, represents a sort of voluntary waiver (by the author) of protections generally guaranteed by copyright, rather than an addition of new restrictions, and so would likely hold up in a court of law. In common language, the license says, “Even though this work is covered by copyright, we’re gonna be nice and let you make some extra copies anyway as long as you stick to our terms.”

That just leaves the question of fair use, which is a big one. I’m not aware that any court has established any sort of fair use doctrine for fonts. Copyright cases in other media have established that in certain cases, making copies of a protected work for personal, private, noncommercial use is legal. As far as I know, this is a pretty huge Grey Area as far as fonts are concerned. If you choose to go this route, you might have a strong case that it’s perfectly legal, on the very low chance that anybody actually wanted to try to sue you for it. (The question of where on the internet to find a free copy of Helvetica is beyond the scope of this answer coughpiratebaycough.)

Tue Jan 12 21:55:47 AST 2010
Answer #: 2
This answer has received: 2 Votes.

Copy helvetica.dfont from your Mac and use Fondu to convert it to ttf and then move it to your fonts folder

http://grasshopperpebbles.com/ubuntu/ubuntu-convert-mac-dfont-files-into-ttf-using-fondu/

Sat Feb 02 21:13:00 AST 2013
This question and its answers are found at: Is it possible to install the Helvetica font on linux?

How to use A-B repeat feature of VLC?

This question has received: 28 Votes.

Apparently VLC has an A-B repeat feature, but how do I use it? There’s even a related feature request. I can’t find any GUI controls for it (Windows VLC version 1.1.9) I am aware there is a possible command-line method, but I seek a more user-friendly GUI/keyboard solution.

I ask specifically for VLC, but other free video players that support both mirroring (flipping horizontally) and A-B repeat are acceptable.


Background info: I have a video of a dance performance I need to practice.

  • A-B repeat to concentrate on a single part at a time
  • Mirroring to make following it more natural
Mon Jul 04 15:02:38 AST 2011
Answer #: 1
This answer has received: 35 Votes.

In the View Menu click Advanced Controls. This will display the loop button (A-B) on the bottom.

enter image description here

Mon Jul 04 15:12:41 AST 2011
Answer #: 2
This answer has received: 6 Votes.

The previous answer is out of date. I have version 2.1.4 (May 2014), on a Mac.

Press cmd-J to jump to the start of your loop, then cmd-shift-L to mark it.

Press cmd-J to jump to the end of your loop, then cmd-shift-L to mark it.

You can then watch your loop.

Press cmd-shift-L a third time to cancel the loop.

Note that although the dialog for cmd-J says “seconds”, you can enter minutes and seconds normally (e.g. 4:34).

Thu May 15 09:34:50 AST 2014
Answer #: 3
This answer has received: 4 Votes.

I believe this can also be accomplished on the CLI:

–start-time starts the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90)

–stop-time stops the video here; the integer is the number of seconds from the beginning (e.g. 1:30 is written as 90)

–repeat repeats current item until another item is forced

For example

vlc movie.avi --start-time 240 --stop-time 560 --repeat

Source: https://wiki.videolan.org/Documentation:Command_line/

Thu Jun 19 17:39:52 AST 2014
Answer #: 4
This answer has received: 2 Votes.

Play the video and while it’s playing Press the ‘Loop’ button at the point you wish the loop to start (Point A) then press it again at Point B the point you wish it to return to point A. Pressing a third time clears the loop.

Sat Sep 21 16:53:49 AST 2013
This question and its answers are found at: How to use A-B repeat feature of VLC?