Showing posts with label Fedora. Show all posts
Showing posts with label Fedora. Show all posts

Tuesday, November 08, 2011

Building ElectricSheep on Fedora 16 (and enabling in KDE4)

UPDATE: Apparently these steps also work on Fedora 17. Moreover, if you use Gnome3, there are some additional instructions that can help you get ElectricSheep setup.
Quick link: Updated makeSheepFedora16.sh install script
A while back, I wrote a post summarizing how to get ElectricSheep running on Fedora 15 with KDE 4.6.5. Today, I "upgraded" to Fedora 16 and was surprised to find that library updates were incompatible with ElectricSheep. Symbol mismatches made it impossible to simply symlink old shared libraries to new shared libraries. Moreover, the version of electricsheep that built fine on Fedora 15 would not build on Fedora 16.

So I made some modifications to Tait Clarridge's script to fix the build. My hacks seem to work for me so far; hopefully they do not introduce regressions into the already old version of electricsheep.

So to get ElectricSheep running on your Fedora 16 system, try downloading and running my modified makeSheepFedora16.sh script. As a bonus, it (hopefully) will install ElectricSheep as a screensaver if you are running KDE. However, the same DPMS caveats about mplayer from old post still apply until Fedora updates their mplayer to a recent version (why does it take these people so long?).

Wednesday, August 31, 2011

Electric Sheep on KDE 4.6.5 with Fedora 15 (using Intel graphics card)


This post begins with a few important updates; scroll down to see the bulk of the original post.

Fedora 16 update: If you are using Fedora 16, then see updates from a newer post about how to get ElectricSheep built and running.

DPMS Update (getting monitors to sleep/standby/suspend/turn off on schedule again): It turns out that electricsheep is preventing my monitors from getting DPMS sleep/standby/off signals because of a bug in mplayer that was fixed today in SVN r34074. If you pull down the updated mplayer and build it yourself, your DPMS problems with electricsheep will be fixed. If you aren't willing to pull down the SVN source and build the fixed binary, you could use something like this sample electricsheep-wrapper script that starts both electricsheep and a secondary process that reads waiting times from xset q, sleeps for those times, and then issues the appropriate xset dpms force commands. To use the hack, all references to electricsheep in KDE or xscreensaver configuration files must be changed to electricsheep-wrapper and the electricsheep-wrapper script has to be installed in a directory in the PATH. Or, again, you can just wait for mplayer to get patched in your Linux distribution.

KDE update: electricsheep's SourceForge SVN includes a Desktop file for KDE, and so I've updated the stuff below to use it instead. It's probably a good idea to check out their updated SVN repository at GoogleCode to see if the support files have improved.

