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.

Lenovo G530 Suspend Problem

It seems that my most popular posts here deal with fixing some common issues with the Lenovo G530 laptop, namely with the screen hinges, as well as the screen flickering.  Well, judging by the comments it seems that these have helped people (even though you will probably have to repeat the screen flickering one, as the cable can come lose repeatedly).  I am glad they are of use to people; the G530 isn’t the fanciest laptop, but if you can deal with some of these things it certainly gets the job done.

I am having a particular problem with this machine, though, that I have not been able to sort out.  It deals with suspending to RAM, or I should say, the inability to do so.  What is supposed to happen is that I activate suspend, and the machine almost completely shuts off save for a blinking, blue LED.  Opening the lid then resumes the machine almost instantly, bringing me back to where I was.  (Yes, I’m sure most of you know what suspending to RAM is, but I’m just trying to be complete.)  However, when I actually try to do this, the machine shuts off, instantly.  No flashing light, no shutdown sequence, it just turns off as if I removed power and/or battery.  Turning it on again makes it boot up as if I had opted to reboot.  After a while I got used to just turning the machine off when I didn’t need it, but this is kind of annoying, and I would like to fix it.

Now, first things first.  As you can probably tell from this site I am a GNU/Linux user, and do in fact run Ubuntu on this laptop.  In fact, overall it runs well.  I bring this up because of many suspend issues which have plagued many of the distros, however for about the first year of having this laptop suspend to RAM worked beautifully.  (Hibernate did and still does, but suspend is more convenient.)  But to verify this I tried installing Windows XP (along with the hardware-specific drivers supplied by Lenovo on their site), but encountered the same behavior.  Same with other distributions.

Next, I figured on a lark that maybe this would have something to do with the battery, which when I first noticed this behavior was on its last leg (ie, 20 minutes of power).  I replaced the battery, but this did not help anything.  I tired looking in the BIOS, but couldn’t find anything that suggested a problem.  I tried updating the BIOS, but this didn’t work either.  I even tried alternating the RAM sticks, as well as using only one at a time.  (It is suspend to RAM, so I figured there might be something there.)

So, how about it, anyone else seen this sort of thing before, shutting down cold instead of suspending?  Maybe not even with this particular laptop?  Any ideas, thoughts, something I may have overlooked?  I will try to make something of an effort to look into this again myself, probably starting with running memtest86 on the machine (something which I did not do, and may reveal something more about the memory).  But, I would appreciate any input.  And if I come to a solution, I will of course do my best to report it here, with a nice pictorial guide if applicable.

Ubuntu Directory

Right now I am on vacation, as my last post may indicate.  It is beautiful here, the beaches are nice, and the fresh air is a much welcomed diversion.  However, I still think about random projects and things, and hence I take a few minutes here and there to right them down or even make up a neat little blog post.

The subject of this post is something I have kicked around for a little while, but have recently resolved to try to take on.  Basically, the situation is this: if you haven’t figured it out, I am a GNU/Linux user (though I do use OpenBSD and occasionally FreeBSD for some things as well).  At home I have a few different machines that run Linux, including a small server, a desktop, and a laptop.  There are several others as well, but these are the ones I use mainly.  The thing is, I would love an easy way to manage users and permissions across them.  Basically, I’m thinking of something similar to a domain, like you might see in a Microsoft-based network.

Now, yes, of course you can join *nix machines to a Windows domain (or have one be a domain controller via Samba).  I don’t really have any Windows machines, though, nor do I want to buy/pirate a server version of Windows.  I could also use Kerberos and LDAP, and in fact I do use them.  They work well for me for the most part, but I said in the last paragraph that I wanted an easy way to admin the network.  If you follow one of the various online tutorials about getting the two going the process of setting this up isn’t actually that bad, but adding and removing users can be a bit of a pain.  I mean, it’s not really complicated, but you’d need to add the user to Kerberos, then to LDAP.  Then I guess you can use an LDAP browser to manage the rest.  But, it seemed to me like there should be some sort of GUI tool that would manage both, IE let you create a user and add them to some networked groups and whatnot.  I was thinking of the name while considering a networked version on Ubuntu’s user and groups tool, hence the name.  (In other words, it wouldn’t have to be Ubuntu-specific by any means.)

