One of my favorite tools that I find myself using quite often is called “ScreenCloud“. It allows you to quickly select any area of your workspace, create an sized screen shot, and then upload it or export it off to their server, your Dropbox account or an SFTP server.
If you’ve recently performed upgrades, either to Ubuntu >16.x or Fedora >21 or the latest version of ScreenCloud, you may be experiencing the same pain that I just endured when launching the application.
In my case, this particular error relates to the SFTP plugin inside of ScreenCloud which automatically uses secure FTP to upload your screenshots to a remote server.
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named 'Screencloud'
First, kill any running instances, remove any custom repositories you may have installed it from and then completely remove the screencloud application.
In Ubuntu/Mint:
sudo killall -9 screencloud
sudo rm -vf /etc/apt/sources.list.d/screencloud*
apt-get remove screencloud -y
In Fedora:
sudo killall -9 screencloud
sudo rm -vf /etc/yum.repos.d/screencloud*
yum remove screencloud -y
Now, remove its associated local plugins (sftp, dropbox, etc). These are easily attainable again via the application or GitHub.
rm -rf ~/.local/share/data/screencloud/ScreenCloud/plugins/
Next, we need to place the ScreenCloud.py module in a directory that is actually included in the search paths for the application. This varies depending on systems and versions.
You can find a list of the paths within the ScreenCloud application, by opening “Preferences” and pressing CTRL+D (debug mode) and typing the following into the debug CLI:
py> import sys
py> print sys.path
In my case, ~/.local/share/data/screencloud/ScreenCloud/screencloud/modules was part of the path and the directory did not exist, so I simply created it and rsync’d the file over:
mkdir -p ~/.local/share/data/screencloud/ScreenCloud/screencloud/modules
cp -f /usr/share/screencloud/modules/ScreenCloud.py ~/.local/share/data/screencloud/ScreenCloud/screencloud/modules
Now, try to run the application again.
No? If you received an error such as this:
from Crypto.PublicKey import DSA
ImportError: No module named Crypto.PublicKey
Make sure you have the latest Crypto and PyCrypto modules installed:
sudo pip install crypto pycrypto --upgrade
Copy over the Crypto module from your system’s distribution package into a path that screencloud is configured to look in.
You can find a list of the paths within the ScreenCloud application, by opening “Preferences” and pressing CTRL+D (debug mode) and typing the following into the debug CLI:
py> import sys
py> print sys.path
And again I simply rsync’d the entire Crypto/ module’s directory over to it one of the included paths. Note: Debian based systems like Ubuntu use different system paths for Python packages than RedHat based systems. Note the differences below and know your system’s layout before running commands.
In Ubuntu/Mint:
sudo rsync -avz /usr/lib/python2.7/dist-packages/Crypto ~/.local/share/screencloud/modules/
In Fedora:
sudo rsync -avz /usr/lib64/python2.7/site-packages/Crypto ~/.local/share/data/screencloud/ScreenCloud/screencloud/modules/
I hope this helps save someone else some time and frustration!
Tweet
Erik
Tuesday, August 23, 2016
linux administration - tips, notes and projects, ubuntu linux
No Comment