Tuesday, July 21, 2015

Sneaky plant

Needle-and-thread grass is starting to hitch rides with us on a regular basis as of early July.  02 July 2015, near Brooks, Alberta.

Thursday, July 16, 2015

Moving default folders such as Pictures and Documents, etc. to the new partition

So I have set up my computer to dual boot into Ubuntu and Windows 8.1.  Then I partitioned my hard drive so I could have a shared data partition between Ubuntu and Windows.  Now, I want to change the default folders on both operating systems (like My Documents and My Pictures on Windows) to be on this new partition so I can use files from both places easily.  It was pretty easy and took about 15 minutes in Windows 8.1 despite my having delayed doing this for several days because surely it'd be hard. It appears to be essentially the same in Windows 7 if you have that.  I had three user accounts that I all directed to the same folders.  Otherwise it would have just been a few minutes.  I didn't redirect the desktop as I think this allows me to have different things saved on each one, and I only save temporary files on the desktop.  There was one conflict where I had the same file in each download folder, and Windows asked me what to do about it (replace, add, etc.) so I think if you try this after you have a lot of files it would still work.  I did this when my computer was essentially empty.


Okay, how to do this in Ubuntu?  It appears Windows always mounts the drive so it's visible, but in Ubuntu it doesn't and you have to configure it manually.  Here is a file showing all the commands and responses I got.

Next, how do I change the folders?  That first link I provided wanted me to make some sort of links, but this changing of a configuration file seems more permanent and unlikely to confuse programs like LibreOffice.  I couldn't find the  .config folder though and it was hidden.  Ctrl+H did the trick. I changed the file from $home/Downloads to media/Data/Downloads first to test it.  It didn't show up at first, but this older tutorial says I need to either log off and on again, or kill and restart Nautilus first.  My computer needed rebooting for some updates anyway, so I tried that first.  It worked!

