Info Linux

AMIGASYSTEM · 1820

AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
on: July 12, 2022, 03:57:18 AM
I managed to create a named script (ArosOne.desktop) to run AROSBootstrap, it all works fine, I also assigned a png icon to the script.

Now I would like to run this script from EasyPeasy's MainMenu, I created the "Item" menu (see screenshot) where I configured the script path (ArosOne.desktop) but it doesn't seem to work, probably some parameter is needed that I don't know, does anyone have any ideas, thanks


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #1 on: July 12, 2022, 04:27:40 AM
Hi AMIGASYSTEM,


Thank you for putting this into a separate thread.


1) the .desktop extention is a special one on my desktop environment that is used solely for the purpose of creating a icon on the desktop. Say like when using windows you drag an icon from the start-menu to your desktop. For my Desktop Environment you can't do that when there doesn't exist an icon/startup yet so I have to manually craft a specific desktop icon. I do not have a menu-item shortcut to AROS.


2) If you are using a script to start AROS (which is perfectly valid, i use them as well for the command line) they usually have the file extention .sh (for a shell script). It might be that your DE (Desktop Environment) is configured in such a way that it does not accept other file extentions to be executed from the menu.


3) if using .sh extention for your script does not solve your issue then there is another option and that is to create a file-link (without extention) that points to your shell script and use the file-link in your menu-item. Be a bit careful with file-links and make sure to read into it. They are the same as used on NTFS and linux file-systems but are usually not portable amongst platforms/filesystems.


4) just to make sure: are you able to use the .desktop script to actually start AROS from a command-line ? e.g. execution bits are all set correctly ?


5) it might be that you need to start the script using your shell (usually /bin/sh or /bin/bash with the script as parameter)


As a general note, and as far as my knowledge goes, Easy Peasy seems to be updated last in 2008 or 2009. That is ancient. It might run perfectly for you (it is specially crafted for your hardware) but it might cause issues and i have no idea about the package manager and if their repositories are still alive.


Anyhows, in case you are familiar with a filemanager such as Norton Commander then try and install mc (sudo apt install mc) and start start that from a command-line. It is Midnight Commander and is a Norton Commander clone and lets you do simple actions like file-editing/viewing, copying etc. just in the same way as Norton did. In case you do not like such file-managers then please ignore.


edit: explanation to creating a .desktop item -> https://www.addictivetips.com/ubuntu-linux-tips/create-application-menu-shortcuts-linux/
« Last Edit: July 12, 2022, 04:32:48 AM by magorium »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #2 on: July 12, 2022, 05:03:58 AM
Thanks for replying, (I deleted my OT posts from "Scalos - General", delete yours too so as to avoid confusion in reading the thread "my fault of course")

Yes EasyPeasy is old but I chose it because it is very light and fast and it works well on my old VMWare Player, with Filemanagers and Editors I have no problems, they are the same on any OS, I can move well on Linux, I lack Shell knowledge.

The script I created it manually by taking a cue from a suggestion from the web, the script has .desktop as an extension and contains these strings:

Code: [Select]
[Desktop Entry]
Version=1.0
Name=ArosOne x86
Comment=Aros Hosted Linux
Exec=/home/amiga/AROS/Arch/linux/AROSBootstrap
Path=/home/amiga/AROS/Arch/linux/
Icon=/home/amiga/AROS/Arch/linux/ArosOne.png
Terminal=false
Type=Application
Categories=Operating System;

I created a small video showing how the script works and what I wish could be done.


https://drive.google.com/file/d/1AyVTajrYtphYFqykcsReeNA7dJbZ2BH5/view?usp=sharing


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #3 on: July 12, 2022, 05:16:29 AM
I copied some stuff form the other thread so i can delete the posts from scalos.


@AMIGASYSTEM:
To start your AROS on linux from a shell:
1) open a terminal window
2) assuming you are in your home directory (/home/amiga)
   cd Scrivania/AROS
3) ./Arch/Linux/AROSBootstrap
4) enjoy  :)

You can also make a link on the desktop that uses /home/amiga/Scrivania/AROS as start directory.


To start it from a link what needs to be added in the Icon?

Note that things might be named differently on your Desktop Environment.

When i view the properties of the icon that starts AROS for me it reads (*):
General information: (read-only)
File: AROSBoottrap.desktop
Name: AROSBootstrap
location: /home/pi/Desktop
Desktop Entry: (these you need to set yourself)
Command: /home/magorium/AROS/AROS-20190318-linux-armhf-system/Arch/linux/AROSBootstrap -m 200
Checked: Execute in Terminal emulator
Checked: Keep terminal window open after execution
Working directory: /home/magorium/AROS/AROS-20190318-linux-armhf-system
Description: AROS RasPi Hosted ABIv0


(*) this is an old installation on a raspberry pi so do not mind the dates and the location of the bootstrap executable as they differ from your AROS installation, so change them accordingly to your setup




magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #4 on: July 12, 2022, 05:25:38 AM
This is my AROSBootstrap.desktop contents from my old Pi installation:
Code: [Select]

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Icon=/home/apps/AROS/AROS-20190318-linux-armhf-system/System/Images/AROS.png
Exec=/home/apps/AROS/AROS-20190318-linux-armhf-system/Arch/linux/AROSBootstrap -m 200
Name=AROSBootstrap
GenericName=AROS RasPi hosted ABIv0
Category=Application;IDE;Development;GUIDesigner;
Keywords=Amiga;Replacement;OS;AROS;
Name[en_GB]=AROS V1 Hosted
Path=/home/apps/AROS/AROS-20190318-linux-armhf-system
Comment[en_GB]=AROS RasPi hosted ABIv0
Terminal=true
X-KeepTerminal=tru


