Normal Topic Linux Environment Variables (Read 484 times)
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Linux Environment Variables
Jan 5th, 2006 at 10:14pm
Print Post Print Post  
Is there anyone else out there running Sesame on Linux that knows how to set the environmental variables without having to start a console and either run sesame from the comand line or from a script?

I can do it these to ways but I do not like to have a console window open that is hooked to the program. If someone closes the console window it also closes the program. Sesame server just dies with out a peep this way not exactly what I want.

I would like to be able to start Sesame as a server and as a client by double clicking on an icon that runs a script to start it with the proper setup.  I can not get this to work, however if I run the same script in the console it works.

Any ideas? Anyone got this working?

Thanks in advance for any help you can offer!  8)

Frederick
« Last Edit: Jan 6th, 2006 at 5:18pm by Frederick_JH »  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Linux Enviroment Variables
Reply #1 - Jan 6th, 2006 at 1:22pm
Print Post Print Post  
Are you remembering to either make your script executable:

chmod +x your_script.sh

or launching (in the icon) it with the appropriate shell:

sh /your/path/your_script.sh
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Frederick_JH
Junior Member
**
Offline


Open Sesame . . . the
magic portal awaits!

Posts: 52
Joined: Jan 26th, 2004
Re: Linux Environment Variables
Reply #2 - Jan 6th, 2006 at 5:17pm
Print Post Print Post  
Hi Mark!

The answer to both those question is yes, however I figured out the solution to my problem.

You can use a program called env to set the environment variables and start a program. This could be done by clicking on the desktop and creating a link to the env program followed by the environment variables that you want to set then by sesame and any command line options you want. However this gets hard to read in the tiny box and scrolls out of sight.

A simple one that would start the server and set the variable to tell where the license file is would look like this (should all be in one long line):

/usr/bin/env SESAME_LICENSE_PATH=/usr/local/bin/s_conf.cnf sesame -server

I choosen to have the icon start a script with the commands as it is easier to read and edit.

Here is the script:
=====================================================
#!/bin/sh

/usr/bin/env SESAME_LICENSE_PATH=/usr/local/bin/s_conf.cnf\
                   SESAME_ROOTDIRS_PATH=/root/Sesame/rootdirs.ini\
                   SESAME_HELP_PATH=/root/Sesame/HelpFiles/\
             SESAME_BROWSER="/usr/bin/opera -windowname SesameHelp"\
             SESAME_REPORT_PATH="/usr/root/Sesame/Reports/"\
             sesame
=====================================================
The "\" at the end of the lines mean that the command is not finished and to add the next line on to the end of it.  So in reality it is all one long command.

If someone wants to do this in a short cut you should omit the "\" and  you do not need the magic cookie (#!/bin/sh). That just tells the shell that it is a shell script.

If you want to start sesame with command line options you can add these after "sesame".

I have three icons now one to start Sesame in stand alone, one to start the server and one to start the client.

I hope this helps anyone else that in wondering how to do this.

Frederick
  

Frederick Henderson*Radio HRGS*Roatan*Bay Islands*Honduras
Back to top
 
IP Logged