Pages

Tuesday, May 22, 2012

Wine Virtual Desktop from the Command Line

Some programs, when run with Wine under Linux, are next to useless when run without Virtual Desktop emulated by Wine. This usually happens when programs have dialog boxes, like Open File, displayed beside the main program window. In such a case, turning on the Virtual Desktop option in Wine solves these issues and the dialog boxes are displayed properly. 

Unfortunately, there is no option to instruct Wine to use Virtual Desktop when run from the command line. There was (is?) an option for older versions of Wine, using "wine explore /desktop=default,1280x1024 <program.exe>" but this does not seem to work when run under Wine 1.5.3 that I have.

The good news is that there is a workaround available. You can use q4wine. Create a shortcut in there, setting all the properties as desired. There you can specify which Wine prefix to use and whether to use Virtual Desktop or not. Then, you can right-click the created shortcut, select Copy to Clipboard -> q4wine-cli cmd, and it will copy something like

/usr/bin/q4wine-cli  -p "Quicken" -i "Quicken"

to clipboard. You can use this as an Exec line in the .desktop shortcut file that you can create in Gnome, for example. It will run the shortcut you created with the Virtual Desktop setting. This can be used for multiple purposes but I need it mostly in order to run Quicken, which prompts the user for certain input entries and confirmations on startup.

2 comments:

Anonymous said...

Once you make your new program icon in q4wine, you can just drag-and-drop it to your desktop. Much easier than the copy-paste method you mention.

Alen's Australia said...

Four years later, I would expect things to have become easier, that's for sure.