How to Have Menu Entries for External & Wine Apps

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

How to Have Menu Entries for External & Wine Apps

#1 Post by mikeslr »

This "How To" is long because (a) it assumes you know nothing beyond simple stuff under Windows, and (b) I tend to be long-winded. The actual, necessary, instructions take up less than 1/4 of the text.
External Applications, sometimes called portable applications, are physically located outside your SaveFile. Playdaz discussed the technique for using them in a post called “Program Folders.
Last edited by mikeslr on Thu 10 Aug 2017, 01:03, edited 6 times in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Getting LibreOffice and other Apps as Program Folders

#2 Post by mikeslr »

Hi All,

I recently ran a series of tests that revealed running Libreoffice as a Program Folder made fewer demands on my system than running it as pet installed to my SaveFile, or even as a loaded SFS. That suggest that Program Folders may be the best way to run an application on a computer with limited RAM or a slow CPU. But see http://murga-linux.com/puppy/viewtopic. ... 093#686093 for yourself, for other reasons to employ Program Folders and, perhaps, why not to.
One of the conclusions I discussed in that post was that using Program Folders (aka Program Directories aka External Programs) makes the most sense if they are of applications you frequently have open, such as Browsers, or are of a suite of applications not all of which you need to have opened at the same time.
Without regard to any question of the general utility of using a Program Folder rather than a pet or SFS –one size doesn't always fit all-- for the sake of completeness I figured you might want to know how to create your own. The previous post on this thread gave as an example downloading the tgz direct from its publisher. http://www.murga-linux.com/puppy/viewtopic.php?t=66237. And Lobster has reminded us of the availability of Portable Linux Apps, http://portablelinuxapps.org/ which are essentially prepackaged Program Folders, that are supposed to be functional in “Ubuntu, Fedora, debian and derivatives.
Attachments
LibreOfficeConfiguration.png
Snapshot of folders for comparison
(94.07 KiB) Downloaded 681 times

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#3 Post by darkcity »

Nice work, added link to thread on the wiki
http://puppylinux.org/wikka/PuppyMenu

torgo
Posts: 71
Joined: Fri 09 Sep 2011, 15:42

#4 Post by torgo »

Edit 2/19/13: The discussion following is still valid for applications in general. However, the current version of SWIron --and probably Chrome & Chromium-- can no longer be run as root. Starting its executable in a terminal explains that some modification can be made, but it is beyond my current ability to interpret how to do it. Opera and firefox, downloaded from their publishers continue to work as Program Folders.


Ironically, the new Chrome and Iron happen to be the exact reasons I'm reading your tutorial. I just got them working in Lucid 5.28 as root, and now I want to add them to the menu and the default browser selection list.

I downloaded both in 32-bit .deb format from the original sites (Iron downloaded from SRWare, Chrome downloaded from Google), saved them to my drive and clicked to install them with petget. After "installing" them with petget, here's how I got them working as root:


For Iron:
go to /usr/share/applications and open iron.desktop as text
add " --user-data-dir" (with a space but without the quotes) to the end of the "Exec" line and save the file. Clicking the iron.desktop file should now launch Iron.

For Chrome:
go to /opt/google/chrome and open google-chrome.desktop as text
add " --user-data-dir " to the Exec line located around line 108. Put it just before the %U. (Again, without the quotes but with a space before and after.) Clicking on google-chrome.desktop should now successfully launch Chrome.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

New script argument for SWIron

#5 Post by mikeslr »

Hi All,

Thanks to Torgo's explanation, just above this post, I am once again able to run SWIron from /mnt/home.
SWIron makes it rather difficult to locate its Linux version. I had to specify "SWIron Linux deb download" otherwise only the Windows version showed up. Finally found it at:
http://download.cnet.com/SRWare-Iron-fo ... 17001.html
Saved it to a temporary file and extracted it to a folder. Examination of the folder revealed that its executable, iron, was now located in THE WITHIN /usr/share/iron folder, and that a desktop file was similarly located in the within /usr/share/applications folder.
Since I wanted to run Iron from /mnt/home, I changed the name of the extracted deb folder to SWIron and moved it to /mnt/home. Then in /root/my-applications/bin I copied the iron.png and created a script named SWIron with --thanks to Torgo-- the following argument, Code:

#!/bin/sh
exec /mnt/home/SWIron/usr/share/iron/iron --user-data-dir"$@"

Next I copied the supplied desktop file to the systems /usr/share/applications, and opened it to make the following changes:

Exec=/root/my-applications/bin/SWIron
Icon=/root/my-applications/bin/Iron.png
...
Categories=X-Internet

The supplied desktop has Iron showing up in the network submenu.

Restarted X.

Viola!

mikesLr

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

Just to add my two-penn'orth to Mike's explanation:-
Mikeslr wrote:...sometimes you have to restart the windows manager (shutdown>restart X), and sometimes you even have to reboot before your new desktop file will both work and show up in the menu. But before you do anything else, make sure you didn’t overlook the listing of the application in the menu. From top to bottom, applications are listed alphabetically, but all applications whose name starts with a capital letter are listed before any application whose name starts with a small letter.
I'm sure Mike himself is aware of this, but for the benefit of anybody who's discovering this kind of info for the first time, I just wanted to point out that before restarting 'X', it helps enormously to open a terminal, type

Code: Select all

fixmenus
...and hit 'Enter'. This tells Puppy to re-write the /etc/xdg/templates/_root_jwmrc file, which is what generates the Menu configuration, as detailed in the 'hidden' /root/.jwmrc file.

This, in turn, simply makes sure that the new .desktop file you've just created has definitely been 'listed' before restarting 'X'. (I find it's better to restart 'X' than merely restart JWM.....the latter doesn't always seem to implement every step needed to display the new MenuEntry.)

But it is a very easy process to create MenuEntries; I've written so many over the years that I can almost do 'em in my sleep now.....and it's all thanks to Mike originally. And, having created the .desktop file in /usr/share/applications, you can then utilise it as an item in the 'Launcher' area of the tray, between the Menu button and the desktop 'pager.....very easy to do, especially if you're running Radky's 'JWMDeskManager'.


Mike. :wink:

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#7 Post by mikeslr »

Hi Mike Walsh,

You're being generous. When I wrote the original post on this thread 7 years ago, I may have known of the command 'fixmenus'. But using it wasn't something I had made part of my routine. So I didn't think of it and didn't mention it.

:idea: "Live-and-learn". Which is far better than its obverse. :roll:

mikesLr

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#8 Post by Mike Walsh »

mikeslr wrote:Hi Mike Walsh,

You're being generous. When I wrote the original post on this thread 7 years ago, I may have known of the command 'fixmenus'. But using it wasn't something I had made part of my routine. So I didn't think of it and didn't mention it.

:idea: "Live-and-learn". Which is far better than its obverse. :roll:

mikesLr
No worries, mate. BTW, I didn't realise you'd been using Iron for as long as you have. You are aware that the simplest place to obtain new versions of Iron is on SRWare's own forums, yes?

https://www.srware.net/forum/index.php

Go into the 'SRWare Iron Support (English)' sub-forum, and there's a section in the stickies at the top where they've always got links to the most recent Linux release. It's where I download 'em from, when I make the 64-bit packages up...

(Talking of which, it looks like it's time to make the next new packages up. Good job I looked...)


Mike. :wink:

Post Reply