Making ROX more fun: changing file associations

What features/apps/bugfixes needed in a future Puppy
Message
Author
Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

Making ROX more fun: changing file associations

#1 Post by Jesse »

Hi,

I've been a bit busy lately but have identified something that can make puppy more fun.

The idea is an application that you barely notice, which makes things work much better.

The problem I saw: in a rox window, clicking on a x.txt file opens it in leafpad, clicking on playlist.asx (a gxine playlist) opens the playlist in leafpad, thats useful... and I could not find a way to tell ROX to think of them differently.

The really clever solution IMHO, is to replace the file /root/Choices/MIME-types/text_plain
with the attached file.

It lets you choose which app you want to open the file with, by a simple menu list, which looks like part of the ROX application.

This is just a hack at the application to get peoples opinion if this is something that puppy needs. If this is met with good feedback, I can quite easilly add in a 'database' for all the app types, and an option to add in new file types that the user comes across.

Is this a good idea or not? did I just not find the right way to configure things?

Jesse
Attachments
text_plain.tar.gz
tar.gz file contains one file "text_plain"
extract and copy this file to /root/Choices/MIME-types/text_plain overwrite it, and make sure that it keeps the execute permission.
(796 Bytes) Downloaded 875 times

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#2 Post by Bancobusto »

I think that's a great idea.

for example, I would like to be able to associate .CUE files with mplayer, but Rox see's them as text files (fair enough, i guess).... changing the association to mplayer would mean that all text files would try to get played their...


good stuff :lol:

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#3 Post by Flash »

/root/Choices/MIME-types/text_plain is a symlink to /usr/local/bin/abiword in my computer. What should I do?

I'm running 1.0.4 from CD, with a pup001 file on the hd.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#4 Post by Lobster »

Yes very good idea - never had the expertise to do this but it is required for us Rox rockers :)

In a similar way we might include

create new image (opens mtpaint)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#5 Post by GuestToo »

you can easily change the file associations by editing
/usr/local/share/Choices/MIME-info/Standard

(or copy it to /root/Choices/MIME-info/Standard and edit the copy)

you can setup an association for any file extension(s) you like ... (it's how the dotpups work)

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#6 Post by Bancobusto »

Cool, 8)

Thanks GuestToo

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#7 Post by Jesse »

Hi GuestToo,

yep, you can certainly edit those files by hand if you like, but you have to rely on the "file" application returning the correct MIME-type for the file.
Also you have to be up with the play on what mime types are and where those files are stored, and how to write shell scripts... But it doesn't exactly give you option to open a file in a particular application on-the-spot :)

But "file" is not always perfect, for example it identifies a gxine playlist *.asx (XML) as text_plain and that isn't quite desireable
The app that I posted above would idealy be called for all of the mime types, and match against the MIME-type as well as the file extension, and have an option like "configure type..." so that you can set another application or an application for an unregistered type through a window like M$ "open with..." dialouge. i.e. a GUI option instead of a command line one.

Comments? thoughts?

Jesse

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

Jesse,
I haven't tried your program yet, so hope my comment is relevant.

yes, i want to keep the current open menu, but sometimes i want something different, like want to open a .gif with xpaint instead of mtpaint for example.
So, something like Microsoft's "Open as..." would be great.

Do you know we already have something like that in the Uxplor file manager?
Right-click on a file and you get quite a nice menu of choices -- it doesn't have any file associations, just a fixed menu.
The menu used in Uxplor is actually a separate little Xlib program.

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#9 Post by Bancobusto »

I find that the "send to" menu works quite well usually with the existing Rox...

For example I have the option to send folders to XmmS by right-clicking, send-to, xmms.

Seems to work for whatever programs you symlink the send--to folder to.

Don't know if that helps :?

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#10 Post by Jesse »

Ok, so heres a screen shot of how it would work...
The menu pops up to select the application when you click to open the file, in this case when clicking on the file text_file_demo.txt
Attachments
app_select.png
(14.01 KiB) Downloaded 3281 times

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

one thing i noticed about vi
if you close rxvt by clicking the Close window button
vi continues to run as a background process, with 99% cpu usage
you need to close vi using :q

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#12 Post by Jesse »

Hi,

So yeah heres a screenshot of the "select application dialouge box"...
the window that appears when you click on "Select..."
all working except for the "Accept ALL" button, which should be done in a day or so.

http://tinypic.com/a9s40y.png

So does this look intuitive? could it be better somehow?
go on tell me now, you'll be using it in the next puppy* :o)

Jesse

* maybe

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

work hard - stay frisky

#13 Post by Lobster »

Looks fine (and useful) to me

Was it done in Tcl?

Is Mut 0.0.6 on the horizon - boy is that a useful program . . .

Just for you Jesse . . .

a potential Pup launcher (written in XUL)
http://www.georgenava.com/applauncher.php

somewhere to store your files, bookmarks, emails etc (online)
https://axentra.net/homebase/registration

. . . and something for the Peter Pan in you :)
http://thepiratebay.org
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

User's paradise

#14 Post by raffy »

a definite addition to userland, where there is a sign on every path. thanks!

BTW, in other threads, there was this mention of certain scripts executing only when ending in .com. how is this handled here?
Puppy user since Oct 2004. Want FreeOffice? [url=http://puppylinux.info/topic/freeoffice-2012-sfs]Get the sfs (English only)[/url].

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#15 Post by Jesse »

Hi,

Yep, it is written in Tk/Tcl, and fairly small, about 10K including its currently minimal database of file associations (1K).

Yes I think I need to figure out a good way of handling executable files, as they don't usually have an extension... a .com file is easy to handle as it is.

I think I'll do a "how to" for Tk/Tcl widgets as they are very confusing but simple, but quite powerful for a scripting language once you get your head around them.

MUT is very useful as is, and yes there is room for improvement... I'm thinking that getting these file associations working would be better than a few MUT cosmetic changes, for the moment, and there are a few other tk/tcl projects that look very tempting...
There are two quirks in MUT that I'm likely to change quite soon, so yes there will be a 0.0.6 MUT but probably not as much of an advance as what you might be hopeing for.

Jesse

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#16 Post by Lobster »

:)

I hope it is added to your wiki Tcl tutorials . . .

http://www.goosee.com/puppy/wikka/LearnTclTk
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
peppyy
Posts: 443
Joined: Mon 27 Jun 2005, 23:49
Location: VT USA
Contact:

#17 Post by peppyy »

An "open with" dot pup would be great! I have just spent half a day trying to figure out why I couldn't open any text or abi files and it looks lihe it is all from associating .asf with mplayer. Never knew that it would change all the files with a text icon.

What are the chances of seperating extensions so they could be associated individually? Open .abw with abiword and ,txt with beaver etc.
Puppy Linux...
It just works!

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#18 Post by Bancobusto »

I know it may be to size issue, but the newer version Rox that came out has all these features and more. I hope that we can upgrade to it eventuallly :lol:

Guest

#19 Post by Guest »

peppyy wrote:What are the chances of separating extensions so they could be associated individually? Open .abw with abiword and .txt with beaver etc.
it's easy ... just add something like this to /root/Choices/MIME-info/Standard (or /usr/local/share/Choices/MIME-info/Standard)

Code: Select all

text/abiword
	ext: abw ABW
here's a dotpup that will setup a rox file association so that abw files will open with Abiword when clicked
Attachments
abi-assoc.pup
setup an Abiword file association
(4.54 KiB) Downloaded 397 times

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#20 Post by GuestToo »

the Abiword file association dotpup post was mine

Post Reply