How to setup ksystemlog to open any *.log file by default? - Ask Ubuntu
i've used glogg while , happy it, cannot show unicode characters properly.
i found ksystemlog in this question. seem need. can open log file within open file menu, , display unicode characters.
every time need open different log file arriving randomly. not find way set default "open with.."
command. find ways set specific log files default. "open with"
ignores file try open.
i've tried adding "open with" command: ksystemlog %u
, no luck. i've tried creating desktop file it, doing wrong.
any advice?
ok, solved this, hope someone.
since ksystemlog
limitation is able open pre-defined files, decided copy log temporary file , define ksystemlog
open file.
this how it's done:
1) create bash script (called alog.sh):
#!/bin/bash cp $1 /home/(user)/tmp.log ksystemlog
2) add desktop entry:
[desktop entry] terminal=false name=klogger exec=alog.sh %u type=application icon=gnome-panel-launcher mimetype=text/x-log;
3) set "open with"
.desktop above script
4) in ksystemlog settings select option start above tmp.log
Comments
Post a Comment