don't ask - but i might need this in the near future...
Monday, June 9, 2008
Friday, May 30, 2008
nss signtool, xulrunner, firefox 3 add-ons and things i don't want to mention - currently on a debian system
in the very unlikely case someone wants to write an add-on for firefox - and let's assume this add-on should run with the new ff3... and the add-on should not be hosted on mozilla.org... well, this is going to be a tough one (and i dont't even want to go into that).
furthermore, let's assume (now, that it's obvious that this add-on needs to be signed) the signing is supposed to take place on a current debian system...
...and, last but no least, this system should also run a xulrunner in ver.> 1.8.1
these constraints will lead (among others) to the following packages:
libnss3-1d, 3.12.0~rc3-1
libnss3-tools, 3.12.0~rc3-1
related:
furthermore, let's assume (now, that it's obvious that this add-on needs to be signed) the signing is supposed to take place on a current debian system...
...and, last but no least, this system should also run a xulrunner in ver.> 1.8.1
these constraints will lead (among others) to the following packages:
libnss3-1d, 3.12.0~rc3-1
libnss3-tools, 3.12.0~rc3-1
in case the signtool refuses to do part of its job (and complains about missing libraries) this might help:
ln -s /usr/lib/nss/libsoftokn3.so /usr/lib/libsoftokn3.so
ln -s /usr/lib/nss/libnssdbm3.so /usr/lib/libnssdbm3.so
ln -s /usr/lib/nss/libsoftokn3.so /usr/lib/libsoftokn3.so
ln -s /usr/lib/nss/libnssdbm3.so /usr/lib/libnssdbm3.so
related:
Tuesday, May 27, 2008
Saturday, May 24, 2008
OpenVPN, Tunnelblick, bridged network (tap device), mDNSResponder, and daapd on OS X - Part 2
- i found the following sh-script (executed with administrator privileges) does help most of the time (cf. http://iiegn.blogspot.com/2008/03/openvpn-tunnelblick-bridged-network-tap.html for the problem...)
#!/usr/bin/env bash
killall openvpn
sleep 1
launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sleep 3
kextunload /Library/Extensions/tun.kext
kextunload /Library/Extensions/tap.kext
sleep 5
kextload /Library/Extensions/tap.kext
kextload /Library/Extensions/tun.kext
sleep 5
kextunload /Library/Extensions/tun.kext
kextunload /Library/Extensions/tap.kext
launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
in order to get this sh-script executed the following lines of AppleScript might be helpful (saved as an Application Bundle with the above script inside the bundle):
set myPath to POSIX path of (path to me as string)
do shell script myPath & "/Contents/Resources/Scripts/upndowntaptun.command" with administrator privileges
display dialog "You may now restart your Tunnelblick Connecrtion." buttons {"OK"} default button 1
references:
Tuesday, April 29, 2008
Static Lib contents
It is written at the top of the ar manpage, but I seem to miss it every time: to print all symbols contained in a static archive, emit
nm --print-armap [archive]
really simple.
Saturday, April 19, 2008
firefox and system-wide installation/deployment of certificates
wanted to add CACert.org Root Certificate in firefox for all users on a system. it seems as if this were not possible...
(but see: http://wiki.cacert.org/wiki/NSSLib and https://bugzilla.mozilla.org/show_bug.cgi?id=215243)
(but see: http://wiki.cacert.org/wiki/NSSLib and https://bugzilla.mozilla.org/show_bug.cgi?id=215243)
however, one can use certutil to create a cert8.db and deploy that with the default profile - of course, that doesn't help with users who already have profiles...
certutil -N -d .
certutil -A -n "SomeName" -t "C,C,C" -i some.crt -d .
and then copy cert8.db, key3.db and secmod.db to Firefox-Root-Dir/defaults/profile.
references:
and then copy cert8.db, key3.db and secmod.db to Firefox-Root-Dir/defaults/profile.
references:
Wednesday, April 2, 2008
VIM: Punch the Mode Line
mode line: lines at top or bottom of source code files that contain options for configuring the editor, c.f.:
(of course, in emacs 'mode line' denotes a entirely different concept...)
:help modeline
(of course, in emacs 'mode line' denotes a entirely different concept...)
Monday, March 24, 2008
OpenVPN, Tunnelblick, bridged network (tap device), mDNSResponder, and daapd on OS X
tried to get the music library from a server running firefly to a mac via an OpenVPN tunnel
- where the same server is also the OpenVPN server and is using a tap device and
- the mac was using Tunnelblick
though this setup seemed to work for my linux machine it didn't quite do the job on the mac: there the mdns information was only used occasionally (though ethereal aka. wireshark confirmed that it was being transmitted).
currently i think that the mDNSResponder is behaving - at least - strange and a possible work-around seems to be
- install the tun/tap-driver separately from Tunnelblick (so the driver is loaded at boot time and mDNSResponder is not 'surprised' by its late appearance...)
- turn the interface of the internet connection (the one tunnelblick uses to connect to the server - not the tap one...) off and on
Wednesday, March 19, 2008
Use Time Machine (OS X) with a (samba) Network Drive
sudo defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
references:
...but cf. http://pastebin.com/f47499d34 after update to 10.5.2.
references:
Tuesday, March 18, 2008
quick reminder: Getting X11 forwarding through ssh working after running su
$ xauth list $DISPLAY
You'll get something like
somehost.somedomain:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae
Then, after having done su, tell the new user what the cookie is:
$ xauth add somehost.somedomain:10 MIT-MAGIC-COOKIE-1 4d22408a71a55b41ccd1657d377923ae
(just copy'n-paste the output of the above 'xauth list' onto 'xauth add') That's it. Now, you _should_ be able to start any X application.
references:
related:
You'll get something like
somehost.somedomain:10 mit-magic-cookie-1 4d22408a71a55b41ccd1657d377923ae
Then, after having done su, tell the new user what the cookie is:
$ xauth add somehost.somedomain:10 MIT-MAGIC-COOKIE-1 4d22408a71a55b41ccd1657d377923ae
(just copy'n-paste the output of the above 'xauth list' onto 'xauth add') That's it. Now, you _should_ be able to start any X application.
references:
related:
Setup Samba for Bonjour networking with OS X 10.5 Leopard
put the following into /etc/avahi/services/[somename].service on a linux machine running samba and avahi-daemon:
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h filer</name>
<service>
<type>_smb._tcp</type>
<port>139</port>
<host-name>zaphod.bn.dev</host-name>
</service>
</service-group>
references:
Friday, February 15, 2008
Negate find results
Find files that do not match expression and dostuff on them:
Example:find ./ [expressions] -prune -or [dostuff]
finds all non-svn files and prints their paths on stdoutfind ./ -name '.svn' -prune -or -type f -print
Sunday, February 10, 2008
Zero Config User Initiated Cross Platfrom Remote Desktop Assistance
Use Case
you frequently give remote assistance to users in very heterogeneous environments
Problem
user-side firewalling makes it impossible to just start up e.g. a vnc server.
Solution
let the user initiate a ssh tunnel from his machine to yours, forwarding his local vnc server port.
Rationale
it is way easier for you to allow for incoming traffic once than it is to do the same on every user's machine.
Implementation
Server
enable your sshd and create a dedicated help user with shell /bin/false
Client
use a shell script to start the vnc server and the ssh tunnel. this is only non-trivial for windows, so I shall outline that below.
Extensions
Appendix: Client on Windows
after running this script, you should be able use a vnc viewer to connect to localhost on your server and see the client's screen. you will want to set -compress 9 -encoding tight explicitly to tune the connection.
you frequently give remote assistance to users in very heterogeneous environments
Problem
user-side firewalling makes it impossible to just start up e.g. a vnc server.
Solution
let the user initiate a ssh tunnel from his machine to yours, forwarding his local vnc server port.
Rationale
it is way easier for you to allow for incoming traffic once than it is to do the same on every user's machine.
Implementation
Server
enable your sshd and create a dedicated help user with shell /bin/false
Client
use a shell script to start the vnc server and the ssh tunnel. this is only non-trivial for windows, so I shall outline that below.
Extensions
- use a private/public key pair for ssh authentication
- use a different server user for each supported user
- automatically react on incoming ssh sessions
Appendix: Client on Windows
- Download the tightvnc zip distribution, unzip
- Download plink (the putty ssh command line client) and save it into the vnc folder
- start winvnc.exe
- enter a password (you will use this later when using your vnc client to connect to the user's machines), fix the port to 5900, quit the application
- startup regedit
- add a dword key "AllowLoopback" with value 1 to LOCAL_MACHINE\Software\ORL\WinVNC3
- export LOCAL_MACHINE and CURRENT_USER\Software\ORL to vnc.reg and vnc2.reg in your vnc folder
- close regedit
- create the batch file and zip the whole directory for distribution:
reg import vnc.regwhere helpaccount and helppassword match the local account you created on your server and my.dns.org is your server's hostname.
reg import vnc2.reg
taskkill /F /IM winvnc.exe
start winvnc -run -shareall
plink helpaccount@my.dns.org -pw helppassword -N -R 5900:localhost:5900
after running this script, you should be able use a vnc viewer to connect to localhost on your server and see the client's screen. you will want to set -compress 9 -encoding tight explicitly to tune the connection.
Monday, February 4, 2008
top (unix command) with two samples in logging mode - but only the second matters
i wanted to use the unix top command with GeekTools and found that this wasn't as straight forward as i had expected...
anyways, the following bundle does the trick:
anyways, the following bundle does the trick:
top -o cpu -l 2 -u -S | sed -e '2,/^Processes:/ d'
Saturday, January 26, 2008
use Quick Look (OS X) from command line
qlmanage -p FILE
qlmanage -p FILE >& /dev/null &
Subscribe to:
Posts (Atom)