Linux BASICtools - questions

basically miscellaneous, if it doesn't fit another sub-forum enter it here, we might even promote it to its own sub-forum
KeepItSimpleStupid
Posts: 7
Joined: Fri Nov 30, 2012 5:47 am

Linux BASICtools - questions

Post by KeepItSimpleStupid » Fri Jun 03, 2016 4:20 am

I decided to play in DEMO mode today. I'm surprised I got as far as I did.

I am using the LIVE version of Ubuntu 12.04.LTS so everything should be duplicate able.

Aside:
So, I've been running from CD for at least a year, if not longer. I have a small flash drive that has a script that for the most part;
a) Disables trackpad tapping; b) Sets the time zone (file on flash drive); c) Installs Flash from a directory on the USB stick (a copy); d) Adds an ARP entry for a printer then checks for an internet connection and terminates if it doesn't find one.

You basically need to 1. Mount the flash drive; 2. Connect to a network and 3. Open a terminal window and execute "sudo bash /media/KINGSTON/config from a fresh boot.

Now it downloads and installs the latest Firefox and NFS and creates the mount points.

I have another script that helps me to install VPN if I need it.

I did, at one time, I did install the arduino development kit and got around most of the issues. The biggest one there is USB permissions. That can be temporarily solved by running in sudo mode. The Arduino has two types of USB devices.

You definitely need a readme.linux type of file.

The first thing was the .gz whatever it was mounted as a Network drive eventually. Totally odd. It's definately not apt, or the package manager. Vivaldi (new browser) uses stuff with an RPM extension. That works nice. privateinternetacess.com (paid VPN) uses a WGET sort of construct. I think the VPN stuff requires adding the proper repository. Synaptic is cool too as a package manager.

Ok, back to the issues:

1. Where do you suggest that BASIC be installed? I picked /usr/local/bin. So, I moved the stuff there.

2. tk apparently isn't installed and there are three versions to choose from. tk,
via apt, you can install tk, tk8.4 and tk8.5 (I chose tk) I found that out because BASICtool complained that it could not find wish.

3. I added execute permissions by doing:
chmod +x TclTerm.tcl and chmod +x TclTerm.tcl

4. I did add a path to BASIC using some form of the command here: http://unix.stackexchange.com/questions ... th-to-path

5. sudo wish BASICtools.tcl at least launches BASICtools. sudo wish TclTerm.tcl launches with only two real options.
Claear and reset. and the error ttyso is not available which would be OK. Earlier in my playing, I got a syntax error. Not running as sudo got some permission errors with some .out? type of file.

5a. One f the startups were really wierd where it trys a lot of the tty's. I suppose the tty with USB in it is not there because the FDDI device isn't present.

6. HELP gave me the following error: start: Unknown job: http://www.coridiumcorp.com/ARMhelp/index.htm
from the Ubuntu terminal window.

7. About ArmBasic tools gives me an error I can;t read all of. Could not execute (path)BASICArmb... the .. are part of the message.

8. the connection command gives me "Could not execute 21xx No such file...." Again ... is part of the message.

9. Edit/show preprocessor. Gives me a message about "Notepad".

10. Finally the BIG ISSUE. Choose editor doesn;t work at all. at one point it was opening gedit. The selection process only allows .com, .exe and .bat. They don;t exist in Linux. I wanted to add pico. Typing the complete path to pico didn't work either.
I could probably fake it.

11. I did make a simple file: e.g. 10 print 1; 20 END

12. I forget what's supposed to happen, but loading doesn;t show in window. SHow pre-processsed doesn;t show anything.
Based on another message, I tough a minimal amount of emulation was done.

13. This error (gedit:19416): GLib-GIO-WARNING **: Missing callback called fullpath = /root/.local/share/recently-used.xbel
occurred.

14. Print doesnt; work "Could not execute Printit.exe"
couldn't execute "PrintIt.exe": no such file or directory
couldn't execute "PrintIt.exe": no such file or directory
while executing
"exec $::printIt __temp.out "
(procedure "printWdw" line 16)
invoked from within
"printWdw .display.txxt "
invoked from within
".#menubar.#menubar#fil invoke active"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke active]"
(procedure "tk::MenuInvoke" line 50)
invoked from within
"tk::MenuInvoke .#menubar.#menubar#fil 1"
(command bound to event)

15. It's kinda hard to tell in the Details box, where the individual errors start and end. I'd insert a blank line if you can.
e.g. At a menu selection. Check to see if a blank line was sent and if not send one.

BASICtools starts in a window in the lower left hand corner and then moves a bit.

As I said, I'm surprised I got as far as I did. As i said, since I used the LIVE CD, it's like starting from scratch everytime, so you should be able to duplicate everything. The error messages in the dialogs are too short. The file exploring may need some help at a later time.

Lots of odd issues (probably PATH related):
ubuntu@ubuntu:/usr/local/bin/BASIC$ cd ~
ubuntu@ubuntu:~$ BASICtools.tcl
Error in startup script: couldn't read file "TclTerm.tcl": no such file or directory
while executing
"source TclTerm.tcl"
(file "/usr/local/bin/BASIC/BASICtools.tcl" line 1293)
ubuntu@ubuntu:~$ sudo wish BASICtools.tcl
Error in startup script: couldn't read file "BASICtools.tcl": no such file or directory
ubuntu@ubuntu:~$ pwd
/home/ubuntu


