Gui for viewing logfiles

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
Samy
Posts: 2
Joined: 10. Sep 2011, 11:42

Gui for viewing logfiles

Post by Samy »

Hi I'm looking for GUI to view logfiles with Salix Xfce. Something like the "Gnome System Log Viewer". Does anyone know one?
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: Gui for viewing logfiles

Post by JRD »

I don't have answer...but I'm interrested too.
Image
User avatar
justwantin
Posts: 44
Joined: 21. Jul 2010, 11:12

Re: Gui for viewing logfiles

Post by justwantin »

Normaly I have a terminal open and would use less [path] or mc to navigate to and F4 to view the file. If you really have a burning desire to view logfiles gui and don't want to bother with a gui editor then zenity might do what you want

Code: Select all

#!/bin/bash
# Name this script what you like and chmod +x
# This script will give you a file selection pop up opened to 
# /var/log. Select any text log file hi enter and it will be 
# opened in another pop up for viewing. Alternatively, uncomment
# the first zenity command and comment out the second and you will
# get a pop up in which you can enter a path and file name to do
# the sme thing. Create a desktop icon with a path to this script
# or a desktop file in /usr/share/applications that you can add 
# to a menu.

#log_file=`zenity --entry \
#	--window-icon=$icon \
#	--title="Enter log file path" \
#	--text="Enter the path to the logfile you want to view"`
log_file=`zenity --file-selection \
	--filename="/var/log/" \
	--title="Select a log file"`

rtrn=$?
	
	if [ "${rtrn}" == "1" ]; then
		exit 1
	fi
	
cat $log_file | \
        zenity --text-info \
        --title "Showing $log_file" \
        --width 850 --height 600 
        rtrn=$?
		
i	if [ "${rtrn}" == "1" ]; then
		exit 1
	fi
	
# end of script
Merit?
None whatsoever!

www.turtlespond.net
Post Reply