Software, Physics, Data, Mountains

...and other random associations

Multiuser Screen Sessions

ok, trying to do this for real…

I set suid on screen, so

mmm@kojiro:~/projects/ttu/doc$ ls -al /usr/bin/screen
-rwxr-sr-x 1 root utmp 340604 2010-08-17 10:55 /usr/bin/screen

becomes

mmm@kojiro:~/projects/ttu/doc$ ls -al /usr/bin/screen
-rwsr-sr-x 1 root utmp 340604 2010-08-17 10:55 /usr/bin/screen

and then /var/run/screen needs to be 755 instead of 775… i.e.,

mmm@kojiro:~/projects/ttu/doc$ ls -al /var/run | grep screen
drwxrwxr-x  5 root     utmp      100 2011-02-08 10:17 screen

becomes

mmm@kojiro:~/projects/ttu/doc$ ls -al /var/run | grep screen
drwxr-xr-x  5 root     utmp      100 2011-02-08 10:17 screen

Now, user1:

user1@kojiro:~$ screen -x -S junk -t junk

or just

user1@kojiro:~$ screen -S junk

user1 sets multiusermode

Ctrl-A :multiuser on
Ctrl-A :acladd user2
Ctrl-A :acladd user3

user2

user2@kojiro:~$ screen -x mmm/

user3

user3@kojiro:~$ screen -x mmm/

another version

For security reasons, screen by default is installed so that other users within the system can not attach to your screen sessions. To allow this to be changed one must set screen to run SUID root by doing the following (once):
sudo chmod +s /usr/bin/screen
sudo chmod 755 /var/run/screen
Then user1 can share their session on host as follows:
screen -S shared-session
Ctrla :multiuser on
Ctrla :acladd user2

user2 on host can then connect to the shared session like:
ssh user2@host
screen -x user1/shared-session

first view screen -S junk

second view screen -x -R junk


maybe this’ll work…

user1

screen -t junk

user2 becomes user1

screen -x -t junk

looks like this works… maybe overkill but wtf?

screen -xR -t junk -S junk

allegedly, screen -t junk screen -x -t junk should work

below is old

It’s possible for two users to share a screen session. This is particularly useful if multiple people want to monitor a long running task, and it’s easy to do.

user #1:

screen -R longbuild

user #2:

screen -x -R longbuild

The -x flag tells screen to allow you to attach to an already attached session. This is also good for crazy stuff like a collaborative Vim session (if you’re into that sort of thing).

Fix Spaces in Osx

defaults write com.apple.dock workspaces-wrap-arrows -boolean NO

Hawk-notes

a1 138G root
a2 swap
b1 1T /opt
c1 1.5T /usr/local
d1 2T /home

Manual Vlans for Libvirt?

I’m gonna set up hawk to configure VMs into isolated VLANs.

most of this comes from

http://www.tolaris.com/2010/02/20/vlans-bridges-and-virtual-machines/

setting up br0, bt10, and br12

Howto-ddwrt

I’m loving dd-wrt…

startup scripts

http://www.dd-wrt.com/wiki/index.php/Startup_Scripts

iptables

vlans

Dnsmasq Ddwrt

todo - lease times (infinite?) - maybe remove specified ip addresses? - find better way to configure dnsmasq from startup?


unresolved:

had to add static addresses to /etc/hosts on router and then

killall -HUP dnsmasq

need to figure out how to get this working from router reboot!

ok, resolved this…

nvram set rc_startup="
  echo '10.10.10.2 hawk.mmmhtm.org' >> /etc/hosts
  echo '10.10.10.10 laserjet.mmmhtm.org' >> /etc/hosts
  killall -HUP dnsmasq
"
nvram commit
reboot

Debuggin Eucalyptus Aoe

mostly from http://open.eucalyptus.com/forum/attaching-ebs-image and http://www.debian-administration.org/articles/553


problem1

