6

What is wrong with my .desktop file ???

I wrote a simple c++ program for learning purposes and all is fine with this. I compiled with g++ and got a .out file (thought the .out may be relevant).

So I thought why not make a launcher for it, this is it menu.desktop

[Desktop Entry]
Type=Game
Exec=/home/mark/Documents/cpp/Game_menu_project/menu.out
Terminal=true
Name=Menu

At first it had a lot of options but after many errors this if what remains.

If I click it

There was an error launching the application

In a terminal

menu.desktop: line 1: [Desktop: command not found

I know the exec command is right because if I make a simple bash script

#!/bin/bash  
/home/mark/Documents/cpp/Game_menu_project/menu.out

It runs fine, so I changed the exec to run the menu.sh, same errors.

Other .desktops are running fine, I use one at boot to set up the display, works fine if I click it, whats going on ?

I have seen this question and the one it is marked duplicate of, but believe my issue is diffrent as I don't want to run the .desktop in a terminal, I want my menu.out to open in a new terminal ( Thats what Terminal=true should do right ?.

0

1 Answer 1

6

The line

Type=Game

is invalid. Replace it with

Type=Application

This should fix the error when clicking it.

You can't run a .desktop file from the shell.

1
  • Yes that work, I can't believe it, I was just blind to it after working on it for hours, Thanks.
    – Mark Kirby
    Jun 22, 2015 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .