SliTaz SliTaz Forum

You are not logged in.

#1 2012-06-10 16:54:08

manit123
Member
Registered: 2012-06-08
Posts: 36

modify context menu

Hi guys

I am using 3.0

I have written a script 'sumplay' whiuch plays video as I need (fullscreen with x11 expanded & autodetect subtitles).

Only I want to associate an icon with it . So that it looks nice .

Currently it is like this.

[attachment=11239,525]

Offline

#2 2012-06-15 23:36:28

manit123
Member
Registered: 2012-06-08
Posts: 36

Re: modify context menu

okay I found out solution

I would like to share.

I created a 16x16 PNG image (named whatever.png) as icon for my 'script' & copied it to /usr/share/pixmaps

Then I created a sumplay.desktop file containing

[c]

[Desktop Entry]

Encoding=UTF-8

Name=sumplay

Exec=sumplay

MimeType=video/x-msvideo

Icon=whatever.png

NoDisplay=true

[/c]

which I placed in /usr/share/applications

Now I edited ~/.local/share/applications/defaults.list

and added

[c]

video/x-msvideo=sumplay.desktop

video/x-flv=sumplay.desktop

video/mp4=sumplay.desktop

video/x-matroska=sumplay.desktop

application/vnd.rn-realmedia=sumplay.desktop

[/c]

to play mkv,rmvb,flv,avi,mp4 files default with 'sumplay'.

Offline

#3 2012-06-15 23:39:30

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: modify context menu

Fixed your code tags. With bbPress, tags are in <> and not [].

Offline

#4 2012-06-16 08:04:34

manit123
Member
Registered: 2012-06-08
Posts: 36

Re: modify context menu

Here is a screenshot

[attachment=11425,529]

Offline

#5 2012-06-16 08:09:57

manit123
Member
Registered: 2012-06-08
Posts: 36

Re: modify context menu

Currently I am stuck in opening text file (without extension) of ntfs partition with gvim by default.

Actually it gets saved as

$ls -l /media/FreeAgent\ GoFlex\ Drive/sum/sum/txt/linux/slitaz/config

-rwxrwxrwx    1 root     root           94 Jun 14 20:38 config

from

$ls -l  ~/.mplayer/config

-rw-r--r--    1 tux      tux            94 Jun 14 20:38 config

Thus default option in pcmanfm is execute

Though

'$file config' says

config: ASCII text

Please suggest ?

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.019 seconds, 8 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]