Archive

Author Archive

Cloud Saves for Minecraft

February 21st, 2014 No comments

I’ve recently become addicted to Minecraft. I realize that I’m late to this game, having only recently discovered it despite its popularity over the past couple of years. As readers know, I typically switch between a few different machines throughout my day, and indeed between a few different operating systems. Luckily, Minecraft is portable and can be played on any platform – but how to go about transferring saved games?

By default, Minecraft puts your user data and game saves in a hidden folder within your home folder. In particular, save game data is stored at ~/.minecraft/saves/. My solution to the cloud save problem was to create a minecraft folder in my DropBox, and then symlink the default save folder to this location.

Start by creating a folder in your DropBox (or other cloud share platform) folder:

jonf@UBUNTU:~$ mkdir ~/Dropbox/minecraft
jonf@UBUNTU:~$ mkdir ~/Dropbox/minecraft/saves

Next, back up your existing save games folder. We’ll restore these once the symlink has been created.

jonf@UBUNTU:~$ mv ~/.minecraft/saves/ ~/.minecraft/saves.old

Now create the symlink between the new DropBox folder and the save game location:

jonf@UBUNTU:~$ ln -s ~/Dropbox/minecraft/saves/ ~/.minecraft/saves
jonf@UBUNTU:~$ ls -la ~/.minecraft
total 24
drwxrwxr-x  3 jonf jonf  4096 Feb 21 08:58 .
drwx------ 43 jonf jonf 12288 Feb 21 08:55 ..
lrwxrwxrwx  1 jonf jonf    38 Feb 21 08:58 saves -> /home/jonf/Dropbox/minecraft/saves/
drwxrwxr-x  2 jonf jonf  4096 Feb 21 08:55 saves.old

As you can see, the saves folder under the .minecraft folder now points to the saves folder that we created inside of our DropBox folder. This means that if we put anything inside of that folder, it will be automatically written to the DropBox folder, which will be synced to all of my other computers.

Finally, let’s restore the existing saved games folder into the new shared folder:

jonf@UBUNTU:~$ mv ~/.minecraft/saves.old/ ~/.minecraft/saves

If I take the same steps on my other machines, then I can play Minecraft from any of my machines with my saved games always available, no matter where I am. Keep in mind that the ln syntax for Mac OSX is slightly different than the example above. The steps remain the same, but you’ll want to check the docs if you’re trying to adopt these steps for a different platform.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

WTF Ubuntu

September 7th, 2013 2 comments

I’m not even sure what to say about this one… it looks like I might have an angry video card.

I sat down at my machine after it had been sitting for three or four days to find this... wtf?

I sat down at my machine after it had been sitting for three or four days to find this… wtf?




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: God Damnit Linux, Jon F, Ubuntu Tags:

Dual Booting Ubuntu 13.04 and Windows 8 on a Lenovo Y400 IdeaPad

July 27th, 2013 1 comment

With the third edition of The Linux Experiment already underway, I decided to get my new laptop set up with an Ubuntu partition to work with over the next few months. A little while back, I purchased this laptop with intent to use it as a gaming rig. It shipped with Windows 8, which was a serious pain in the ass to get used to. Now that I’ve dealt with that and have Steam and Origin set up on the Windows partition, it’s time to make this my primary machine and start taking advantage of the power under its hood by dual-booting an Ubuntu partition for development and experiment work.

I started my adventure by downloading an ISO of the latest release of Ubuntu – at the time of this writing, that’s 13.04. Because my new laptop has UEFI instead of BIOS, I made sure to grab the x64 version of the distribution.

Aside: If you’re using NoScript while browsing Ubuntu’s website, you’ll want to keep an eye on the address bar while navigating through the download steps. In my case, the screen that asks you to donate to the project redirected me to a different version of the ISO until I enabled JavaScript.

After using Ubuntu’s Startup Disk Creator to create a bootable USB stick, I started my first adventure – figuring out how to get the IdeaPad to boot from USB. A bit of quick googling told me that the trick was to alternately tap F10 and F12 during the boot sequence. This brought up a boot menu that allowed me to select the USB stick.

