What does not
What was not tested
More specific features!
* Making Foxit Reader to open files with double click on ubuntu using Wine (main reference (* 2)): In the folder "~ /.local/share/applications" create files "Foxit Reader.desktop" and "Foxit Reader.sh" as models. -> Foxit Reader.desktop Note: Note that "/home/eduardo/.local/share/applications/Foxit Reader.sh" must be enclosed in single quotes because there is a space in the name "Foxit Reader". " [Desktop Entry] Categories=; Exec='/home/eduardo/.local/share/applications/Foxit Reader.sh' %f Hidden=false Icon=3B87_Foxit Reader.0 Name=Foxit Reader StartupNotify=true Type=Application Name[en_US]=Foxit Reader " -> Foxit Reader.sh Note: Note that " #!/bin/ksh" have to have a space before, otherwise it does not work. " #!/bin/ksh param= while [ "$1" ] do param="$param Z:$1" shift done wine "C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe" $param " Run the command "chmod a+x '/home/name/.local/share/applications/Foxit Reader.sh'" to give "Foxit Reader.sh" execute permissions (reference (* 1)). Even in the "~/.local/share/applications" open file "mimeapps.list" and insert the following entries as the model and keeping the others: NoteI: You may need to remove old entries to "application/pdf". NoteII: The file "/usr/share/applications/mimeinfo.cache" usually has several models of the inputs used in "mimeapps.list." " [Default Applications] application/pdf=Foxit Reader.desktop; [Added Associations] application/pdf=Foxit Reader.desktop; " If there are other files repeated in "~/.local/share/applications" to "Foxit Reader" (eg "Foxit Reader-1.desktop", "Foxit Reader-2.desktop", "Foxit Reader-3.desktop" ...) maybe you will need to remove them to make scheme works properly. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- References -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- (*2) " Nautilus open-with / mime-type associations BY ARNON WEINBERG, ON DECEMBER 12TH, 2010 Using the native GNOME file manager Nautilus, you can double-click on a file to open it with its default application. If you donâ€™t like that, are not sure what the default application is, or want to modify it, then you can right-click on the file to see a list of mime-type associations. The first item on the list is the default application, and the rest are alternatives. The last item on the list is â€œOpen with Other Applicationâ€¦â€. For example, on my current system, right-clicking on a .txt file brings up: Open with "Emacs Text Editor" Open with "OpenOffice.org Calc" Open with "OpenOffice.org Writer" Open with Other Application... Clicking on â€œOpen with Other Applicationâ€¦â€ brings up a dialogue box that lets you add another application to the list. A list of known applications is provided, and there is a â€œUse a custom commandâ€ option, that allows associating with any arbitrary command. If you want to change the default application, or remove an application from the list, then right-click on the file, and select Properties -> Open With. Modifying the mime-type associations manually: Under a standard freedesktop system, the local (user) mime-type associations are listed in: ~/.local/share/applications/mimeapps.list For example, the .txt file associations on my system are listed as follows: [Added Associations] text/plain=emacs.desktop;openoffice.org-calc.desktop;openoffice.org-writer.desktop; These are references to *.desktop files, which describe the applications. Adding applications to the â€œOpen with Other Applicationâ€¦â€ list: Any application manually associated with a file type using the â€œUse a custom commandâ€ option is automatically added to the â€œOpen with Other Applicationâ€¦â€ known applications list. In the â€œback-endâ€, a corresponding ad-hoc *.desktop file is created to describe the application, and a reference to it is made in the mimeapps.list file. An interesting question is: How to add an application to the default â€œOpen with Other Applicationâ€¦â€ list using an existing *.desktop file. Doing this has the advantage of recycling existing files, automatically associating mime-types, and adding a nice icon to the application. In fact, the default known applications list is automatically derived from the list of known *.desktop files â€“ the same list used to derive the menu. Thus all *.desktop files in the standard locations are used to generate the list. A caveat that I discovered however, is that not all *.desktop files are included â€“ only the ones containing a line similar to: Exec= %f â€¦ ie, that specify how to handle a parameter (the file being opened) are included. Example: I set up Photoshop under Wine and wanted to associate *.psd files with it. To do this: Create a shell script to run Photoshop and pass parameters to it (and test it!) Create a Photoshop.desktop file with the Exec line calling the script and passing %f Place the *.desktop file in ~/.local/share/applications (or another standard location) Use the â€œOpen with Other Applicationâ€¦â€ dialogue as above to make the association â€“ Photoshop should now appear on the list Nautilus Actions Configuration Just for good measure, under System -> Preferences -> Nautilus Actions Configuration is a method for adding context-menu actions to Nautilus. These are items that appear in the same right-click menu as above, but lower down the list (below â€œSearch for Filesâ€¦â€). You can associate applications this way as well. Sample script to run Photoshop under Wine: #!/bin/ksh param= while [ "$1" ] do param="$param Z:$1" shift done wine "C:\Program Files\Adobe\Adobe Photoshop CS2\Photoshop.exe" $param Sample *.desktop file for Photoshop under Wine: #!/usr/bin/env xdg-open [Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Icon[en_US]=~/.local/share/icons/9b6a_newshortcut1_236bb7c4441942fd04091e257a25e34d.0.png Name[en_US]=Image Editor - Photoshop Exec=~/applications/Photoshop/Photoshop %f Name=Image Editor - Photoshop Icon=gnome-panel-launcher MimeType=image/x-psd;image/vnd.adobe.photoshop; " -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- (*1) " Scripting NOTE: The commands given in the scripting section are to be put into the text editor and not in the terminal unless instructed otherwise. Bash is primarily a scripting language, so it would be a crime not to talk about scripting. Let's dive straight in with a bash script. More precisely the infamous "Hello World" script. You can create a bash script by opening your favorite text editor to edit your script and then saving it (typically the .sh file extension is used for your reference, but is not necessary. In our examples, we will be using the .sh extension). #!/bin/bash echo "Hello, World" The first line of the script just defines which interpreter to use. NOTE: There is no leading whitespace before #!/bin/bash. That's it, simple as that. To run a bash script you first have to have the correct file permissions. We do this with chmod command in terminal (change mode) as follows: chmod a+x /where/i/saved/it/hello_world.sh #Gives everyone execute permissions # OR chmod 700 /where/i/saved/it/hello_world.sh #Gives read,write,execute permissions to the Owner This will give the file the appropriate permissions so that it can be executed. Now open a terminal and run the script like this: /where/i/saved/it/hello_world.sh " -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|Operating system||Test date||Wine version||Installs?||Runs?||Used|
|Show||Mac OS X 10.7 "Lion"||Dec 18 2012||1.4.1||Yes||Yes||Bronze||an anonymous user|
|Current||Ubuntu 12.04 "Precise" amd64 (+ variants like Kubuntu)||Feb 04 2013||1.4||Yes||Yes||Platinum||an anonymous user|