Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a desktop Connect to Server shortcut Network
Although you can hit Command-K to access the Connect to Server dialog box in the Finder, if you're not in the Finder, you need to first switch to it. This hint will create an application that can be stored on your desktop, in your dock, in DragThing, DropDrawers, etc., making Connect to Server accessible from anywhere without the need to first activate the Finder.

Open Script Editor (in your Utilities folder) and type in this program:
 tell application "Finder"
open location (choose URL showing File servers with editable URL)
end tell
Save it as an application on the desktop, or wherever. I even copied the "Network" icon from the left most finder column view pane and pasted it over the new app's icon, and named the app "Connect to Server".

Even more interesting, if you remove the "showing file servers" portion of the second line, then you get a new pop-up menu in the dialog. This pop-up menu lists all possible types of connections, which is pretty interesting in itself!
    •    
  • Currently 4.33 / 5
  You rated: 5 / 5 (3 votes cast)
 
[58,409 views]  

Create a desktop Connect to Server shortcut | 12 comments | Create New Account
Click here to return to the 'Create a desktop Connect to Server shortcut' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Very useful !
Authored by: Drogoul on Oct 29, '02 10:15:07AM

And even more useful when you use it in conjunction with FruitMenu. Just add the item to the menu as a File/Folder shortcut and name it "Connect to...".

Thx

Alexis



[ Reply to This | # ]
Very useful !
Authored by: greggo on Oct 30, '02 05:52:16PM

Thanks for the great script, here's a tip...

comment out (with 2 dashes --) the tell statement like this

-- tell application "Finder"
open location (choose URL showing File servers with editable URL)
-- end tell

It runs a little faster if you are not calling the Finder

greggo



[ Reply to This | # ]
Use AppleScript menu
Authored by: khaled on Oct 29, '02 10:56:26AM

Save the script as "Compiled Script" and place it in: /Library/Scripts and use it in the AppleScrip menu.



[ Reply to This | # ]
what's wrong with location files?
Authored by: JazzDude on Oct 29, '02 11:15:43AM

For favorites it's easier and more elegant to create a location file with IE. For AppleFileServer locations, type
afp://username:password@192.168.0.7/NameOfVolume in IE's location bar. Copy all, then drag to the desktop (or wherever).
You can also type
afp://username:password@OtherMac'sName/NameOfVolume
if you're in a network using DHCP. Other variations:
smb://username:password@192.168.0.7/NameOfVolume
ftp://username:password@192.168.0.7/NameOfVolume


You can also make an alias in the Finder....



[ Reply to This | # ]
... or use Favorites
Authored by: googoo on Oct 29, '02 12:57:56PM

I do it this way:

1. Connect to the server in the usual way (ctrl-k ...). You can store the server password in your keychain if you like by using the Options button.

2. Drag the server icon onto the Favorites icon in the Finder Toolbar. This makes an alias for the server volume in your Favorites.

Now, when you choose your favorite icon for the server, it mounts. If you stored the server password in your keychain it mounts automatically. (This is almost transparent if you give the Finder permission to always access this password.) This feature is especially handy in Column View.

The other benefit is that you can directly access your favorites from the Open and Save dialogs. Hence, you can open a connection to the server without going to the Finder.

-Mark



[ Reply to This | # ]
... or use folder alias
Authored by: MrWinther on Oct 29, '02 04:52:24PM

I dont have enough space on my ibook for some mp3 files. So I put them on my wifes Imac. I put them in a folder called "Music on Imac".
Then I just made an alias, copied it over to the ibook, deleted the alias on the Imac.
All I have to do now on the ibook is doubleclick the alias and it automaticly opens. :-)



[ Reply to This | # ]
... or use folder alias
Authored by: rspress on Oct 29, '02 07:42:48PM

I do much the same to mount a folder on my Windows XP Pro box. After connecting to the folder I have set up for sharing on the Windoze box I make an alias of the mounted volume. You can leave it on the desktop and double-click to mount it or put it in a folder called shared volumes and then drag that folder to the dock for a simple point and shoot to mount any shared volume no matter what app is running. I usually share three folders on the PC, one for MP3 or media files, one for a redundant backup of important documents and a general shared folder for shooting stuff back and forth.



[ Reply to This | # ]
what's wrong with location files?
Authored by: Greenfruit on Oct 30, '02 03:20:04PM

ssh work similarly

ssh://name:pass@dnsaddress

and opens the terminal. however it still asks for the password, any ideas on how to remove the password request



[ Reply to This | # ]
Im not sure
Authored by: Accura on Oct 29, '02 09:22:11PM

Ok, i can't test this because im at work but it works with disk images so it should work with servers. One day i was install a news reader and i forgot to copy it to my hard drive before adding to my dock (i was very hung over from the night before), i've been using it every now and again. Last night i realised that the disk image would mount (i dont think disk copy was even open) and the app would run. Now i think if you did the same kind of thing (with a folder/file/app) it should mount the server.

As i said i can't test it because im at work but if any onwe tries this and it works (or doesn't work) just post here and people can ignore it



[ Reply to This | # ]
Aliases is the way to go
Authored by: jason mark on Oct 30, '02 08:19:25PM

yeah as a few people mentioned this is a TON more work, and not as powerful as aliases. Because I connect over a LAN to an NT server using ethernet, and sometimes that same sever over the airport using SAMBA (because Linksys doesn't support Appletalk still), I actually have 2 aliases to my server, one for each connection type.

It work great. I have aliases to my server in the dock and in my favorites folder.



[ Reply to This | # ]
This is broken in 10.2.2
Authored by: dabsher on Nov 11, '02 09:37:41PM

After updating to 10.2.2, this script fails. I'm not sure why, but if anyone has a fix, I'd love to hear it. This kind of script is exactly what I want in my dock, giving me the ability to connect to any computer on our network from within any app with one click, without having to switch to the finder and typing command-K. Why didn't Apple leave "Recent Servers" in the Apple menu????



[ Reply to This | # ]
This is broken in 10.2.2 (fix)
Authored by: dabsher on Nov 11, '02 09:50:59PM

Nevermind. Removing the "tell application "Finder"" & "end tell" did the job.



[ Reply to This | # ]