Second Post!

Somehow, I had expected to post here a few more times this year, not sure what I was thinking.  But, better late than ever.  Now for something Halloween-related:

IMG_7560

And here’s a picture in the light:

IMG_7558Good-sized pumpkin, and I also made sure to save the seeds:

IMG_7557Basically, you pick the seeds out of the pumpkin guts and rinse them out well.  Then you can let them dry for about a week, and save them in an envelope.  I’ve got the ones above from the big pumpkin, as well as some from a smaller one.  I’m not sure I’ll have the space to plan them in the spring, as they do kind of take over, but I’ll see.

Anyways, I mentioned an homebrew inverter project before.  I’m still tossing this around, but I think I’ve thought of a way to simplify part of it.  More information will come, sometime.

In the mean time, Happy Halloween!

First Post (of 2013)!

Alright, New Year’s is over, and it’s 2013.  I didn’t put a whole lot of thought into resolutions, but here are a few things I’ve been thinking of regarding this site:

  • Projects.  I mentioned the inverter, and that and some other things have been kicking around in my head.  Now I want to start work on them and share.
  • Wiki.  This goes with the above, as I think it will be a better format for some things.  It won’t be for everyone to edit, but I think it will present certain bits of information in a better fashion than this blog.  It’ll also be a little easier to maintain.
  • Housekeeping.  I’ve been meaning to update the theme here, and also take a look at some backend stuff.
  • Feverdreams Update?  I’ve been thinking of trying to modernize the Fever Dreams mirror, if for no other reason than to play with some Web development stuff.  This would mainly be backend, as I wouldn’t want to disturb the pristine late-90s look.  🙂  I sometimes wonder about updating with new content, but that will remain to be seen as I really don’t have any.

Anyway, that’s about it.  Have a good remainder of Christmas or whatever.

New Year’s Eve

This will be my last post of 2012!  The world didn’t end, which is nice, although certainly some things could have gone a lot better than they did.  All I’m going to say is that we must stay positive, and try not to lose hope.  There’s still a lot to be happy about in this world.

Anyway, I’m off to dinner, so stay safe, and maybe as a 2013 resolution I’ll update this site a little more and change the theme.

Power Inverter

I have a terrible habit of thinking of projects that would be neat, starting to work on them, then forgetting about them or otherwise leaving them until some point in the future at which I remember them, and then the cycle repeats.  Well, I’ve been mulling one particular project over in my head for a couple years, and now I’m going to declare my intention to start it and hopefully share it with the world: I am planning to build a power inverter.

Now, the truth is I have started on this project a little bit, mostly by sketches on paper and in LTspice, an excellent,  free (but not open source) circuit simulator.  For those unaware (and who didn’t feel like reading the Wikipedia entry), a power inverter (I’ll probably just refer to it as an ‘inverter’) is a device that converts direct current (DC) to alternating current (AC).  There are a number of applications for this…

  • Running household appliances in your car (shave while you drive!)
  • Backing up servers, medical equipment, or whatever else you want to keep running when the power goes out (UPS)
  • Running normal household appliances on a small renewable energy system
  • Connecting your small renewable energy system to the grid

And so on.  Inverters range from small ones you get at a hardware store, to big ones that can run small villages.  I’m not trying to run a village with this project, nor am I trying to power a significant portion of my apartment.  I would, however, like a small, high-quality inverter, and to really learn how it works.  And, I would like to publish instructions for this online, so that hopefully they will be useful to other people and the design can possibly evolve.

Here are my objectives for this project:

  • Output of 120 VAC, 60 Hz (nominal), 300 watts
  • Input of 12 VDC (nominal)
  • Sine wave output
  • Bidirectional: can also function as a battery charger with a transfer relay, similar to an uninterruptible power supply (UPS)

Now, this isn’t really anything novel.  As I mentioned, there are smaller inverters around, and you might be wondering why this would be worthwhile compared to say buying a small inverter at the hardware store for less than $100.  Well, as I mentioned, I’d like to learn, but that’s not all.  Note the ‘Sine wave output’ requirement.  Most of those cheap inverters won’t have this and will thus produce dirtier power.  Also, I haven’t really found a smaller unit that can act as an inverter/charger, which is something that would come in handy for me – while I do have a largish battery with some solar, it would be nice to be able to charge from the grid with this unit and essentially have a UPS.  Of course, I could get a UPS too, but they’re not really designed for continuous usage, they tend to have dirty outputs, and are designed for charging smaller batteries (usually big enough to allow you to shutdown your equipment, or start up generators or whatever).  Also, for safety reasons, I will NOT being setting this up as a grid tie inverter, meaning it won’t sell power back to the power company.

Now, I would also like to point out that I am not sure how well the design I’m considering will scale.  By this, I mean that were I to build a bigger unit (>1kw), I might approach it differently – this is kind of an experiment.  So, if you’re thinking of building something that you can use to power a chunk of your house when the power’s out in the next hurricane, I’d advise pursuing other options at this point.  (Hey, hopefully this can evolve…)  There are actually several commercial manufacturers that make products (inverter/chargers) that are similar to what I’m building, but work at higher power levels.  I have not used any of those companies’ products, but they do have decent reputations.  Also, if your power doesn’t go out very often, and you just want some quick, cheap backup, a normal gas-powered generator isn’t a bad idea.

I should note that I would not consider this the ideal beginning electronics project; while not impossible it will be somewhat challenging, and will involve high (lethal) voltages.  If you’re unsure of things, feel free to ask here (I’ll try to answer as best I can), and go brush up on power electronics (there are plenty of books on this subject, as well as college classes).  I’ll be saying this again, but whatever you try must be at your own risk.  I’ll try to keep up with this and post more as I go, so stay tuned.  It should be fun.

Happy Halloween!

I hope you all had a great Halloween!  I didn’t do too much, and didn’t even get too many trick-or-treaters, but I did carve a pumpkin:

One thing to note for next year, though is to be careful of the tools.  I picked up one of those carving kits.  I would avoid this particular kit in the future, though, as the saw broke:

The scoop was very nice, though.

I didn’t use any of the patterns, just made something up.  After the breakage I ended up going out and picking up a steak knife for working on a smaller pumpkin, which was fine.

On a more serious note, if you or a loved one was caught in Hurricane Sandy, I wish you all the best.  I wasn’t really hit beyond some wind and rain, but I know that there is still damage being repaired.  So be careful, and hang in there!

No Icons on Cinnamon Desktop

I’ve posted before about Linux Mint, as well as using Xfce.  While I hadn’t gotten Cinnamon working on the older machine, I did realize that there is in fact an ebuild for this on Gentoo.  I’ve been trying it on a laptop, and have found it to be pretty nice.  However, after logging in a few times, I could no longer see any icons on my desktop, nor could I drag anything onto it.

This is caused by the filemanager, nemo, not starting at login and taking over the desktop.  Starting the file manager manually by clicking the taskbar icon brings the icons back, but this only lasts until you close it.  I wasn’t sure what was causing this, until I remembered that I still had Gnome3 installed, which uses nautilus to manage the desktop.  Cinnamon is derived from Gnome, and you can actually use gnome-session-properties to manage startup applications in both.  The problem was that both nautilus and nemo were trying to take over, and neither were winning.

I didn’t have gnome-session-poperties installed, but I got it by emerging gnome-media.  In the list of applications it listed ‘Files’ twice.  Find the one that starts nautilus (highlight it and click ‘Edit’, then see what command it uses) and disable it.  After logging out and logging in again I had my desktop back to normal.

Trying Linux Mint 13

Mint

I had been curious to try out Linux Mint (see also the Wikipedia entry) for a while now.  Basically, it’s a distribution based on Ubuntu, which aims to provide a better out-of-the-box experience by including some proprietary software.  Ie, when you install it, you shouldn’t have to install many codecs or whatever, as you do with Ubuntu.  It’s also gotten more and more attention as people have grown tired of UI changes with Gnome 3 and Ubuntu’s Unity, since its feel is closer to that of Gnome 2.  Partly because of this, Mint has grown in popularity, spreading and taking over like its namesake herb (though it still seems to be second to Ubuntu).  Because of this, I thought I’d give it a try.

I have an older desktop, actually the first one I built back in the early 2000s (I think around 2003 or 2004).  This machine is old, but not exactly decrepit – it’s a dual AMD MP2800 rig, with 1 GB of RAM and a 120 GB hard drive.  Not my most powerful computer, but it still works pretty well.  Since it wasn’t doing much I figured I’d use it to test Mint 13, the latest release as of this writing.  I’m not going to lie, I don’t really feel like doing a full review.  There are tons of those around, just go to Google.  However, I have some remarks and a random tip or two.