Now, yes, there are other projects that aim to accomplish this kind of thing, like FreeIPA.  And I won’t lie, that one looks pretty neat.  But it just seemed to me that just having a frontend to take care of some basic user/group stuff would help out a lot.  Especially if you already have a Kerberos/LDAP setup.  So, at some point in the future I am going to see what I can do with my idea, and maybe whip something up in Python and GTK.  I can’t make any guarantees right now, nor say when I will get to working on it, but we shall see.

As a final disclaimer, I am not what you would call an “IT professional”.  I program, and I’ve done quite a bit of work with *nix and networking, but this isn’t my normal gig.  I haven’t extensively used Active Directory, and so I’m not trying to clone it.  I just want an easier way to manage some users across my home networks (for a couple friends, the cats, etc.), but to have the option of still getting at the guts if I want.  Hell, maybe the best way to go about this is just a nice shell script anyway.

Windows Shares in /etc/fstab

A project I am doing at work involves having a Debian Linux machine mount a Windows share, and then letting a script go in and pull some data out of files for processing.  A lot of this is easily handled by Perl, but the first task is to mount the share.  And this had me stumped for a second.

The syntax for mounting a share in /etc/fstab looks kind of like this (on one line):

//servername/sharename    /mount/point   username=user,password=pass,default   0 0

Now, I had something like that set up, but when I would try to mount it by typing mount /mount/point, I would get an error like this:

[mntent]: line 21 in /etc/fstab is bad
mount: can’t find /mount/point/ in /etc/fstab or /etc/mtab

Now, I couldn’t figure out what was causing this at first.  I mean, it worked fine when I just used the mount command.  But, it turned out that the problem was a space in the Windows share name (something like /servername/share name).  I had thought that using a simple \ to escape the space would work, but on a hunch I searched to see if there was a proper way to escape, specifically for /etc/fstab.  This post explained it, and now I have the following in /etc/fstab:

//servername/share\040name    /mount/point   username=user,password=pass,default 0 0

Basically I just replaced the space with \040, which is unicode for a space.  Now I can mount it with no problems.

Fun With Jack and Pulseaudio

So, recently my Focusrite Saffire Pro 10 came in the mail.  It’s a decent firewire interface, with 8 mic preamps.  And, it’s supported by FFADO in Linux.  This, along with Ardour and Jack will make a nice little studio whether for just me by myself or with a band.  Not to mention that with a laptop it’s great for recording shows.  Getting it to work in Linux was a little interesting at first, and may be the subject of a future post.  Long story short, I used the old firewire stack, made sure I could write to the /dev/raw1394 device, and then basically turned the interface on and off and I could start using it.  Well, it works well now…

Anyway, now a new adventure was beginning as I started messing with Jack.  (There’s a lot of dirt on Linux audio floating around, so don’t be afraid to Google and/or comment.)  Now, I usually have at least two sound cards in my main computer: the normal, somewhat-crappy onboard card, and something a little better for recording with.  Previous to the Saffire this second card was an M Audio Delta 44 (also a nice interface, with good Linux support).  The Saffire doesn’t connect  through ALSA (unlike the Delta 44; it uses FFADO), but nonetheless it is my designated “recording” interface, for when I want to make something that kind of sounds nice.  The nifty thing about this is that it allows two systems, the crappy onboard card (for normal desktop stuff like listening to music or watching crap on YouTube), and the Saffire+Jack+Ardour+whatever tangle to be used for recording.  In fact, I can use these two at the same time without problems.  However, when you have multiple things on your computer that can input and output sound, after a while it becomes tempting to route between things.

