Launch the code with GUI

Hi, do i always have to run detectnet, my-detection or etc. from terminal? or other things

Can we launch via GUI
i mean just double-click to program and do it what we want.

Double-click and opening chromium, calculator or office program.

For example double-click and opening camera-capture or detection and etc and other features in the program that we write

Sounds like you just need a desktop icon. There are a number of articles on this on the web, and these will all apply to the Jetson GUI as well (there won’t be any dependency upon the actual hardware used). Examples which would be useful:

Note that there are usually ways for different window managers to have your applications added to the regular launch menus as well, and that anything in a launch menu can usually use drag and drop to place an icon on the desktop (or right click if not drag n drop).

No, not shortcut
For example the program im writing with python should work just double click

For example i write a code about facedetect.py with opencv and haarcascade and just wanna run it not via terminal (python3 facedetect.py) just click and see whats goin on

Like .deb file or .exe on windows

So you are saying you have a terminal without the GUI?

When you double click on a file name in Windows you are double clicking on the file manager application. The file itself does not interpret, nor know anything about double click. Similarly, a Mac has a file manager application which can browse files in the GUI. In Ubuntu 18.04 the equivalent is the application “nautilus”.

If you run nautilus (either manually, through the menu, or with it auto starting upon GUI login), and browse to any executable file, then double clicking on the file name should do what you want (provided the file can run). The file name itself has no meaning towards whether or not this will execute in Linux, whereas in Windows you’d give it a file name with a “.exe” extension. Files themselves are given executable permission, and if the file is capable of executing, then double clicking in that file browser should do the job.

Incidentally, the program used for browsing files changes depending on your particular window manager. For example, in KDE it is dolphin. If you happen to have both KDE and Gnome window managers installed, then typically you could double click on a file name in either one and it would work regardless of whether you were currently running KDE or Gnome.

I think I could not explain. Sorry for my english
I just want to run for example detectnet.py /dev/video1 not via terminal just click and run like a vscode program

Want to create an interface with
Tkinter PyQt5 or etc. And just double click and object detection

I’ll take another guess. If you have a file name and can execute it on command line, then it would imply that the file has executable permission. If you know the content of the file is executable, e.g., because it is a Python script or Bash script, but it won’t execute, then you’d give it execute permission (execute permission allows the attempt to execute, but won’t make nonsense actually execute). To see the permissions of a given file:
ls -l /where/ever/that/file/is

An example:

# which ls
/bin/ls
# ls -l /bin/ls
-rwxr-xr-x 1 root root 125520 Jan 18  2018 /bin/ls*

In the above the permissions are:
-rwxr-xr-x

This is basically shorthand for 3 attributes if you are the file owner, the same 3 attributes for people in that group, and finally, the same 3 attributes for “other” people. In that example, the owner has read ("r"), write ("w") and execute ("x") permissions. If you are not the owner, but in the same group as the owner, then there would only be read and execute permissions, and write would be prohibited. Same for people who are not the owner and also not in the same group as the owner. The part you are interested in is execute, or “x”.

The command for modifying permissions of a file you own is chmod. There are many ways to use chmod. If this is what you are needing to know, then can you tell me what “ls -l ...” shows when using it on your file?

Sorry for my english its so long and i cant understand clearly.

Just i want to detect object and open it with click not write a text to terminal.

subject went elsewhere

Sorry again

What are you clicking on? The application which sees the file has much to do with this. A command line terminal does not have any such ability, not even on a Mac nor in Windows. In Windows the application which lists the file is “Windows Explorer”. Not sure what it is on a Mac, but a simple command line text terminal on a Mac also cannot do this with a double click. It is very important to know what it is you are using which sees that file name before an exact answer can be given. If you do not have any sort of file browser application running, then you cannot do this without writing your own custom replacement to the command line text terminal.

When i want to detect an object im writing to terminal that @dusty_nv wrote “jetson inference”

./detectnet /dev/video1

Instead of this
İs there a solution with Tkinter and make it a program

I guess
I cant explain myself, or i dont understand.

the subject is very confused.

I report this topic i hope they remove

What I’ve done in the past, is make a bash script (with executable privileges), which then invokes the command line that you want to run. You can double-click it and it will give you the option to run it. You won’t typically see the terminal output, but you could setup logging in your bash script. You can also customize the command line arguments that you want run here.

These “launcher scripts” are essentially similar to the shortcut / desktop icon that Linuxdev mentioned, in fact it could be one in the same. I typically put my launcher scripts on the desktop for easy access, but you could store them wherever you wish.

Perhaps this is what you are looking for?

Yes this is really what i want to

I found this
https://gist.github.com/nathakits/7efb09812902b533999bda6793c5e872 earlier.

I asked here may be there is another solution to make it.
I want to open detect.py like click a calculator or etc.

Thanks i took @linuxdev time he wants to solve my problem but im writin on phone and my english is not enough and @linuxdev writes so long.