Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 03 Sep 2014, 03:01
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Suggestions
Making ROX more fun: changing file associations
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [35 Posts]   Goto page: 1, 2, 3 Next
Author Message
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Sun 31 Jul 2005, 22:59    Post subject:  Making ROX more fun: changing file associations  

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
text_plain.tar.gz
Description  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.
gz

 Download 
Filename  text_plain.tar.gz 
Filesize  796 Bytes 
Downloaded  631 Time(s) 
Back to top
View user's profile Send private message 
Bancobusto


Joined: 13 Jun 2005
Posts: 168
Location: Vancouver Island

PostPosted: Sun 31 Jul 2005, 23:06    Post subject:  

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 Laughing
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11034
Location: Arizona USA

PostPosted: Sun 31 Jul 2005, 23:23    Post subject:  

/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.
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sun 31 Jul 2005, 23:28    Post subject:  

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

In a similar way we might include

create new image (opens mtpaint)

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 01 Aug 2005, 00:23    Post subject:  

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)
Back to top
View user's profile Send private message 
Bancobusto


Joined: 13 Jun 2005
Posts: 168
Location: Vancouver Island

PostPosted: Mon 01 Aug 2005, 02:32    Post subject:  

Cool, Cool

Thanks GuestToo
Back to top
View user's profile Send private message 
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Mon 01 Aug 2005, 04:29    Post subject:  

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 Smile

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
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Mon 01 Aug 2005, 04:53    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
Bancobusto


Joined: 13 Jun 2005
Posts: 168
Location: Vancouver Island

PostPosted: Mon 01 Aug 2005, 05:12    Post subject:  

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 Confused
Back to top
View user's profile Send private message 
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Mon 01 Aug 2005, 06:39    Post subject:  

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
app_select.png
 Description   
 Filesize   14.01 KB
 Viewed   3165 Time(s)

app_select.png

Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 01 Aug 2005, 19:33    Post subject:  

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
Back to top
View user's profile Send private message 
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Tue 09 Aug 2005, 09:07    Post subject:  

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* Surprised)

Jesse

* maybe
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Tue 09 Aug 2005, 09:43    Post subject: work hard - stay frisky  

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 Smile
http://thepiratebay.org

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
raffy

Joined: 25 May 2005
Posts: 4765
Location: Manila

PostPosted: Tue 09 Aug 2005, 10:08    Post subject: User's paradise  

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? Get the sfs (English only).
Back to top
View user's profile Send private message 
Jesse

Joined: 08 May 2005
Posts: 465
Location: Auckland, NZ

PostPosted: Tue 09 Aug 2005, 21:00    Post subject:  

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [35 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Suggestions
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0894s ][ Queries: 13 (0.0153s) ][ GZIP on ]