For desktop stuff I, like most Linux users, use the Pulseaudio daemon.  (Lots of people have complained about this, especially when it was first being introduced.  However, it is very nice for desktop audio.)  This works with the onboard card fine.  But, what if I want to use the Saffire for my desktop audio?  Or, what if I want to do something like play the output of Ardour into Skype (which uses Pulseaudio)?  Or, even just play something from Jack out my main computer speakers (crappy onboard)?  In my case, this started when I wanted to play with NetJack (an awesome feature of Jack, I might add), and stream music from my desktop to another Jack daemon on my laptop – which only has one sound card.  Which is also used by Pulseaudio.

Just so we’re clear, here’ s a picture of what I spent a good portion of the other night trying to make work:

Basically, I wanted to set up the Ethernet transport for Jack, but to do this I also wanted to be able to send audio from Jack to Pulse on the laptop.  I could stop Pulseaudio and let Jack take over, but I’d rather not.  So, I will say this right now, for anyone Googling: What I want to do is route Jack through Pulseaudio.  NOT route Pulseaudio through Jack.  IE, Jack is a secondary function on the laptop.  There are tons of guides for having pulse not use a physical sound device but play through Jack; this was not the intent – though you can achieve much of the same functionality.  In fact, the setup is almost the same.

Basically, the key lies in setting Jack up as a source and/or sink for Pulseaudio.  The best way to do this, it seems, is to use the aptly-named module-jack-source and module-jack-sink modules in Pulseaudio.  I was able to load them like this ($ being the prompt):

$ pactl load-module module-jack-source

$ pactl load-module module-jack-sink

Actually, for my setup I only did the first line.  I just wanted to have Jack appear as a source to Pulseaudio, as I just wanted to play music.  Now, to just pass through Pulseaudio, you’ll want another module, which will let you connect a source and a sink…  In this case, we are going to connect the Jack source to our normal ALSA sink, the laptop’s sound card:

$ pactl load-module module-loopback

With this loaded, in Ubuntu I opened pavucontrol (Applications -> Sound & Video -> Pulseaudio Volume Control).  Under the Recording tab, I set Show: to All Streams, and then the loopback device presented itself.  with an option to pick a source to loopback from.  Just pick the Jack source.  Then, under Playback, again you would pick All Streams, and now you can control the volume of the loopback.  And that’s that.

Using this, you can route audio from Jack applications into Pulseaudio, and vice-versa.  With Netjack, you can even go across hosts.  (On a side note, if you just want to say play back from Rhythmbox on a different computer, Pulseaudio does have networking built in, so you don’t need Jack.  But if you’re using Jack, this is nice.)  You can even go between sound cards, or between hosts as we saw here.  There is more latency with what I described, of course (mostly from the networking, I think, but combining two audio servers probably contributes too), but it’s a handy setup to be able to have.

Spam Spam Spam! And Music.

So, the Akismet plugin (or some combination of that and ReCaptcha) has weeded out over 85,000 spam comments from this blog.  I should really wise up and just start firewalling IP addresses, but whatever.

On another, less spammy note I am excited about purchasing a Focusrite Saffire Pro 10 IO audio interface.  As a musician, it is important to have a good way to record yourself…  As a GNU/Linux user it is important to find compatible hardware.  Thankfully, the Saffire satisfies both of these.  It is a firewire interface supported by FFADO, and thus I can use it on my Linux machines for multitrack awesomeness with Ardour and Jack.

In case anyone is wondering, there aren’t a lot of audio interfaces supported on Linux, but if you get one that is, you can actually be productive with it.  I’ve used an M Audio interface for recording bands before (this new one will give me more inputs), and it can work well.  Sure, if you’re used to something like Protools or Logic that’s what you’re used to.  But if you’ve got a Linux machine and want to experiment, there is a lot there.  As a general rule you’ll have to mess with things more (though Ubuntu Studio tries to minimize this), but you can do some pretty neat things.  Like using audio interfaces on other hosts, and all sorts of other fancy network audio streaming.  I should write up a post on some of this stuff, but most of it is out there if you search.