Once Ubuntu had booted off of the USB stick, I opened up GParted and went about making some space for my new operating system. The process was straightforward – I selected the largest existing partition (it also helped that it was labelled WINDOWS_OS), and split it in half. My only mistake in this process was to choose to put the new partition in front of the existing partition on the drive. Because of this, GParted had to copy all of the data on the Windows partition to a new physical location on the hard drive, a process that took about three hours.

The final partitioning scheme with my new Linux partition highlighted

The final partitioning scheme with my new Linux partition highlighted

With my hard drive appropriately partitioned, it was time to install the operating system. The modern Ubuntu installer pretty much takes care of everything, even going so far as selecting an appropriate space to use on the hard drive. I simply told it to install alongside the existing Windows partition, and let it take care of the details.

The installer finished its business in short order, and I restarted the machine. Ubuntu booted with no issues, but my Windows 8 partition refused to cooperate. It would seem as though something that the installer did wasn’t getting along well with UEFI/SecureBoot. Upon attempting to boot Windows, I got the following message:

error: Secure Boot forbids loading module from (hd0,gpt8)/boot/grub/x86_64-efi/ntfs.mod.
error: failure reading sector 0×0 from ‘cd0′
error: no such device: 0030DA4030DA3C7A
error: can’t find command ‘drivemap’
error: invalid EFI file path

Press any key to continue…

Uh oh.

Like I said, I could boot Ubuntu, so I headed on over to their website and read their page on UEFI. At first glance, it seemed as though I had done everything correctly. The only place that I deviated from these instructions was in manually resizing my Windows partition to create space for my new Ubuntu partition.

Thinking that I might be experiencing troubles with  my boot partition, I took a shot at running Ubuntu’s Boot-Repair utility. It seemed to do something, but upon restarting the machine, I found that I had even more problems – now a Master Boot Record wasn’t found at all:

It would appear as though I may have made things worse...

It would appear as though I may have made things worse…

After dismissing the boot device error, I was prompted to choose which device to boot from. I chose to boot Windows’ UEFI Repair partition, and was (luckily) able to get to a desktop. Unfortunately, none of the other partitions on the device seem to work, so I’m back where I started at the beginning, except that now in addition to having to put up with Windows 8, I also have a broken master boot record.

Lenovo: 1 / Jon: 0.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Querying the State of a Hardware WiFi Switch with RF-Kill

October 8th, 2012 No comments

The laptop that I’m writing this post from has a really annoying strip of touch-response buttons above the keyboard that control things like volume and whether or not the wifi card is on. By touch-response, I mean that the buttons don’t require a finger press, but rather just a touch of the finger. As such, they provide no haptic feedback, so it’s hard to tell whether or not they work except by surveying the results of your efforts in the operating system.

The WiFi button in particular has go to be the worst of these buttons. On Windows, it glows a lovely blue colour when activated, and an angry red colour when disabled. This directly maps to whether or not my physical wireless network interface is enabled or disabled, and is a helpful indicator. Under Linux Mint 12 however, the “button” is always red, which makes it a less than helpful way to diagnose the occasional network drop.

Lately, I’ve been having trouble getting the wifi to reconnect after one of these drops. To troubleshoot, I would open up the Network Settings panel in Mint, which looks something like this:

Mint 12's Wireless Network Configuration Panel

The only problem with this window is that the ON/OFF slider that controls the state of the network interface would refuse to work. If I drag it to the ON position, it would just bounce back to OFF without changing the actual state of the card.

In the past, this behaviour has really frustrated me, driving me so far as to reboot the machine in Windows, re-activate the physical interface, and then switch back to Mint to continue doing whatever it was that I was doing in the first place. Tonight, I decided to investigate.

I started out with my old friend iwconfig:

jonf@jonf-mint ~ $ sudo iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:off/any
Mode:Managed  Access Point: Not-Associated   Tx-Power=off
Retry  long limit:7   RTS thr:off   Fragment thr:off
Encryption key:off
Power Management:off

