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 Thu 24 Apr 2014, 16:26
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Almost programming... Mime in VT Q.
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 4987
Location: Arizona, U.S.A.

PostPosted: Thu 07 Jun 2012, 18:37    Post subject:  Almost programming... Mime in VT Q.  

ROX does mime associations, but the VT doesn`t. Why not?
This seems odd, but there may be a reason for it.

I`d like to have the default app. run if a mime file is entered in a VT.
Song.mp3 gets mPlayer
Image.png gets mtPaint
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Thu 07 Jun 2012, 19:45    Post subject:  

You would need something like SOUND_PATH i guess to search directories for song.mp3

Code:
set show-all-if-ambiguous on


into /etc/inputrc

would at least work for TAB completion to show files and dirs .
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 4987
Location: Arizona, U.S.A.

PostPosted: Thu 07 Jun 2012, 22:14    Post subject:  

I`m not sure this is what I`m talking about Karl.
The path is being supplied, but the mime is not working for VTs.

If you click the file: Song.mp3 in ROX-Filer it starts the default music player.
But if you do this in a VT it doesn`t work, you get an error:
Code:
sh-4.1# /mnt/sdb3/Music/Cheers-ThemeTV.mp3
sh: /mnt/sdb3/Music/Cheers_ThemeTV.mp3: cannot execute binary file

If it works in the file browser, why not in the console?
Obviously ROX is the reason that it works in the file browser.

The console makes no assumptions about the graphical desktop environment.
So I suppose there would have to be CLI apps. installed for it to be complete.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2481
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Fri 08 Jun 2012, 05:10    Post subject:  

Hope I am talking about what you mean.

Once upon a time a terminal that was a teletypewriter without graphics and without mouse (not yet invented), everything text only.

A virtual terminal does just emulate this.
Thus you have to type some text, for example:

Code:
mplayer /usr/share/audio/goodluck.m4a


or (less typing if you use it more than once)

Code:
alias m=mplayer
cd /usr/share/audio

Code:
m good*
Very Happy
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3861
Location: Kiel,Germany

PostPosted: Fri 08 Jun 2012, 07:10    Post subject:  

The whole thing would need to alter the bash source code to implement a loading of a mime database file when typing "bash" .

Every input after "Enter" then has to be checked as it is today if exist, is in PATH, is alias, is executable or readable or writable, if file or dir etcetc and additionally if (some of) these tests fail if in mime.db file .

So you would need something like /etc/bash/mime.types thats get parsed every time .
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 4987
Location: Arizona, U.S.A.

PostPosted: Fri 08 Jun 2012, 15:11    Post subject:  

Exactly Karl..! I could only think how complicated and messy Linux mime is.

I entered .sq* in the mime file globs and it loads a SqApp file when clicked.
But doesn`t it seem this type of functionality should be in the console also?

Constantly accessed files like /etc/resolv and mime should be in the initramfs.

To fix Ash and Bash, an exec. wrapper seems to be the best solution.
A separate console globs file allows different apps. than the desktop.
If there is not an entry for the file type, the regular globs file is parsed.

With the hack of a junction I made, files wouldn`t need a path or to be in PATH.

I`ll let you know what I come up with... Terry B.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0495s ][ Queries: 12 (0.0089s) ][ GZIP on ]