0

I've used glogg for a while and was happy with it, but it cannot show unicode characters properly.

I found ksystemlog in this question. It seem just what I need. It can open any log file from within its open file menu, and properly display unicode characters.

Every time I need to open a different log file arriving randomly. But I could not find any way to set it as default for "open with.." command. I could only find ways to set specific log files as default. "Open with" always ignores the file I try to open.

I've tried adding "open with" command: ksystemlog %U, no luck. I've tried creating a desktop file for it, but I probably doing it wrong.

Any advice?

Amir Uval
  • 1,161

1 Answers1

0

Ok, solved this, hope it will help someone.
Since ksystemlog limitation is that it is able to open only a pre-defined files, I decided to copy the log to a temporary file and define ksystemlog to always open this file.

This is how it's done:

1) create a bash script (called it alog.sh):

#!/bin/bash
cp $1 /home/(user)/tmp.log
ksystemlog

2) add a 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" the .desktop above script

4) in ksystemlog settings select an option to always start with the above tmp.log

Amir Uval
  • 1,161