Page 1 of 1

Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:02 pm
by FX-Tech
Hi Guys,

This morning when I came into work and fired up the machine, all seemed normal until I tried to launch some applications from the desktop. When I click on a program launcher on the desktop, I get an error message. Here's a screenshot of the error:
Program Launch Bug.jpg
Anyone else seeing this? I know there were a bunch of updates late in the day yesterday.

Thanks ,
Trevor

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:06 pm
by dolphin_oracle
click "mark executable" and it should be OK after that. Xfce 4.18 introduced an additional security check where it compares a checksum against the desktop file. if the checksum is not present or doesn't match, you get that popup.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:09 pm
by FX-Tech
That does not do the trick. Sorry I forgot to mention that I had tried that.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:10 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 12:02 pm Hi Guys,

This morning when I came into work and fired up the machine, all seemed normal until I tried to launch some applications from the desktop. When I click on a program launcher on the desktop, I get an error message. Here's a screenshot of the error:
Dont's see that as an Error . It a new addtional "security measure about trusted application launcher brought to you by new upgraded version of Xfce.
Just click on "Mark executable" to make it trusted.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:12 pm
by FX-Tech
BTW, the program that is giving me the problem is run under wine. The launcher works from the menu under wine folder, but not from the desktop. I've also tried deleting it and re adding it from the main menu (right click - add to desktop) and that doesn't work either.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:13 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 12:09 pm That does not do the trick. Sorry I forgot to mention that I had tried that.
Hmm this was mentioned by someone else... maybe permission issue with the home folder.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:13 pm
by FX-Tech
Can we turn off the "New Feature"?

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:15 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 12:12 pm BTW, the program that is giving me the problem is run under wine. The launcher works from the menu under wine folder, but not from the desktop. I've also tried deleting it and re adding it from the main menu (right click - add to desktop) and that doesn't work either.
Are you saying it's only one launcher that won't work and for all others let you mark as trusted work.
Perhaps show details like this,
open terminal on desktop and run:

Code: Select all

ls -al  

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:25 pm
by FX-Tech
Here's the launcher that isn't working:
-rwxr-xr-x 1 trevorj domain users 283 Feb 17 2022 'IntelEvent Express.desktop'

The KiCAD launcher is working after clicking mark as execute.
-rwxr-xr-x 1 trevorj domain users 583 Aug 19 08:04 kicad.desktop

The permissions look identical

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 12:57 pm
by FX-Tech
The only thing different about this launcher that I know of, is that it is a windows program run under wine. It's worked flawlessly this way all through MX-19 and MX-21 so far until now. This machine is a member of a windows domain - but I don't see that being the issue as the other programs, like KiCAD do launch ok. Thanks for your help. Hope it's not a wide spread issue!

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:01 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 12:25 pm Here's the launcher that isn't working:
-rwxr-xr-x 1 trevorj domain users 283 Feb 17 2022 'IntelEvent Express.desktop'

The KiCAD launcher is working after clicking mark as execute.
-rwxr-xr-x 1 trevorj domain users 583 Aug 19 08:04 kicad.desktop

The permissions look identical
Hmm, can you post the output of this command.
Open terminal on Desktop:

Code: Select all

gio info 'IntelEvent Express.desktop'
and also the working one:

Code: Select all

gio info kicad.desktop
But please - for better readability - wrap the text output between those [code]brackets[/code] ( use the [</>] icon above the post editor)
thanks

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:25 pm
by FX-Tech
Sorry for not using the CODE segment Felix. I figured it was OK since it was just 2 lines. I'll use it in the future. Here's the output. It's got me scratching my head. BTW when I deleted the launcher that wouldn't work and added it back from the main menu, it wouldn't even give me the launch security message when clicked. I was thinking this was because the checksum for that launcher is already calculated and that when I replaced the launcher thinking the launcher had become corrupt, replacing the launcer just put an identical file on the desktop and the checksum would have been the same.

Code: Select all

