Jump to content
SNS Users' Forums
  • Announcements

    • Eric Newbauer

      Follow SNS on Twitter!

      Get notifications via Twitter! Looking for instant updates? We're now also announcing new versions and beta programs via Twitter. Follow Studio Network Solutions on Twitter. Thanks!
Msteel

Mixing GUI and CLI in SANmp Client 4

Recommended Posts

We are transitioning from PPC/Tiger to Intel/Lion and so have moved to SANmp Client 4.0 from whatever version we had been using.

On the old machine we mounted drives at login using a script and the CLI. The previous behavior was that the CLI launched the GUI. Once I found out how to make the script hide the GUI when we were done this worked well. If we wanted to mount an additional drive later, we could pull up the GUI and do it.

The new version seems to behave differently. It appears that the GUI and the CLI are mutually exclusive. If the GUI is open the CLI will not log in, and if the CLI is logged in the GUI cannot.

Is there no way to mix and match the GUI and CLI anymore?

Is it possible to use Applecscript to load a profile or something at least?

Share this post


Link to post
Share on other sites

Hello msteel,

The GUI and CLI have been split since version 3.0, so I would guess you were using 2.0 or 2.5 previously. The easiest way to emulate your previous behavior is to use mounting profiles. SANmp Client has the ability to save a mount profile, which records the disks and permissions with which they were mounted.

After launching SANmp and logging in, you can then load this saved profile to re-mount the same volumes. It is possible to keep multiple profiles to represent different projects, etc. If you would like for the login and mounting to happen via script, it is most likely possible to do this with Automator or Applescript.

You can find more information about mount profiles in the SANmp Client guide, located in the SANmp folder inside Applications.

Best Regards,

Jason

Share this post


Link to post
Share on other sites

If it were not for profiles I think I would be pulling my hair out more than I am.

Since the SANmp Client GUI is not written as a scriptable application, I am having to go through all the back doors, like telling System Events to click menu item "Log In" of menu "User" of menu item "User" of menu bar 1.

And, the GUI doesn't even map the standard "open" command to the "Load Profile" command. If I ask the SANmp Client to "open" a profile file, it tells me it does not support this kind of file. So instead I am simuating key presses to bring up the "Load profile" dialog, etc.

The irony of that is that I was a proponent of splitting the GUI and the CLI. The advantages I saw to that were that you could mount drives at boot without having to have somebody logged into the Mac to get a GUI. But if I had known that it would mean one or the other then I would never have asked for it.

Share this post


Link to post
Share on other sites

There is an undocumented feature in SANmp that may benefit you. It is possible to allow simultaneous login from the CLI and the GUI, but each must be logged in separately. We made the decision to leave it undocumented because it is possible to use it to get into a bad situation. Do not log into two different accounts from the CLI and the GUI, and don't attempt to do actions simultaneously from the GUI and CLI, and you should be fine.

To enable multiple login on Mac OS X, enter the following into Terminal:

sudo touch "/Library/Application Support/SNS/SANmp/EnableMultipleClientLogin"

(please note that the sudo command will not accept an empty password)

To enable multiple login on Windows, create the following registry entry:

HKLM\Software\SANmp\EnableMultipleClientLogin (type:DWORD, value:1)

Best Regards,

Jason

Share this post


Link to post
Share on other sites

Thanks for that info. If I need to make changes I'll look into using that. But since I've got the Applescript pretty much working now, I think I'll leave things alone.

Share this post


Link to post
Share on other sites

×