Overall, installation was a pain and took me several attempts.  Now, don’t get the wrong idea here, I don’t really blame Mint for this.  This machine does not have a DVD drive, and Mint 13 no longer distributes CD images – they’re too big.  Now, I tried using a USB stick, which seemed to work, but was also slow…  Because while the motherboard can boot from USB, the onboard USB is 1.1, and it won’t boot off the 2.0 PCI card I have in there.  Luckily, there is a guide on howto remaster the DVD image and shrink it.  Basically, you just remove some installed packages.  I didn’t have a Mint system already, so I had to mess around with the tool they mention in order to run it on an Ubuntu 12.04 system.  (Basically, you need to either install the mint-core package in Ubuntu, or download the .deb and force an install or extract it.  Sorry to gloss over this, but hopefully most people either have faster USB or a DVD drive. If someone wants instructions, I’ll try to put something together.)  I remastered the no-codec CD, and ended up removing samba, firefox, java, and a few other things.  This should get you an image small enough to fit on a CD.  When the install’s done, just use the package manager to put everything back (that you want).

So, I got the install rolling.  However, I then ran into a problem with the installer hanging toward the end of the process.  Everything seemed to finish, but the window would close and leave only the spinning mouse cursor to indicate something was happening.  After leaving it for a while, rebooting revealed a failed install.  A fix for that is here.  Basically, when the live CD (or USB stick or whatever) boots, open a terminal and type this:

sudo apt-get remove ubiquity-slideshow-mint

This should allow the install to finish.

Finally, the system would not detect my nVidia card.  This card is old, and requires the legacy drivers, which the proprietary driver manager was unable to find.  This was annoying, but I found a solution here.  That guide has you set up a repository for Ubuntu Oneiric, and install the Xserver from that distribution along with the legacy drivers.

After going through that, I had a working install!  Like I said, I don’t blame Mint.  Not too much, at least.  It would have been nice if there was some support still there for the older video card, but then again this hardware is ancient.  I can also understand why they don’t distribute CDs.  But there you go, I’m probably not the only one who will have to go through some hoops to get it running on something older.

There is one more problem, however.  Due to what I can only consider to be my older video card, the desktop effects are slow.  Too slow to be usable, in fact, so I turned them off.  This also means no Cinnamon desktop, although the fallback Gnome option is actually quite nice. I’ll probably use this system as it is for a while.  If you liked Gnome 2, and want an Linux distro that’s newer but has that kind of feel, I would highly recommend checking Mint out.  That said, I’m not sure I’d install this again, but that’s just me.  Overall, it’s very nice.

XFCE/Nautilus Hybrid Desktop

It’s been a while since posting here, but I haven’t forgotten about you :).  I’ve still been mulling over (read: procrastinating) on some things, but a lot of that has been put on hold due to some positive developments in my life which I will not go into.  However, I do have some other news:

  • Development on my inverter project continues, look for more information sometime in the future (who knows).
  • I recently received my Raspberry Pi, and am looking at making it into the server for this site.
  • I’ve also been considering ways to make the Pi run at least partially on solar power.  As I’ve mentioned before this would be a neat thing to have my server do, although there are some logistical obstacles.

That said, the rest of this post is not about anything mentioned in the above list.  Rather, it deals with my frustrations regarding Gnome.  I upgraded to Gnome 3 on my Gentoo machine, and for the most part was happy with it.  That is, once I got used to the layout.  I understand why people might not like it, but it didn’t bother me too much.  However, eventually it started getting unstable, as in certain things would make it crash.  At first it was not much of a problem, but then it started to get more and more random.  I switched to Fallback Mode, which I actually kind of liked too.  However, this too proved to crash a little too often.  (Note: I was also having some issues with the clutter-gst package and introspection USE flag not compiling, but I think my stability problems are related to the current nVidia drivers.)

The other day, a crash happened while playing around with the excellent EDA software KiCad, and that was it: time to migrate to something else.  I’d used Xfce in the past, and had been happy with it, although I usually stuck to Gnome because I was familiar with it most of all.  Desperate, I emerged it.  It’s a great environment as is, but it just felt lacking.  I wanted to manage my desktop like I did under Gnome, with my wallpapers and the like.  Actually, I wanted Gnome, but it just wasn’t working out.  This post will explain how I made this environment more like Gnome by using Xfce with Gnome’s Nautilus file manager.  It’s not difficult, and hopefully it will help someone out.

Xfce is a lightweight desktop, and I should point out that doing this sort of defeats the purpose of having it.  That said, I had the hardware resources to use Gnome more than comfortably, so this really isn’t an issue.  Also, if you really like it, you might consider a distribution that uses it by default, which will probably integrate it fairly well.

Anyway, assuming you’re switching from something else (Gnome in my case), to start with you’ll need to install Xfce.  To do this on Gentoo, I used the following command (as root):

emerge -avt xfce4-meta

(Note: The Gentoo Xfce Configuration Guide is a great place to check out if using this distro.)

Next, logout and log back in with Xfce selected as your desktop.  You should have a vanilla looking desktop, and now we want to have Nautilus manage the folders and icons.  Open the Settings Manager (Applications Menu->Settings), and click on Session and Startup.  Now, before I go on, I should say that we are going to determine what gets started when you log in to your Xfce desktop.  So, close everything you don’t want open (leave the Settings manager open though).  In the Session tab, you should see a list of running applications.  Select the xfdesktop program, and kill it.  Now click the Save Session button.

So now, Xfce isn’t managing the desktop.  Click the Application Autostart tab, and you will see a bunch of different services, some Xfce-related, some Gnome-related.  In my case there was one called Files, which I checked.  This basically runs the command nautilus -n, which has Nautilus manage the desktop.  (If you’re unsure, you can select it, hit Edit, and look at the command.)  I also activated some other things, like the SSH Key Agent.

Logging out and logging in again, you should now have Xfce panels, but with a desktop managed by Gnome that responds like it did before.  If you want, play with the Xfce panels, and you can make it look fairly Gnome-like.  It’s a little weird, but I’m happy with it.  It doesn’t have all the 3D effects of Gnome, but it’s responsive, and so far has been fairly stable.

Nautilus and vsftpd

Just recently I was playing around with setting up an anonymous FTP server using the excellent vsftpd software.  (The ‘vs’ is for ‘very secure’.)  To test this out, I decided to connect from Nautilus, on my Ubuntu laptop.  Unfortunately, I got an error like this:

Sorry, could not display all the contents of "/ on ftp.whatsmykarma.com"

So, I gave this a try instead with the commandline ftp client on this machine, and it worked fine.  This had me scratching my head, but I figured it out eventually.  Basically, the problem is one of passive vs active FTP – look a the Wikipedia page for more information.  As it turned out, the commandline FTP client was defaulting to active mode, which basically means that the server listens on one port, and connects to a port on the client (that is, the client has to have one open and listening) to make the transfer.  This is fine if you’re on a local network, or have a loose environment firewall-wise where the server can talk to the client this way.  However, because this setup is a bit more difficult, passive FTP was introduced – the server listens on one port and then some other random ports.  The client doesn’t have to listen, just connect to the server on port 21, and then get which other port it has to connect to on the server to actually do the transfer.  This is basically an improvement, but it still means we want to listen on more ports than just 21.  For whatever reason Nautilus only seems like passive FTP (which is probably a good thing), and was giving that error because I’d only forwarded port 21 on the server.

Now, the fix for this is simple, but before I give much of my vsftpd.conf file I would like to address a concern that will no doubt be brought up: FTP isn’t that great.  Well, not from a security standpoint, at least.  Normal FTP just sends everything in clear text, and with minimal effort someone who has access to the datastream (eg, the guy in charge of your company’s firewall, or someone on your wireless network) can easily get this information.  Perhaps your FTP login details are used elsewhere, like for logging into to a system account.  (Like, you sit at your workstation and login with those credentials, and someone else getting them means they can read your Email and delete your crap.)  These days there are better options, such as SFTP (basically an FTP-like protocol that tunnels over SSH, and only really needs OpenSSH) that are better for a lot of things.  However, FTP is nice for certain things, like if you have a server that hosts a bunch of big files you want to put up for download.  You can do this with anonymous FTP, with no need for sensitive usernames and passwords.  I’m going to assume that this is kind of why you’re looking into FTP, and that roughly you know what you’re doing.  (Note that it’s also possible to use FTP with SSL, which could be handy in some cases when you really want to use FTP with login info.)

Anyway, here’s what we have to do.  We want to use passive FTP, and configure vsftpd thusly.  To do this we need to forward port 21 to it (of course), but we also need to have it listen on another port to do the transfers.  Traditionally the FTP server would randomly pick a port from a range, but you really only need one.  I chose 2020.  It can be anything, so long as it’s above 1024.  This is because the server will try to bind it as a non-root user.

Now, the other thing the server will do when we tell it we want to go into passive mode is send an address for the client to connect to (with the given port).  In my case, I’m on a dynamic IP, so we would like to give it a hostname to use.  Luckily, vsftpd will allow us to do all this.  So, for a simple, anon-only FTP server that works in passive mode, here is my config:

listen=YES
local_enable=NO
anonymous_enable=YES
write_enable=NO
anon_root=/var/ftp
pasv_enable=YES
#
# Optional directives
#
#anon_max_rate=2048000
xferlog_enable=YES
listen_port=21
pasv_min_port=2020
pasv_max_port=2020
pasv_addr_resolve=YES
pasv_address=ftp.example.com

Change the details or add stuff to suit your setup.  Note that we have a pasv_min and pasv_max port, these can just be the same thing.  pasv_addr_resolv=YES just lets us specify a hostname.  And that’s that, restart vsftpd and enjoy FTP.