vtund wasn’t in sync with the pid in /var/run/eucalyptus and so it “wasn’t able to bind to socket” in /var/log/syslog


problem2

Volume is created and available from the SC ps awux | grep vblade should return something… something running on the br0 interface… but they seem to be stuck on eth0


general method for exporting things using aoe

On the storage controller (“target” in AoE lingo)…

Load the module modprobe aoe

Then vbladed 0 1 eth0 /dev/sdd5 or for euca vblade 0 5 br0 /dev/vg-TldY4A../lv-hrh7uQ..

Then on the NC (“initiator”)…

discover aoe-discover (this wasn’t necessary on a NC… just worked once the target had the right device)

status aoe-stat ls /dev/etherd/

this showed a e0.5 entry that can be treated like a regular partition

Note: iSCSI is over TCP (layer 4?), AoE is over Ethernet (layer 2) so iscsi can be routed, aoe can’t (at least not without ebtables and l2 switches) aoe is designed to be used in a tighter lan environment


Had to manually change the files in /var/lib/eucalyptus/db/ to use br0 instead of eth0

This is probably the biggest problem with setting up eucalyptus!!


vtun?

dunno wtf… I assume it’s something going on with tunneling traffic between SC and NC instances?

Git and Bzr


update

Some tools from this were broken… got a decent set of revisions working… yay!

Grab and install the following:

git-bzr-ng

git clone http://github.com/termie/git-bzr-ng.git
(working HEAD was 280eba)

Now install

cd /usr/local/bin
sudo ln -s ../src/git-bzr-ng/git-bzr-ng git-bzr

bzr-fastimport

bzr branch lp:bzr-fastimport -r327

Now install.
I know there’re much better ways to do this… I’m just capturing what I did to get it to work

cd bzr-fastimport
sudo ./setup.py install
mv /usr/local/lib/python2.7/dist-packages/bzr-fast"*" /usr/lib/python2.7/dist-packages/
mv /usr/local/lib/python2.7/dist-packages/bzrlib/plugins/fastimport /usr/lib/python2.7/dist-packages/bzrlib/plugins/

original post

from http://wiki.openstack.org/GitBzrInstructions

on Ubuntu/Debian:

apt-get install git-core bzr bzr-fastimport; 
git clone git://github.com/kfish/git-bzr
cd git-bzr
sudo cp git-bzr /usr/local/bin

Using git-bzr:

An example session goes like this:

$ git init
$ git bzr add upstream ../bzr-branch
$ git bzr fetch upstream
$ git checkout -b local_branch upstream
$ Hack hack, merge merge....

$ git bzr push upstream

see also http://doc.bazaar.canonical.com/migration/en/survival/bzr-for-git-users.html

Gdata-ruby

From:

https://github.com/dsisnero/gdata-ruby.git
https://github.com/tsenying/gdata-ruby-util.git
http://code.google.com/apis/gdata/articles/gdata_on_rails.html

gdata-samples in ~/src

svn checkout http://gdata-samples.googlecode.com/svn/trunk/ gdata-samples-read-only

or

git svn init http://gdata-samples.googlecode.com/svn/trunk/
git svn fetch

Sunfire Ilom

log into the agent

SP -> set /SP/SystemInfo/CtrlInfo PowerCtrl=reset  
The System will be Reset.
Do you wish to Continue..?(y/n)y
Set 'PowerCtrl' to 'reset'
/SP -> 

start /SP/AgentInfo/console



/SP -> set /SP/SystemInfo/CtrlInfo PowerCtrl=forceoff
The System will be force Powered Off.
Do you wish to Continue..?(y/n)y
Set 'PowerCtrl' to 'forceoff'
/SP -> show /SP/SystemInfo/CtrlInfo                  

  /SP/SystemInfo/CtrlInfo
    Targets:

    Properties:
        PowerStatus = off
        PowerCtrl = (Cannot show property)
        BootCtrl = regular
        IdLedCtrl = off

    Target Commands:
        show
        set