Program runs when launched through terminal but not by .desktop file

I am new to fedora. I have compiled and installed gnome-console / kgx / king’s cross.

It works fine when I launch it through gnome-terminal but it does not open when I launch it through gnome app grid.
How could I fix that?

Welcome @arun54321

Try this to use as the command you would use when you create a link:
gnome-terminal --full-screen --window -e /path/to/your/script

Instead of --full screen you can also give the size you like with:
--geometry=112x24+600

gnome-console is a terminal application just like gnome-terminal. I’m not trying to run a script.

But did you give a try?
Just instead of /path/to/your/script you put /path/to/your/app

gtk-launch org.gnome.Console

What happens when you run above command?

1 Like

It is installed as /usr/share/dbus-1/services/org.gnome.zbrown.KingsCross.service

image

It does nothing on gtk-launch org.gnome.zbrown.KingsCross

It works fine when launched through gnome-terminal

But what are the warnings?

you may want to have a look at
/usr/share/applications

and see what the .desktop file is executing

They are just icon pack size warnings.

It’s executing kgx

[Desktop Entry]
# Translators: This is a train station, see README.md for more info
Name[ca]=King's Cross
Name[cs]=King’s Cross
Name[da]=King’s Cross
Name[de]=King’s Cross
Name[en_GB]=King’s Cross
Name[es]=King’s Cross
Name[eu]=King’s Cross
Name[fi]=King’s Cross
Name[fr]=King’s Cross
Name[fur]=King's Cross
Name[hr]=King’s Cross
Name[hu]=A király keresztje
Name[id]=King’s Cross
Name[it]=King's Cross
Name[nl]=King’s Cross
Name[pl]=King’s Cross
Name[pt_BR]=King’s Cross
Name[ro]=Intersecția regelui
Name[sl]=King’s Cross
Name[sr]=Краљевски Крст
Name[sv]=King’s Cross
Name[tr]=King’s Cross
Name[uk]=Кінгс-кросс
Name[zh_CN]=King’s Cross
Name=King’s Cross
Exec=kgx
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.zbrown.KingsCross
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords[ca]=ordre;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;rei;creu;commanda;
Keywords[cs]=příkaz;výzva;cmd;command;prompt;commandline;cli;spustit;spouštění;shell;terminál;kgx;kings cross;
Keywords[da]=kommando;prompt;cmd;kommandolinje;kør;skal;terminal;kgx;kings cross;
Keywords[de]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;befehl;kommando;befehlszeile;kommandozeile;ausführen;
Keywords[en_GB]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;
Keywords[es]=comando;prompt;cmd;línea;ejecutar;shell;terminal;kgx;kings cross;
Keywords[eu]=komandoa;gonbitea;cmd;komando-lerroa;exekutatu;shell-a;terminala;kgx;kings cross;
Keywords[fi]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;pääte;terminaali;komentorivi;
Keywords[fr]=commande;prompt;invite;cmd;commandline;ligne de commande;exécuter;lancer;shell;terminal;kgx;kings cross;
Keywords[fur]=comant:prompt;cmd;rie di comant;shell;terminâl;kgx;kings cross;
Keywords[hr]=naredba;upit;cmd;naredbeni redak;pokreni;ljuska;terminal;kgx;kings cross;
Keywords[hu]=parancs;bekérés;cmd;parancssor;futtatás;parancsértelmező;terminál;kgx;király;keresztje;
Keywords[id]=perintah;prompt;cmd;baris perintah;jalankan;shell;terminal;kgx;kings cross;
Keywords[it]=comando:prompt;cmd;riga di comando;shell;terminale;kgx;kings cross;
Keywords[nl]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;opdrachtregel;opdrachtlijn;commandoregel;commandolijn;
Keywords[pl]=powłoka;shell;prompt;polecenie;komenda;wiersz poleceń;linia poleceń;wiersz komend;linia komend;cmd;konsola;terminal;kgx;kings cross;
Keywords[pt_BR]=comando;command;prompt;cmd;linha de comando;commandline;executar;run;shell;terminal;kgx;kings cross;
Keywords[ro]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;comandă;linie de comandă;intersecția regelui;
Keywords[sl]=ukaz;cmd;ukazna vrstica;zagon;lupina;terminal;kgx;
Keywords[sr]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;команда;наредба;линија;цмд;командлајн;покрени;шел;шкољка;терминал;кгџ;краљев крст;
Keywords[sv]=kommando;prompt;cmd;kommandorad;kör;skal;terminal;kgx;kings cross;
Keywords[tr]=komut;istem;cmd;komut satırı;çalıştır;kabuk;uçbirim;terminal;kgx;kings cross;
Keywords[uk]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;команда;запит;командний рядок;запустити;запуск;оболонка;термінал;кінгс-кросс;
Keywords[zh_CN]=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;命令;提示符;命令行;运行;终端;
Keywords=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;
Terminal=false
Type=Application
Categories=System;TerminalEmulator;X-GNOME-Utilities;GTK;GNOME;
StartupNotify=true
DBusActivatable=true
X-GNOME-UsesNotifications=true
Actions=new-window;new-tab;
# Translators: Do NOT translate or transliterate this text (these are enum types)!
X-Purism-FormFactor=Workstation;Mobile;

[Desktop Action new-window]
Exec=kgx
Name[ca]=Finestra nova
Name[cs]=Nové okno
Name[da]=Nyt vindue
Name[de]=Neues Fenster
Name[en_GB]=New Window
Name[es]=Ventana nueva
Name[fi]=Uusi ikkuna
Name[hr]=Novi prozor
Name[id]=Jendela Baru
Name[nl]=Nieuw venster
Name[pl]=Nowe okno
Name[pt_BR]=Nova janela
Name[ro]=Fereastră nouă
Name[sr]=Нови прозор
Name[sv]=Nytt fönster
Name[tr]=Yeni Pencere
Name[uk]=Нове вікно
Name[zh_CN]=新建窗口
Name=New Window
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=window-new

[Desktop Action new-tab]
Exec=kgx --tab
Name[ca]=Pestanya nova
Name[cs]=Nová karta
Name[da]=Nyt faneblad
Name[de]=Neuer Reiter
Name[el]=Νέα καρτέλα
Name[en_GB]=New Tab
Name[es]=Pestaña nueva
Name[fi]=Uusi välilehti
Name[fr]=Nouvel onglet
Name[fur]=Gnove schede
Name[hr]=Nova kartica
Name[hu]=Új lap
Name[id]=Tab Baru
Name[nl]=Nieuw tabblad
Name[pl]=Nowa karta
Name[pt_BR]=Nova aba
Name[ro]=Filă nouă
Name[sl]=Nov zavihek
Name[sr]=Нови језичак
Name[sv]=Ny flik
Name[tr]=Yeni Sekme
Name[uk]=Нова вкладка
Name[zh_CN]=新建标签页
Name=New Tab
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=tab-new
1 Like

If you put the full path to the kgx binary in the desktop file for the Exec line does it work?

you may want to copy the desktop file to

~/.local/share/applications

Prior to modifying it.

1 Like

Hi, also please check if the kgx binary are correctly located in /usr/bin/kgx. You could check it with type kgx.

1 Like

SOLVED :smile:
Thanks everyone for helping me. I have fixed the issue after removing all files of kgx, recompiling it again and reinstalling the package.

1 Like