Post by donnybowers on Mar 12, 2019 3:28:07 GMT -5
I'm doing something different with the desktop icon now. I made a bash script to run it. Then when I make the desktop icon, I run the bash script (using my desktop icon) and it runs the program.
LB5 bash script file (runLB5.sh) - name it as you will, but the .sh extension is required.
#!/bin/bash ./lin32-347 lb5alpha.im
Create the above script in a text editor and save it in your LB5 alpha folder (wherever you have LB5 on your hard drive).
The following should work on most Ubuntu based systems unless you have some kind of panel launcher that locks the desktop from being used. But the process of making a launcher should be similar for whatever kind of launch panel your distro is using:
. Right click on your desktop
. Select "Create Launcher"
. Name: LB5-alpha (or whatever you prefer)
. Comment: optional
. Command: Use the browse button * and navigate to your LB5 folder and select your bash script (runLB5.sh)
. Working Directory: Use the browse button * and navigate to your LB5 path and select it (this will be required for this script to work)
. Icon: Click on the browse button * and you should be able to find your LB4.xx (or any version) icon and select that.
. Click Create.
. Exit the Launcher Creator
. Right click on your new LB5 icon and select "Make Executable"
. Your LB5 Desktop launcher should now work
* If your distro doesn't have the browse buttons you'll have to type these paths in yourself.
The process should be similar if you're creating a launcher in a panel instead of on the desktop. I haven't tried it on Raspberry Pi yet; but being that Raspberrian is Linux based there is probably a similar way to create a launcher either on the desktop or in a panel.
Post by donnybowers on Mar 12, 2019 5:20:15 GMT -5
Here's another option to make the desktop icon that I think should work for almost any modern Linux distro:
.Create the script below in a text editor and save it to your Desktop folder with the extension .desktop (i.e. runLB5.desktop)
.Change YOUR-USER-FOLDER in Exec= and Path= to whatever path is required to get to your LB5-347 folder.
.You can also change the Name= to your liking.
.You would also have to mark the file executable. If you can't do this from the desktop, most file browsers give you the ability to "Make Executable" in the context menu (right click). In fact, if you try to click the icon without making it executable, it will probably prompt you with the opportunity to mark it executable right then and there.
.And of course you still need to make the bash script file (runLB5.sh) in a text editor as shown in my other post above. You could then edit the .desktop file later for the next alpha version.
You'll end up with a default icon (probably a gear); but I would think it would work in most Linux distros as long as there's not another type of launcher panel that has the desktop locked. If so, there's probably a simple way to add a new launcher to that panel that would be similar to the instructions in either Stefan's post or my post above.
for what ever reason with Mint 19 Cinnamon I had to add the path
even though the script was in the lb5-347 folder
I would say Stefan is technically right and the program folder should be in the opt folder
but I like to backup my home folder weekly and its easier to keep everything there.
#!/bin/bash cd /home/username/lb5-347 ./lin32-347 lb5alpha.im
Yes, Stefan probably is right there. I know I have Apache Web Server (LAMPP) on my computer for developing in PHP, and it's in the /opt folder. But, like you, I find it easier to do stuff like this in my home folder when I can. I don't like having to play around with the file permissions all the time. Sometimes that can be a real pain in the neck. I would imagine Stefan's way, using the /opt folder, would be much more secure.
You know, I bet you could probably put your bash script right in the Desktop folder and it would work the way you did it, with the change directory command in it. I'l have to try that and see what it looks like.
Edit: Yep. I tried it in my Desktop folder and it works just fine with the "change directory" line in it. It gives you what looks like a word processing icon on the desktop, with a kind of dark gray/black color and the #! symbols on it. That would work just fine for me. And quick and easy too! Just my style. LOL
But, the other way I did it, it's kind of cool to have the Liberty Basic logo on it too. It seems like anything you do on a computer there's a hundred different ways to do it. Especially with Linux.
Post by Stefan Pendl on Mar 16, 2019 3:24:22 GMT -5
I am using the /opt folder, just because I was trained as a Unix system and network administrator on SUSE 5.0 back in the days. The /opt folder is the location where optional applications should be installed, so I envision the installer of LB5 to put the files that are not meant to be user changeable to be located there. Anyways, as I mentioned in my post, the path needs to point to the location where the files are and that is decided by the user currently.
Post by Chris Iverson on Mar 17, 2019 1:18:26 GMT -5
It's technically a bug. A lot of the preferences aren't actually implemented yet.
This is my own setup. It's identical on my Ubuntu box, and on my Pi.
I've got the LB5 builds stored in /opt/lb5-alpha. So, /opt/lb5-alpha/lb5-347 and /opt/lb5-alpha/lb5-348.
I also have a symlink, /opt/lb5-alpha/latest, that I will modify to point to the latest LB5 build. (You could just make this a folder, and keep putting the new build in this folder, to replace the old ones entirely.)
Then, in the /opt/lb5-alpha folder, I also have a script, lb5alpha.sh, that I use for actually launching LB5.
if [ `uname -m` == "armv7l" ] then binName="rpi-alpha"
else binName="lin32-*" fi
./$binName lb5alpha.im &
It changes the executable name it tries to run based on the architecture it's running on. (It also uses a wildcard for the Lin32 name, so you don't have to keep editing the script to point to the newest one, since the Lin32 binary is the only one that changes its name with new builds.)
I stole Donny's desktop file, and pointed it to my script.