It's trying to load the console but the wiki dose'nt show how to set the varible that I can see, I might have somehow missed it :)
It's trying to load the console but the wiki dose'nt show how to set
the varible that I can see, I might have somehow missed it :)
export SBBSCTRL="/sbbs/ctrl/"
at the ~ prompt....
And though i've done this. anyway I look at it, when I try to load envorinment varaibles, even in a very simple script, EXCEPT for scfg, the SBBSCTRL environment will not set.
not will it work in .profile .bash-profile .bashrc
simple script
#!/bin/sh and tried bash
SBBSCTRL=/sbbs/ctrl && export SBBSCTRL && sudo /sbbs/exec/sbbs [triggers, etc] exit
I've tried this directly from a CLI and it still states SBBSCTRL environment not set.
SCFG does'nt give the issues after being loaded stating it cannot
find the ctrl dir when loading directly like this or from a script.
in my ~/.bashrc ~/.bash-profile and ~/profile I have:
SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
it is also setup in /etc/prfile btw.
and I no longer have any issues with LD_LIBRARY_PATH being called for.
strange indeed.
And though i've done this. anyway I look at it, when I try to load
envorinment varaibles, even in a very simple script, EXCEPT for scfg,
the SBBSCTRL environment will not set.
What do you mean "EXCEPT for scfg"? There's nothing special about scfg.
On what OS?
On Ubunu Linux or Debian Linux:
1. edit the file /etc/profile
2. after the last line, add one line: export SBBSCTRL=/path/to/ctrl
4. at a terminal command prompt, type: echo $SBBSCTRL
You don't need 2 different steps (ENV_VAR = val, then export) you can do it with a single operation: export ENV_VAR = val, for example:
Maybe try "export SBBSCTRL=/path/to/ctrl" instead.
it is also setup in /etc/prfile btw.
Works for me. What flavor of Linux are you using?
$ export HELLO=Hi!kk4qbn@kk4qbn:~$ export HELLO=Hi
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there too
$ export HELLO=Hi!
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there too
Now put this in a file, called hi.sh:
export HELLO=Hi!
# unset HELLO <- remove the HELLO env var
# source hi.sh <- interpret the hi.sh script
# echo $HELLO <- Do you see Hi!? It worked
Re: Re: Raspberry PI synchron
By: Digital Man to KK4QBN on Thu Feb 15 2018 23:40:01
And though i've done this. anyway I look at it, when I try to load
envorinment varaibles, even in a very simple script, EXCEPT for scfg,
the SBBSCTRL environment will not set.
What do you mean "EXCEPT for scfg"? There's nothing special about scfg.
I guess I stated what I was trying to say wrong, you told me to try on the basc commandline.
SBBSCTRL=/sbbs/ctrl && export SBBSCTRL && /sbbs/exec/scfg
I did this, SCFG LOADED with no issues, not with the regular error message stating "cannot find sbbs ctrl dir, or whatever"
ANY WAY I try to set SBBSCTRL, either on the cmdline, through a script, through the . files, profile, etc. ALWAYS at the beginning of loading the sbbs executable it gives the error, SBBSCTRL EVIRONMENT NOT SET. It DOES NOT seem to bother the FUNCTION of sbbs itself.
On what OS?
debian x64, I thought I stated that earlier. it does'nt matter if I did or did'nt at this point.
On Ubunu Linux or Debian Linux:
It did not give this issue on Ubuntu or even MINT, using the DEBIAN repo and not the ubuntu.
1. edit the file /etc/profile
2. after the last line, add one line: export SBBSCTRL=/path/to/ctrl
4. at a terminal command prompt, type: echo $SBBSCTRL
kk4qbn@kk4qbn:~$ echo $SBBSCTRL
kk4qbn@kk4qbn:~$
it is not working.
here is the last few lines of /etc/profile
done
unset i
fi
export SBBSCTRL=/sbbs/ctrl/
It has been like this.
You don't need 2 different steps (ENV_VAR = val, then export) you can do it with a single operation: export ENV_VAR = val, for example:
Thanks for educating me on that.. I used to be better versed in scripting but lost it through time. I have now somplfied all that.
Maybe try "export SBBSCTRL=/path/to/ctrl" instead.
I believe I've tried all different variations.. still trying.. I'm amazed the BBS is running :)
it is also setup in /etc/prfile btw.
that was a typo BTW.
Works for me. What flavor of Linux are you using?
Debian
$ export HELLO=Hi!kk4qbn@kk4qbn:~$ export HELLO=Hi
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there too
kk4qbn@kk4qbn:~$ echo $HELLO
Hi
I got HI but no Hello..
$ export HELLO=Hi!
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there too
Now put this in a file, called hi.sh:
export HELLO=Hi!
Done..
# unset HELLO <- remove the HELLO env var
# source hi.sh <- interpret the hi.sh script
# echo $HELLO <- Do you see Hi!? It worked
output from this travesty
kk4qbn@kk4qbn:~$ unset HELLO
kk4qbn@kk4qbn:~$ source hi.sh
bash: export: `HELLO-Hi!': not a valid identifier
kk4qbn@kk4qbn:~$ echo $HELLO
kk4qbn@kk4qbn:~$
Something is borked.
not even trying the shebang no reason..
Something is blocking env var from being stored to a point.. does it not appear this way?
Thanks for your hel Rob.. while others would call me an idiot, you spend the time to help.. I used to be great with *nix environments and mainly run only freeBSD and it was not as forgiving as a lot of these distros out now, I'm getting older now, my memory suffer, and I cannot spend as much time at the console because my health (lower half of body goes numb, plus get migraines) but I do as good as I can, and I don't want to do this with windows.. Not that I don't like windows, I do, it has its uses.. but I always have a special place in my hard for linux and SBBS, and I apreciate your patience.
kk4qbn@kk4qbn:~$
it is not working.
here is the last few lines of /etc/profile
done
unset i
fi
export SBBSCTRL=/sbbs/ctrl/
And you rebooted while it was that way?
"HELLO" was the name of the environment variable. "Hi!" was the content. No where did I suggest you should have "got Hello".Note the following statement
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there
too
kk4qbn@kk4qbn:~$ unset HELLO
kk4qbn@kk4qbn:~$ source hi.sh
bash: export: `HELLO-Hi!': not a valid identifier
You did something wrong. :-)
No. The reported error ("bash: export: `HELLO-Hi!': not a valid identifier") suggests to me you have a typo.
If it's not causing a problem, I suppose you can just shrug it off and continue on, but I assure you: you can set environment variables a multitude of ways on Debian and Ubuntu Linux and you've shown that at least *some* of those ways are working as they should and the others that aren't working for you are likely due to user error.
Here's a FAQ on it: https://unix.stackexchange.com/questions/117467/how-to-permanently-set-env ironm ental-variables#117470
Re: Re: Raspberry PI synchron
By: Digital Man to KK4QBN on Fri Feb 16 2018 23:09:34
kk4qbn@kk4qbn:~$
it is not working.
here is the last few lines of /etc/profile
done
unset i
fi
export SBBSCTRL=/sbbs/ctrl/
And you rebooted while it was that way?
Yes, of course :)
"HELLO" was the name of the environment variable. "Hi!" was the content. No where did I suggest you should have "got Hello".Note the following statement
$ echo $HELLO
$ env <- shows all environment variables, you'll see HELLO there DM>> too
^^^ Ummm little stuff like that is what throws me for loops at times
kk4qbn@kk4qbn:~$ unset HELLO
kk4qbn@kk4qbn:~$ source hi.sh
bash: export: `HELLO-Hi!': not a valid identifier
You did something wrong. :-)
but what? the hi.sh is EXACTLY what you typed and I followed step by step.
No. The reported error ("bash: export: `HELLO-Hi!': not a valid identifier") suggests to me you have a typo.
well something is scrwed.. I would'nt think attempting to export Sooo many times in so many different ways I would get that typo EVERY sing time, and with EVERYTHING else it works, but sbbs still reports that SBBSCTRL environment not set.
Here's a FAQ on it: https://unix.stackexchange.com/questions/117467/how -to-permanently-set-env ironm ental-variables#117470
Thankss again, I have read a few docs on it.. it should'nt be giving this much complications.
kk4qbn@kk4qbn:~$ unset HELLO
kk4qbn@kk4qbn:~$ source hi.sh
bash: export: `HELLO-Hi!': not a valid identifier
You did something wrong. :-)
but what? the hi.sh is EXACTLY what you typed and I followed step by step.
is your sbbs/ctrl directory ACTUALLY /sbbs/ctrl?
or do you have sbbs in a home dir like I do? if so you need to set a symlink from /sbbs/ to ~/sbbs/
How about paste the md5 sum of hi.sh here?
It should look this this:
root@cvs:~# cat hi.sh
export HELLO=Hi!
echo $HELLO
root@cvs:~# md5sum hi.sh
f7201385bdb7c523dade158d270014cc hi.sh
root@cvs:~# source hi.sh
Hi!
No. The reported error ("bash: export: `HELLO-Hi!': not a valid
identifier") suggests to me you have a typo.
Don't use sbbs to test your methods of setting environment variables. Use "echo" or "env" instead. Once "echo" and "env" show the environment variable(s) that you have set are indeed there, then run 'sbbs'.
And if the SBBSCTRL environment variable shows up in 'env' output (or its value can be echoed via $SBBSCTRL) and sbbs still reports that error, then revisit your methods of starting sbbs - if it's a shell script, revisit the contents of that that shell script.
that's easy... you used a '-' instead of a '='... that's what you did wrong...
is your sbbs/ctrl directory ACTUALLY /sbbs/ctrl?
or do you have sbbs in a home dir like I do? if so you need to set a symlink from /sbbs/ to ~/sbbs/
Mine is in /sbbs/, however for some reason every time I load /sbbs/exec/sbbs , the BBS has some issue and telnet doesn't work, and the web has some issue as well... Making it a bit hard to create a login account....
Re: Re: Raspberry PI synchron
By: Digital Man to KK4QBN on Sat Feb 17 2018 14:31:17
How about paste the md5 sum of hi.sh here?
It should look this this:
root@cvs:~# cat hi.sh
export HELLO=Hi!
echo $HELLO
root@cvs:~# md5sum hi.sh
f7201385bdb7c523dade158d270014cc hi.sh
root@cvs:~# source hi.sh
Hi!
kk4qbn@kk4qbn:~$ cat hi.sh
export HELLO=Hi!
kk4qbn@kk4qbn:~$ md5sum hi.sh
7771bfae728b34ec658674c6cbe2281f hi.sh
kk4qbn@kk4qbn:~$ source hi.sh
kk4qbn@kk4qbn:~$
See.. somethink is BORKED!
Yes, I found THAT type oin hi.sh before running the above I accidently had a hyphen instead of =. but fixed that. and there are no typos in my scripts.. I even put SBSCTRL and LD_LIBRARY_PATH in /etc/environment. sbbs still states !SBBSCTRL ENVIRONMENT NOT FOUND.
SO far I've tried it 2 -3 different ways in ~.profile ~.bash-profile ~.bashrc /etc/profile /etc/environment. still no go..
Don't use sbbs to test your methods of setting environment variables. Use "echo" or "env" instead. Once "echo" and "env" show the environment variable(s) that you have set are indeed there, then run 'sbbs'.
well 'env' states that SBBSCTRL is indeed set
still issues, and
/etc/environment is not doing what I thought it would. its scrweing with the programs. try to run scfg and you get !ERROR 2 changing curent directory to /sbbs/ctrl.. guess I'll trash that and reboot and keep trying.
And if the SBBSCTRL environment variable shows up in 'env' output (or its value can be echoed via $SBBSCTRL) and sbbs still reports that error, then revisit your methods of starting sbbs - if it's a shell script, revisit the contents of that that shell script.
I will do that again.. but if I was'nt hving issues with SCFG and gtkmonitor and jsexec I would think it was just that.
or do you have sbbs in a home dir like I do? if so you need to set a [M0f6 KK>> symlink from /sbbs/ to ~/sbbs/
Mine is in /sbbs/, however for some reason every time I load /sbbs/exec/sbbs , the BBS has some issue and telnet doesn't work, and the web has some issue as well... Making it a bit hard to create a login account....
make sure you set the varible -> export SBBSCTRL=/sbbs/ctrl/
then -> sudo /sbbs/exec/sbbs <-to load the system
this works great for me, I also put my BBS in /sbbs
What OS are you running?
I am just playing around with Synchronet for the PI right now, I have a 32GB card set up with Debian (C)lass 10
and a 32GB card set up with Ubuntu 16.04 (C)lass 10
So far I am running Synchro PI locally but plan to move stuff over like
i cd to /sbbs/ctrl and run the executable
kk4qbn@kk4qbn:~$ cat hi.sh
export HELLO=Hi!
kk4qbn@kk4qbn:~$ md5sum hi.sh
7771bfae728b34ec658674c6cbe2281f hi.sh
kk4qbn@kk4qbn:~$ source hi.sh
kk4qbn@kk4qbn:~$
See.. somethink is BORKED!
Yes. You need to slow down and actually look at what you're typing and copying and pasting.
Like I said before, let's back up and not use 'sbbs' to test your ability to set environment variables.
Well most of those files are only used by bash. Are you using bash? If you're at a shell prompt, and you run 'ps', does the output look like this?
well 'env' states that SBBSCTRL is indeed set
When does it state that? After a fresh boot and opening a new terminal window? If so, then one of those files that bash (or whatever shell you're using) is parsing, is working. Did you maybe set different values in each to find out which is/are working?
/etc/environment is not doing what I thought it would. its scrweing
with the programs. try to run scfg and you get !ERROR 2 changing
curent directory to /sbbs/ctrl.. guess I'll trash that and reboot and
keep trying.
Is the ".." part of the error messge? that would indicate a typo somewhere.
And if the SBBSCTRL environment variable shows up in 'env' output
(or its value can be echoed via $SBBSCTRL) and sbbs still reports
that error, then revisit your methods of starting sbbs - if it's a
shell script, revisit the contents of that that shell script.
Welp, we need to slow down backup and find out if you're able to set environment variables and where. If you're setting them in a shell script, I already explained that they don't live up beyond the script (unless you "source" it). But you kind of seem to be all over the map on what you're trying and what you're reporting is working or not working. Simplify. Pick one test and start there until you understand why it's not working and how to make it work.
Re: Re: Raspberry PI synchron
By: Digital Man to KK4QBN on Sat Feb 17 2018 19:31:33
Re: Re: Raspberry PI synchron
By: MRO to Denn on Sat Feb 17 2018 11:02 pm
i cd to /sbbs/ctrl and run the executable
I just click the synchronet icon on my task bar on my Sycnchronet windows BBS But now that I'm setting up on a raspberry PI with Linux it's all command line or script.
:)
I will probably just keep my Synchro windows BBS since i'ts already set up.
Re: Re: Raspberry PI synchron
By: Digital Man to KK4QBN on Sat Feb 17 2018 19:31:33
kk4qbn@kk4qbn:~$ cat hi.sh
export HELLO=Hi!
kk4qbn@kk4qbn:~$ md5sum hi.sh
7771bfae728b34ec658674c6cbe2281f hi.sh
kk4qbn@kk4qbn:~$ source hi.sh
kk4qbn@kk4qbn:~$
See.. somethink is BORKED!
Yes. You need to slow down and actually look at what you're typing and copying and pasting.
The last message I typed I accidently aborted, anyway.. I see where I scrwed that up and did'nt have echo $HELLO in the hi.sh I think this occured from the typo in the last message I'd have to look to be sure but it don't really matter.. the md5sum is indeed the same now..
kk4qbn@kk4qbn:~$ cat hi.sh
export HELLO=Hi!
echo $HELLO
kk4qbn@kk4qbn:~$ md5sum hi.sh
f7201385bdb7c523dade158d270014cc hi.sh
Like I said before, let's back up and not use 'sbbs' to test your ability to set environment variables.
I am not.. I'm using it as an example along with the fact that I have to force the /sbbs/ctrl directory upon SCFG to get it to work correctly and have to do the same with jsexec.
Well most of those files are only used by bash. Are you using bash? If you're at a shell prompt, and you run 'ps', does the output look like this?
Yes, I am using bash
PID TTY TIME CMD
10933 pts/3 00:00:00 bash
11328 pts/3 00:00:00 ps
well 'env' states that SBBSCTRL is indeed set
When does it state that? After a fresh boot and opening a new terminal window? If so, then one of those files that bash (or whatever shell you're using) is parsing, is working. Did you maybe set different values in each to find out which is/are working?
after a fresh boot, and there are no different values nowhere.
/etc/environment is not doing what I thought it would. its scrweing
with the programs. try to run scfg and you get !ERROR 2 changing
curent directory to /sbbs/ctrl.. guess I'll trash that and reboot and
keep trying.
Is the ".." part of the error messge? that would indicate a typo somewhere.
And if the SBBSCTRL environment variable shows up in 'env' output DM>> (or its value can be echoed via $SBBSCTRL) and sbbs still reports DM>> that error, then revisit your methods of starting sbbs - if it's a DM>> shell script, revisit the contents of that that shell script.
No the .. was me I was typing the error from a different terminal..
I'll
keep checking everything.. but it's not just sbbs giving errors so I don't think the script is the issue, I will go back over everything again when I get time. for the time though everything is running smooth the way it is.. It just bugs me that this is happening.
Welp, we need to slow down backup and find out if you're able to set environment variables and where. If you're setting them in a shell script, I already explained that they don't live up beyond the script (unless you "source" it). But you kind of seem to be all over the map on what you're trying and what you're reporting is working or not working. Simplify. Pick one test and start there until you understand why it's not working and how to make it work.
I will set the varaiables in one file at a time and try it. but as I said, it shows to be already set, I might make a typo from time to time, but one cannot get much slower than I am.. I'm fairly methodical of the methods I use. the ONLY reason I set them in scripts is because sbbs, scfg, and jsexec were giving issues.. otherwise I would'nt be "all over the map" usually setting an envorinment variable should be fairly straight forward.. right?
echo $HELLO
kk4qbn@kk4qbn:~$ md5sum hi.sh
f7201385bdb7c523dade158d270014cc hi.sh
And when you "source hi.sh", does it print "Hi!"?
I am not.. I'm using it as an example along with the fact that I have
to force the /sbbs/ctrl directory upon SCFG to get it to work
correctly and have to do the same with jsexec.
Please be more specific.
I don't think you understood my suggestion. My suggestion was to set different environment variables (called them ENVTEST1, ENVTEST2, etc. or whatever) in each method you know of to set an environment variable. e.g. in your /etc/profile, add:
Well it can be tricky given that processes (including scripts invoked as executeables) get a *copy* of their parent script and any changes made are that copy, which disappears when the process/script is finished. This is a bit different from Windows, where batch/cmd files can set environment variables in their parent environment without issue.
Thanks again Rob.
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 325 |
Nodes: | 10 (0 / 10) |
Uptime: | 02:48:23 |
Calls: | 510 |
Messages: | 220569 |