As you can see, the wireless interface is listed, but it appears to be powered off. I was able to confirm this by issuing the iwlist command, which is supposed to spit out a list of nearby wireless networks:

jonf@jonf-mint ~ $ sudo iwlist wlan0 scanning
wlan0     Interface doesn’t support scanning : Network is down

Again, you can see that the interface is not reacting as one might expect it to. Next, I attempted to enable the interface using the ifconfig command:

jonf@jonf-mint ~ $ sudo ifconfig wlan0 up
SIOCSIFFLAGS: Operation not possible due to RF-kill

Ah-ha! A clue! Apparently, something called rfkill was preventing the interface from coming online. It turns out that rfkill is a handy little tool that allows you to query the state of the hardware buttons (and other physical interfaces) on your machine. You can see a list of all of these interfaces by issuing the command rfkill list:

jonf@jonf-mint ~ $ rfkill list
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
1: hp-wifi: Wireless LAN
Soft blocked: no
Hard blocked: yes

Interestingly enough, it looks like my wireless interface has been turned off by a hardware switch, which is what I had suspected all along. The next thing that I tried was the rfkill event command, which tails the list of hardware interface events. Using this tool, you can see the effect of pressing the physical switches and buttons on the chasis of your machine:

jonf@jonf-mint ~ $ rfkill event
1349740501.558614: idx 0 type 1 op 2 soft 0 hard 0
1349740505.153269: idx 0 type 1 op 2 soft 0 hard 1
1349740505.354608: idx 1 type 1 op 2 soft 0 hard 1
1349740511.030642: idx 1 type 1 op 2 soft 0 hard 0
1349740515.558615: idx 0 type 1 op 2 soft 0 hard 0

Each of the lines that the tool spits out shows a single event. In my case, it shows the button that controls the wireless interface switching the hard block setting (physical on/off) from 0 to 1 and back.

After watching this output while pressing the button a few times, I realized that the button does actually work, but that when the interface is turned on, it can take upwards of 5 seconds for the machine to notice it, connect to my home wireless, and get an ip address via DHCP. In the intervening time, I had typically become frustrated and pressed the button a few more times, trying to get it to do something. Instead, I now know that I have to press the button exactly once and then wait for it to take effect.

I stand by the fact that this is a piss-poor design, but hey, what do I know? I’m not a UX engineer for HP. At least it’s working again, and I am reconnected to my sweet sweet internet.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.

Python Development on Linux and Why You Should Too

September 1st, 2012 25 comments

If you’re a programmer and you use Linux but you haven’t yet entered the amazing world that is Python development, you’re really missing out on something special. For years, I dismissed Python as just another script kiddie language, eschewing it for more “serious” languages like Java and C#. What I was missing out on were the heady days of rapid development that I so enjoyed while hacking away on Visual Basic .NET in my early years of university.

There was a time when nary a day would go by without me slinging together some code into a crappy Windows Forms application that I wrote to play with a new idea or to automate an annoying task. By and large, these small projects ceased when I moved over to Linux, partially out of laziness, and partially because I missed the rapid prototyping environment that Visual Basic .NET provided. Let’s face it – Java and C# are great languages, but getting a basic forms app set up in either of them takes a significant amount of time and effort.

Enter Python, git/github, pip, and virtualenv. This basic tool chain has got me writing code in my spare time again, and the feeling is great. So without further ado, let me present (yet another) quick tutorial on how to set up a bad-ass Python development environment of your own:

Step 1: Python

If there’s one thing that I really love about Python, it’s the wide availability of libraries for most any task that one can imagine. An important part of the rapid prototyping frame of mind is to not get bogged down on writing low-level libraries. If you have to spend an hour or two writing a custom database interface layer, you’re going to lose the drive that got you started in on the project in the first place. Unless of course, the purpose of the project was to re-invent the database interface layer. In that case, all power to you. In my experience, this is never a problem with Python, as its magical import statement will unlock a world of possibilities that is occupied by literally thousands of libraries to do most anything that you can imagine.

