The Simple Way to Mount a Network Drive on Lubuntu – Ubuntu – Debian

There are lots of answers out there for this problem and they are all absurdly complicated. Here’s the easy way to do it and it takes about 2 minutes.

If you don’t have cifs installed then you’ll need to install the utils package. It’s not installed by default with lubuntu. The command is “sudo apt-get install cifs-utils

Create a director to map this folder to in your media folder “sudo mkdir /media/{your folder name}

Then you need to edit your fstab file. “sudo leafpad /etc/fstab

To the end of the file add the following line; remember to replace the sections in brackets with your information
//{your drive IP address}/{any sub folders you want} /media/{your folder name} cifs username={drive_username},password={drive_password}

To test if it’s working type “sudo mount -a” if you did it wrong this will give you some useful error messages. Unfortunately cifs only supports IP addresses currently so you’re stuck with that. It’s generally a good idea to give things like a network drive a static IP address.

Earlier today I installed some updates and ended up having a problem with my mount. I had to add a version flag to the end of my fstab line to get it to work. vers=1.0 I tried vers=2.0 and vers=3.0 which did not work for me.
//192.168.1.1/volume /media/nas cifs username=****,password=****,vers=1.0

Odoo 9 Step By Step Install Guide – Linux Ubuntu Lubuntu Debian

Unfortunately Odoo has intentionally made their community edition a little on the difficult side to install. I can only assume this is to drive people to their paid SaaS model. To balance this I’ve put together a guide to getting Odoo up and running and I’ll add updates as I implement and deploy new functionality.

  1. Download Odoo from their website – You’ll want to pick Odoo 9 Community for Linux
    https://www.odoo.com/page/download
    The pick “Latest Debian 9.0” as your download

The install script does a pretty good job setting up new users and getting things installed and put into the correct place. One very critical step that it does leave out is getting Postgresql configured properly. So that’s step 2. You will see a 500 Internal Server Error if you try to access http://localhost:8069 at this point

  1. Setup Postgresql user
    1. Postgresql should have already been installed but if it wasn’t you can use this command to do it from the terminal “sudo apt-get install postgresql
    2. if you get the message “No passwd entry for user postgres” you probably need to do t his
  2. Well need to create a new user and password that odoo can use to access the database – You can do that with these 2 commands
    1. Switch to postgresql user “sudo su – postgres”
    2. Execute the command “createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt odoo
    3. You will be asked to create and confirm a password – This is the password that will protect your odoo database so make it something good and then remember it – you will need it again
    4. Type “exit” to get back to your previous user
  3. Edit the Odoo config file which is cryptically still called “openerp” even though they changed the name of the software quite some time ago
    1. the file is located in “/etc/odoo/openerp-server.conf
    2. on Lubuntu the command would be “sudo leafpad /etc/odoo/openerp-server.conf” just replace leafpad with “gedit” if you are on ubuntu or your favorite text editor
    3. You need to change the 2 lines for “db_user” and “db_paspsword” to odoo and the password you chose before
    4. also add “logfile =/var/log/odoo/odoo-server.log” to the end of the config file so you can track down log files if you need to
  4. You should now have Odoo up and running at “http://localhost:8069“!
    1. You will get a first configuration screen to setup a new database for your instance
    2. Go ahead and pick your password which will be the default password for your administrator user
    3. The default user name (which it wont tell you) is “admin” with the password you picked
    4. Note: if you change the email address of the admin user you will then login with that email address instead of admin

 

Let me know if you run into trouble!

The “Some controls on this presentation can’t be activated” Solution

Also know as Object Library Invalid Or Contains References To Object Definitions

I just finished an epic battle with PowerPoint cause by a recent round of Windows Update. My colleague ran into the same problem so it’s time to share the cause and very easy fix to this problem. If you see “Some controls on this presentation can’t be activated. They might not be registered on this computer” when you startup specific PowerPoint files and you’ve recently updated your computer then this is likely your problem.

some controls

 

To verify if you’re having the same problem open a new PowerPoint file and go to the “DEVELOPER” tab. If you don’t have it you can activate it by going to

File > Options > Customize Ribbon > Right hand panel > Check the box next to Developer

Then try to place one of the “Controls” onto your blank new PowerPoint file.

Controls

You should get an error indicating the library is corrupted and missing. Congratulations you’ve identified the problem! Now for the fix:

Open Windows Explorer and type %AppData% into the address bar. Which will take you to the Roaming Directory. You need to navigate back one folder to just the AppData Directory. (On Windows XP running office 2010 I found the files in “Local Settings” instead of “AppData”)

AppData

From there just search for “*.EXD” and remove any files that you find. These files are temporary and will conflict with the new files that were installed by Microsoft. Instead of uninstalling updates and Office multiple times, take the easy way out and delete these files. Restart PowerPoint and you’ve got your fix!

 

Some other things I searched for when trying to fix this problem

method ‘object’ of object ‘oleformat’ failed ActiveX Label
missing activex control windows 8.1
activex controls not registered powerpoint
reinstall activex control windows 8.1
Object Library Invalid Or Contains References To Object Definitions

 

