Browsed by
Category: Problem solutions

VNC-ing into Ubuntu 14.04

VNC-ing into Ubuntu 14.04

Some VNC functionality was broken in Ubuntu 14.04 due to Vino, but fortunately, it’s fixable:


Using a combination of clues from (which is all about VNC access) and (which discusses the bug introduced into Vino) I have managed to resolve the matter.

Essentially you have to disable encryption on remote desktop access in Gnome due to a bug that has come to surface in Vino. However, some threads tell you to uncheck it in the wrong place. Follow these guidelines and you should be able to resolve it quickly.

Specifically it’s

dconf > org > gnome > desktop > remote-access > require-encryption – uncheck

and NOT

dconf > desktop > gnome > remote-access > enabled – uncheck

Here is how you do it:

  1. First make sure Desktop Sharing is set up properly.
  2. Download dconf-tools by typing in Terminal sudo apt-get install dconf-tools
  3. Run dconf-Editor
  4. Expand org
  5. Expand gnome
  6. Expand Desktop
  7. Select Remote Access
  8. Uncheck Require Encryption (don’t click on Set to Default as it rechecks it)
  9. Exit dconf-Editor

It should now work. Tested through a reboot and all good.

Hope it helps.

(I have got a screen shot of dconf but don’t have enough points on here to post it – I am sure everyone can work it out for themselves though! ūüôā )

Tanya’s plan to avoid the fallacies of crunching and bad work habits

Tanya’s plan to avoid the fallacies of crunching and bad work habits

Tanya Short gave one of the best talks I’ve heard in a long time about the fallacies of crunching and bad work habits many people have. The video is now up for free at the GDCVault. Her talk starts at 6:00 :

Summary of her points:

When trying to hit deadlines, she starts out by observing that most of the time we think ‘getting X done’ is our highest priority. It’s not. It’s actually #3:

Your real priorities:

  1. Don’t burn out¬†(i.e. don’t die)
  2. Always keep in mind you’re going to do another – and you should be excited to do the next one even better.
  3. Get it done

That sounds great, but it also sounds a bit idealistic. She says it is not easy, but lays out these points.

Step-by-step roadmap to not dying:

  1. Believe it is possible to hold those priorities in that order
    Many great studios work and ship games without crunch. It can be done, she does it. You just have to be disciplined.
  2. Stop working ‘all the time’. Set work hours.
    It is a fallacy to think working all the time is better. Especially in creative fields. Creative work and creative problem solving require a relaxed mind to do it. Time away from work helps us be more productive. So set work hours and stick to them.
  3. Prioritize your tasks and re-prioritize as often as needed.
    In order to hit your deadlines, you need to¬†know what you’re working on RIGHT NOW is important,¬†not just urgent. If you focus just on the ‘urgent’ emails/tasks/etc, then you’ll never get into the steady workflow that is what makes your work great.
  4. Estimate your tasks. Re-estimate when needed.
    When you finish your task, ask if it took the time you thought it would take. You should do that with every task. It helps you get better at estimating.
  5. Cut the scope before you bleed out.
    If you’re 3 weeks out and realize you won’t make it, don’t immediately think about working more/harder/longer. 3 or more 60 hour weeks is scientifically less productive than 3 or more weeks of 40 hour weeks. You are doing worse work. Even if you think you are a special exception. Why can she say that? A study was done on 100 people that claimed they needed less than 7 hours of sleep. Only 5 out of the 100 could actually do it.
  6. Don’t give up – iterate steps¬†1-5 again and again
    These steps (production) is a skill. Skills can be developed. Skill development requires practice. So congratulate yourself when you do it pretty well, forgive and be kind to yourself when you don’t treat yourself as you deserve.
    We are primates. Primates need to be taken care of in a way computers and games don’t, so don’t act like that towards yourself. It’s not about how many hours you spend because everyone is different.

Other quotables:
A few long nights won’t kill you, but a few long months might. Especially if combined with other health and life factors.

Burnout is the feeling of being dulled as layer after layer of exhaustion accumulates. Burnout is the void left behind where your career could have been.

Then she has a real Benedictine moment: The moment right now will never come again. Every one of us will die. No matter what we create, all we have is right now. Don’t use up that joy, love, and creative energy you have by burning yourself out.

Keep death always before your eyes.
‚ÄĒSt. Benedict: The Rules: Chapter 4.47

She doesn’t cite the studies, but I found some:

Set up VNC on Ubuntu 14.04

Set up VNC on Ubuntu 14.04

Setting up VNC on Ubuntu used to be pretty painless. But recent changes in Ubuntu and X have left it kind of a mess. It took me way longer to set up VNC than it should have, and finding the documentation wasn’t super-easy either. There were lots of broken guides. So, here’s what you need to do:

  • Follow these setup instructions first:
  • When completed, however, a known issue means the screen will come up blue-grey and have few desktop controls if you try to connect to it. This is because (near as I can tell) the X manager currently used for Ubuntu doesn’t work over VNC anymore. You need to set VNC up to use an older desktop manager that
  • To fix that problem, you need to fix things according to this guide:
  • On your client, start the vncserver and connect to it by matching the final digit of the port number to the :X number you used to create it.
    • Example:
      host: vncserver :4 –geometry 800×600 (to create the server)
      client should use the ip:
  • If you get an error starting the vncserver, increment the :2 to :3 or :4 and so forth until you find one not in use by some other user on the server.

Fedora scp: connection refused

Fedora scp: connection refused

I was trying to scp some files and kept getting this:

scp: connect to host port 22: Connection refused

Some linux distros, like the ancient Fedora 21, have ssh daemon turned off by default. So, turn it on:

sudo service sshd start
scp without entering a password each time

scp without entering a password each time

Lets say you want to copy between two hosts host_src and remote_machine. host_src is the host where you would run  scp, ssh or rsyn, irrespective of the direction of the file copy.

  1. On host_src, run this command as the user that runs scp/ssh/rsync$ ssh-keygen -t rsaThis will prompt for a passphrase. Just press the enter key. If you assign a password to the key, then you’ll need to enter it each time you scp. It will then generate a private key and a public key. ssh-keygen shows where it saved the public key. This is by default ~/.ssh/

    Your public key has been saved in <your_home_dir>/.ssh/

  1. Transfer the file to host_dest by either ftp, scp, rsync or any other method.
  1. On remote_machine, login as the remote user which you plan to use when you run scp, sshor rsync on host_src.
  2. Copy the contents of to ~/.ssh/authorized_keys
    $ cat >>~/.ssh/authorized_keys
    $ chmod 700 ~/.ssh/authorized_keys

If this file does not exists, then the above cat command will create it. Make sure you remove permission for others to read this file via chmod. If its a public key, why prevent others from reading this file? Probably, the owner of the key has distributed it to a few trusted users and has not placed any additional security measures to check if its really a trusted user.

Optional – allowing root to ssh:

  1. ssh by default does not allow root to log in. This has to be explicitly enabled on remote_machine. This can be done by editing /etc/ssh/sshd_config and changing the option of PermitRootLogin from no to yes.
  2. Don’t forget to restart sshd so that it reads the modified config file.
  3. Do this only if you want to use the root login.

Thats it. Now you can run scp, ssh¬†and rsync¬†on host_src connecting to¬†remote_machine¬†and it won’t prompt for the password. Note that this will still prompt for the password if you are running the commands on host_dest connecting to¬†host_src. You can reverse the steps above (generate the public key on¬†remote_machine¬†and copy it to host_src) and you have a two way setup ready!

Connecting iSpy to an Amcrest IP2M-841 webcam

Connecting iSpy to an Amcrest IP2M-841 webcam

This was more annoying than it should have been. When setting up my Amcrest IP2M-841B camera, I was able to use the Amcrest IP Config tool to log in and watch my camera without issue.

When using iSpy 64, however, the darn thing couldn’t figure out how to connect to it. Here’s how I did it. I left the camera on channel 1, set the encoding to plain H.264, and then did the following.

Test your camera using Amcrest IP config.

The first thing is to make sure your camera is working at all:

  1. Be sure you can open the IP config tool and see your cameras.
  2. Make sure passwords are correct, you can get a live view, and that it’s set to H.264 encoding and the channels are correct.