Install this bad boy with the simple command sudo apt-get install python and then find yourself a good python tutorial with which to learn the basics. Alternatively, you can just start hacking away and use StackOverflow to fill in any of the gaps in your knowledge.

Step 2: Git/Github

In my professional life, I live and die by source control. It’s an excellent way to keep track of the status of your project, try out new features or ideas without jeopardizing the bits of your application that already work, and perhaps most importantly, it’s a life saver when you can’t figure out why in the hell you decided to do something that seemed like a good idea at the time but now seems like a truly retarded move. If you work with other developers, it’s also a great way to find out who to blame when the build is broken.

So why Git? Well, if time is on your side, go watch this 1 hour presentation by Linus Torvalds; I guarantee that if you know the first thing about source control, he will convince you to switch. If you don’t have that kind of time on your hands (and really, who does?) suffice it to say that Git plays really well with Github, and Github is like programming + social media + crack. Basically, it’s a website that stores your public (or private) repositories, showing off your code for all the world to see and fork and hack on top of. It also allows you to find and follow other interesting projects and libraries, and to receive updates when they make a change that you might be interested in.

Need a library to do fuzzy string matching? Search Git and find fuzzywuzzy. Install it into your working environment, and start playing with it. If it doesn’t do quite what you need, fork it, check out the source, and start hacking on it until it does! Github is an amazing way to expand your ability to rapid prototype and explore ideas that would take way too long to implement from scratch.

Get started by installing git with the command sudo apt-get install git-core. You should probably also skim through the git tutorial, as it will help you start off on the right foot.

Next, mosey on over to Github and sign up for an account. Seriously, it’s awesome, stop procrastinating and do it.

Step 3: Pip

I’ve already raved about the third-party libraries for Python, but what I haven’t told you yet is that there’s an insanely easy way to get those libraries into your working environment. Pip is like a repository just for Python libraries. If you’re already familiar with Linux, then you know what I’m talking about. Remember the earlier example of needing a fuzzy string matching library in your project? Well with pip, getting one is as easy as typing pip install fuzzywuzzy. This will install the fuzzywuzzy library on your system, and make it available to your application in one easy step.

But I’m getting ahead of myself here: You need to install pip before you can start using it. For that, you’ll need to run sudo apt-get install python-setuptools python-dev build-essential && sudo easy_install -U pip

The other cool thing about pip? When you’re ready to share your project with others (or just want to set up a development environment on another machine that has all of the necessary prerequisites to run it) you can run the command pip freeze > requirements.txt to create a file that describes all of the libraries that are necessary for your app to run correctly. In order to use that list, just run pip install -r requirements.txt on the target machine, and pip will automatically fetch all of your projects prerequisites. I swear, it’s fucking magical.

Step 4: Virtualenv

As I’ve already mentioned, one of my favourite things about Python is the availability of third-party libraries that enable your code to do just about anything with simple import statement. One of the problems with Python is that trying to keep all of the dependencies for all of your projects straight can be a real pain in the ass. Enter virtualenv.

This is an application that allows you to create virtual working environments, complete with their own Python versions and libraries. You can start a new project, use pip to install a whole bunch of libraries, then switch over to another project and work with a whole bunch of other libraries, all without different versions of the same library ever interfering with one another. This technique also keeps the pip requirements files that I mentioned above nice and clean so that each of your projects can state the exact dependency set that it needs to run without introducing cruft into your development environment.

Another tool that I’d like to introduce you to at this time is virtualenvwrapper. Just like the name says, it’s a wrapper for virtualenv that allows you to easily manage the many virtual environments that you will soon have floating around your machine.

Install both with the command pip install virtualenv virtualenvwrapper

Once the installation has completed, you’ll may need to modify your .bashrc profile to initialize virtualenvwrapper whenever you log into your user account. To do so, open up the .bashrc file in your home directory using your favourite text editor, or execute the following command: sudo nano ~/.bashrc 

Now paste the following chunk of code into the bottom of that file, save it, and exit:

