Category Archives: Applications

File Sizes in Ubuntu

So you may find that you would like to sort out some file size information.  Of course you can access any directory (or file) and look at its properties using the file browser (Nautilus), but you may want to dig deeper or you may want to get a broader picture.

First, from the command line you can just list out the directory contents thus:

ls -alh /path/to/directory

This will give you file sizes and the number of items in each directory in human-readable numbers (MB or GB as it were).  You might also like to see how large directories are, and you can do that like so:

du -hcs /path/to/directory

If you are not so interested in the terminal, there are a couple of good GUI applications for sizing matters.  There is Disk Usage Analyzer (baobab from the terminal) and Graphical Disk Map (gdmap from the terminal).  Both are small and both are in the repositories and can be installed easily:

sudo apt-get install gdmap

sudo apt-get install baobab

Finally, to get an overview of all disk usage, I like the terminal command df:

df -h

This will list your partitions and their usage.  These ought to cover just about any size question you might care to have answered.

 

Share

Opera 32 on Ubuntu bookmarks page rendering issue

(This has subsequently been solved by an update to Opera.)

Having upgraded to the latest version of Opera (stable) on Ubuntu 14.04, I have encountered a seemingly insurmountable issue with rending the page for the bookmarks.  Possibly related to this, the bookmarks pop-up menu appears blank.

The menu is interesting because though it appears to be empty white space, you can click items in the menu if you can guess at their invisible locations.  Very much unusable but interesting nonetheless.

The bookmarks page (Show All Bookmarks) however is utterly useless.  It is true that one could make guess about locations of invisible items on the page, since the page is very much larger than the pop-up menu such guesses seem profoundly unlikely.

The bookmarks page itself… well, have a look.

Opera Bookmarks Rending  Issue
Opera Bookmarks Rending Issue

The echo is live on this top row (the echo repeats down the page but I only included the top here).  You can see that on the left I have clicked into the address bar, and the echoes have also highlighted the contents of their address bars.

Not sure what can be done at this point.  I am opening a thread over at the Opera forums.  I’ll keep you posted.

edit:

Looks like this is only an issue with the xorg (open source) driver.  If you are able to switch to a current proprietary driver you may be in good shape.

Change Video Driver
Change Video Driver

As you can see I am now using the most current NVIDIA proprietary driver and no longer using the X.org driver.

It’s also broken in other OS’s so there you have it.

Opera Forums

Hope this helps.

Share

No Fucking with Sophos

We run Sophos on all of our machines at work.  I recently built a Windows 10 machine for one of our developers.  He ran into a problem, however, when he tried to debug the application he was writing.

Sophos was falsely blocking his application with the following error message:

File “C:\Users\[username]\Documents\Visual Studio 2015\Projects\KillerFuckingApp\KillerFuckingApp\obj\x86\Debug\intermediatexaml\KillerFuckingApp.exe” belongs to virus/spyware ‘Mal/DotNet-C’.

Ostensibly a false positive I went to discuss the matter.  It didn’t seem likely that his code shared any code with the known exploit so for shits and giggles I asked him to rename the application anything else to see if Sophos was merely objecting to the name.

Sure enough, once he removed “fucking” from the title, Sophos let things be.

At least Visual Studio wasn’t censoring our fucking developer.

Thanks, Sophos; but, you know, fuck off.

Share

Invisible Titles in Evernote on Ubuntu 14.04 with Wine

I recently updated my version of Evernote on Ubuntu and noticed that the titles of the notes were now invisible in the title field of the reading pane.  This made it very difficult to type or especially to change a note title.  Even copying and pasting was a challenge since I couldn’t tell if I had any or all of the title selected.

I was eventually able to find a solution here.

Essentially there is a dll in Wine that was in need of some wrangling.  A dll or Dynamic Link Library is a Windows thing.  You probably don’t want to know much about them except to say they are sometimes required for applications to function as expected or perform certain tasks.

With one line of code in your terminal (don’t fear the terminal, ok?) you can fix this problem:

winetricks -q riched20

That’s it.  Run that command and when you again open Evernote you should be able to see the titles.  I mean, if it worked for me why wouldn’t it work for you?  Go for it!

What does it do?  It installs the dll (riched20.dll) into the Wine directories.  I guess Evernote needs that dll to display the titles in the title field in the reading pane.  (The -q just means don’t ask me any questions.)

