- Hits: 983
Here I will collect stuff related to Linux and Server stuff useful mostly for my own work but you might find a trick or two that could suit any *nix geek out there...
- Hits: 942
Well, not the most high-tech of questions but still something that seems to confuse people... :o
$ grep -H -r "my text" /home/user
Only want the filenames, eh?
$ grep -H "my text" /home/user/* -R | cut -d: -f1
And if I know the filename or extension, what then?
$ find / -type f -print0 | xargs -0 grep -l "test"
Best of luck finding your texts...
- Hits: 906
Have you ever tried to run a graphical Java interface and ended up with an error stating "xlib.lock failed". Well, I have many times...
The error looks like this:
"xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed"
Why this occurs I have no idea about and I tried to read and understand where it comes from but failed. There is a lot of confusion flying around different forums and articles but no one has really explained this in an understandable manner that I have found... Maybe only Linus Torvalds knows... ;)
Anyhow, the solution is quite simple, just fire the below in a terminal as the same user you try to trigger the Java app:
> export LIBXCB_ALLOW_SLOPPY_LOCK=1
- Hits: 916
VI Search and replace Windows char(13):
- Hits: 894
If you get problems like "cannot connect to display" or something similar try executing:
> xhost +
This normally occurs if you try to sudo (or su) to another user and try to run a X-app.
This will allow all applications running as any user to connect to the display.
You might need to export the Display again: export DISPLAY=:0.0