Yes, I could spend more, get a Mac, and go the route most people go for their home recording studios.  But I like the idea of having free (as in freedom) tools that can do a lot of this stuff.  Sure as hell beats spam.

Fedora 13

I’ve had a problem on Ubuntu for a while, or at least I thought it was Ubuntu-specific.  The problem is with suspend-to-ram (aka, what you get when you click suspend; the computer goes into a low-power state, and comes back relatively quickly).  A little while ago, I think after upgrading to Lucid, this stopped working.  That is, instead of suspending, it (this is my laptop, btw) would simply shut down.

I liked Ubuntu, and still do.  But I had wanted to give Fedora a spin for a while now, and figured maybe this problem was distribution-specific.  So I went ahead and installed Fedora 13.  It didn’t solve the problem, the machine still shuts down.  But I have to say it’s not bad.  I’ll probably throw Ubuntu back on here soon, but in the meantime I’ll give this a spin.

My first exposure to Linux was with RedHat 8 – I couldn’t get X working at first (didn’t even know how to troubleshoot it), so I just started playing with the shell.  I learned enough to move around, and even set up an FTP server, followed by a Samba, followed by a Web server…  This was back in high school, and it was really cool to be able to share documents around the house and over FTP.  Of course, I was mostly playing, and ended up breaking the system a few times.

Over the years I tried different distros, including Fedora when it first came out, Suse, and Gentoo – the last of which I stuck with for a while, because it encouraged tweaking.  But while I enjoyed all this there came a time when I wanted the system to (forgive me for contributing to the overuse of this phrase) “just work,” and so I turned to Ubuntu.  I can’t say I remained a fan of RedHat based distros, though I used them occasionally.

Well, Fedora 13 is nice.  I’m used to Ubuntu by this point, but I’m kind of getting into it.  Gnome is not customized as much as in Ubuntu, and I’m not sure I’m crazy about the theme that it defaults too.  But I can see how this would be more of an ‘enterprise’ distro; during login you can select different authentication sources, so in theory it should be easy to get it going with LDAP/Kerberos (something I haven’t done yet myself, but plan to someday).  Also, Fedora gives you the option of full-disk encryption, which is neat.  I encrypt everything except the /boot partition, and I have to say it does satisfy my inner paranoia.  However it does require you to enter a passphrase at boot, which is a little inconvenient but not that bad (especially if you have trade secrets or something you’re trying to protect).  One caveat though is that home directories are not encrypted individually by default (you can do this, but there isn’t an install option to), so with default permissions one use can look in another’s home dir.  But for a single-user laptop it’s probably not that much of an issue.

This was never meant to be a review, just a little blurb.  If you’ve got the hardware, time, and curiosity, and you’re looking for a new distro (or OS?), give Fedora 13 a whirl.  I’ll probably end up reinstalling Ubuntu tomorrow, but if fate calls I may end up using a Fedora for something else in the future.  As for the suspend problem, I’ll look into that more.  Maybe even try to patch it myself (something I’ve always wanted to do).

An Open Letter to Tor Users

The idea behind the Tor project is a good one.  There are a lot of people around the world who have only filtered Internet access, and this project allows them to do things like read Wikipedia and other informational sites, whether or not their government wants them too.  It also provides a means of engaging in illegal acts while reducing your chances of getting caught.

And then again, you could be running an exit node, as I was.  Well, inadvertantly.  Apparently the version of Tor I put on my workstation was acting as one by default.  I don’t mind being a middleman node (where you just pass traffic to other Tor nodes), but running an exit node is a bit risky, especially at an educational institution.  I found this out the hard way, after the school forwarded me a DMCA infringement notice.  Now, if you look on the Tor site, they actually have a template for this, which is in fact a somewhat common occurance (at least enough such that they have a form letter made up).  However, due to the rules in place where I’m at I think this is on my record now.