$ gio info 'IntelEvent Express.desktop'
display name: IntelEvent Express.desktop
edit name: IntelEvent Express.desktop
name: IntelEvent Express.desktop
type: regular
size:  283
uri: file:///home/BPLSV/trevorj/Desktop/IntelEvent%20Express.desktop
local path: /home/BPLSV/trevorj/Desktop/IntelEvent Express.desktop
unix mount: /dev/sdb1 / ext4 rw,noatime,discard
attributes:
  standard::type: 1
  standard::name: IntelEvent Express.desktop
  standard::display-name: IntelEvent Express.desktop
  standard::edit-name: IntelEvent Express.desktop
  standard::copy-name: IntelEvent Express.desktop
  standard::icon: application-x-desktop, text-x-generic, application-x-desktop-symbolic, text-x-generic-symbolic
  standard::content-type: application/x-desktop
  standard::fast-content-type: application/x-desktop
  standard::size: 283
  standard::allocated-size: 4096
  standard::symbolic-icon: application-x-desktop-symbolic, text-x-generic-symbolic, application-x-desktop, text-x-generic
  etag::value: 1645134486:0
  id::file: l2065:21762652
  id::filesystem: l2065
  access::can-read: TRUE
  access::can-write: TRUE
  access::can-execute: TRUE
  access::can-delete: TRUE
  access::can-trash: TRUE
  access::can-rename: TRUE
  time::modified: 1645134486
  time::modified-usec: 0
  time::access: 1674151433
  time::access-usec: 743137
  time::changed: 1674151433
  time::changed-usec: 743137
  time::created: 1674151433
  time::created-usec: 743137
  unix::device: 2065
  unix::inode: 21762652
  unix::mode: 33261
  unix::nlink: 1
  unix::uid: 10000
  unix::gid: 10006
  unix::rdev: 0
  unix::block-size: 4096
  unix::blocks: 8
  owner::user: trevorj
  owner::user-real: Trevor Jacobs
  owner::group: domain users
  metadata::xfce-exe-checksum: 73daeaf99736d1855d6afa788c0cf931828d8e7dcb817c6566834131ea64a658

Code: Select all

$ gio info kicad.desktop
display name: kicad.desktop
edit name: kicad.desktop
name: kicad.desktop
type: regular
size:  583
uri: file:///home/BPLSV/trevorj/Desktop/kicad.desktop
local path: /home/BPLSV/trevorj/Desktop/kicad.desktop
unix mount: /dev/sdb1 / ext4 rw,noatime,discard
attributes:
  standard::type: 1
  standard::name: kicad.desktop
  standard::display-name: kicad.desktop
  standard::edit-name: kicad.desktop
  standard::copy-name: kicad.desktop
  standard::icon: application-x-desktop, text-x-generic, application-x-desktop-symbolic, text-x-generic-symbolic
  standard::content-type: application/x-desktop
  standard::fast-content-type: application/x-desktop
  standard::size: 583
  standard::allocated-size: 4096
  standard::symbolic-icon: application-x-desktop-symbolic, text-x-generic-symbolic, application-x-desktop, text-x-generic
  etag::value: 1660914290:0
  id::file: l2065:21765927
  id::filesystem: l2065
  access::can-read: TRUE
  access::can-write: TRUE
  access::can-execute: TRUE
  access::can-delete: TRUE
  access::can-trash: TRUE
  access::can-rename: TRUE
  time::modified: 1660914290
  time::modified-usec: 0
  time::access: 1668036652
  time::access-usec: 12474
  time::changed: 1668036652
  time::changed-usec: 12474
  time::created: 1668036652
  time::created-usec: 12474
  unix::device: 2065
  unix::inode: 21765927
  unix::mode: 33261
  unix::nlink: 1
  unix::uid: 10000
  unix::gid: 10006
  unix::rdev: 0
  unix::block-size: 4096
  unix::blocks: 8
  owner::user: trevorj
  owner::user-real: Trevor Jacobs
  owner::group: domain users
  metadata::xfce-exe-checksum: b771e444654a2b77e0caa1a8a7502fb3193e31fd2a8003cda6eaf4034da86cfa
  

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:28 pm
by dolphin_oracle
space in the file name. I wonder if xfdesktop has a weakness in that area, although the other user that reported something similar did not have spaces in their filenames.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:34 pm
by dolphin_oracle
hmmm, if the desktop files on the desktop are actually symlinks, the trust system will fail.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:49 pm
by FX-Tech
Here is the command in the launcher that is on the Desktop:

