How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Questions about Wine on Linux
Locked
ptrtdrv
Level 1
Level 1
Posts: 6
Joined: Sat Mar 25, 2023 2:44 am

How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Post by ptrtdrv »

I have installed the latest wine and winetricks following the instructions on the official winehq wiki: wine install instructions and winetricks install instructions

The I successfully installed Ableton Live 10 following these instructions again on winehq site. I started the application by launching the explorer.exe like this:

Code: Select all

wine64 explorer.exe
and then locating and double clicking the Ableton Live's executable from the explorer's interface. It runs fine, then I pinned the program's icon to the Ubuntu's applications dock and quited the instance. But when I try to start the program by clicking the icon in the dock the program never starts. There is no error message shown.

Also when I click on a file that is expected to get launched with Ableton I get a window with the following error message:
"There is no Windows program configured to open this type of file"
Image

------------------------------------------------------

OS: Ubuntu 22.04.2 LTS Wayland
Wine version: wine-8.0
Winetricks version: 20230212-next
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Post by jkfloris »

Does the program work when you start it directly (without explorer.exe)?

Code: Select all

wine start /unix "/path/to/ableton/directory/ableton.exe"
If it works, then you can create a .desktop file in ~/.local/share/applications/

Code: Select all

[Desktop Entry]
Type=Application
Name=Ableton Live
Comment=Ableton Live
Exec=wine start /unix "/path/to/ableton/directory/ableton.exe"
Icon=wine
Terminal=false
ptrtdrv
Level 1
Level 1
Posts: 6
Joined: Sat Mar 25, 2023 2:44 am

Re: How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Post by ptrtdrv »

No, if I try to start it directly it fails. Please, see the log output below. Note that because I wasn't sure wether "/path/to/ableton/directory/ableton.exe" should be surrounded or not by quotation marks I tried the command both ways.

--------------- with quotation marks ---------------

Code: Select all

wine start /unix "/home/user/.wine/drive_c/ProgramData/Ableton/Live\ 10\ Suite/Program/Ableton\ Live\ 10\ Suite.exe"
says:

Code: Select all

06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:imm:ImeSetActiveContext (0028014E, 1): stub
06d0:fixme:imm:ImmReleaseContext (003100EC, 0028014E): stub
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
06d0:fixme:exec:SHELL_execute flags ignored: 0x00000100
06d0:err:exec:SHELL_ExecuteW cannot set directory L"C:\\ProgramData\\Ableton\\Live\\ 10\\ Suite\\Program\\Ableton\\ Live\\ 10"
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Success.

06c8:fixme:ver:GetCurrentPackageId (000000000021FD70 0000000000000000): stub

After that command a window with an error message "Path not found" pops up several times.

--------------- without quotation marks ---------------

Code: Select all

wine start /unix /home/user/.wine/drive_c/ProgramData/Ableton/Live\ 10\ Suite/Program/Ableton\ Live\ 10\ Suite.exe
says:

Code: Select all

0718:fixme:file:NtFsControlFile FSCTL_GET_REPARSE_POINT semi-stub
0718:fixme:file:NtFsControlFile FSCTL_GET_REPARSE_POINT semi-stub
0058:fixme:mountmgr:harddisk_ioctl returning zero-filled buffer for IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
0718:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
06f0:fixme:ver:GetCurrentPackageId (00000000066EFE10 0000000000000000): stub
0058:fixme:mountmgr:harddisk_ioctl returning zero-filled buffer for IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
0698:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000A90FD70): stub
068c:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000AB0FD70): stub
0694:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000AD0FD70): stub
0790:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000AF0FD70): stub
0794:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000B10FD70): stub
0738:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000B30FD70): stub
073c:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000B50FD70): stub
0740:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000B70FD70): stub
0744:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000B90FD70): stub
0748:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000BB0FD70): stub
074c:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000BD0FD70): stub
0750:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000BF0FD70): stub
0754:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000C10FD70): stub
0758:fixme:avrt:AvSetMmThreadCharacteristicsW (L"Pro Audio",000000000C30FD70): stub

No window shows up. That command does nothing, i.e. no window shows up.
Last edited by ptrtdrv on Sun Mar 26, 2023 12:18 pm, edited 2 times in total.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Post by jkfloris »

I wasn't sure wether "/path/to/ableton/directory/ableton.exe" should be surrounded or not by quotation marks
You can choose between quotation marks or the backslash. i.e.

Code: Select all

wine start /unix "/home/user/.wine/drive_c/ProgramData/Ableton/Live 10 Suite/Program/Ableton Live 10 Suite.exe"
# or
wine start /unix /home/user/.wine/drive_c/ProgramData/Ableton/Live\ 10\ Suite/Program/Ableton\ Live\ 10\ Suite.exe
No window shows up. That command does nothing, i.e. no window shows up.
Does it make any difference if you cd into the Ableton directory?

Code: Select all

cd "/home/user/.wine/drive_c/ProgramData/Ableton/Live 10 Suite/Program/"
wine "Ableton Live 10 Suite.exe"
ptrtdrv
Level 1
Level 1
Posts: 6
Joined: Sat Mar 25, 2023 2:44 am

Re: How to configure Ubuntu to start windows application pinned to the dock and to associate files to that app?

Post by ptrtdrv »

Does it make any difference if you cd into the Ableton directory?
Yes, it does make a difference! It starts successfully!

I went further and had success in launching it again with that one line command

Code: Select all

wine start /d 'C:\ProgramData\Ableton\Live 10 Suite\Program\' 'Ableton Live 10 Suite.exe'
Though I couldn't manage to use that command in may Ubuntu's application launcher file. I used there another command:

Code: Select all

sh -c "cd /home/user/.wine/drive_c/ProgramData/Ableton/Live\ 10\ Suite/Program/ && exec env WINEPREFIX="/home/user/.wine" wine Ableton\ Live\ 10\ Suite.exe"
So I edited the autogenerated by Wine launcher file for Ableton to look like this:

Code: Select all


[Desktop Entry]
Name=Ableton Live 10 Suite
Exec=sh -c "cd /home/user/.wine/drive_c/ProgramData/Ableton/Live\ 10\ Suite/Program/ && exec env WINEPREFIX="/home/user/.wine" wine Ableton\ Live\ 10\ Suite.exe"
Type=Application
StartupNotify=true
Comment=Ableton Live 10 Suite
Icon=0330_Ableton Live 10 Suite.0
Terminal=false

I had to log out and in the Ubuntu user to refresh the changes.

Thanks for your help, @jkfloris. You are awesome!!! :)
Locked