Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Computer name in menu bar?

Computer name in menu bar?
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 20, 2004, 08:59 AM
 
Does anyone know if there is any way to display the Computer Name (from Sharing pref) in the menu bar? We have a lab full of servers, all of which share a monitor and it would be nice to have some way to identify them in the Finder. I've found a number of utilities that willl show IP address, but not yet the name.

Thanks in advance.
     
Senior User
Join Date: Aug 2003
Location: united states empire
Status: Offline
Reply With Quote
Oct 20, 2004, 10:23 AM
 
Does it have to be in the menubar?

If not, there's tons of options, like a konfabulator widget or even...a custom desktop picture for each machine.

Sorry that this wasn't the answer you were looking for
     
Senior User
Join Date: Sep 2003
Location: UK
Status: Offline
Reply With Quote
Oct 20, 2004, 10:36 AM
 
If you enable Fast User Switching, the name of the logged-on user will show up in the top-right of the menu bar. You would just have to rename the users to the name of the computer.
You can see it in the picture on this page:

http://www.apple.com/macosx/

The picture shows when the FSU tab is clicked, when it is not it just shows the name of the user in Bold (similar to how the time is displayed).

Edit:
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Oct 20, 2004, 12:11 PM
 
Wow - I was wondering how easy that would be to hack-up.

The answer was - very easy.

http://www.monkeyfood.com/software/c...NameInMenubar/

Code:
-(void)awakeFromNib { NSStatusBar *bar = [NSStatusBar systemStatusBar]; NSString *localHostName = [[[NSHost currentHost] name] stringByDeletingPathExtension]; NSAttributedString *itemTitle = [[NSAttributedString alloc] initWithString: localHostName attributes: nil ]; appStatusItem = [[bar statusItemWithLength: NSVariableStatusItemLength] retain]; [appStatusItem setAttributedTitle: itemTitle]; [itemTitle release]; }
(Last edited by Diggory Laycock; Oct 20, 2004 at 12:53 PM. )
     
Fresh-Faced Recruit
Join Date: Feb 2002
Status: Offline
Reply With Quote
Oct 20, 2004, 12:25 PM
 
That works perfectly - thanks Diggory! It seemed that the information must be there and easily accessible and you proved that it is.

Thanks also to everyone else for the suggestions.
     
Posting Junkie
Join Date: Mar 2004
Location: MacNN database error. Please refresh your browser.
Status: Offline
Reply With Quote
Oct 20, 2004, 01:09 PM
 
winswitch might be able to help you customize your fast user switching. Great freeware (and nothing to do with Windows).

This is a computer-generated message and needs no signature.
     
Fresh-Faced Recruit
Join Date: Sep 2000
Status: Offline
Reply With Quote
Oct 22, 2004, 07:53 AM
 
Diggory,

WOuld you mind posting the ProjectBuilder project and source for that? I think a lot of people would like to see how to code a simple sniglet like this?

Thanks

CSHLDOC
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Oct 22, 2004, 08:15 AM
 
Sure - click on the link again - I've added the source as a separate archive.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:54 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2