Test your rtsp line using VLC:

  1. Open VLC (install it if you need)
  2. Media->Open Network Stream
  3. Copy in your rtsp: address
    1. example without the username/password:
      1. rtsp://
      2. VLC will ask for your username/password and you can enter it.
    2. example with the username/password:
      1. rtsp://<username>:<password>@<ipaddress>:554/cam/realmonitor?channel=1&subtype=0
      2. I left the arguments as¬†–rtsp-caching=100 (the default)
  4. You should see your stream come up in VLC
  5. NOTE: When setting your password, if you have any special characters like %!&#$ Рor the like Рbe sure to convert them to their equivalent hex ASCII codes. See this chart here.
    1. Example: if your password is ‘cat&dog’, you should use the password: ‘cat%26dog’

Connecting to iSpy

If connecting via VLC worked, your 75% of the way there.

  1. Start iSpy
  2. Add->IP Camera
  3. Select the VLC Plugin tab (I have VLC installed, not sure if that’s 100% necessary)
  4. Set the VLC URL to what you had above (with the username+password):
  5. When setting the password, if you have any special characters like %!&%#$ – or the like – be sure to convert them to their equivalent hex ascii codes. See this chart here.
    1. Example: if your password is ‘cat&dog’, you should use the password: ‘cat%26dog’
  6. I left the arguments as¬†–rtsp-caching=100 (the default)

Once you have iSpy connected, you can set up events and connect to the cloud for full web monitoring.



So, where did I get that rtsp line? Directly from the Amcrest HTTP API SDK Protocol Specification. Section 4.1.1, p14 – Get real-time stream. It’s also a handy guide on all the other parameters you can send the camera.

The value of ESP was not properly saved across a function call…

The value of ESP was not properly saved across a function call…

Windows can trigger this error, but sometimes it’s not easy to figure out what’s going on.

I recently got this error when trying to use the OpenGL ES ANGLE library on Windows 10. When compiling against the ANGLE library, the error came when trying to call into the ANGLE and used eglGetProcAddress().

eglGetProcAddress() returns function pointers for important GL extensions, so I couldn’t just ignore it or work around it.

In looking around, the obvious first step is to make sure you’re defining the function pointers correctly, but that turns out not to be my problem.

In looking at this article, I realized I probably had a mismatch of compiler and linker settings. The Visual Studio projects (VS2008) that came with ANGLE required a certain set of compiler and linker flags that were not standard. I had migrated the Visual Studio projects to VS2015, so that also added an element of uncertainty. I simply opened both project settings up next to each other and compared the settings for the ANGLE library build and the final project and found a few mismatches. I change a number of them to be the same, and things worked great.

Check the linking AND compiling flags for not only your project, but the project files that generate the libraries you’re linking against. Differences in compiler settings can cause this error.

NVidia GTX 1070’s – flickering and artifacts

NVidia GTX 1070’s – flickering and artifacts

If you own a GeForce GTX 1070, you might want to pay attention to this news item as you could be effected by this memory issue.

Some users have reported they noticed occasional flickering or graphical artifacts on multiple brands of the 1070. Right now most of the major vendors are working on (or already issuing) a BIOS firmware update for their graphics cards.

Investigation has shown the issues are graphics memory related. GeForce GTX 1070 cards fitted with Samsung memory do not appear to have any issues but some manufacturers have switched towards Micron chips and these appear to be the culprit. This is noticed most during overclocking the graphics memory subsystem. The problem is in the the speed of the voltage adjustment from the low power idle P-States for memory voltage under load. If you can keep the idle voltage above 0.800V before you apply the overclock, you never see the issue.

A number of manufacturers have been working on VBIOS updates, so be sure to check your vendor:

Full info:

git’s git:// protocol fails, but git http:// succeeds

git’s git:// protocol fails, but git http:// succeeds

A number of source websites expose their source via the git:// protocol. Unfortunately, the git protocol recently broke on one I used, but the git http:// protocol was working. Instead of changing my fetching scripts, I found a clever url replacement in git using the following command:

git config --global url. git://

This allows you to change the protocol per URL instead of globally. Exactly what I needed.