# initialize virtualenv wrapper if present
if [ -f /usr/local/bin/virtualenvwrapper.sh ] ; then
. /usr/local/bin/virtualenvwrapper.sh
fi

Please note that this step didn’t seem to be necessary on Ubuntu 12.04, so it may only be essential for those running older versions of the operating system. I would suggest trying to use virtualenvwrapper with the instructions below before bothering to modify the .bashrc file.

Now you can make a new virtual environment with the command mkvirtualenv <project name>, and activate it with the command workon <project name>. When you create a new virtual environment, it’s like wiping your Python slate clean. Use pip to add some libraries to your virtual environment, write some code, and when you’re done, use the deactivate command to go back to your main system. Don’t forget to use pip freeze inside of your virtual environment to obtain a list of all of the packages that your application depends on.

Step 5: Starting a New Project

Ok, so how do we actually use all of the tools that I’ve raved about here? Follow the steps below to start your very own Python project:

  1. Decide on a name for your project. This is likely the hardest part. It probably shouldn’t have spaces in it, because Linux really doesn’t like spaces.
  2. Create a virtual environment for your project with the command mkvirtualenv <project name>
  3. Activate the virtual environment for your project with the command workon <project name>
  4. Sign into Github and click on the New Repository button in the lower right hand corner of the home page
  5. Give your new repository the same name as your project. If you were a creative and individual snowflake, the name won’t already be taken. If not, consider starting back at step 1, or just tacking your birth year onto the end of the bastard like we used to do with hotmail addresses back in the day.
  6. On the new repository page, make sure that you check the box that says Initialize this repository with a README and that you select Python from the Add .gitignore drop down box. The latter step will make sure that git ignores files types that need not be checked into your repository when you commit your code.
  7. Click theCreate Repository button
  8. Back on your local machine, Clone your repository with the command git clone https://github.com/<github user name>/<project name> this will create a directory for your project that you can do all of your work in.
  9. Write some amazing fucking code that blows everybody’s minds. If you need some libraries (and really, who doesn’t?) make sure to use the pip install <library name> command.
  10. Commit early, commit often with the git commit -am “your commit message goes here” command
  11. When you’re ready to make your work public, post it to github with the command git push https://github.com/<github user name>/<project name>
  12. Don’t forget to script out your project dependencies with the pip freeze > requirements.txt command
  13. Finally, when you’re finished working for the day, use the deactivate command to return to your normal working environment.

In Conclusion:

This post is way longer than I had originally intended. Suck it. I hope your eyes are sore. I also hope that by now, you’ve been convinced of how awesome a Python development environment can be. So get out there and write some amazing code. Oh, and don’t forget to check out my projects on github.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Jon F, Programming Tags: , ,

Batch Converting FLAC to MP3

April 2nd, 2012 1 comment

I came across this neat script somewhere on the internet while trying to batch convert a folder full of FLAC files to mp3 files. Hopefully it will help somebody else:

for file in *.flac; do flac -cd “$file” | lame -b 320 -h – “${file%.flac}.mp3″; done




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Jon F, Open Source Software Tags:

Wireless Networking: Using a Cisco/Linksys WUSB54GC on Gentoo

November 13th, 2011 1 comment

We live in an old house, which has the unfortunate side-effect of lacking a wired network of any kind. All of our machines connect to a wireless network, and my desktop is no exception. I’ve got an old WUSB54GC wireless stick that was manufactured some time in 2007. In computer years, this is way old hardware. But with a bit of work, I managed to get it working with my Gentoo install.

This bitch is old... but it works

I started out by installing the NetworkManager applet with a tutorial on the Gentoo Wiki. This was a straightforward process, and after a restart, the applet icon appeared in the top right corner of my screen. If you left-click on the icon, it drops down a menu that lists your wireless interfaces. Under the Wireless Networks heading, it said that it was missing the firmware necessary to talk to my hardware.