BASICtools.tcl does involk BASICtools at least sometimes.

So, the most annoying issues are:
1. Can;t select editor
2, No readme.linux type of file.
Where one should put the thing; Path; how to execute; Adding execute permissions; USBport permissions
3. Error messages are not long enough.
4. References to Notepad
5. Probably some PATH wierdnesses

Enough for now.



basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Sat Jun 04, 2016 2:34 am

Thank you thank you thank you. Love to get this kind of feedback.

I'll fire up the Ubuntu system this weekend.

Maybe there is another file type (all files) choice option for the editor choice (yes I know that should be the default for Linux)

I never thought to try the about or help menus, and will fix those.

As for PRINT, we had to write a utility for Windows so you could choose the printer, not sure how that would be done in Linux, looking for suggestions.

Is there some installer people use for Linux which could set some of the stuff, maybe a script at a minimum. We use NSIS on Windows.

KeepItSimpleStupid
Posts: 7
Joined: Fri Nov 30, 2012 5:47 am

Re: Linux BASICtools - questions

Post by KeepItSimpleStupid » Sat Jun 04, 2016 6:02 am

A a minimum you need a readme.linux file.
The next minimum is being able to chose a text editor.
Permissions and path is the next headache.

Remember the bashrc files: http://www.joshstaiger.org/archives/200 ... le_vs.html You have one for the system, one at first login and one at every shell instance. They are great places to set environment variables and aliases for commands. So, if just me wanted bt to be BASICtools.tcl, I could do that.

Printing: Way back when I used lpr with the right options to print to a printer. It was from a Unix mainframe to a local printer not part of the Unix printers. At one point there were some terminal emulators that supported an ESC sequence. The emulator captured the file and printed it on the local PC/MAC. So, a small script which we called kpr would print a file locally. I have that script somewhere or can make it.

I'd image you would have to do printing with CUPS. https://www.cups.org/documentation.php See CUPS API.

I've been a UNIX user since the 70's, but administrating Linux is a brand new ball game. I have a commercial Linux NAS at home as well.

dmesg | tail would, for instance shows

ubuntu@ubuntu:~$ dmesg | tail
[29878.843654] wlan0: RX AssocResp from d8:50:e6:45:8d:90 (capab=0x1401 status=0 aid=1)
[29878.846422] wlan0: associated
[41513.093655] usb 2-1.2: USB disconnect, device number 5
[41540.940287] usb 2-1.2: new low-speed USB device number 6 using ehci_hcd
[41541.044986] usb 2-1.2: New USB device found, idVendor=045e, idProduct=006a
[41541.044991] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[41541.044995] usb 2-1.2: Product: Microsoft Wireless Optical Mouse\xffffffc2\xffffffae\xffffffae 1.0A
[41541.044998] usb 2-1.2: Manufacturer: Microsoft
[41541.056112] input: Microsoft Microsoft Wireless Optical Mouse\xffffffc2\xffffffae\xffffffae 1.0A as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0/input/input13
[41541.056861] hid-generic 0003:045E:006A.0003: input,hidraw0: USB HID v1.11 Mouse [Microsoft Microsoft Wireless Optical Mouse\xffffffc2\xffffffae\xffffffae 1.0A] on usb-0000:00:1d.0-1.2/input0


when I unplugged a wireless mouse.

The tar.gz method that you had was worse than Adobe's Flash. It mounted in Networks which really threw me and there was no readme which rhrew me more. Knowing how it ran under Windows and my Linux experience saved me.

64 and 32 bit stuff is still annoying.

Your definitely not at the package management level, but look here: https://en.wikipedia.org/wiki/RPM_Package_Manager
I never used RPM as as I know.

See this Vivaldi installer (New browser) https://vivaldi.com/download/?lang=en_US The .DEB package opens and installs via the Ubuntu Software Center. (I went back to fix stuff that wasn't right)

Debian:
http://www.linux.org/threads/debian-pac ... gers.4456/

FWIW, some forum software makes the upload of ,jpg and .JPG case sensitive when your running Linux.

PS: I was around in the Yahoo group and I think here too. A few posts doesn't seem right,

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Sun Jun 05, 2016 11:14 pm

OK, seems I have made about 3 steps backward. the Linux machine I was using died, and I replaced it with another PC and was running Some version 15.xx of Ubuntu. I can no longer run the makefile that generates bpp or compile the BASIC compiler, getting errors outside my sources. Not sure what is going on here. Remember while I have been using Linux since the 90s as many simulators I used ran on it, I am still a novice Linux person, so I get stumped easily.

But I have fixed a couple issues you mentioned. For my own use I was placing everything in /usr/local/bin/Coridium and a BASICtools launch command in /user/local/bin

I use a pretty vanilla version of Tcl (works fine on the Ubuntu I installed).

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Mon Jun 06, 2016 5:18 pm