Code: Select all

env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\Programs\\\\IntelEvent\\ Express.lnk
That's the same command as the launcher in the main menu under the wine folder. To put it on the Desktop I just did a right click ans selected "Add to Desktop".

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 1:50 pm
by FX-Tech
BTW, That is the launcher that wine created when I installed the program.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 2:42 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 1:25 pm

Code: Select all

$ gio info 'IntelEvent Express.desktop'
name: IntelEvent Express.desktop
uri: file:///home/BPLSV/trevorj/Desktop/IntelEvent%20Express.desktop
local path: /home/BPLSV/trevorj/Desktop/IntelEvent Express.desktop
attributes:
  standard::name: IntelEvent Express.desktop
...
  owner::user: trevorj
  owner::group: domain users
  metadata::xfce-exe-checksum: 73daeaf99736d1855d6afa788c0cf931828d8e7dcb817c6566834131ea64a658
So, are you saying, you still got the popup-warning to make the launcher executable?
That would be indeed unusual, b/c the checksum ( used for the trust-check is already generated).
Or, are you saying, after making the launcher executable ( and trusted) the launcher won't start the wine-program?

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 4:31 pm
by FX-Tech
Hi Fehlix,

Click on the icon and nothing happens, no security warning pop up, no program execution, nothing. You can delete the launcher from the desktop, go to the wine folder in the main menu and right click on the launcher and select "Add to Desktop" to put a fresh copy on the Desktop and nothing still happens. It will not launch. Maybe a bug in the new security ? So was there a huge security issue that this new feature was addressing? Have personally never had any problem running programs from the Desktop. One of these days linux will be so secure that nobody can use it... ;-)

Cheers,
Trevor

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 4:51 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 4:31 pm Hi Fehlix,

Click on the icon and nothing happens, no security warning pop up, no program execution, nothing. You can delete the launcher from the desktop, go to the wine folder in the main menu and right click on the launcher and select "Add to Desktop" to put a fresh copy on the Desktop and nothing still happens. It will not launch. Maybe a bug in the new security ? So was there a huge security issue that this new feature was addressing? Have personally never had any problem running programs from the Desktop. One of these days linux will be so secure that nobody can use it... ;-)

Cheers,
Trevor
So far I cannot re-produce the issue. Maybe completely different not the the trusted launcher, b/c it starts
but wont run wine. Make sure wine is not hanging and stop to start, e.g. logout or reboot.
Also you have a fairly unusual primary user group with a space within the group name "domain user". I tried to create a group with a space in the group-name but it won't allow me to. In addtion having not your home-directory under /home but within the sub-directory, may add further unusual setup, which triggers some other show stopper.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 5:00 pm
by dolphin_oracle
I’ve been trying to duplicate with wine apps as well but without success.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 5:57 pm
by FX-Tech
Hey Guys,

So, this machine is a member of a Windows AD Domain. That's a normal home folder location for a user on a domain. There is usually a folder under home indicating the name of the domain and that users in that folder are members of the domain. The same launcher works from the side bar AND the main wine menu. Wine is not hanging.

You probably can't reproduce the issue if it is an issue with being a member of a domain. It's only not working if the launcher is on the desktop. Probably not a lot of MX users are using machines that are members of a domain. Is there any way to turn off this new "Feature"?

Thanks,
Trevor

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:10 pm
by FX-Tech
Thought I'd change the launcher to open in a terminal to see if there was any useful output:
Terminal View.jpg

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:15 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 1:49 pm Here is the command in the launcher that is on the Desktop:

Code: Select all

