Announcement

Collapse
No announcement yet.

Where are error messages from programs launched from the K menu?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Where are error messages from programs launched from the K menu?

    I added a program to the K menu. However when it starts, the window appears briefly and shuts. I'm unable to see what error message is. Are these logged somewhere? I tried following /var/log/syslog but no errors appeared.

    #2
    Start the program in the terminal (Konsole) e.g. $ programname and you will probarbly see error messages.

    Comment


      #3
      The program runs fine from the terminal. Only if I start it from the K menu does it not work.

      Comment


        #4
        Maybe it needs some extra parameter(s). Which program are you trying to run?
        Ok, got it: Ashes come from burning.

        Comment


          #5
          You could add
          Code:
          [I]command[/I] &> ~/program.log
          to pipe the output to ~/program.log

          Comment


            #6
            I think it would be neat if the normal console output (stdout and stderr) from programs started from the menu system were, as a general feature, available ... somewhere. But afaik they are not (just routed to /dev/null).
            I'd rather be locked out than locked in.

            Comment


              #7
              Error messages

              http://techbase.kde.org/Development/...Error_Messages

              In KDE all debugging text-output can be switched on or off based on so called areas. One application can be one or more area. One part of the kde base libraries can be another area. Enabling/disabling these areas from being printed can be done using the kdebugdialog application...

              When you are debugging it is best to simply start a konsole and start the application from there...

              If you are NOT starting the application from a konsole the messages will be logged somewhere else, or they could have been discarded by the program that started your application.

              If your application is started by clicking on an icon your best bet is to check the following log files. Beware; they contain logs for a lot of applications, not just the application you are debugging!

              Case 1: Graphical login (i.e. kdm, gdm, xdm, etc.)

              The debug messages get redirected into the file ~/.xsession-errors or ~/.X.err in your home directory (that is with a leading dot '.' also watch the Capital).

              Case 2: You are using startx:

              Use the following command to restart your session:
              startx 2>&1 | tee startx.log

              so that all the debug messages of applications started at KDE's startup (and any application launched from the panel etc.) go to the file "startx.log"...
              kdebugdialog --help
              Usage: kdebugdialog [Qt-options] [KDE-options] [options]

              A dialog box for setting preferences for debug output

              Generic options:
              --help Show help about options
              --help-qt Show Qt specific options
              --help-kde Show KDE specific options
              --help-all Show all options
              --author Show author information
              -v, --version Show version information
              --license Show license information
              -- End of options

              Options:
              --fullmode Show the fully-fledged dialog instead of the default list dialog
              --on <area> Turn area on
              --off <area> Turn area off
              Have you tried ?

              - How to Ask a Question on the Internet and Get It Answered
              - How To Ask Questions The Smart Way

              Comment


                #8
                Originally posted by OneLine View Post
                http://techbase.kde.org/Development/...Error_Messages
                Case 1: Graphical login (i.e. kdm, gdm, xdm, etc.)

                The debug messages get redirected into the file ~/.xsession-errors or ~/.X.err in your home directory (that is with a leading dot '.' also watch the Capital).
                Wait ... so this means that the answer to the thread question, and the general feature I asked for
                Originally posted by SecretCode View Post
                I think it would be neat if the normal console output (stdout and stderr) from programs started from the menu system were, as a general feature, available ... somewhere. But afaik they are not (just routed to /dev/null).
                is "in ~/.xsession-errors"?

                I had the idea that file only contained graphic/display driver errors. This is good news! With the limitation that the lines in this file aren't timestamped or prefixed with the originating process id/name, as they can be in /var/log/syslog etc.
                I'd rather be locked out than locked in.

                Comment


                  #9
                  Yeah, watch out for that .xsession-errors file. I was running an application that evidently was pulling a lot of errors I was unaware of, until I got a notification that I had run out of disk space. Took a while to find out why, but it turns out the .xsession-errors file had grown to about 16GB. Right away it went into the cleanup script I run at shutdown.
                  We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                  Comment


                    #10
                    Care to share that cleanup script?
                    Using Kubuntu Linux since March 23, 2007
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Code:
                      greenman@Wolfenstein:~$ cat ~/.kde/shutdown/cleanup.sh 
                      #!/bin/sh
                      ## Modified version of kscrubber.sh from https://igurublog.wordpress.com/downloads/script-kscrubber/
                      rm -r ~/.adobe/*
                      rm -r ~/.macromedia/*
                      rm -r ~/.cache/Arora/*
                      rm -r ~/.cache/google-chrome/*
                      rm -r ~/.cache/midori/*
                      rm -r ~/.cache/chromium/*
                      rm -r ~/.cache/virtuoso*
                      rm -r ~/.cache/RawTherapee*/data/*
                      rm -r ~/.cache/RawTherapee*/images/*
                      rm -r ~/.cache/RawTherappe*/aehistograms/*
                      rm -r ~/.cache/darkatble/*
                      rm -r ~/.cache/vlc/art/*
                      rm -r ~/.cache/winetricks/*
                      rm -r ~/.local/share/Trash/*
                      rm -r ~/.thumbnails/*
                      rm -r ~/.bash-history
                      rm -r ~/.recently-used/*
                      rm -r ~/.recently-used*
                      rm -r ~/.kde/share/apps/konqueror/konq_history*
                      rm -r ~/.kde/share/apps/konqueror/closeditems_saved
                      rm -r ~/.kde/share/apps/konqueror/autosave/*
                      rm -r ~/.java/deployment/cache/*
                      rm -r ~/.local/share/data/Arora/cookies*
                      rm -r ~/.local/share/data/Arora/history*
                      rm -r ~/.kde/cache-`uname-n`/http/*
                      rm -r ~/.kde/cache-`uname-n`/thumbs/*
                      rm -r ~/.kde/cache-`uname-n`/WebkitLocalStorage/*
                      pkill firefox
                      pkill firefox-bin
                      rm -r ~/.mozilla/firefox/ddploqlg.default/Cache/*
                      rm -r ~/.mozilla/firefox/ddploqlg.default/Cache.Trash/*
                      rm -r ~/.mozilla/seamonkey/xq7tmx2b.default/Cache/*
                      ## for maximum cleaning of firefox uncomment the following line,
                      ## but it will trash all your favicons and may cause other problems.
                      #find ~/.mozilla -type f -name '*.sqlite' -delete
                      rm ~/.cameramonitor.pid
                      rm ~/.xsession-errors
                      exit
                      Edit: be sure to chmod a+x cleanup.sh

                      Edit further: in the .mozilla lines you will need to change the ".default" directory to whatever
                      is used in your own installation..
                      Attached Files
                      Last edited by doctordruidphd; Jun 07, 2012, 03:09 PM. Reason: clarification
                      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                      Comment


                        #12
                        Thank you. I've modified the script, as I don't have all the directories you do. Added it to Startup and Shutdown > Autostart > Script File (Shutdown).
                        Using Kubuntu Linux since March 23, 2007
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment

                        Working...
                        X