Software on linux...

Linux specific forum
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Software on linux...

Post by DK_PETER »

Hi.

I can't believe it but two weeks ago, I created a dual-boot and installed Ubuntu. :shock: :)
Actually I found the experience --- great. I'm slowly getting used to working with Ubuntu and a.s.f..
So it will become a permanent resident on my pc.

Now, I've created a couple of test programs (Filehandling, 3D, sprite and media) and they worked flawlessly on my pc - so I sent the software to my son and
he said he was unable to run any of the software. His answer was that there was nothing to open the software with?
I believe he has installed nothing but the basics for his studies.

My question now is: What is missing to run my software on other computers?
Do I need to take some precautions and run a script to make sure they have some required packages or is there something else to fiddle with?

TIA
Peter
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: Software on linux...

Post by vwidmer »

Peter,
Try adding:

Code: Select all

ImportC "-no-pie" : EndImport
to the top before u compile it.
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
deeproot
Enthusiast
Enthusiast
Posts: 269
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

Re: Software on linux...

Post by deeproot »

The suggestion from vwidmer is good - I always do that.

But also there is a very simple thing to check - after he has copied your program onto his system, get him to check that the file has the executable flag set in the properties (often a tick-box "Allow this file to run as a program").
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Software on linux...

Post by AZJIO »

I'm not sure, but maybe you need to use fakeroot so that the files on another system don't belong to non-existent users. If the file was compiled on an ntfs drive, it is more likely not to run on another OS.
Last edited by AZJIO on Sun Sep 12, 2021 5:41 pm, edited 1 time in total.
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Software on linux...

Post by DK_PETER »

Thanks vwidmer + deeproot.
I did that and resend the filehandling software to my son.

When "running" the file he gets the following message:
Could not Display "filer"
There is no application installed for "executable" files. Do you want search for an application to open this file?
No matter what he is doing it won't run.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Software on linux...

Post by DK_PETER »

AZJIO wrote: Sun Sep 12, 2021 5:38 pm I'm not sure, but maybe you need to use fakeroot so that the files on another system don't belong to non-existent users.
"Fakeroot"? - I'm a complete newbie :D

Edit:
Okay, now I have an idea of what fakeroot does.
Will take a look at it.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
AZJIO
Addict
Addict
Posts: 1298
Joined: Sun May 14, 2017 1:48 am

Re: Software on linux...

Post by AZJIO »

Create a deb package using 2 commands:

Code: Select all

md5deep -r /home/user/Install_deb/NameProg/usr > /home/user/Install_deb/NameProg/DEBIAN/md5sums
fakeroot dpkg-deb --build /home/user/Install_deb/NameProg
before you do this create folders and files:

/DEBIAN/control
/DEBIAN/copyright
/DEBIAN/md5sums
/usr/bin/name-prog
/usr/share/applications/nameprog.desktop

the "control" file must contain information about the package

Code: Select all

Package: NameProg
Version: 1.0
Maintainer: Author <author@gmail.com>
Architecture: amd64
Section: misc
Description: MyDescription.
Depends: findutils, sed, grep
Installed-Size: 400
Priority: optional
Origin: https://...
X-Source: https:/...
"Depends: findutils, sed, grep" - if you use third-party programs, you can install them with the package by specifying the dependency
User avatar
mk-soft
Always Here
Always Here
Posts: 5313
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Software on linux...

Post by mk-soft »

It should be enough to compress the application as TAR.XZ. This way the file attributes should not be lost.

You should also not compile it with the GTK2 subsystem, as GTK2 must first be installed on the target system.
If something is still missing, start the application in the terminal window (./[Application]. This will show you what special libraries might be missing.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
deeproot
Enthusiast
Enthusiast
Posts: 269
Joined: Thu Dec 17, 2009 12:00 pm
Location: Llangadog, Wales, UK
Contact:

Re: Software on linux...

Post by deeproot »

I do not claim to be a Linux expert - far from it! However, this still sounds like a permissions issue to me.
DK_PETER wrote: Sun Sep 12, 2021 5:39 pmWhen "running" the file he gets the following message:
Could not Display "filer"
There is no application installed for "executable" files. Do you want search for an application to open this file?
No matter what he is doing it won't run.
I have seen that kind of message a few times while testing my program on different distros. The program has usually been copied over the network from another machine, and saved with a file manager. Setting "allow to run as a program" in the file manager fixes it.

Note that it's possible for a file to be listed as "executable" in a GUI file manager, but not have executable permission. This can be seen by listing in a terminal - both files below show as executable type in the GUI file manager, but in their properties only the first has the permission (the copy has no "x"):

Code: Select all

geoff@M58-MX:~/plantbase/project/test$ ls -al
total 7312
drwxr-xr-x 2 geoff geoff    4096 Sep 13 11:59  .
drwxr-xr-x 9 geoff geoff    4096 Sep 13 11:58  ..
-rwxr-xr-x 1 geoff geoff 3737176 Aug 19 12:42  plantbase2prog
-rw-r--r-- 1 geoff geoff 3737176 Aug 19 12:42  plantbase2prog_copy
geoff@M58-MX:~/plantbase/project/test$

For actual distribution I use TAR and no problem has ever been reported.
User avatar
DK_PETER
Addict
Addict
Posts: 898
Joined: Sat Feb 19, 2011 10:06 am
Location: Denmark
Contact:

Re: Software on linux...

Post by DK_PETER »

I'll try your suggestions soon.
I've been sending the files uncompressed (un-tar'ed :-)) - That might be the problem.
Thank you for taking your time to point a linux newbie in the right direction. :wink:
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
Marc56us
Addict
Addict
Posts: 1477
Joined: Sat Feb 08, 2014 3:26 pm

Re: Software on linux...

Post by Marc56us »

First of all, follow mk-soft suggestion: :wink:
start the application in the terminal window (./[Application].
This will show you what special libraries might be missing.
and any other error message.

PS. A tar archive is not a compressed file by default.
See https://en.wikipedia.org/wiki/Tar_(computing)
The main quality is to keep the attributes of the file(s) and to store them without spaces.

:arrow: Under Unix, it is also necessary to know the notion of rights (rxw) for owner, group and guest. Don't type chmod 777 everywhere as the newbies do, it's the best way to make a system vulnerable.

do

Code: Select all

chmod ug+x filer
(if filer is your name fime)
do

Code: Select all

file filer
to know what type of file is 'filer'
Post Reply