I'm working on Centos6.3 -- Gtk-2.18 for a C(++) app. I'm having trouble with Metacity hanging when I set breakpoints in GTK libraries. It looks like the breakpoint is affecting the system-wide copy of the library, ie Metacity's, not just my app's and I have to force-restart my VM. Is there a way to force copy-on-write semantics for those shared libraries?
BTW, I don't have the GTK2.18 source -- the link is dead on http://www.gtk.org/download/linux.php --- is there working mirror somewhere? Thanks.
The breakpoint is not system-wide. Instead, what is most likely happening is that your program is hitting the breakpoint while it has a server grab. This prevents your other windows from receiving events.
There are different ways to work around this. Some GUI toolkits (I don't remember about Gtk) have a way to prevent grabs, to facilitate debugging. Or, you can debug remotely from another machine. Or, similarly, in a VM or using a virtual X server for the program you are debugging.
Related
E.g. Chrome, Electron apps, etc. Without setting it, I get graphical glitches on my Linux machine - but it's very tedious to set manually and make custom shortcuts etc. Is there any way to accomplish this by an environmental variable or something else clever?
The arguments that need to be added to each application are normally as follows, but I'm hoping there's some more global method I've overlooked: --use-vulkan --enable-features=Vulkan
In this tutorial, it says:
Dynamic linking is a little bit more tricky, but it is much more
powerful as it allows you to load skins without relinking the
application. You can even update your application without needing to
restart it.
So I decided to put it to the test, and while the app was running, I replaced libmy_skin.so file with another skin.
The skin in the running app did not change.
Is the statement above incorrect, or did I do something wrong?
You need to turn this option on:
http://cppcms.com/wikipp/en/page/cppcms_1x_config#views.auto_reload
After a lot of searching I have yet to find a way to sign a BlackBerry application on a Linux distribution with no GUI.
As of right now I'm getting the error "Unable to request signatures until this application has completed the initial key generation.". The problem is I'm not able to register the CSI files it seems via CLI. Has anyone accomplished this without setting up X11?
Yes, its definitely possible to do this on a headless Linux box. Heck, I do it on a headless Solaris/UltraSPARC server :-)
For actually running the tool, I like http://bb-ant-tools.sf.net/ . If you are using an older version of the signature tool, you may need to make some modifications as described on http://slashdev.ca/ .
While the tool is fully controllable from command-line parameters, it does unfortunately still require access to a running X server to function. The workaround for this is to install "Xvfb" (a fake X server for purposes like this), launch it in the background on your system, then set the DISPLAY variable so the signature tool will use it for its non-interactive GUI.
Blackberry sigtool may not be supported in Linux and it may be only partially working. BB dev tools are still Windows-centric.
For the purposes of prototyping a new set of shared libraries in a development sandbox (to which I don't have root access), I'd like to know how to execute a binary while completely overriding the contents of /etc/ld.so.cache, so that none of the system libraries get loaded.
How can this be done? I have looked at mechanisms like setting the LD_LIBRARY_PATH environment variable or launching the program wrapped inside /lib/ld-linux.so, but these methods all seem to supplement the loading of libraries from /etc/ld.so.cache, but not override it completely.
Help?
Short of providing your own loader, there is no way to ignore the library path cache.
There doesn't seem to be a good way to do this directly on your host system, but you could use a chroot or a container (Docker/LXC/etc) to isolate your application and ignore the host's ld.so.cache simply by not mounting it into the chroot/container.
I want to intercept dll's loading so I can use them. My first idea was to hook GetProcAddress. Surprisingly, by hooking it, I can only intercept calls made within the process that owns my library. (I opened another executables that call GetProcAddress and those calls don't get intercepted) (I guess because it is dynamically compiled against my lib)
Example of the output:
C:\Windows\syswow64\kernel32.dll
Module32NextW
C:\Windows\syswow64\kernel32.dll
CreateToolhelp32Snapshot
C:\Windows\system32\DINPUT.dll
DirectInputCreateW
C:\Windows\SysWOW64\ntdll.dll
DirectDrawCreate
Anyway, what I want to know is where I should start to be able to intercept dlls loading so I can then use their functions.
Basically, I want to be able to call GetModuleInformation for any dll loaded.
First, what are you doing that requires a global hook?
If you want to be notified that a DLL has loaded in any process, you can look into PsSetImageLoadNotifyRoutine, which is a kernel-mode routine.
Despite it being kernel mode, it's not very hard to use and writing a basic driver is pretty fun.
Another way would be to force a load of your library in every process. There are a variety of methods, one of the more legit ones would be Windows Message hooks.
Install a system-wide hook on the LoadLibrary function.
(I have no idea how to use that small comment thing underneath the question so)