Hi - just getting started with Xojo - testing a simple app, built on a Mac to run on a Raspberry Pi 3 with Raspian Jessie. Got a couple questions I need to get answered.
This app does a Shell Execution and the result is put into a Text Area box. I’ve transferred the folder containing the app and the associated Linux / ARM-32 “stuff” over to the RPi across my network. When I bring up the RPi File Manager and navigate to that folder, I see the app and the other stuff. If I double click the app, I get a box stating “This file is executable - Do You Want To Execute It?” and then a choice of EXECUTE, EXECUTE IN TERMINAL, or CANCEL. If I clicl EXECUTE, it runs fine.
Question number one - how do I get rid of that and simply have it execute?
What I want is to NOT have to bring up File Manager to run my app. I tried dragging it from that folder to the Desktop and double clicking it. I get that same annoying question as above, I click EXECUTE, and… nothing happens.
Question number two - what do I need to do to be able to run my app from the desktop (without it asking what I want to do with it).
Here is the code in my app (it is just a test command for now):
Dim s As New Shell
Dim cmd As String
dim MyResult as text
cmd = “ntpq -p n”
MyResult = s.Result.totext 'save the output in my own text field
TerminalText.text = (MyResult)
I figured out why it didnt work from the desktop icon - it didnt have access to the files in the accompanying folder. I put that on the desktop and the execution worked. Im trying to figure out how to put those folder files in root so as not to clutter up the desktop. Not even sure if that will work, but Im gonna try it.
However, I still get that darn pop-up about executing the app. ANYONE know how to stop that nonsense?
This sort of thing is why i do not use linux or the pi anymore.
What i had to do was open the folder where the executable is located and then look at its properties. One of them says allow execution or similar. Its a while since i did it. Its nothing to do with xojo its an os thing.
Yep, I pretty much figure that it is an OS issue, but I was hoping someone had gone through this before and had figured out how to resolve it.
I am away from home for 3 says in the very icy uk but i have notes of the difficulties back at base. If no one else gets to it i can pass on that info.
OK - thanks Mark - that would be great.
Finally figured out (Google is your friend) how to stop that darn execution message - there is a checkable option in the File Manager that turns it on or off. Looks like I’m good to go, once I figure out how to avoid placing those Libs files on the Desktop.
Linux has generally tougher security which means you will need to provide the app and the folder its in, and its libraries and folders with them execution privileges. Concerning Web apps for example, Xojo documentation states:
Your web app needs to have the correct permissions enabled so that the web server can run the web app. This is done using the chown and chmod commands. The necessary permissions vary by the Linux distribution and Apache installation. Permissions of “755” are often a good starting point.[/quote]
A quick primer for Rasbian is here
BTW: One cool thing you can do with the Pi and Xojo is create a Xojo Web app and have users hotspot to it from their mobile devices to work the GPIO ports controlling relays etc. IOTs = lots of fun.
Thanks Eric - interesting info at that site. One thing that keeps hosing me is that Xojo Libs folder that gets generated when the build is done. It appears to have a space in its name, but I think it is NOT actually a space, and trying to move that folder somewhere else on the Pi is a real issue.
Hello Jim, we use Ubuntu Mate on Pi but hopefully this will work…
Maybe the easiest way may be to run the file manager under root privileges and drag and drop. Some nstructions for doing this are here:
Otherwise if you want to use the command line, keep in mind that spaces are delimiters between commands and parameters so if a space is in a firl or folder name you need to tell this to the OS by using quotes or escaping the forthcoming space with a preceding backslash “”. For example, if there’s a folder called Foo in a folder called Hello World in the opt folder in the root, you could reference Foo using either the following:
Linux file systems are usually case sensitive btw so “opt” <> “OPt” etc.