Portál AbcLinuxu, 6. května 2025 14:28
Exec=python3 ~/.local/ ... atd. ... /litigation/centrala.py Path=~/.local/ ... atd. ... /litigationPokud se pokusim skript primo spustit z domovskeho adresare, nespusti se. Pokud se presunu do adresare k tomu skriptu (.local/ atd.) odtud ho spustim a cely projekt funguje. Krome toho se mi povedlo skript spustit z domovskeho adresare ale to skoncilo hlasenim ze nenasel dalsi moduly pro import. Asi nejaky problem s current working directory. S puvodnim projektem (tam kde si skripty pisu) to funguje tak ze jsem si vytvoril na plose zastupce, do nej napsal 'python3 /cesta_ke_skriptu/skript.py' a tim se to spousti. Takze tou instalaci se veci meni nebo je neco ne uplne koser v tom projektu, ze?
Řešení dotazu:
The Exec key must contain a command line. A command line consists of an executable program optionally followed by one or more arguments. The executable program can either be specified with its full path or with the name of the executable only. If no full path is provided the executable is looked up in the $PATH environment variable used by the desktop environment. The name or path of the executable program may not contain the equal sign ("="). Arguments are separated by a space.O nějaké expanzi ~/ se nic nepíše, buď absolutní cesta, nebo jméno které je v $PATH. Teoreticky by šla napsat šablona toho .desktop souboru která by se "nějak vyplnila" správně při instalaci skrze pip3.
Exec=mujskript
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.