Friday, October 21, 2011

Truecrypt and Debian

Future self - the Truecrypt installer will complain about (gksudo:21149): GLiB-CRITICAL **: g_str_has_prefix: assertion 'str != NULL' failed
Press Enter to exit...

If you try and install it via the downloaded installer.  What you should do is run the installer, and select 'Extract'.

Truecrypt Installation


It will dump a tar.gz into /tmp.

Extract that, and a folder called 'usr' will appear.  Copy that folder where-ever you want.  Inside BIN will be the truecrypt files.

You may need to play with permissions.

Sunday, October 16, 2011

Samba, Debian, and Windows 7

I have a headless linux computer I use mainly as a file server, but also as a bit of an open source science toy.  I can start a ssh / VNC to it from anywhere in the house.  Until recently, it was running Ubuntu 11.04.  I attempted an upgrade to 11.10, but something went wrong and it left the system in a less than optimal state.

That's all right though, I was looking for an excuse to simplify it to straight Debian.   The Debian install went well, though I noticed I took for granted many of the packages that came installed by default in Ubuntu. (make anyone?)  A few apt-gets fixed all of that, though, and I was left with the last headache I remembered:  properly configuring samba to work with my Windows 7 computer.

"This shouldn't be hard", I thought remotely.

The best walkthrough I found was on http://www.unixmen.com/linux-tutorials/1524-standalone-samba-in-debian-squeeze - I simplified it a bit, since I'm okay with home users having access to their own directories.

My path went something like this:


  1.  Make my Windows 7 workgroup name WORKGROUP by clicking start, right clicking "Computer", and hitting "properties" 
  2. Install samba on the Debian computer with 'sudo apt-get install libcupsys2 samba samba-common'
  3. I don't care about domain name for my simple setup, and I make sure my default workgroup is titled WORKGROUP during setup
  4. After completion, sudo edit /etc/samba/smb.conf and uncomment the line 'security=user'
  5. Under the [homes] section, add "valid users = my_username"
  6. change the "read_only" from YES to NO to enable writing
  7. save, quit, and restart samba with a sudo /etc/init.d/samba restart
  8. FINALLY, remember that samba doesn't have access to your Linux login....so you must set the samba password for your username separately via 'sudo smbpasswd -a username'
At this point, you should be able to access the linux home directory, from windows, by typing in the network IP address into the path of a window...such as
\\192.168.1.9 and login with your user name and samba password

Tada




Saturday, August 27, 2011

Another Note to Self

In Android, to get things to center properly, use the android:gravity tag in the Layout surrounding it....


<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="horizontal"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:gravity="center">
 
<Button   android:text="Add"
          android:id="@+id/button_dialog_set"
          android:textStyle="bold"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          >
</Button>
<Button   android:text="Cancel"
          android:id="@+id/button_dialog_cancel"
          android:textStyle="bold"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          >
</Button>
</LinearLayout>


Produces two buttons, centered, next to each other

Tuesday, August 23, 2011

GNU Octave plots

Because I can't afford Matlab, I have been experimenting with GNU Octave on my Linux computer.  It is very expandable via free packages, and seems more command line based.

Anyway, this entire post is to remind myself that you can capture plots via the 'print command' and the following syntax:

print -djpg filename.jpg ....it took a while to understand the help print command, and that you are specifying the 'device' via the print -dFILETYPE_OR_DEVICE syntax

In conclusion, here are some plots of the LMS algorithm converging on a static, unknown system:

Elements Converging

Error Converging

Thursday, August 18, 2011

Garden Success and Failure


Delicious, if small, carrots

Because in my mind, I'm preparing for the apocalypse, I started a garden.  It was a mildly successful mixture of the following:

  • peppers
  • onions
  • carrots
  • pumpkins
  • zucchini
  • lettuce
  • spinach
  • herbs
  • tomatoes

Spot the grasshopper

In review, there are some lessons learned:




1: Pumpkins and Squash have flowers that bloom for maybe 1.5 hours a day, and if they aren't pollinated, they die

2: BUGS oh the bugs.  Everyone is out to eat my vegetables.  Constant vigilance is required, inspecting all leaves for eggs or other abnormal signs

3: Spacing is important....one garden is full of tomato plants, zucchini, and some wildflowers.  A little too much, with no room to grow

4: Carrots grow to be as big as they can go deep.  I guess this made sense in retrospect.



Oh well, there is always fall crop