Run Sesame Server Without the GUI
From the Inside Sesame Help Desk
I'm in a bit of a quandary. My IT department doesn't want to see the Sesame Server window on server computer. In addition, they will regularly reboot the server overnight after they do maintenance and/or updates and I can't get them to restart Sesame Server. They seem to have the attitude that they will not let anything run on the server unless it's something they installed. I'd love to overrule them but I don't have the authority. Is there a way to solve this problem?
Jackson
You're actually asking two separate questions. Each of them have been addressed at different times in Inside Sesame but let's take them together as a package and add some more information to help you and your fellow Sesame users. The usual way Sesame Server is started is via the command (target) line in the desktop shortcut:
C:\Sesame2\Program\Sesame.exe -Server NetworkServerName
On our office system where the server name is NewServ, the shortcut target looks like this:
C:\Sesame2\Program\Sesame.exe -Server Newserv
When you run Sesame Server this way the Sesame GUI displays. On the Windows taskbar, you'll also see an indication that Sesame server is running.
If you could make these two indicators go away, your IT people would be happy. There are a few ways to do this and the final solution will depend on you and your IT group. Let's look at them in the order of the simplest first.
Run Minimized:
The first method is to set the shortcut with the Run line set to Minimized rather than Normal window. This will minimize the Server GUI to the taskbar. Sesame will now run with the only indication being the taskbar icon. The benefit of this method is that you can click on the taskbar icon and the Sesame Server interface will open. This might be enough to satisfy your IT people. Then again, it might not.
Run in Daemon mode:
The second way is to set the command line in the shortcut to run in Daemon mode. A daemon is usually a computer program that runs in the background, rather than under the direct control of a user. Sesame Server emulates this by not displaying its interface but running as a process in Windows. You run Sesame Server in this mode by adding the -daemon switch to the end of the target line in the shortcut:
C:\Sesame2\Program\Sesame.exe -Server Newserv -daemon
This will make your IT people happy because Sesame Server won't then appear on the desktop or on the taskbar. They'll only be able to see that Sesame Server is running by opening the task manager where Sesame.exe will appear as a process. The benefit of this method is obvious - your IT people will leave you alone. There are some drawbacks, though. Without the interface, you won't be able to see how many people are connected or what Sesame applications are open. At a glance, you won't even be able to tell if Sesame Server is running.
But you don't have to live with these disadvantages. Here are a couple of ways to address them. You could create a little batch file called IsSesameRunning.bat on the server computer desktop that will tell you if Sesame is running. The batch file is:
Echo off cls Echo If Sesame is running you will see it listed here in a Table Echo. Echo. Echo IF It is NOT Running, you will see a message "NO Tasks are running Echo with the Specified Criteria" Echo. Echo. TaskList /FI "ImageName eq Sesame.exe" Echo. Pause
When you double-click the batch file, if Sesame Server is running, you'll see a window that will tell you if Sesame is running.
Sesame Admin Mode:
Of course the best way to see - and manage - what's going on is to create another shortcut to run Sesame in Server Admin mode available only in version 2.x. The benefit is that you can run it on the server computer or any workstation on the network. The shortcut target line is:
C:\Sesame2\Program\Sesame.exe -admin NetworkServerName
When you run the admin program, you'll get a logon screen. The default login is admin and the password is hello (both case sensitive). Once you've logged in, if Sesame server is running - even in daemon mode - you'll get an interface with a complete set of administrative tabs.
The admin program can tell you who's connected to the server and what applications are open. You can backup your applications, kick users off the system, close applications, and even shut down Sesame Server.
With daemon mode and Sesame admin, you almost have it all. But as you mentioned, your IT people may do one more thing to make life difficult - they might reboot the server for maintenance without telling you. If they do, then when you try to connect to the server, it won't be running. One more little batch file will solve that problem as well.
Automatic start on reboot:
Create a batch file called StartSesameServer.bat and put in the Sesame2 folder on the server. Also make sure that there's a copy of sunlock.exe in the same folder. (You'll find this file in the Sesame2\Utilities\Lantica folder). The batch file looks like this:
REM sunlock.exe needs to be in the Sesame2 folder REM this file needs to be run from the Sesame2 folder REM This gets run as a scheduled task at system startup sunlock.exe data\YourSesameApplication1.db REM repeat the above line for each Sesame application you have on the server start program\sesame.exe -server NetworkServerName -daemon
Replace the application file and server names in the this batch file with those for your system. Add this batch file as a scheduled task in Windows Control Panel and schedule it to run at system start up or when my computer starts. It will make sure your Sesame applications are unlocked and your Sesame server is started in the daemon mode whenever the server machine starts up.
That summarizes all the options that should make you and your IT people happy.