The next step was to look around the net and figure out the firmware/kernel module combination that supports this stick. I found my answer over at the SerialMonkey project, which is run by a group that took on maintenance of older Ralink firmware after the company of the same name dropped support. According to the SerialMonkey hardware guide, my stick (or at least a very similar stick called the WUSB54GR) works with the rt73usb kernel module and related firmware.

This known, there are two methods of proceeding. Those running older kernels may need to manually compile the necessary packages using instructions similar to these, from the Arch Linux project. For more modern kernels, the Gentoo project provides a Wiki entry detailing the necessary steps.

After following the steps in the Gentoo Wiki entry, I restarted my system, and now have full wireless support. Genius!




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Gentoo, Jon F Tags: , , , ,

Can you install Gnome3 on Gentoo?

November 13th, 2011 1 comment

So my base Gentoo installation came with Gnome 2.3, which while solid, lacks a lot of the prettiness of Gnome’s latest 3.2 release. I thought that I might like to enjoy some of that beauty, so I attempted to upgrade. Because Gnome 3.2 isn’t in the main portage tree yet, I found a tutorial that purported to walk me through the upgrade process using an overlay, which is kind of like a testing branch that you can merge into the main portage tree in order to get unsupported software.

Since the tutorial that I linked above is pretty self-explanatory, I won’t repeat the steps here. There’s also the little fact that the tutorial didn’t work worth a damn…

Problem 1: Masked Packages

#required by dev-libs/folks-9999, 
required by gnome-base/gnome-shell-3.2.1-r1, 
required by gnome-base/gdm-3.2.1.1-r1[gnome-shell], 
required by gnome-base/gnome-2.32.1-r1, 
required by @selected, 
required by @world (argument)
>=dev-libs/libgee-0.6.2.1:0 introspection
#required by gnome-extra/sushi-0.2.1, 
required by gnome-base/nautilus-3.2.1[previewer], 
required by app-cdr/brasero-3.2.0-r1[nautilus], 
required by media-sound/sound-juicer-2.99.0_pre20111001, 
required by gnome-base/gnome-2.32.1-r1, 
required by @selected, 
required by @world (argument)
>=media-libs/clutter-gtk-1.0.4 introspection

This one is pretty simple to fix: you can add the lines >=dev-libs/libgee-0.6.2.1:0 introspection and >=media-libs/clutter-gtk-1.0.4 introspection to the file /etc/portage/package.accept_keywords, or you can run emerge -avuDN world –autounmask-write to get around these autounmask behaviour issues

Problem 2: Permissions

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------
LOG FILE "/var/log/sandbox/sandbox-3222.log"

VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: mkdir
S: deny
P: /root/.local/share/webkit
A: /root/.local/share/webkit
R: /root/.local/share/webkit
C: ./epiphany --introspect-dump=
/var/tmp/portage/www-client/epiphany-3.0.4/temp/tmp-introspectSfeqBO/functions.txt,
/var/tmp/portage/www-client/epiphany-3.0.4/temp/tmp-introspectSfeqBO/dump.xml
--------------------------------------------------------------------------------

This one totally confused me. If I’m reading it correctly, the install script lacks the permissions necessary to write to the path /root.local/share/webkit/. The odd part of this is that the script is running as the root user, so this simple shouldn’t happen. I was able to give it the permissions that it needed by running chmod 777 /root/.local/share/webkit/, but I had to start the install process all over again, and it just failed with a similar error the first time that it attempted to write a file to that directory. What the fuck?

At 10pm at night, I couldn’t be bothered to find a fix for this… I used the tutorial’s instructions to roll back the changes, and I’ll try again later if I’m feeling motivated. In the mean time, if you know how to fix this process, I’d love to hear about it.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Gentoo, God Damnit Linux, Jon F Tags: , ,

Dropbox Meets Gentoo

November 6th, 2011 No comments

So I’m a big Dropbox user. I primarily use it to keep my personal info synchronized between my machines (don’t worry, I encrypt my stuff before dumping it into Dropbox, I’m not dumb), but it’s also handy for quickly sharing files with others.

