xlib_shm / xlib_raw viewer question

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
50cc
Posts: 82
Joined: Sun Mar 23, 2008 12:01 pm
Location: The Netherlands

xlib_shm / xlib_raw viewer question

Post by 50cc »

I installed xlib_shm on our server, it's great!

At the moment I run it by clicking a shortcut I made in the XFCE window manager which runs this:

Code: Select all

sudo ./xlib_shm -m 1 -m 23 -m 11 -m 12 -k 0x7a6d0000
Apparently I need to be root to run it so I need to sudo it and enter the root password.

I would like to start xlib_shm automatically when XFCE starts without the sudo/root problem.

How would one accomplish this??
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Make xlib_shm setuid root.

Code: Select all

sudo chown root.root xlib_shm
sudo chmod +s xlib_shm
Then you can run it without using sudo.
I dont' use XFCE but I think it uses ~/.config/autostart or similar to run programs at startup. Google will help you with that.
50cc
Posts: 82
Joined: Sun Mar 23, 2008 12:01 pm
Location: The Netherlands

Post by 50cc »

Many thanks! It worked! :D

I posted the 'entire' story on my new blog:
http://selfmadenetadmin.blogspot.com/20 ... start.html
johnnytolengo
Posts: 184
Joined: Tue Oct 14, 2008 5:59 pm

Post by johnnytolengo »

I don't have xlib_shm in my PC.


how to install it?

I can't find the package with: aptitude search xlib_shm

thank you.

J.
50cc
Posts: 82
Joined: Sun Mar 23, 2008 12:01 pm
Location: The Netherlands

Post by 50cc »

Quote from my blog on setting this up:
Here's how I got it to work (once you know how it's really simpel):

Downloaded this file:
wget http://dig.hopto.org/xlib_shm/xlib_shm-0.6.3.tgz (the one without OpenGL for this older embedded intel card)

Installed Xvideo dev files:
sudo apt-get install libxv-dev

sudo nano xlib_shm.c
And changed /usr/local/etc/zm.conf into /etc/zm/zm.conf

sudo make all

Place the binary xlib_shm in /usr/sbin/

Ran the new binary with four monitors and the shared memory ID used by our Zoneminder installation.
sudo ./xlib_shm -m 1 -m 23 -m 11 -m 12 -k 0x7a6d0000

It worked! Excellent!!!
More info on extra scripts, options and automation are on my blog.
Post Reply