Connect Excel to PostgreSQL through SSH Tunnel (Part 2)

Now that you have setup your SSH tunnel using Putty It’s time to get excel involved. (Not there yet? go back to part 1)

You will need Office 2013 Professional to get access to the software and you will need to download Power Query from Microsoft. Here’s the current link http://www.microsoft.com/en-us/download/details.aspx?id=39379

Before you connect to a PostgreSQL database, the PostgreSQL .Net Data Provider needs to be installed. To install the PostgreSQL .Net Data Provider, see Install the PostgreSQL .Net Data Provider.

Once you’ve installed Power Query and the PostgreSQL adapter you are ready to open Excel. Navigate to the new Power Query tab and select From Database

Power Query From Database

Power Query From Database

You’ll get a popup to setup your database

Power Query PostgreSQL Database Connection Popup

 

Server will be localhost and the tunnel port that you setup before. If you’re following along closely we setup localhost and used the default value of 5432. This plugin doesn’t appreciate non-default port numbers so be sure to use the default.
Database is the name of your target database on the server

You will need to enter your database username and password also. You will likely get the following popup which is a good sign and you should accept.

Power Query Encryption Popup

Power Query Encryption Popup

If you run into trouble leave a comment and I’ll see if I can help.

Connect Excel to PostgreSQL through SSH Tunnel (Part 1)

This is a solution I managed to cobble together through trial and error and a lot of web searching. The fundamentals will be applicable to any remote database and should save you a lot of time searching.

1) Setup the tunnel with Putty.
Download Putty Here if you need it: http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

Once installed you need to create a session. It’s important to do this first as putty likes to delete configurations when you change the settings:

Host name will be the remote server that hosts the database: something like www.mywebserver.com

Putty Configure Settings

Putty Configure Settings

It’s good to test this connection before going forward.

Once you have confirmed your connection to be functional you will need to reopen putty and setup your sever connection again. This time give it a name in “Saved Sessions” and click “Save” to store the configuration.

Next navigate to the Tunnels Section of the Connection > SSH menu

Putty SSH Tunnel

Putty SSH Tunnel

This is where you are going to define your local redirect settings:
Source Port is for the port on your computer that will be used for the connection (typically called localhost)
Destination is the location on the remote server that you need to access. For me and for most databases this is going to be localhost again. Be sure to include the port number for the database. PostgreSQL uses 5432 by default. (It’s important to use the default because the excel addin only supports default port numbers) (127.0.0.1 is interchangeable with localhost and just means redirect to the computer I’m on)

Putty Tunnel Setup

Putty Tunnel Setup

Go back to Session and be sure to Save your configurations otherwise they will be lost next time you start putty. Like I said, Putty really likes to delete configurations.

You’ll get this screen to login and once complete your tunnel will be setup!

Putty Login Screen

Putty Login Screen

Continue to Part 2 – Setting up Excel

Working with a 4K display on Windows 8 (Refresh Rate)

I’ve been using my 4K monitor for a few months now and it’s changed the way I work and interact with the computer. It isn’t without some challenges. If you are accustomed to a 60hz monitor (a monitor which can refresh the screen 60 times per second) and you switch back to 30hz you’re going to feel like there’s some lag in the mouse. The technology is moving in the direction of higher frame rates as HDMI standards start to catch up with the screens but for the average user, those advances are expensive and difficult to work with. Most shows and movies are presented in 30hz so you wont notice any difference when watching movies and the 4K makes for a really stunning picture quality.

Having the mouse lag took some getting used to but it hasn’t had a major impact on my productivity and I’ve been writing software and doing 3D modeling without any major problems. When I want to play a game I switch back to 1080p to give my graphics hardware some room to breath and to get the increased frame rates that are so critical to gaming. To switch between modes follow these steps:

  1. Right click on a blank area of the desktop and select Screen Resolution.
    WorkingWith4k3
  2. You’ll need to change Resolution down to 1920 x 1080 in order to access the higher refresh rates. Windows knows enough to limit your selections in the next step.
  3. Before applying the new settings chose “Advanced settings” to get the following dialog
    WorkingWith4k4
  4. Select the 60 Hertz from the drop down and hit apply. All your changes will go into effect.
  5. To change back to 4K just do step 1 and 2 but select the 4K resolution. The hertz will automatically set to 30 hertz.

 

Enable 4k Resolution with ATI HD 5770 and Seiki 39″ SE39U04

I’ve been playing around with this for a few days now and the internet has either really outdated or really unhelpful information. Now that I’ve got it working in all it’s tiny 4K pixel glory, I figured I would give back.

I did this on Windows 8.1 Professional using a Intel Core2 Quad Q8200 and 2 HD5770 graphics cards in cross fire. These are admittedly old hardware components but if you are using something different I can’t guarantee your results. With that being said, the results for me have been amazing.

