See the note about the -replace option at the end of this page if you are going to use it. Third, you are now ready to start GNOME Shell inside of gdb. Gnome_session=$(pgrep -u $USER -f -x "*gnome-session-binary")Įval export $(sed 's/\o000/\n/g ' < /proc/$gnome_session/environ | grep DISPLAY)Įval export $(sed 's/\o000/\n/g ' < /proc/$gnome_session/environ | grep XAUTHORITY)Įval export $(sed 's/\o000/\n/g ' < /proc/$gnome_session/environ | grep DBUS_SESSION_BUS_ADDRESS)Īfter you have saved this script, source the file from inside your independent shell with: Download and save the following script to your GNOME Shell system to, for example, ~/bin/xenv.sh: Second, inside this new, independent shell, you must establish the minimum environment variables for X session communication. Screen will confirm that it is now recording the session to screenlog.0 or hardcopy.0, depending on your distribution. Immediately press CTRL-A, release, SHIFT-H. You should see either a welcome message or immediately see a new command prompt with a little status bar at the bottom of the screen, depending on your distribution configuration. If this is from the same computer, press CTRL-ALT-F2 and, at the black console you see, login as the same user whom has a GNOME session running. $ ssh not enable X11 forwarding on the SSH session.) That means SSH from a second computer or using screen to record the output on a VT on the same computer. If you only want a backtrace from your existing session, you can just use this simple GDB command, but that will only get for you the C and JS stack traces, but no other interaction (unless you don't add other commands manually).įirst, obtain a shell that's independent from your GNOME session from which you can extract a log of the output. You need two computers and ssh or you need to be able to switch from the X VT to a console and back reliably (should be fine with all KMS drivers). ![]() ![]() By far the easiest setup is to have two computers, and ssh from one into the other.ĭo not run these commands from your existing login session you will freeze the desktop. gdb is useful for debugging the C side primarily. There are a variety of tools available for debugging, but the primary one is gdb. (See Projects/GnomeShell/DebuggingJavaScript for a description about how to debug Java Script code).įirst, you need to understand GNOME Shell is split between C and JavaScript. (See Projects/GnomeShell/Debugging/Graphics for graphics-specific information). A note about using "-replace" replace on systems with systemd user sessions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |