Posts

Restoring a file backed up through dump from an encrypted home directory

https://help.ubuntu.com/community/EncryptedPrivateDirectory#Recovering_Your_Mount_Passphrase sudo mkdir /mnt/restore sudo chown yourid /mnt/restore sudo ecryptfs-add-passphrase --fnek # record output sudo mount -t ecryptfs /tmp/restore/home/.ecryptfs/yourid/.Private /mnt/restore aes 16 n (passthrough) y (encrypt filenames) (enter 2nd key from fnek above)

My first stab at: Unreal Engine 4 and Linux Gaming

I have almost no time these days but I am desperately interested in learning UE4 and especially excited to see how far I can get writing and playing a game in Linux. I have poked at a few books through Safari but finally settled on buying a course from udemy to help jump start my learning. So far I have a working UE4 Editor and have done some playing with blueprint.  The next step with be trying to something in C++ to work. Starting here:  https://wiki.unrealengine.com/Building_On_Linux#First_Time_Setup I have  working UE4 Editor.  It is going to be interesting adapting the course work which is on Microsoft to work under my Xubuntu desktop. I'll try to record the more memorable steps in this blog. Codelite looks like a  good IDE for use with UE4.  I installed it (sudo apt-get install codelite codelite-plugins).  Next using https://wiki.unrealengine.com/Running_On_Linux as a reference I'm editing Engine/Config/Linux/LinuxEngine.ini and set...

p4v logging, why are you so hard to figure out

I have tried in vain to find out how to get p4v to log the entire command so I can better understand p4. I think people call it google-foo, and normally I'm pretty good at getting the search right, but this has eluded me. My p4 log file was lttered with  "{ 2 additional argument(s) suppressed}"  But man I need that info. Finally got the search right which led me to this page: http://forums.perforce.com/index.php?/topic/3368-having-the-actual-p4v-log-on-my-harddrive/ So simple, just change debug level to :1 in the log.config for p4v. Alleluia!

Finding non ascii characters in a text file

stackoverflow link http://stackoverflow.com/questions/3001177/how-do-i-grep-for-all-non-ascii-characters-in-unix My favorite out of this: grep -P "[\x80-\xFF]" file.xml This was really useful when compiling AWS Cloudformation templates since you can't have certain characters in the JSON.

Ubuntu thunar-like disk mounting from the command line

I always forget how to do this, so why not create a quick page to remind myself. Logged in through the GUI it is easy to use thunar, but from the command line I use these steps: # create the luks volume sudo cryptsetup luksOpen /dev/sdc1 Verbatim1TB # mount the disk like thunar udisksctl mount -b /dev/mapper/Verbatim1TB Voila!

Arbitrary cpu load on linux

https://www.devin.com/lookbusy/ Lookbusy is super awesome. It doesn't just take the CPU to 100% like other utilities.. Wtih AWS, especially t2.small instances, I want to play with the cpu around the credit burning limit and this tool allows me to do that so easily.  I'm not sure how the curve works yet, but I'm going to explore that next.     wget 'https://www.devin.com/lookbusy/download/lookbusy-1.4.tar.gz'     tar zxvf lookbusy-1.4.tar.gz     ./configure     make     ./lookbusy --cpu-uti=45-55 --cpu-mode=curve     ./lookbusy --cpu-uti=15-25 --cpu-mode=curve  # t2.small     ./lookbusy --cpu-uti=19

Using ecryptfs to mount encrypted directories

Rather than encrypted every backup file individually I find it useful to just put an ecryptfs overlay on a couple of directories and just write directly to them letting ecrypt take care of the encryption. In this example, I have a local drive that I write my daily incremental gnu tar file to.  I then rsync that directory's contents to a mirror directory house on the IT microsoft network drive.  This code snipet mounts the 2 ecrypt directories.  I run this after rebooting my box since I don't want  to store the passphrase anywhere. ECRYPT_OPTIONS="key=passphrase,ecryptfs_cipher=aes,ecryptfs_key_bytes=32,ecryptfs_passthrough=n,ecryptfs_enable_filename_crypto=n" sudo mount -t ecryptfs /scratch/myuser/encrypted /scratch/myuser/encrypted                                   -o "${ECRYPT_OPTIONS}" || exit 4 sudo mount -t ecryptfs /mnt/dos/home/myuser/MyDocuments/encrypted /mnt/dos/hom...