And that is located for me at: /home/<here your username>/Desktop


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #5 on: July 12, 2022, 05:43:24 AM
I will try to adapt your script and see what happens :D

I also tried this script .sh but it doesn't seem to work, maybe there is something wrong?  :o

Code: [Select]
#!/bin/bash
cd /home/amiga/AROS/Arch/linux/
./AROSBootstrap &


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #6 on: July 12, 2022, 05:59:49 AM
I will try to adapt your script and see what happens :D
That is ok, please let us know what happens :-)

I will look at your video later.

Quote
I also tried this script .sh but it doesn't seem to work, maybe there is something wrong?  :o

Ok, so how i have setup my linux is that i created a special script directory in my home directory and added that to my path.

That way i can start the aros script from the command-line where ever the terminal's current directory is located.

I named the script itself, startaros.sh and a small excerpt of that reads:
Code: [Select]
# store current directory
CWD="$(pwd)"

# change the directory to the AROS sys directory
cd AROS-20190416-2-linux-i386-system

# invoke AROS bootstrap, note that the location depends on which version of AROS you want to start
 ./Arch/linux/AROSBootstrap
#./boot/linux/AROSBootstrap

# return to starting directory
cd $CWD

And i can then start that from the terminal with:
Code: [Select]
startaros.sh

To make it more comfortable i added a file-link to this script as well so that i can omit the ".sh" and just type "startaros" from the shell

Actually my script is more complicated then this as it also routes the error and output to a file so i can copy-paste that as a file instead of copying it from the terminal window and it also takes care of which version of AROS that i want to start (i have several hosted versions installed)


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #7 on: July 12, 2022, 06:14:34 AM
When you watch the video you will see that I have no problem running the script from an icon, my problem is running it from the MainMenu.

I tried your script and it works the same as mine, I can run it from Icon but not from EasyPeasy's MainMenu, in my opinion it is missing some parameter to add after the command, I noticed that some applications use %U or %F


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #8 on: July 12, 2022, 06:19:27 AM
The problem is that i am not familiar with the app launcher that easy peasy uses ...


Can you figure out which launcher that exactly is ?


Because the distribution is so old (actually abandoned) i am unable to find any related forums so perhaps the actual name of the app launcher is able to come up with some search results.


terminills

  • Member
  • ***
    • Posts: 168
    • Karma: +69/-0
Reply #9 on: July 12, 2022, 06:30:52 AM
Thanks for replying, (I deleted my OT posts from "Scalos - General", delete yours too so as to avoid confusion in reading the thread "my fault of course")

Yes EasyPeasy is old but I chose it because it is very light and fast and it works well on my old VMWare Player, with Filemanagers and Editors I have no problems, they are the same on any OS, I can move well on Linux, I lack Shell knowledge.

The script I created it manually by taking a cue from a suggestion from the web, the script has .desktop as an extension and contains these strings:

Code: [Select]
[Desktop Entry]


Version=1.0
Name=ArosOne x86
Comment=Aros Hosted Linux
Exec=/home/amiga/AROS/Arch/linux/AROSBootstrap
Path=/home/amiga/AROS/Arch/linux/
Icon=/home/amiga/AROS/Arch/linux/ArosOne.png
Terminal=false   <~~~~ Terminal=true
Type=Application
Categories=Operating System;

I created a small video showing how the script works and what I wish could be done.


https://drive.google.com/file/d/1AyVTajrYtphYFqykcsReeNA7dJbZ2BH5/view?usp=sharing

Try changing  Terminal=false   to Terminal=true
« Last Edit: July 12, 2022, 06:40:40 AM by terminills »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #10 on: July 12, 2022, 07:00:19 AM
Try changing  Terminal=false   to Terminal=true

Already Done, it doesn't change anything, why linux is so complicated? with Windows or Amiga/AROS it would have been so easy to do these things :'(


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #11 on: July 12, 2022, 07:03:25 AM
The problem is that i am not familiar with the app launcher that easy peasy uses ...


Can you figure out which launcher that exactly is ?


Because the distribution is so old (actually abandoned) i am unable to find any related forums so perhaps the actual name of the app launcher is able to come up with some search results.

I think it is a simple launcher, with other executables it works, it seems not to digest scripts ! in my opinion as said it needs some particular command or parameter !


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #12 on: July 12, 2022, 07:35:53 AM
 I managed to start a script from MainMenu of EasyPeasy, it was simpler than it looked, i came up with a script   ;D
« Last Edit: July 12, 2022, 07:55:33 AM by AMIGASYSTEM »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3755
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #13 on: July 12, 2022, 08:03:35 AM
Made a small video showing the Script created by me and AROS running from the MainMenu of EasyPeasy ;)

https://drive.google.com/file/d/17NFv8WXQ7uSGyTYvXyysoj9A52giKKSd/view?usp=sharing


« Last Edit: July 12, 2022, 09:36:14 AM by AMIGASYSTEM »



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #14 on: July 12, 2022, 09:45:38 AM
why linux is so complicated? with Windows or Amiga/AROS it would have been so easy to do these things :'(
Because you are unfamiliar with Linux  ;)

I'm also not very familiar with it so whenever i want something that isn't obvious i do some research on the forums of the Linux distribution that i use (debian based) and if that does not provide me with a (satisfactory) answer i try to search for it on the basic linux distro on which my linux distribution is based on.

Small steps my dear Watson. Rome wasn't build in a day either  :)

Glad to hear you got your shortcut menu item working and thank you for your illustration video's/pictures