To install,
- zip up all the files in /root/Choices/MIME-types/* if you want an option to undo this.
- Delete those files /root/Choices/MIME-types/*
- While those files are deleted you cant click run files in Rox.
- copy the script below to files named text image audio video application
- You might need to make those files executable with the chmod program, example here LearnTclTkStep1
- copy the RoxFileSelectorAppStart and RoxFileSelectorSelect programs to that folder too.
- You might need to make those files executable with the chmod program, example here LearnTclTkStep1
- copy the RoxFileSelectorAppFileTypes database file to /root/Choices/AppFileTypes
- Install done, no need to restart Rox, just use it.
Shell script 1 /root/Choices/MIME-types/text
#! /usr/bin/wish
wm transient .
wm frame .
wm withdraw .
catch { exec pwd } path
set path "$argv0/../app_start"
set l [split $path /]
set n [lsearch $l ..]
for {} {$n != -1} {} {
if {$n != -1} {
set a [lrange $l 0 [expr "$n-2"]]
set l [concat $a [lrange $l [expr "$n+1"] end]]
}
set n [lsearch $l ..]
}
set cmd " catch { exec [join $l /] \"[lindex $argv 0]\" } oops "
eval $cmd
if {$oops != ""} {
tk_messageBox -message "$cmd \n[lindex $argv 0] result: $oops" -type ok
puts $oops
}
destroy .
CategoryApplicationPreinstalled
There are no comments on this page. [Add comment]