Unfortunately, Dropbox doesn’t exist in the Gentoo portage tree.

To get started, head over to the Dropbox website and download the source tar.bzip file for your platform. Unzip it to your desktop, open a root terminal and cd into the resulting directory. Before you can actually install Dropbox, you’ll need to satisfy a few dependencies.

First, make sure that you’ve got python by typing emerge python into the aforementioned root terminal. Next, install docutils by typing emerge docutils in that same terminal. Now you should be able to install the dropbox stub by typing ./configure && make && make install.

At this point, Dropbox will have installed a stub of an application on your machine. You should be able to find it under Applications > Internet > Dropbox. When you launch this application, Dropbox will attempt to automatically download and install the binary portion of the application.

Optional: Verifying Binary Signatures

When dropbox downloads binary files, it verifies their legitimacy by calculating a digital signature and comparing it to a known value. In order for it to perform this task, you’ll need to have the pygpgme library installed on your system. Note that this is not the same as the python-gpgme library. They are different, and Dropbox requires the former. Like most Python libraries, pygpgme is a wrapper around a c-based library, in this case, GPGME. As such, the installation takes two steps. First, run emerge gpgme in your root terminal.

Second, you’ll need to install the pygpgme wrapper. It can be found on the project’s homepage at Launchpad. Unpack the tar.bzip, cd into the resulting directory, and run python setup.py build && python setup.py install from a root terminal. If the installation fails with an error message like

fatal error: gpgme.h: No such file or directory

then check the location of your gpgme.h file. It should have been included with the emerge gpgme command, but pygpgme expects it to live in /usr/include/. On my system, it was living in  /usr/include/gpgme/. I solved this problem by running cp /usr/include/gpgme/gpgme.h /user/include/. The only catch is that if you upgrade GPGME, you’ll need to remember that you copied the header file in order to make the python wrapper work. Once the file is copied, you should be able to run the setup script above.

Finally, run Dropbox and check to ensure that the warning message about binary signatures has gone away. You should now be good to go!

 

Edit: After I had figured all of this crap out, I realized that Dropbox actually is available in the Gentoo tree, but it’s called gnome-extra/nautilus-dropbox. You should be able to skip all of these steps and install Dropbox with the command emerge nautilus-dropbox, although I haven’t tried it myself.




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Free Software, Gentoo, Jon F Tags: , ,

X!

November 3rd, 2011 No comments

Tonight, I finally got X11 working on my Gentoo machine. For those who are following along, on Tuesday night I managed to get my machine up to a command line. The next logical step is a graphical window manager.

I’ve chosen to give Gnome3 a spin, but before I can dive into all of it’s shiny UI-goodness, I need an X11 server installed on my machine. Because I have an nVidia graphics card in my machine, and I’ve had great luck with Ubuntu’s proprietary nVidia drivers in the past, I decided to skip over the open-source Nouveau drivers this time around. I started out the installation by following Gentoo’s nVidia guide, supplementing with info pulled from the nVidia entry on the Gentoo Wiki.

Although X is supposed to configure your system automagically, it couldn’t find my screens or devices on my first run of startx. I looked about the internet for a bit, and found out that you can force X to automatically configure itself. Simply run Xorg -configure and copy the file that it creates into your Xorg config directory (you can find it in the log file, mine is at /usr/share/X11/xorg.conf.d/).

In my case, these automagical settings still needed a bit of tweaking. I noticed in the log file (again, mine is at /var/log/Xorg.0.log, your mileage may vary) that X was failing to load GLX, which is essentially for 3D acceleration. In my case, GLX was installed, but it NVIDIA’s version wasn’t being loaded. Once again, the Gentoo Wiki came through for me, instructing me to run eselect opengl set nvidia. This worked like a charm.

Finally, I had to install twm and xterm so that I could see X working. That was a quick and painless process. Now on to Gnome!




On my Laptop, I am running Linux Mint 12.
On my home media server, I am running Ubuntu 12.04
Check out my profile for more information.
Categories: Gentoo, Jon F, Xorg/X11 Tags: