Dennis,
>>*you're calling it "shebang". Is that the official name ?
...
> I learned "shebang" as short for "shell bang".
Thats a good one! Alexandre posted a link to wikipedia, which suggested
that its a corruption of a contraction of "Sharp Bang". I like yours
better though.
> Possibly the gtk# installs rewrote some of the MIME tables.
Houston, we have a problem : I just stuck another SD card into the Pi (one
with which I did not anything with than a first-time boot and having it
install raspbian in offline mode). I create a "test.py" file with just a
shebang line mentioning "python3". Here xdg-mime did return a
"text/x-python3" for it ...
In other words, while either your possibility or just me having unwittingly
altered more than intended sound plausible, it does seem to point to our
versions of the OS not being the same ...
> "mailcap" was a file identifying "mail capabilities".
...
> The usage by Linux desktops is secondary -- ie: we already have a file
> linking MIME types to programs, can we somehow make use of that to
> launch files from a desktop?
Yep, now looking thru that file makes sense. Thanks.
> Unfortunately, the only time I run a desktop is when installing a
> new NOOBS release. All the rest of my usage has been via SSH
> login to a text console.
Not really unfortunate I would say. I tend to, onWindow, do most of my
programming in a command console.
> I use XFCE (rather than some variant of LXDE/LXQT) on
> that, and it shows a generic "text document" for a .py file.
That /was/ what it did for me too. And I quickly realized that mixing text
documents with them (with code snippets or other info) would make it hard to
find those back. Hence my queste to change the script documents icons to
something else.
> But... the gist is that a /launcher/ file can be created for specific
> script files, and the launcher can have an icon specified.
Yes, I found a description for that too, using xxx.desktop files.
But in my case it is really all about being able to easily recognise the
script files in a folder (or on the desktop) (regardless of if they are
executable or not).
> Created a similar file (couldn't find a simple way to do that from the
> GUI -- had to use text editor).
On my desktop I can rightclick -> create new -> empty file. After which I
ofcourse still have to open it with a text editor to add the shebang line
though ...
> Then found I had to install xterm -- seems the "launch in terminal"
> doesn't find the R-Pi terminal
And that does seem to confirm we're not running the same OS ... When I do
that the script is ran in something called "lxterminal"
("psutil.Process().parent().name()")
> I've found nothing equivalent to how Windows associates icons to
> file types (which seems to be that it uses the icon associated with
> the application specified in the OpenWith registry entry of the file
> /type/).
Or, when the involved registry entry does not contain a reference to the
to-be-used program (in the "default" key), by using a "DefaultIcon" key.
Been there, done that - several times. :-)
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|