Share

Fix for Firefox’s Profile Manager Error

There is a bug in Firefox (as near as I can tell) and it has been present for many versions (more than a dozen at least). It only effects users in a particular configuration on Macs, so it is not very likely to get any love any time soon. (I filed a bug report here ages ago.)

In short, Firefox is able to create it’s Profiles folder under /path/to/home/[username]/Library/Application Support/Firefox/ and it is able to create the associated profiles.ini file next to it.  However, Firefox is not able to add the information pointing the profiles.ini folder at the newly created profile folder.

If you try to launch Firefox you will only get the Profile Manager and it will not be able to see any profiles, nor will it be able to create one.  Instead it throws an error:

Profile Manager Error
Profile Manager Error

Anyway, perhaps one day Mozilla will fix it.  In the meantime I need to be able to fix this for users.  I know I can add a known-good profile and profiles.ini pair, so I figured I could just build my own profiles.ini file based on what I saw in the Profiles folder.  That worked so I just needed to create a way to use that information.

We use the Casper Suite to manage the Macs in our environment, so I was bent on doing something through Casper.  Additionally I wanted to user Casper’s Self Service application so I could just point a user to a single button to fix the problem.

Here is the script I added for users to evoke through Self Service.

## 
#! /usr/bin/env bash 
# Fix Firefox profile manager error on machines with re-directed home directories. 
# by JamesIsIn 
# Do something nice today. 
# https://github.com/jamesisin/slop-bucket/blob/master/popit/ConfRm_Replace_Firefox_profiles_ini.sh
## 


#Get current logged-in username. 
username=$( stat -f %Su /dev/console ) 


# Get first profile name in user's Library folder. 
profile="$( basename /home/"${username}"/Library/Application\ Support/Firefox/Profiles/* | head -1 )" 


# Empty and populate user's Firefox profiles file. 
printf "[General]\nStartWithLastProfile=1\n\n[Profile0]\nName=Default User\nIsRelative=1\n" 1>/home/"${username}"/Library/Application\ Support/Firefox/profiles.ini 
printf "Path=Profiles/""${profile}" 1>>/home/"${username}"/Library/Application\ Support/Firefox/profiles.ini 


exit 0 
## 

First I get the username of whomever happens to be logged in at the time Self Service is run on that machine and save that in a variable (called username).

Then I get the name of the first profile located in the user’s Firefox folder (under the user’s Library folder).  It doesn’t matter which one I use, I just arbitrarily chose the first one.  This way if there is only one I’ll be ok too.  I store that in a separate variable (called profile).

Finally I use those two variables to construct the appropriate profiles.ini file (using printf and standard output redirection).

Hope that helps you.

Share

Download Evernote on Linux

If you run Evernote and you use Linux (I run Evernote on Ubuntu under Wine) you may find yourself in the situation where you are attempting to download the Evernote Windows installer to install Evernote into the Wine environment.

You will run into trouble.

The Evernote site does a browser/OS check and presents you not with any download options but instead informs you that they do not offer a version of Evernote for Linux.  Simply put, you cannot get to the installer by the usual means.

So what about unusual means?

Since I run Opera (you can read about how to install Opera here) I am able to mask my browser identity by right-clicking on the page in question, choosing Edit Site Preferences…, and then on the Network tab modifying the Browser identification.

If you set the browser identity to Mask as Internet Explorer (and reload the page) you will be presented with the download as expected.

Fuck browser checks (and OS checks) when the result is to limit user action and not merely inform or suggest.

Share

Migrating Your RDP History to a Different Windows 7 Machine

You would think this would be a simple operation.  Migrating my bash history for Cygwin meant moving one file.  But you’d be wrong.  This migration means moving two registry hives, one file, and the contents of one very difficult to locate hidden folder.  Well, at least it can be done.

I began with the RDP client already pinned to my Task Bar.  Your results may vary if you have not done so.  Let’s get started.

First open the registry editor (just type regedit in the Run dialog or in the search box for the Start menu).  Once there navigate to

HKEY_CURRENT_USER —> Software  —> Microsoft  —> Terminal Server Client

In this location you will find two hives called Default and Servers.  Export each of those hives (right-click  —> Export), move them to the new machine, and import them (right-click  —>  Merge).

Then you need your Default.rdp file (and any other .rdp files you may have saved if you’d like).  This is a hidden file located in your My Documents folder.  Migrate that file to your other machine (just copy it into the same location on the destination machine).

Finally locate this hidden folder.  You will not be able to navigate to it in the usual manner, even if you have hidden files enabled for viewing.  Just put this in your Explorer window:

%AppData%\Microsoft\Windows\Recent\AutomaticDestinations

Migrate the entire contents of that folder to your new machine and you will migrate all of your so-called Jump Lists.  If you are already using your new machine and would rather not see certain Jump Lists overwritten, only copy in the unique files.  (I don’t know how to determine which file is which list at this time.)

Now you have all four of those items migrated (two registry hives, one file, and the contents you selected from one folder) just go ahead and restart your machine.  Now you should be all good to go.

I hope this helps you along.

Share

Some Good and Bad News in Ubuntu 14.04

I have been upgrading certain machines here at work and testing various items along the way.  First one item of concern.

There is a great package out there for Windows domain integration called likewise-open.  We had a 13.10 machine running and connected to our Windows domain using this package.  It’s a great package and it really streamlines the domain membership problem.

Unfortunately there is currently no 14.04 package available in the repositories.  The machine we upgraded is currently not able to log in using domain credentials.  Since it’s Friday at 16:09, I created the user a local administrative level account and we’ll look to doing more as is necessary (but surely next week).

I imagine this package will appear in the repositories before long.  We shall see.  Just be forewarned if you are planning to upgrade any Windows domain connected Ubuntu machines any time soon.

But there is a nice delight to offset this.  The old vmware-view-client package which was broken due to a misplaced dependency and which has finally been removed from earlier-version repositories has been replaced in the 14.04 repositories with a working version.  Now you can use vmware-view-client to attach to your View sessions and you can do so using the VMWare native PCoIP protocol.

Have fun with that.

Share

Installing VMware (Fusion) Tools for Ubuntu 13.04

Recently (not so recently now because I’m a slow blogger) I was installing, or rather attempting to install, the VMware Tools into a virtual machine running Ubuntu 13.04, and I ran into a bit of trouble.  This may happen to you too.

First you’ll see this problem:

Searching for a valid kernel header path…
The path “” is not a valid path to the 3.5.0-26-generic kernel headers.
Would you like to change it? [yes]

Enter the path to the kernel header files for the 3.5.0-26-generic kernel?

Clearly no path (“” <— note the lack of… anything) cannot be correct.  But how do you find the correct path?

The kernel header path in question should be under /usr/src/[your current kernel version]/include.  Of course you’ll need to know your current kernel version.  You can find this by running uname -r (it will return something like linux-headers-3.5.0-26-generic).  So this is the answer to the above question:

/usr/src/linux-headers-3.5.0-26-generic/include

This may yet fail if the headers were not installed alongside the kernel.  Sweat not, little piggies!  Enter this command to install the proper headers:

sudo apt-get install linux-headers-$(uname -r)

Once that install finishes you can hop back over to the Tools installation and insert the above path once again.

The path “/usr/src/linux-headers-3.5.0-26-generic/include” is not a valid path
to the 3.5.0-26-generic kernel headers.
Would you like to change it? [yes]

Enter the path to the kernel header files for the 3.5.0-26-generic kernel? /usr/src/linux-headers-3.5.0-26-generic/include

The path “/usr/src/linux-headers-3.5.0-26-generic/include” appears to be a
valid path to the 3.5.0-26-generic kernel headers.
Would you like to change it? [no]

I hope that helps you get where you want to be.

Share

Be an Expert Screen Shooter in Ubuntu

I mean, why not, right?

The built-in screen capture software in Ubuntu is pretty good.  Hit a button (Print Screen) and it snaps your screen into the copy buffer.  Then you save it as an image file though a simple dialog.

But, and this happened to me recently, you may find need to capture something like a menu which doesn’t like to stay put while you press the appropriate button.  Fortunately there is a way to work with this.

Take a look at the manual page for the Gnome screen shot application:

man gnome-screenshot

Apparently you can add border effects.  Who knew?

Anyway, for my interests the one to know is the -d or –delay= argument.  This allows you to hit Enter, mouse to the menu, and hover over the item of interest before you screen shot fires.

Try five seconds:

gnome-screenshot -d 5

Exciting, eh?

Pew pew pew!

Share