Multiple Monitors update: KDE will stretch one electricsheep across all of your monitors. Instead, if you want electricsheep to put a different instance on each monitor, use xscreensaver instead of kscreensaver. To do so, you'll have to follow the instructions for using xscreensaver on KDE, which are also on the xscreensaver man page. I modified step 4 to use my own custom system-level kscreenlocker that doesn't force everyone on the system to use xscreensaver. Additionally, to get electricsheep to show up in the xscreensaver-demo menu, you need to not only install the relevant electricsheep.xml file (find it in the source repo's or built it yourself), but you also have to add a line to your own ~/.xscreensaver configuration file. I don't know why the former doesn't generate the latter. On one of my machines, it does. On the other, it doesn't.

Of course, YMMV.


I installed electric sheep today because I was bored of my ASCIIQuarium KDE screensaver and not thrilled about the other options (some of which bail out on my dual screen Intel setup). [ If you're not familiar with Electric Sheep, you should check out the Electric Sheep Wikipedia page which discusses how the screensaver evolves over time. It's a distributed computing project, and the genetic algorithm that guides the evolution actually takes input from Electric Sheep users (well, not me, because I don't have the keyboard support to "up" and "down" the sheep I see). So the screen saver is constantly downloading and processing new AVI's, generating new content, and contributing it back to the network. I like it because it's pretty screen saver diversity at the cost of a few computing cycles and some disk space. ] It wasn't so bad, but it also wasn't trouble free. Here's what I did (which almost worked entirely without me having to do anything special):
  1. Use the Fedora-specific script from Tait Clarridge's page on downloading and installing electric sheep in Fedora (if you are running Fedora 16, see my updated script instead).
  2. Learn from Giulio Guzzinati about the need to add an electric sheep KDE Desktop file to get the screensaver into the KDE Screen Saver configuration tool.
Unfortunately, Giulio Guzzinati's desktop file didn't work for me, and so I had to build my own use the desktop file inside the electricsheep distribution. Here the file that ended up "working" for me (which is downloadable as electricsheep.desktop, but I copied from electricsheep.desktop.kde in the SVN repo).
[Desktop Entry]
Exec=electricsheep
Icon=kscreensaver
Type=Service
X-KDE-ServiceTypes=ScreenSaver
TryExec=xscreensaver
Actions=InWindow;Root;Setup;
X-KDE-Category=Fractals Screen Savers
X-KDE-Type=xv
Name=ElectricSheep

[Desktop Action Setup]
Exec=electricsheep-preferences
Name=Setup...

[Desktop Action InWindow]
Exec=electricsheep -window-id %w
Name=Display in Specified Window
NoDisplay=true

[Desktop Action Root]
Exec=electricsheep -window-id %w
Name=Display in Root Window
NoDisplay=true

X-Ubuntu-Gettext-Domain=desktop_kdeartwork
As explained in Giulio Guzzinati's post, you can place that file in
/usr/share/kde4/services/ScreenSavers/
You can probably put it in
~/.kde/share/services/ScreenSavers/
as well (you might have to create that directory first) if you'd rather do something local. That put the Electric Sheep across both of my monitors. If you'd rather put a separate electricsheep in each monitor, use xscreensaver instead of KDE's screen saver. If you're having trouble getting your monitors to go to sleep while electricsheep is running, then you need to get an updated mplayer that fixes the bug that causes that problem (see the updates at the top of this post for more information). Alternatively, you can use a hack like this electricsheep-wrapper script to re-enable DPMS-like timeouts during the screensaver. To use the hack, all references to electricsheep in KDE or xscreensaver configuration files must be changed to electricsheep-wrapper and the electricsheep-wrapper script has to be installed in a directory in the PATH. However, it probably won't be too long until the mplayer DPMS fix reaches your Linux distribution.

Sunday, March 06, 2011

Another rant on the supremacy of rolling release cycles for OS distributions (why Arch beats Fedora and Ubuntu)

As I sit here right now, I notice that my Arch Linux package manager ("pacman") is downloading KDE 4.6.1. KDE 4.6.0 was released at the end of January, and it was automatically installed on my system shortly after it was released. I don't notice a lot of new features, but there is one feature that I now use all the time. For a long time, dragging a KDE window to one of three edges of the screen would cause it to either be maximized (top) or resized to fill either the left half (left) or right half (right) of the screen for easy side-by-side tiling. This feature exists in Windows Vista, and I know a certain fiancée who uses it all the time. In KDE 4.6.0, they've added more granularity – the left and right edges of the screen are now partitioned into thirds. Dragging a window to the top or bottom third causes it be resized for a quarter of the screen as opposed to a half of the screen. The middle third resizes for half of the screen as before. So now it is easy to do even more sophisticated tiling by dragging, and I use it all the time.

But I can't use that feature on my machine at the office (Fedora 14) nor the HTPC connected to my TV (Ubuntu 10.10). That's because both Fedora and Ubuntu are on 6 month release cycles, and KDE is also on a 6 month release cycle. Consequently, my Fedora office machine is stuck back on some KDE 4.5.5 components, some 4.4.10 components, and some KDE 3.5.10 components, and it seems arbitrary which components are which KDE version. More importantly, it may be another year before I can ever expect to get quarter-window tiling on these machines (enterprise distributions, like RedHat EL, are even worse; you may wait a decade for features to trickle down the official release path). There are ways in which these distribution gatekeepers try to get around this delay by supporting auxiliary repositories of updated software, but then that is a whole other mess I would have to cover in another rant.

It's frustrating to me that these Linux "distributions" take on a release cycle that elevates them to a level on par with the software that supposedly is the sole driver of their value. It is one thing to wait for the next release of Windows to come out because Windows is a product itself; however, Ubuntu or Fedora is just a distribution – a glorified collection of independent software components that are possibly rapidly evolving and have some dependency structure on each other. Arch Linux recognizes this. It recognizes that a good package manager trumps a great "distribution" any time, and pacman is a great package manager (and it doesn't have a stupid name, like "yum" or "apt-verb", and isn't just a wrapper for yet another silly-named package manager (like "rpm" or "dpkg")). In doing so, it allows for everything from minimal Linux installations to maximally bloated Linux distributions, with the distinction that every package is truly up to date (and not just up to date relative to some arbitrary collection of version numbers). Arch Linux is not the only distribution with this nice feature. Gentoo, for example, also uses a rolling release cycle... and Gentoo is also well-known for its excellent package manager "emerge".

[ ...and on the subject of package managers, the pacman-wrapper yaourt augments the terrific pacman with the ability to automate building packages from source, even when you want to both customize your build environment and automatically build updates when they are available... so yaourt brings some of the nice features of Gentoo's rolling release cycle directly to Arch Linux's rolling release cycle ]

Frustration is certainly not the only feeling I can associate with the Fedora and Ubuntu distributions forced on me (by my employer in the former case and Boxee in the latter case); there's also fear. Every six months with Fedora or Ubuntu, you have to go through the horror of upgrading the entire distribution at once. I'd rather tackle upgrading problems with one package at a time as opposed to the entire OS twice a year. Not to mention the psychological trauma that upgrades cause – regardless of how nice the system works, I always have in the back of my head that maybe it would be better if I just formatted and installed fresh right now (but then the fear of the next upgrade prevents me from doing that). An operating system should not be a major cause of distress, but I find nothing but distress in Ubuntu, Fedora, and the other deleterious distributions in that pernicious pack that do not adopt rolling releases.

So there you go. I just quarter-window tiled this window, and it saddens me that when I go back into the office on Monday, I will lose half my day to half-window tiling and resizing... and then I'll lose a day or two later this year when FC15 comes out. Stupid six-month distribution release cycles...