I don’t care; I’m not a heavy torrent user at all, and have never gotten such a notice in the past.  However this is annoying, in that it means that somewhere on the Tor network someone was proxying their Bittorrent traffic.  Now, as I said it seemed that the default exit policy was to make my machine a full-fledged exit node, not blocking anything (unless I missed something).  Normally blocking torrents is a good policy, along with spam.  I would say I would probabably have been fine with the exit node if I’d have done this.  But it so happens I didn’t.  It would however be very nice if Tor wasn’t abused, though, as it really can be helpful.  So, think about that if you ever become a Tor user yourself (whether you run just a client, or also have your machine be a relay).

And to the people with the balls and bandwidth to run an exit, I salute you.

Back to Gentoo

When I first started on Linux, my distribution was RedHat 8.0 on our old HP Vectra.  After installing it I found that I couldn’t get X to start, and so I had to navigate the system from the command line, without the GUI.  It was a good learning experience, and I think I ended up breaking the system a few times.

When I finally got a more powerful machine, I tried RedHat again, then Fedora Core, then I think Suse, and then back to Fedora…  At first it was motivated by some driver problem that made the system freeze (I never figured out what it was, but it did just stop at one point), but later on it was just to get exposure to the different distros.  And there were (and are) a lot of nice ones.  However, I wanted to tinker.  And then a friend introduced me to Gentoo.

My first install on that machine, a dual AMD MP 2800 took three days.  I think I did a Stage 1 install (no longer supported), in which the entire system is compiled from source.  I ended up reinstalling a few times after, but in the end Gentoo was what I stuck with.  I liked it, it was fast and gave me a lot of things to customize and tweak.

Sometime a little more than a year ago this computer had a power supply problem, and I decided I might as well just upgrade as it was kind of outdated anyway.  So I went with an Intel Core 2 Quad system, and it’s been good.  But, I had also been doing some recording on Linux, making a low-latency kernel necessary.  I had patched it here and there on Gentoo, but I started to take an interest in Ubuntu Studio, as it takes care of a lot of that for you.  Also, while I still liked Gentoo I still had a few incidents in which I updated the system only to have some package like X or Gnome broken, and my desktop gone.  On top of that I had been starting to recommend Ubuntu to other people, after hearing about its supposed user-friendliness.  So, I went with Ubuntu Studio on my desktop.  I had actually been running normal Ubuntu on my laptop, and it was alright.  I was really impressed with Ubuntu Studio, though.  Doing my audio stuff was easy, and performance was decent.  Overall, I was happy.

Now, in an earlier post I mentioned how my laptop only ran at 600 MHz despite a supposed speed of 1.4 GHz.  Well, that was my primary reason for switching to Ubuntu on that box, though having everything configured out of the box was nice too.  I figured I just didn’t want to do all the compiling Gentoo entailed on such a slow machine.  Well, I fixed the bug (it was hardware related), and the performance jumped.  It was great for a while.

Now, I still run Ubuntu Studio on my desktop, despite some annoyances with 8.10 version’s low latency kernel not supporting multiple processors, and thus only running on of the cores on my processor (I don’t use it unless I need to record).  Now, another annoyance, and one that I especially noticed on my laptop was the bloat present in Ubuntu.  After deciding I didn’t feel like putting up with it anymore, I relented and did a Gentoo install this weekend.

And so far it’s been great.  Even with the speed bug fixed compile times can be long, but thanks to Ice Cream I can distribute some of the compiling to my desktop.  (Most packages are fine with this, some don’t seem to like it so much.)  I got Gnome installed, got power management and CPU frequency scaling working, along with suspending to RAM.  So now I have a zippy Linux install on my laptop.

Gentoo is a bit of work, but it’s worth it, in particular if you want to learn about how your system works.  I recommend it.