Odd terminal/cmd behaviour with different .desktop files

Questions about Wine on Linux
Locked
reggie-man
Newbie
Newbie
Posts: 1
Joined: Wed Dec 31, 2014 6:44 am

Odd terminal/cmd behaviour with different .desktop files

Post by reggie-man »

In my desktop file entry (.desktop file), if I use the below Exec key, the program runs fine, and a regular terminal emulator window appears alongside if the Terminal key is set to true.

Code: Select all

Exec=sh -c "wine \\$HOME/.wine/drive_c/users/\\$USER/Application\\\\ Data/OpenSpades-0.0.12b-Windows/OpenSpades.exe"
But using this one, if the Terminal key is set to true, a regular terminal window appears, displays three lines, then disappears. If set to false, an odd cli window running through Wine appears (makes me think cmd.exe), shown in the attachment.

Code: Select all

Exec=wine start "%%APPDATA%%\\OpenSpades-0.0.12b-Windows\\OpenSpades.exe"
Terminal=false
The above Exec keys essentially translate to

Code: Select all

wine "C:\\Users\\reggie-man\\Application Data\\OpenSpades-0.0.12b-Windows\\OpenSpades.exe"
and

Code: Select all

wine start "%APPDATA%\\OpenSpades-0.0.12b-Windows\\OpenSpades.exe"
Desktop entries are just extremely fiddly. If these commands are run normally in a terminal, not in a desktop entry, the second command displays the message "fixme:exec:SHELL_execute flags ignored: 0x00000100", but the first one doesn't, so I think this is where the behaviour comes from.

The error isn't caused by %APPDATA% because

Code: Select all

wine start "C:\\Users\\reggie-man\\Application Data\\OpenSpades-0.0.12b-Windows\\OpenSpades.exe"
produces the same message.

I want to use the second command in my desktop entry (or something like it), because it is much simpler and easier to read, and I also just want to know what is causing this odd behaviour.
Attachments
odd wine terminal.jpg
User avatar
olivierfrdierick
Level 5
Level 5
Posts: 258
Joined: Thu Sep 13, 2012 12:09 pm

Re: Odd terminal/cmd behaviour with different .desktop files

Post by olivierfrdierick »

I do believe that if you use "wine start command", wine spawns a new process for "start" and then quits and closes the first "normal" terminal. Then "start" opens its own terminal for output.

I think it spawns a xterm terminal. You can type "xterm" in a terminal to check this.
Locked