OK, making progress again, I have bpp and the compiler working, now actually trying to get BASICtools to compile a simple program.

Will need lots of simple edits to get there. Stay tuned...

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Wed Jun 08, 2016 9:11 pm

OK, this looks like it is working on my Ubuntu system

unpack this into the ~ directory, which means you end up with a Coridium directory there

There is an install script so run --

sudo ~/Coridium/installBASIC

You may have to reboot as the echo says, because the groups are only updated on boot, and this changes the groups

It adds a BASICtools script to the /usr/local/bin
and adds a directory there, /usr/local/bin/Coridium with 2 Tcl scripts and 2 executables

There is a sample (testBLINKY.bas) BASIC program in ~/Coridium

This thread has bee moved to

http://www.coridiumcorp.com/forum/viewt ... f=9&t=1003

KeepItSimpleStupid
Posts: 7
Joined: Fri Nov 30, 2012 5:47 am

Re: Linux BASICtools - questions

Post by KeepItSimpleStupid » Sat Jun 11, 2016 7:58 am

It helps a little.

You might want to rename installBASIC to installBASIC.sh. This seems to be typical extension in some of the install scripts I've seen. it's also typical to see sudo ./installBASIC.sh as well. .sh meaning shell. Kinda like the PC SETUP program, but at least you know what the package is. What you said is the same basically.

One package I have installs with basically this:

wget https://<somewebsite>/installer/install_ubuntu.sh
sudo sh ./install_ubuntu.sh

So, extracting and cd'ing into the directory and executing the .sh file is a common way to install stuff.

The files turned out better because the execute bits were set. Yeah!

It would help if your username is bruce.

BASICtools: line 2: wish: command not found[ really means that there is no tcl installed on your system which I can fix.

Tired for now. Progress. Yippee. Thanks. Tired.

ubuntu@ubuntu:~/Coridium$ sudo ./installBASIC
gpasswd: user 'bruce' does not exist
*** You will need to reboot to have the dialout change take effect***
ubuntu@ubuntu:~/Coridium$ more ./installBASIC
gpasswd --add bruce dialout
echo "*** You will need to reboot to have the dialout change take effect***"

if test -d /usr/local/bin/Coridium; then echo ""; else mkdir /usr/local/bin/Cori
dium; fi

cp BASICtools.tcl /usr/local/bin/Coridium/.
cp TclTerm.tcl /usr/local/bin/Coridium/.

cp BASICtools /usr/local/bin/.

cp bpp /usr/local/bin/Coridium/.
cp ARMbasic /usr/local/bin/Coridium/.

ubuntu@ubuntu:~/Coridium$ BASICtools.tcl
BASICtools.tcl: command not found
ubuntu@ubuntu:~/Coridium$ cd /usr/local/bin
ubuntu@ubuntu:/usr/local/bin$ ls
BASICtools Coridium
ubuntu@ubuntu:/usr/local/bin$ $PATH
bash: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: No such file or directory
ubuntu@ubuntu:/usr/local/bin$ BASICtools
ubuntu@ubuntu:/usr/local/bin$ /usr/local/bin/BASICtools: line 2: wish: command not found


Here's an EXCERPT from my system startup file

# 15-Apr-16 Upgraded Flash to 202.616
# 27-Apr-16 Hopefully fixed the Watch signal strength issue
# 04-Jun-16 Upgraded flash to 202.621
echo "Disable Trackpad Tapping"
synclient MaxTapTime=0
# When updating flash
# Make new directory; Extract to new directory; Ignore errors
# Change version in 3 places: echo and 2x in copy.
# Increment Letter in 2 places. Test 2 lines with sudo
# Restart Firefox
echo "Installing Flash Plugin v Version 11.2.202.621
(cp)"
cp /media/KINGSTON/Install.Flash.x64n.621/libflashplayer.so /usr/lib/mozilla/plu
gins
cp -r /media/KINGSTON/Install.Flash.x64n.621/usr/* /usr
#
echo "Add HP printer to ARP table"
# Won't connect via hardwired Ethernet, using AP in bedroom
#
arp -s 10.0.1.230 00:xx:xx:xx:xx:xx
#
echo "Setting keyboard delay to 500 mS"
kbdrate -s -d 500

^C

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Sat Jun 11, 2016 2:25 pm

As for brucee, yes the problem is that I am installing the BASICtools.ini file which sets that. i have fixed that in the script, but have not posted it yet.

So just delete the BASICtools.ini file in ~/Coridium

I am moving this over to the Mac as we speak and will probably tweak the installer a bit following that excercise.

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Sat Jun 11, 2016 2:27 pm

I will add the .sh to the proper files, just trying to get all the pieces in place.

I guess I could check for wish, but it has always been there on any Linux/Mac that I have seen. What flavor Linux are you running?

basicchip
Posts: 985
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: Linux BASICtools - questions

Post by basicchip » Sat Jun 11, 2016 9:16 pm

This thread is moving over to the software section

http://www.coridiumcorp.com/forum/viewt ... f=9&t=1003

Post Reply