File associations in "Open with.." menu

I have installed MS Office 2010 using Lutris.
I created application menu shortcut. And word 2010 have appeared in “Open with” context menu. However if i try to open a word docx file with Lutris application, the word opens with empty file.
How can I configure arguments of lutris applications to open any file by right-click “open with” menu??

With LibreOffice I really don’t feel the need to use ms office anymore.

But maybe this helps:

Just to clarify; Lutris is meant for videogames. To use Wine with applications, you really should be using something else (my go-to choice is Q4Wine; you can set up Wine versions from Lutris there, it’s easy to manage wineprefixes and executables, and it’s even handy for setting up games manually before making a Lutris shortcut).

As for the reason you can’t open files in your Office install… As I said, Lutris is meant for videogames. The trailing command line arguments (which is how you’d be expected to supply files you want opened to a program: program-name /path/to/file) aren’t passed normally to the game, instead being received by Lutris itself (desktop links produced by Lutris just start Lutris itself passing the game config ID parameter to it), as the arguments that it does receive are statically set up in the Lutris game config. Which is likely how it should be, as no one really would be trying to open their files with a videogame :smiley:

I think it’s a pity to have this limitation. Lutris is a very modern yet powerful wrapper that could be useful for a lot of applications, not only for gaming
did someone find any workaround for this? for instance making a custom script?

…Well as I said, it’s not a “wrapper”, it’s specifically a videogame manager (or “gaming platform”, quoting directly from their index page). If you want functionality that doesn’t belong with videogames, you really should use software that is actually meant to be used this way. Like Q4Wine which I linked to earlier (besides, it’s really easy to operate once you know what you’re doing).

The Lutris CLI API doesn’t appear to support passing arbitrary arguments (as the whole idea is that you shouldn’t need anything extra to run your videogames in the first place). So the “workaround” would be to not use a videogame manager to edit text files.

Hang on, the OP asked for a way to open a file in office via the right click action. He also mentioned that he created a shortcut. I think he should take a look at that. Lutris for the install part, Linux/Wine for opening the file.

Shouldn’t the OP just work with the Desktop file?

On my KDE machine all shortcuts are located here:

$HOME/.local/share/applications/

This is the shortcut for the Wine accociation for GIF images:

[Desktop Entry]
Type=Application
Name=Wine Internet Explorer
MimeType=image/gif;
Exec=env WINEPREFIX="/home/[user-name]/.local/share/lutris/runners/winesteam/prefix64" /home/ubuntu/buildbot/runners/wine/ge-protonified-4.9-nofshack-1.8-x86_64/bin/wine start /ProgIDOpen giffile %f
NoDisplay=true
StartupNotify=true
Icon=7596_iexplore.0

I don’t know what the /home/ubuntu/ path does there as I am on a Fedora system…

Anyhow you can set a specific prefix for office there and target a working wine installation. The %f is for the argument.

Maybe this helps.

Well, they were asking about doing it through Lutris, and this is another variation on how to do that not through it :slight_smile:

While your method does work (just as much as writing a wrapper script for a wine executable does), it’s rather fiddly, so in my experience Q4Wine is more convenient for that purpose (and it produces external desktop files via simple drag’n’drop or even generates them automatically for the menu if that’s enabled in settings).

(And the guy who answered isn’t the OP, the OP hadn’t written to the thread for half a year now.)