Wireshark 1.6.7 with OPC ua dissector inside chroot on debian squeeze
NEEDS SOME MORE CLEANING
sudo apt-get install debootstrap schroot
cd ~/
sudo mkdir /chroot
NOTE: if you make the directory outside your home directory, make sure your normal user has the right privileges.
sudo debootstrap --include=iceweasel sid /chroot http://ftp.us.debian.org/debian
NOTE1: include iceweasel with the installation. This is an easy way to install W.
NOTE2: use a nearby mirror if you don't live in the US of A.
[sid]
description=Debian sid (unstable)
aliases=default
type=directory
mount-options=-o atime,sync,user_xattr
location=/home/<yourUser>/chroot
users=<yourUser>
root-users=<yourUser>
run-setup-scripts=true
run-exec-scripts=true
# mount.defaults: static file system information for chroots.
# Note that the mount point will be prefixed by the chroot path
# (CHROOT_PATH)
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev /dev none rw,bind 0 0
/dev/pts /dev/pts none rw,bind 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/home /home none rw,bind 0 0
/tmp /tmp none rw,bind 0 0
schroot -p -c sid
iceweasel
You may have trouble starting X applications in your chroot because you cannot open display 0:0. You can fix this by typing: xhost + before entering the chroot:
xhost +
schroot -p -c sid
iceweasel
WARNING: to be safe, you should use a wrapper script as described over here
sudo apt-get install wireshark
wireshark
NOTE: you can start it directly from outside the crooted environment like so:
schroot -p -c sid wireshark
You may get errors when installing things with apt-get because your locales aren't properly setup. Fix like so:
apt-get -f install.
apt-get install locales
dpkg-reconfigure locales
Select the locale(s) you want to use (you can check outside your chroot what you're using there with
wireshark as non-root user:
METHOD 1
dpkg-reconfigure wireshark-common
--> choose yes
usermod -a -G wireshark <youruser>
You need to logout and login again to make the changes of your group to take effect.
METHOD 2 (works tested)
$ sudo -s
# groupadd -g wireshark
# usermod -a -G wireshark <yourUser>
# chgrp wireshark /usr/bin/dumpcap
# chmod 4750 /usr/bin/dumpcap
NOTE: you can add the group outside of your chroot.
Create a file named wireshark_wrapper in
/usr/local/bin/wireshark_wrapper
#!/bin/bash
# right way for export Xauthority file
#xauth extract /home/<YOURUSERNAME>/chroot$HOME/.Xauthority $DISPLAY
xhost +
# run your command
schroot -c sid -p wireshark
# remove the Xauthority
#rm -f /home/<YOURUSERNAME>/chroot$HOME/.Xauthority
xhost -
and put an icon on your desktop/toolbar that calls this script.