You are not logged in.
Pages: 1
Dear friends,
I am trying to start a program with a self created desktop file.
When I start it, it will show this error:
execvp: Exec format error#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=XXX
Comment=XXX
Exec=XXX
Icon=/opt/XXX/XXX.png
Terminal=false
StartupNotify=false
Categories=Application;Game;If I start the program with the sytax (XXX) behing the
Exec=XXXit will start without any errors from the konsole as user or as root.
Setting the setting
Terminal=truewill give an error too:
Warning: Could not start program '/usr/bin/XXX' with arguments '/usr/bin/XXX'.
Warning: execve: Exec format errorAny clue to solve this problem?
I use desktop files with other programs, never with any problems.
But why it works with the konsole?
Last edited by alocacoc (2020-05-09 12:17:01)
Offline
Is this thing really that top secret that you can't show this uncensored? What are you executing exactly? Does it have the executable bit set? How are you executing it from the terminal?
If you can't answer this with the other three questions yourself, post what exactly you are trying to do without hiding information.
Last edited by V1del (2020-05-09 09:39:05)
Offline
Thank you for your answer.
As you can see from all my previous posts, I never hide any information about myself. But I only follow forum rules, so here it cannot be helped.
The file in /usr/bin is set to 775, the executable in opt/ is also set to 775. The icon file is set to 664. That should be fine.
I'm executing it from the terminal with just typing the 4 digit command. Exactly the same command that is behind Exec=
Background information: I installed the program from a *.deb packet.
I used the program debtap.
debtap *.deb
sudo pacman -U *.pkg.tar.zst
It all went fluently, I can start the program, it works 100% from the command line, but it don't execute from the desktop file.
Offline
There's your problem. You'll need to specify the absolute path to the executable. The executable in the desktop entry will not be searched for in your PATH.
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
But I only follow forum rules, so here it cannot be helped
Which of the rules in https://wiki.archlinux.org/index.php/Code_of_conduct does block you from giving the info V1del mentioned ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Found the problem.
The problem was, that the usr/bin/XXX executable was a script with an error.
This script checks if a config directory in home exists. If not, it will create it, if yes, it will proceed.
After that it changes to that config directory to put save files inside there.
Then it will execute the file in /opt/XXX/XXX.
When trying to start the /usr/bin/XXX file from "open with" with konsole, it fails, but with xterm it worked, but it didn't change to the config directory before it executed the /opt/XXX/XXX, so it saved into the /opt/XXX/ directory, which is not nice.
So I checked the slightly complex script and the important line to change was:
# /bin/SHinto
#!/bin/shThank you for your help.
PS: To answer Lone_Wolfs question, it collides with 2.2.1, prohibited use of copyrighted/patented material. In this case it contains use of copyrighted image and audio sample material.
Last edited by alocacoc (2020-05-09 12:23:00)
Offline
There's your problem. You'll need to specify the absolute path to the executable. The executable in the desktop entry will not be searched for in your PATH.
Since when???
I suggest you look in /usr/share/applications/*.desktop, the vast majority specify executables without paths, and those which have paths are invariably located in some weirdo obscure location instead of /usr/bin.
PS: To answer Lone_Wolfs question, it collides with 2.2.1, prohibited use of copyrighted/patented material. In this case it contains use of copyrighted image and audio sample material.
I don't believe the .desktop file would qualify as copyrighted material, it only contains the *names* of the copyrighted image/etc. files, the description of the program, etc. It's perfectly fine to name a copyrighted material and give a short, one-line description of what it is/does.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Pages: 1