env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine C:\\\\ProgramData\\\\Microsoft\\\\Windows\\\\Start\\ Menu\\\\Programs\\\\IntelEvent\\ Express.lnk
That's the same command as the launcher in the main menu under the wine folder. To put it on the Desktop I just did a right click ans selected "Add to Desktop".
Would this wine command shown in the launcher run within terminal opened within the desktop directory:
Here with replaced double backslash "\\" by singel backslash "\"

Code: Select all

env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine C:\\ProgramData\\Microsoft\\Windows\\Start\ Menu\\Programs\\IntelEvent\ Express.lnk

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:24 pm
by FX-Tech
Hi Fehlix,

Yes, I saw that too, but this launch command was generated directly by wine when the program was installed and has worked flawlessly for several years, until now. I did try changing the line and it made no difference. Thanks.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:25 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 6:24 pm Hi Fehlix,

Yes, I saw that too, but this launch command was generated directly by wine when the program was installed and has worked flawlessly for several years, until now. I did try changing the line and it made no difference. Thanks.
That was meant as a question whether the env -line runs or not, from terminal opened in Desktop directory?

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:39 pm
by FX-Tech
Just realized I attached the wrong screen shot of the terminal. The previous one is when I had modified the command line to remove spaces. This is what the terminal output looks like with the command line that wine generated and has always worked:
terminal output.jpg

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:47 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 6:39 pm Just realized I attached the wrong screen shot of the terminal. The previous one is when I had modified the command line to remove spaces. This is what the terminal output looks like with the command line that wine generated and has always worked:
terminal output.jpg
I hate terminal text posted as screenshot images!
OK, can you run the same command I posted from Terminal
but this time change first directory to $HOME:
Open Terminal:

Code: Select all

cd $HOME
env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine C:\\ProgramData\\Microsoft\\Windows\\Start\ Menu\\Programs\\IntelEvent\ Express.lnk

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 6:56 pm
by fehlix
OK, seems I can reproduce, something with the quotings within the launcher on the desktop:

This type Exec line of launcher worked for me from with the launcher but als from the terminal CLI :

Code: Select all

Exec=env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine "C:/ProgramData/Microsoft/Windows/Start Menu/Programs/IntelEvent Express.lnk"
So right click on the Launcher on the Desktop and replace the command with

Code: Select all

env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine "C:/ProgramData/Microsoft/Windows/Start Menu/Programs/IntelEvent Express.lnk"
or alternatively open in Text editor and replace the Exec= line
+++EDIT+++
Opps corrected ... again: mainly repalce all "\\" with "/" and "\ " with just " ",
and put all int double quotes

++EDIT 2 +++
Here the way to reproduce the issue:
I've installed within wine, Total Commander,
which created this Launcher on the Desktop:

Code: Select all

[Desktop Entry]
Name=Total Commander
Exec=env WINEPREFIX="/home/demo/.wine" wine C:\\\\Program\\ Files\\\\totalcmd\\\\totalcmd.exe 
Type=Application
StartupNotify=false
Comment=C:\\Program Files Totalcmd
Icon=B838_totalcmd.0
StartupWMClass=totalcmd.exe
Path=
Terminal=false
and gave the same error of not starting:
now I replaced the Exec line with

Code: Select all

Exec=env WINEPREFIX="/home/demo/.wine" wine "C:/Program Files/totalcmd/totalcmd.exe"
so the Desktop-launcher looks like this:

Code: Select all

[Desktop Entry]
Name=Total Commander
Exec=env WINEPREFIX="/home/demo/.wine" wine "C:/Program Files/totalcmd/totalcmd.exe"
Type=Application
StartupNotify=false
Comment=C:\\Program Files Totalcmd
Icon=B838_totalcmd.0
StartupWMClass=totalcmd.exe
Path=
Terminal=false
which worked, /after marke as trusted.
So the whole issue seems related to the handling of those quadro "\\\\" backslashes with the Desktop launcher, created by wine-installer, which appears to be now an issue within Xfce 4.18. ... Ufff.. :turtle:

+++ EDIT 3 +++
Or alternatively:
* Replace all "\\\\"-quadro backslashes with one "/"-forward slash.
* Replace "\\ " double-backslash+ space with "\ " one backslash and space

Or this one liner running with terminal in the Desktop directory, which would fix all wine launchers on the Desktop in one go:

Code: Select all

perl -i -pe 's/\\{4}/\//g; s/\\{2} /\\ /g;'  *.desktop
:happybday:

+++ EDIT 4 +++
This is the "final" solution use only forward-slashes and quotes . Replace all "\\\\"-quadro back-slashes with a single "/" forward-slash
and replace all "\\ " double-slash + space with a double-quoted space " ":
As one liner:

Code: Select all

perl -pe 's/\\{4}/\//g;s/\\{2} /" "/g;' *.desktop
This makes sure, any future Xfce-fix of desktop launcher, which may properly handle "\\\\" and "\\ " bask-slashes, by using only a "forward"-slashes and quote spaces.

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 7:31 pm
by FX-Tech
Hey Fehlix,

Thought I posted a reply a few minutes ago, but I must have not. Anyway, I solved it by making a new launcher and using this command line:

Code: Select all

env WINEPREFIX="/home/BPLSV/trevorj/.wine" wine C:\\ProgramData\\Microsoft\\Windows\\Start\ Menu\\Programs\\IntelEvent\ Express.lnk
It works in a newly created launcher. It seems that wine uses a single "\" to indicate a space and "\\" to indicate a folder branch. Not sure why there were 3 of them in places, but obviously there is an issue with the new security and wine. Maybe the new launcher automatically marks it as trusted? Just guessing here as I have no idea how the new security feature works.

Thanks for your help guys!
Cheers,
Trevor

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 7:47 pm
by fehlix
FX-Tech wrote: Thu Jan 19, 2023 7:31 pm Not sure why there were 3 of them in places, but obviously there is an issue with the new security and wine.
Nope, that's a strong indication of a regression ( a bug), nothing todo with security. The old quador- "\\\\" backslashes
where needed, b/c desktop files when "started" would first replace "\\\\" with "\\".
Next step would be to pass this argument to wine, which would then replace "\\" with "\"
As it works from the menu, that#s an clear indication the new Desktop-launcher handling introduced
this issue. Not an issue with the new trusted feature, but an regression withn the new code for handling launchers.
So suggest, to use my adjusted fix "with "forward slashes, b/c they may fix the issue,
to work properly with quadro- "\\\\" backslashes again, which would than make you "\\"-double backslash solution not work. (see "EDIT 4" with my last post above...)

Re: Program Launchers on desktop not working after updates

Posted: Thu Jan 19, 2023 11:46 pm
by wdscharff
I have never had a launcher created by Wine because I use Windows programs that are called "portable". This has the advantage that you don't have to install them when moving or reinstalling, but a copy from the backup is sufficient.
I wrote my first launcher in 2014 under opensuse, since then I have only edited it when a new version of the programme came out.
My exec line looks different.

Code: Select all

[Desktop Entry]
Version=1.0
Type=Application
Name=JPG-Illuminator V54
Comment=JPG-Illuminator
Categories=Graphics;windows;
Exec=wine start /Unix "/home/winnI/winetc/JPG-Illuminator-54/jpgIlluminator.exe"
Icon=/home/winnI/winetc/wineapps/ji.png
Path=/home/winnI/winetc/JPG-Illuminator-54
Terminal=false
StartupNotify=true
GenericName=JPG-Illuminator
Name[de_DE.utf8]=jpg-illuminator V54

It worked like that on opensuse 12-42, all mint and ubuntus between 2014-2016 and since 2018 on MX.
I have about a dozen starters of this type, so that they appear in the fluxbox menu (formerly xfce menu) as executables, the *desktop files are all under /home/username/.local/share/applications .

This is also where the desktop files of appimages belong, if you use a program like the Appimage Launcher, it does the work for you :)