Wednesday, July 29, 2015

Using veracrypt on Ubuntu 14.04 LTS

Since we have become aware of the security concerns surrounding the Truecrypt project, veracrypt has taken its place as one of the most trusted encrypting solutions. Here is a brief guide on how to get it intalled and running under Ubuntu Linux.

Installation

Go to the official VeraCrypt website at https://veracrypt.codeplex.com/ and click on the "Downloads" tab.

There you will find the appropriate Linux download option

VeraCrypt Linux Setup 1.0f-2 (version will change in the future)

Once downloaded unpack it and you should see 4 different files to chose from. If you are running a 32-bit install you will want to use the x86 option while the x64 file will be the one to use if you are on a 64-bit ubuntu installation. If you are new to Veracrypt I would  recommend installing the GUI option (I believe this option even installs the commandline option as well)

$ /home/your_user_name/Desktop/veracrypt-1.0f-2-setup-gui-x86

This can be done by dragging and dropping the file from nautilus directly into a terminal screen which will cause it to show the path to the installation file with quotes around it. Simply remove the quotes and run the file.

The install should be fairly quick and you will be prompted for your admin password. Once that's done you should be able to find Veracrypt on your system.

Encrypting your files

In order to actually encrypt your files, Click "Create Volume" and follow the wizard.

I recommend creating an encrypted file container using "standard veracrypt volume". In terms of Encryption algorithm I usually go with "Twofish" and the hash algorithm "Whirlpool". Chose what size your volume will have and then format it.

Once you have a volume created, find your file location (Select File...) and mount the drive in the selected slot from the list shown. This should prompt you for your password. Once that's done you should see the mounted drive for your use.





Thursday, July 23, 2015

Terraria under Ubuntu 14.04 - crash upon map loading

I just installed the beta version of Terraria for linux which just came out. I'm very happy the developers decided to make a linux port for this game. Of course the port is full of bugs and we're supposed to be reporting these bugs. Except I can't post my issue at the terraria forums right now (I'm not exactly sure why). So instead I'll post it here in case it can help someone in any way.

I just ran steam off of the command line, where you can open steam by going to

~/.steam/bin32/steam

and running

$ steam

from there you should be prompted to enter your credentials. From this point on just open another console window and go to

~/.steam/steam/SteamApps/common/Terraria

and run

$ ./Terraria

At this point I can basically start my game, I created my world and all looked OK. Once I tried to play it, the screen loaded for a second and then the game crashed. The following message was shown in the console:


Stacktrace:
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) object.wrapper_native_0x7fad18ede710 (Microsoft.Xna.Framework.Graphics.OpenGLDevice/GLenum,int,int,int,Microsoft.Xna.Framework.Graphics.OpenGLDevice/GLenum,intptr) <0xffffffff>
  at (wrapper delegate-invoke) <Module>.invoke_void__this___OpenGLDevice/GLenum_int_int_int_OpenGLDevice/GLenum_intptr (Microsoft.Xna.Framework.Graphics.OpenGLDevice/GLenum,int,int,int,Microsoft.Xna.Framework.Graphics.OpenGLDevice/GLenum,intptr) <0xffffffff>
  at Microsoft.Xna.Framework.Graphics.OpenGLDevice.DrawUserIndexedPrimitives (Microsoft.Xna.Framework.Graphics.PrimitiveType,intptr,int,int,intptr,int,Microsoft.Xna.Framework.Graphics.IndexElementSize,int) <0x00115>
  at Microsoft.Xna.Framework.Graphics.GraphicsDevice.DoSpriteDraw (Microsoft.Xna.Framework.Graphics.PrimitiveType,int,int,System.Runtime.InteropServices.GCHandle,int) <0x00095>
  at Microsoft.Xna.Framework.Graphics.FastBatch.DrawBatch () <0x0022f>
  at Microsoft.Xna.Framework.Graphics.SpriteBatch.End () <0x00057>
  at Terraria.Main.DrawToMap () <0x00f57>
  at Terraria.Main.Draw (Microsoft.Xna.Framework.GameTime) <0x02767>
  at Microsoft.Xna.Framework.Game.Tick () <0x0056c>
  at Microsoft.Xna.Framework.SDL2_GamePlatform.RunLoop () <0x007bf>
  at Microsoft.Xna.Framework.Game.Run () <0x0010a>
  at Terraria.Program.LaunchGame (string[]) <0x00087>
  at Terraria.LinuxLaunch.Main (string[]) <0x00037>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