The process is relatively simple thanks to ToastyX and his utilities. In the interest of giving credit here’s a link to the post that really made this all possible for me. If you don’t want to wade through all that the steps are below.

  1. Download and install the latest CCC drivers from ATI’s website.
    ATI CCC Info
  2. Download AMD/ATI Pixel Clock Patcher – For whatever reason ATI seemed to be refusing to let me use the dual channel capabilities of the cable that came with the Seiki tv. Apply this patch to get at all that bandwidth.
  3. Download CRU-1.1 – This amazing application lets you override the available options from the display settings menu.
    CRU
  4. Click add and set your resolutions to 3840 by 2160 by 30hz and choose LCD Reduced to save some bandwidth. I was unable to get it to work without this option unless I reduced the refresh rate. Hit OK and restart your computer.
    CRU Details

That’s all there is to it. Enjoy all your extra resolution without any additional hardware.

 

Alt Tab Tuner, Missing Previews Solved, Windows 8

Recently my alt-tab functionality in Windows 8 reverted to a much more boring version. Instead of displaying super hand pictures of the target windows it showed just their icons. This makes it very tough to identify which explorer window I’m headed towards.

I discovered that the setting to change between the 2 modes is located deep in the registry. For those of you that know what I’m talking about the key is

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
setAltTabSettings = 0 for pretty preview mode
setAltTabSettings = 1 for old school XP display

Even if you like editing the registry, I recommend this awesome free tool. It’s called Alt+Tab Tuner by winaero.com. You can download it here. It gives you the power to change settings you didn’t even know you were missing. Increase the size of the previews, decide how many previews show up on each column or row, change transparency values. This is functionality that should have been included with Windows. It’s super tiny and doesn’t require an install. Just download and run.

alttabtuner

 

One point of clarity, 0 means default so if you want minimum spacing set it to 1 like in the picture above.

Launch Google Chrome Twice With Different Users

Google Chrome is a solid web browser. It’s fast, generally reliable and will sync all your data with their servers, all your computers and mobile devices. It wont let you launch 2 instances which causes problems when using multiple desktops and it wont let you sign in as 2 users at the same time. There are some easy steps to make this possible however.

Step 1: Create a shortcut to chrome. Go to C:\Program Files (x86)\Google\Chrome\Application\ which is the default Chrome install directory. Right click on chrome.exe and choose “Create shortcut”

Step 2: Right click the new shortcut and choose “Properties”

Step 3: In the properties popup find the box labeled Target and add -user-data-dir=C:\Chrome\user2 be careful to paste only the underlined text onto the end of the Target text field. You don’t want to change anything else or your shortcut might not work. You can change user2 to any folder which allows you to have as many different instances as you want. You’ll need 1 shortcut for each instance.

ChromeMultUserSnap

Step 4: Hit ok and launch Chrome via the new shortcut. You can use that shortcut to start a second instance on your second desktop or sign in as an entirely different user. Chrome will automatically sync your settings for this new instance so all your bookmarks and addins will transfer over if you want them.

Desktops v2.0

Image

The quest for amazing software continues. This time it comes in an unusually small and simple package. Desktops v2.0 is a minuscule program available from Windows Sysinternals website and is hosted on the Microsoft website. This gem weighs in at 61kb or roughly 4% the size of a floppy disk you might have owned 15 years ago. The size means it’s not going to slow down your system or consume a lot of hard drive space.

What it does:

Despite it’s tiny size it packs a serious software punch. With the press of a keystroke you can now have up to 4 completely independent desktops available on your computer. Mac users might recognize this functionality from the built in Mission Control app. It’s frequently used as a point of contention between the 2 operating systems.

Why you want it:

Effectively you can have 4 computers running within all the same hardware. This gives you impressive organizational flexibility. Keep all your movie watching and song playing apps open off screen waiting for you to finish that paper you were working on. Or for the more tech savvy, keep all your test programs open on one desktop while you program on the other. The possibilities are limited by your creativity and workflow but having the option is worth the extremely small amount of effort to obtain it. Being officially part of the Microsoft world gives me more confidence in it than your average 3rd party app. Especially given how bad the software attempting to perform this function has been previously.

How to get it:

The setup for this program is easier than installing Chrome on a new computer. Go to the website – http://technet.microsoft.com/en-us/sysinternals/cc817881.aspx and download or follow this direct download link. Copy the one file and double click to launch. Configuration is 2-3 clicks and you’re done.

Desktops V2.0

The super simple configuration screen for Desktops V2.0

 The Dark Side

Some programs don’t like being open in both places. Most programs which have an icon in the bottom right corner (the app tray) will not be very happy about running on a second desktop. Most of these applications check to see if they are running already and wont understand why you’re asking them to launch again. Google Chrome is probably the most notable example of this. To get Chrome working on your 2nd desktop follow these instructions.

Additionally, the Windows Start menu will only open on the primary desktop. This can make getting the apps you want to run a bit more challenging. This hasn’t been much of a problem for me as 99% of the applications I use have icons on the task bar and desktop. If you’re running into consistent issues try adding a shortcut to this folder C:\ProgramData\Microsoft\Windows\Start Menu\Programs This is where windows stores your start menu and all the shortcuts contained within.

Overall the good outweighs the bad by quite a lot. It’s definitely worth a look and “uninstalling” is as easy as deleting the Desktops.exe file from your computer. Happy multitasking!