I use SeaMonkey from MS-Windows 10 and I use it for it's nice (HTML) Composer feature. I do not use it for web browsing. I have setup SeaMonkey's preferences to only open the composer at application startup. When I startup SeaMonkey from the Windows CMD prompt without any command line arguments, it does open up the composer as expected. But when I give a filename as a parameter, it opens up that file in the browser and not in the composer. Is there a way to have SeaMonkey open up the file specified as command line argument to open in the composer? I am trying to script this and hence the need to specify the HTML file as a command line argument.
1 Answers
For Windows, the command line you're looking for is seamonkey -editor %1 where %1 will be substituted by the URL of the file you are right-clicking on.
Even if you have configured SeaMonkey to launch as Composer (using Èdit > Preferences > Appearance), when you pass a file argument to it on the command line, it reverts to assuming you meant to open it in browser mode, unless you specify otherwise, as above.
See: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options
To run this command from the Win10 shell (rather than the command line, which you're interested in), see https://stackoverflow.com/a/11882138 for how to add a new item (e.g. Edit) to File Explorer's right-click menu for a certain file type (.html in this case), and how to associate the above command line with it.
Incidentally, for Ubuntu 20.04 Linux running the gnome shell (which is the OS I wanted to alter when I started searching for an answer), you can discover which config file to edit as follows:
$ grep -i seamonkey ~/.config/mimeapps.list
text/html=seamonkey-mozilla-build.desktop;org.gnome.gedit.desktop;libreoffice-writer.desktop;firefox.desktop;
$ find / -name seamonkey-mozilla-build.desktop 2> /dev/null
/usr/share/applications/seamonkey-mozilla-build.desktop
$ cd ~/.local/share/applications
$ cp /usr/share/applications/seamonkey-mozilla-build.desktop .
$ chmod +x seamonkey-mozilla-build.desktop
$ vi seamonkey-mozilla-build.desktop
or substitute your favourite editor for vi. Then change the line starting Exec to:
Exec=seamonkey -editor %u
- 441
- 4
- 5