/home/zoah/.local/share/Steam/SteamApps/common/Terraria/lib64/libmonosgen-2.0.so.0(+0xcd18a) [0x7fad1f7eb18a]
/home/zoah/.local/share/Steam/SteamApps/common/Terraria/lib64/libmonosgen-2.0.so.0(+0x12ad1b) [0x7fad1f848d1b]
/home/zoah/.local/share/Steam/SteamApps/common/Terraria/lib64/libmonosgen-2.0.so.0(+0x38f46) [0x7fad1f756f46]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7fad1f38fd40]
/usr/lib/fglrx/dri/fglrx_dri.so(+0x50d8c6) [0x7fad033c08c6]
/usr/lib/fglrx/dri/fglrx_dri.so(+0x5b344a) [0x7fad0346644a]
/usr/lib/fglrx/dri/fglrx_dri.so(+0x4b323a) [0x7fad0336623a]
/usr/lib/fglrx/dri/fglrx_dri.so(+0x5f57c8) [0x7fad034a87c8]
[0x40a43f0f]
Debug info from gdb:
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
./Terraria: line 20:  5073 Aborted                 (core dumped) ./${BASENAME}.bin.${ext} $@

Tuesday, March 3, 2015

Mutt - email from the command line

Since I started using linux on my work machine I have been looking for good CLi alternatives to things I need on a daily basis. I was given a work laptop and I run my Xubuntu install off of a VM on my Windows 7 machine. What that translates to is that I'm constantly running low on RAM and CPU, therefore anything I can do from the CLi makes my computer happier. For this reason I decided to try to add my email to something I can check off of the command line. It would save me a solid 200-250 Mb of memory that I don't need to be spending on an email client that mostly just pops up incoming msgs all day. So after looking around, it seems like Mutt is the popular choice for people checking their email on the CLi.

To be perfectly honest, I really only need my client to check my mail on occasion, and if I need to respond to an email, I don't even mind opening Thunderbird then, but I just don't like keeping it open all day. But here is what you do to get Mutt running on your debian based distro:

$ sudo apt-get install mutt

this will install mutt on your distro... from there I got a Postfix Configuration screen. There you should find some details about the different types of configurations available (Internet site, Internet with SMTP, etc). For my purposes I just skipped this part and left with no changes to configuration, I will deal with that post install.

To access the configuration file for mutt use your favorite text editor (such as vim, nano, etc) and open ~/.muttrc so for me I will run

$ sudo nano ~/.muttrc

there you can add the following information for your particular email

set imap_user = “usernam@gmail.com”
set imap_pass = “passwrd”

set smtp_url = “smtp://usernam@smtp.gmail.com:587/”
set smtp_pass = “passwrd”
set from = “usernam@gmail.com”
set realname = “My name”

set folder = “imaps://imap.gmail.com:993”
set spoolfile = “+INBOX”
set postponed=”+[Gmail]/Drafts”

set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

set move = no

I probably don't need to tsay it, but change it to the information relevant to your email account of course. Leave the password fields blank if you prefer, and that will cause mutt to prompt you for it which may be a bit of a safer option.

From here you will need to run the program by typing

$ mutt

From your inbox use your

up/down arrow keys - move through your inbox
PgUp/PgDwn - move quickly through your inbox
Enter - opens the msg

Once you open a msg use

space - scroll down the msg
'-' (minus) - scroll up the msg (unfortunately you don't use up/down for this)
i - returns to inbox (seems like q works as well, which seems more natural to me)

For more information on how to use Mutt, this post was very useful to me:

http://www.linuxuser.co.uk/tutorials/get-started-with-mutt/1