Gui for viewing logfiles
Gui for viewing logfiles
Hi I'm looking for GUI to view logfiles with Salix Xfce. Something like the "Gnome System Log Viewer". Does anyone know one?
Re: Gui for viewing logfiles
I don't have answer...but I'm interrested too.
- justwantin
- Posts: 44
- Joined: 21. Jul 2010, 11:12
Re: Gui for viewing logfiles
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