Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
3rd July 2023, 02:24 | #1 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Linux, Wine and shortcuts
Any Linux experts out there?
I'm new to Linux but I've been experimenting with Wine and finally had a reasonable amount of success running the Windows programs I'd like to keep using for the moment. Creating start menu shortcuts was a challenge initially, but I seem to have it sorted now with one exception. The desktop files I've created don't work when added to the file manager's sendto folder because the file path looks like a command to most programs. The same applies to using the "open with" menu. Here's a typical desktop file (created manually): Code:
[Desktop Entry] Name=MPC-HC Comment= Type=Application Categories=AudioVideo;Player; Icon=/home/Me/.local/share/icons/MPC-HC.png Exec=env WINEPREFIX="/home/Me/.local/share/wineprefixes/Win64" wine "/home/Me/.local/share/wineprefixes/Win64/drive_c/Program Files/MPC-HC/mpc-hc64.exe" %f Code:
Unrecognised switch(es) found in command line string: C:\Program Files\MPC-HC\mpc-hc64.exe /media/NVME1/video.mkv Code:
C:\Program Files\MPC-HC\mpc-hc64.exe M:\NVME1\video.mkv PS Desktop files created by PlayOnLinux work fine as sendto items, but PlayOnLinux is obviously taking care of the translation. The desktop file it created for MPC-HC (I've modified it a little) looks like this: Code:
[Desktop Entry] Encoding=UTF-8 Name=MPC-HC Comment=PlayOnLinux Type=Application Exec=/usr/share/playonlinux/playonlinux --run "MPC-HC" %F Icon=/home/Me/.PlayOnLinux//icones/full_size/MPC-HC StartupWMClass=mpc-hc64.exe Categories=AudioVideo;Player; Last edited by hello_hello; 3rd July 2023 at 02:32. |
6th July 2023, 11:19 | #2 | Link |
random user
Join Date: May 2014
Location: #Neuland
Posts: 116
|
I had the same problem recently and found a solution in a forum:
The 'winepath' tool can be used to convert path names between windows and unix format. Try this: Code:
Exec=env sh -c "winepath -w -0 %F | WINEPREFIX='/home/Me/.local/share/wineprefixes/Win64' xargs -0 wine '/home/Me/.local/share/wineprefixes/Win64/drive_c/Program Files/MPC-HC/mpc-hc64.exe'"
__________________
BeHappy Audio Transcoder > <Doom9 forum> <Gleitz forum> <GitHub> MP4.tool GUI for MP4Box & L-SMASH muxer > https://www.mediafire.com/folder/3i6y6cbkyhblm/MP4.tool |
7th July 2023, 01:22 | #3 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Perfect! Thank you.
I'd done a fair bit of searching and assumed for it to work correctly 'winepath' would need to be involved, but I couldn't work out how to implement it in a shortcut. I don't know why the WineHQ site doesn't provide instructions for creating shortcuts this way. Cheers. |
7th July 2023, 06:34 | #4 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
I thought I'd add the following in case it helps someone. There was one program that wouldn't behave itself when using the method above (AvsPmod), but adding the following in red fixed it. Why it wouldn't work in the first place and why the following does, I'm not sure yet, but adding the red text for shortcuts that were already working as sendto items didn't seem to have an adverse effect on them.
Code:
Exec=env sh -c "winepath -w -0 %F | WINEPREFIX='/home/Me/.local/share/wineprefixes/Win64' xargs -0 wine start /Unix '/home/Me/.local/share/wineprefixes/Win64/drive_c/Program Files/AvsPmod/AvsPmod.exe'" Last edited by hello_hello; 7th July 2023 at 11:12. |
7th July 2023, 11:08 | #6 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
No Microsoft. I've been replacing Windows programs with native Linux alternatives where I can, but there's some programs I'm used to and don't want to give up (yet), or I haven't found a Linux alternative I like. Last edited by hello_hello; 7th July 2023 at 11:19. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|