Friday, May 4, 2018

Microsoft Visio 2013 :: Import of image file failed: '[name of the image file]'

problem: I cannot insert an image file into Visio 2013 (INSERT > PICTURES > (any graphic formats .png, .jpg, etc).

The popup message is: "Import of image file failed: '[name of the image file]'". Pasting the image also didn't work and complained with a pop up about not enough memory.

impact: cannot import images in Visio

solution: install Visio KB3114720

Here is a link to the update for Visio 2013 (KB3114720) (Applies to: Microsoft Visio 2013 Service Pack 1)

Interestingly enough making a new windows profile and trying to insert an image in Visio in the new profile worked fine. Opening that saved drawing in the profile that was not working showed a box with an X inside where the image had been successfully inserted in another profile.

Pasting from mspaint did work, but things like transparency were lost in this case.

citation(s):

Props to:
Pieter Pessemier @ answers.microsoft.com

Tuesday, September 5, 2017

xterm .Xresources not being applied at awesome startup (x2go)

problem: xterm settings not being applied at awesome startup (x2go)

impact: have to manually merge after awesome startup

solution: use a custom launch script that merges settings before awesome starts

#!/bin/sh [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources exec /usr/bin/awesome

Tuesday, July 18, 2017

windows 10 and smb share mounting not working // system error 64

problem: net use w: \\hostname\path errors with system error 64

impact: cannot mount the share

solution: check the smb protocol version of the server (and client)

Client Windows 10 Pro 1703

Mounts to linux smbd v4 were working ok
Mounts to linux smbd v3.6.6 were not working

using elevated powershell we could see the existing shares
PS C:\Windows\system32> Get-SmbConnection
This can be useful if comparing working shares vs. non working shares as it shows the Dialect version of SMB protocol.
In this case the linux smbd 4.x version was using Dialect 3.x The linux smdb 3.6.6 was having the system error 64 after some trials we forced the smb protocol in the smdb.conf
[global] min protocol SMB2 max protocol SMB2
After an smbd daemon restart the windows client was able to connect and the Dialect was 2.0.2

Our conclusion was that win10 client was trying to speak SMB3 with the older smbd daemon which it doesn't support.

There were errors in the smdb logs that helped us reach this conclusion.

Saturday, March 28, 2015

error: C compiler cannot create executables

problem: error: C compiler cannot create executables

I was getting this on Debian systems and after some research found this solution worked for me on more than one occasion.

solution: reinstall binutils

aptitude reinstall binutils

Tuesday, April 1, 2014

problem: blocked/denied permissions on an NTFS folder which you don't own

impact: prevents you working with the folder and its contents

solution: use the SYSTEM account

some copy
psexec -s -i cmd

links: http://technet.microsoft.com/en-us/sysinternals/bb795533

Friday, March 15, 2013

sqlite3 + skype chat history + group chat history

Raw post, but very useful info for extracting messages from Skype chat SQLite databases. sqlite3.exe "$(cygpath 'C:\Users\kmilnes\Downloads\main-ml.db')"

Open a SQLite DB:

sqlite3 /path/to/your/main.db Cygwin: sqlite3.exe "$(cygpath 'c:\Downloads\main.db')"

SHOW TABLES:

SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;

DESCRIBE a table:

PRAGMA table_info(Conversations);

Schema (CREATE SYNTAX) for a table:

.schema TABLENAME

A list of unique usernames you've chatted with:

SELECT DISTINCT(dialog_partner) FROM Messages;

Show a list of messages for a given chat partner, ordered by timestamp:

SELECT author, from_dispname, datetime(timestamp, 'unixepoch') as date, body_xml FROM Messages where dialog_partner = 'your_dialog_partner' ORDER BY timestamp;

Show a unique list of participants from group chats you've had:

SELECT DISTINCT(participants) FROM Chats;

Get the chat id for a given group conversation:

SELECT id FROM Chats WHERE participants = 'participant1 participant2';

Get the conversation id for a given group conversation:

SELECT id FROM Conversations WHERE chat_dbid = 17627;

Get the messages for a given conversation id, ordered by timestamp:

SELECT author, from_dispname, datetime(timestamp, 'unixepoch') as date, body_xml FROM Messages where convo_id = 17631 ORDER BY timestamp;

Tuesday, July 31, 2012

Mingle MQL API by example

I was playing around with the Mingle API's today, some notes to self for future development...

An example of a raw GET request to Mingle's MQL API, notes:
  • against Mingle 12.1
  • URL encoding on the query string values
GET /api/v2/projects/YOUR_PROJECT/cards/execute_mql.xml?mql=SELECT%20number%2C%20name%20WHERE%20'Release'%20%3D%20(Next%20Release)%20AND%20Type%20%3D%20Feature HTTP/1.1
Host: YOUR_HOST:YOUR_PORT
User-Agent: curl/7.24.0 (i686-pc-cygwin) libcurl/7.24.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.22 libssh2/1.4.0
Accept: */*
Cookie: mingle_12_1_2_session_id=SOME_SESSION; login=SOME_LOGIN
Note above how I'm hi-jacking an existing Mingle session to perform this request.

curl exmple

Here is a curl command and its resultant raw request, note I'm running this through a local debugging proxy, using https and basic authentication. I use Charles web debugging proxy, I am a huge advocate of this tool, and the use of any debug proxy in general :)
curl -k --proxy localhost:8888 'https://YOUR_USER:YOUR_PASS@YOUR_HOST:8080/api/v2/projects/YOUR_PROJECT/cards/execute_mql.xml?mql=SELECT%20number%2C%20name%20WHERE%20%27Release%27%20%3D%20%28Next%20Release%29%20AND%20Type%20%3D%20Feature'
In order for the basic authentication to work, you need to turn on Mingle's basic authentication, a simple change and its documented here. I restarted Mingle after this change.

The raw request from the curl
GET /api/v2/projects/YOUR_PROJECT/cards/execute_mql.xml?mql=SELECT%20number%2C%20name%20WHERE%20%27Release%27%20%3D%20%28Next%20Release%29%20AND%20Type%20%3D%20Feature HTTP/1.1
Authorization: Basic --REMOVED--
User-Agent: curl/7.24.0 (i686-pc-cygwin) libcurl/7.24.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.22 libssh2/1.4.0
Host: YOUR_HOST:8080
Accept: */*

HTTPS HOWTO

If you're interested in setting up https for your Mingle instance, you can read my HOWTO. I highly recommend this, why send your credentials in clear text when you don't have to? :)