I wondered if Ubuntu would politely accommodate the files from both the original default folder and the new folder like Windows did, so I put two documents in the default: one that had a duplicate and one that did not.  Then I went back to the configuration file and changed everything except the desktop.  Templates and Public did not have folders in Windows, so I added those to the data partition in case they are important for Ubuntu (I don't know yet).  This time I tried the killall nautilus in the terminal and it worked (much faster than rebooting or logging on and off).  Ubuntu did not move the files over, which makes sense since it wasn't particularly automated.  So if you already have a bunch of files, you'll need to move them manually.

I next noticed that there are two sets of links to documents, downloads, music, pictures, etc. in the files browser.  The top set (about the Data, Windows8_OS, and Computer partitions) go to the newly set folders.  The bottom set goes to the old /home ones.  I deleted the folders from /home, but then those lower links just gave an error for a missing directory.  I discovered you can right click on them and remove them.  No more confusion or errors.  I then tried saving something from LibreOffice to see where it goes as default.  It goes to /home/Claire which would have been annoying anyway I think.  I opened LibreOffice Writer and went to Options>LibreOffice>Paths and edited where "My Documents" is.  I tried installing another program afterwards (DigiKam for photo management) and it automatically went to my new Pictures folder.  Success!

I only have one Ubuntu user account right now so I just did this once.  I assume it'll work okay if I create another account, but so far I'm just using one account.

Tuesday, July 14, 2015

Sneaky sparrow

We've almost certainly heard this male Baird's Sparrow on several days since banding (same song in same territory), but he likes to perch in the grass out of sight.  08 July 2015, near Brooks, Alberta.

Thursday, July 09, 2015

Setting up partitioning on my dualboot laptop

Now that I have my shiny new laptop successfully dual booting, I want to access the same files from both operating systems.  I see on the side menu thing (start menu?  task bar?) a "Windows8_OS" icon.  When I click this, it "mounts" the partition with Windows 8.1 so I can nose around in the files.  I had two screenshots from my dual boot adventures previously, so I went to those files and copied one and edited it.  Now I will reboot and go into Windows and see if it worked.  Yes!

I want a separate data partition though and inexplicably Windows 8.1 had 400+ GB in spite of using only about 35 GB currently.  I went to Adminstrative Tools>Disk Cleanup.  I selected all the files it gave me and told it to clean up system files as well (the button with the adminstrator shield on it).   Disk cleanup continued.  It took around 5-10 minutes and then brought up the window again with more selections for cleanup.  When I said okay, it asked if I wanted to permanently delete these files.  Yes, I do want to delete them.  Thanks.  It took at least 20 minutes.  Then I defragmented again.  This didn't get rid of the extra space.

Some googling let me know that Windows apparently stores some critical files at the middle/end of its original partition.  I followed these instructions to move the files into a smaller region.  It worked without a hitch.  I left about 70 GB for Windows 8.1.  Unfortunately, since I did my "unallocations" at two different times (once to make space for Ubuntu and now to solve the problem of why Windows wanted 400 GB), they are not combined.  The unallocated portions were separate.  It appeared the easiest way to combine them would be with the linux-based disk management GParted. 

I rebooted into Ubuntu and installed (using the application manager) and then opened up GParted.  It looks like I need to move the Ubuntu partitions around.  I did "swapoff" for the linux-swap partition, then moved it as described on the GParted site.  I just did one first to make sure it worked.  I rebooted twice into Windows and then once into Ubuntu to confirm everything was happy (the site suggests just doing Windows twice but I figured it was important to see if Ubuntu was happy since this was the linux swap partition I just moved).

Apparently I then needed a LiveCD version of GParted (can be done with USB too but CD seemed easier and it fit on the old CDs I have).  It was a bit over 200 MB so it took a while to download on my connection.  I burned this bootable CD on the lowest speed with "Verify disk after burning" checked.  I then reinserted the CD and shut down my laptop and turned it on again.  It didn't boot from the CD so I went to system settings, it took me through the Lenovo screen again, where I pressed F12 to choose the boot device.  I picked the third one, which had CD0 and DVDRAM in the name so I figured that was the CD.

I left it to sit a bit too long on default once GParted live had loaded and it started doing things.  Then the keymap screen came up as described. For the next few questions it asked me, I picked all defaults as suggested by the GParted help and then was at step 6.  I moved the remaining two linux partitions (/ and /home).  While I was there I right-clicked on the linux-swap file system and labeled it "Linuxswap".  After those changes were applied, I took the now-continuous and contiguous unallocated space and created a new partition which I labeled Data.

Once this was all done I rebooted into both operating systems to confirm I could see the files.  I ran into a bit of trouble with Windows not being able to read the Ubuntu screenshot, because it contained a colon.  I renamed the file back in Ubuntu and could see it fine in Windows then.

Finally, I needed to reset the changes I made from the initial instructions on reducing the size of the Windows partition.  The memory dump change wouldn't go without changing the paging file settings first.  It was still giving that error after I changed the paging file, so I did the other things (except for hibernation, which I have tried to turn off everywhere anyways).

I could have saved myself all this trouble by shrinking the Windows partition more appropriately BEFORE I installed Ubuntu.  Then I'd only have had to create the new partition from the one piece of unallocated space instead of moving things around.  Oh well, I learned how to use GParted!  Next up I'll figure out how to redirect all the default directories (My Documents, My Pictures, etc.) to the new partition and how to do the equivalent in Ubuntu.

Tuesday, July 07, 2015

Too early in the morning

Sunrise to the east.  Near Brooks, Alberta, 02 July 2015.

Moonset to the west.  Near Brooks, Alberta, 02 July 2015.

Friday, July 03, 2015

Another chapter from my dissertation out in the world: integrating hybrid zone models

I am pleased to announce that chapter 1 from my dissertation (highly modified and improved by reviewer comments) has been accepted as "An Integrated Framework for Hybrid Zone Models" in Evolutionary Biology.  It's been over five years since I first had this idea and it's finally out there.