Sometimes Ubuntu will start to execute the first item in the “Run” dialog box history instead of whatever command you actually type. For instance, if you typed xcalc previously and are now typing gnome-disks, but xcalc actually executes leaving you with a calculator on screen you might have fallen victim to this issue. This problem equally influences those who use standard Ubuntu with Unity and Dash as well as those who use the various spins that Canonical supports. The easiest way to fix this problem is to clear or disable the “Run” command history. Along the way you might find that it’s a good idea to clear out many different types of histories, which a tool called Bleachbit makes easy.
Users of any of the versions of Ubuntu where holding down the Super key and R or Alt and F2 at the same time bring up a “Run” box can solve the issue in a similar fashion. This includes those who use Xubuntu with Xfce4 as well as Ubuntu MATE and Lubuntu with LXDE. Keep in mind that the “Recently Used Items” Dash makes a record of aren’t the same as those items that Ubuntu notes from the “Run” box. This command history needs to be cleared out or disabled.
Method 1: Disabling Unity Runner History
Bring up the “Run” box by holding down the Super key and pushing R or by holding down Alt and pushing F2. The Super key is the same as the Windows key on most PC keyboards. You can also open a terminal by holding down CTRL, ALT and T at the same time.
If you’d prefer to disable the Runner history with a terminal command, then type:
gsettings set com.canonical.Unity.Runner history 
Push the enter key and a sound will confirm correct entry. You can perform the same task by typing dconf-editor, pushing enter and then using the mouse cursor to open the Desktop, Unity and Runner commands in the left-hand side of the window. Double-click on history and change the value to  then push enter and close the window. This will ensure that Ubuntu’s user interface stops taking note of what you enter into the “Run” box. Keep in mind if you’re using the terminal and you often write Bash commands, these won’t get deleted in the process.
Method 2: Clearing the Runner History with Bleachbit
If you’d prefer not to flat out disable the history but merely wish to clear it out, then you can install a useful program called Bleachbit, which will help you clear out many different histories throughout your Ubuntu installation. You’ll need to take care, however, because it can remove important files too.
If you don’t already have it installed, then simply open a terminal like before and run sudo apt-get install bleachbit, then follow the prompts. You could also open up Ubuntu or Lubuntu Software Center or Synaptic and then start typing bleachbit. Mark the package for installation once it’s found. More than likely if you’ve been using your Ubuntu installation for a while, you already have the dependencies needed for the program installed.
On the Dash, KDE, LX or Whisker menu you’ll now find two links under system tools. One reads Bleachbit and the other is Bleachbit (as root). You’ll need to run both to clear your system of many duplicate histories, but running the first one will be sufficient merely for cleaning the local user history.
You need to select the Edit and then Preferences features when you first run the program. You can select “Hide irrelevant cleaners” to hide any program not on your Ubuntu installation. You’ll probably want to make sure “Overwrite files to hide contents” and “Start BleachBit with computer” is unchecked, unless you need the added security. Make sure “Confirm before delete” is checked.
In the Languages tab, make sure that any languages you have software installed in are checked. Select the Whitelist tab and add any area that you need ignored in it, then close the preferences box and look at the list of cleaners in the left-hand side. Each will explain what gets deleted when you have it selected. Please keep in mind that if you agree to delete Passwords or Bookmarks using this tool that it will remove saved data from your browser. Additionally using Bleachbit to clear memory can cause system instabilities. In either case, while Bleachbit will warn you before you delete something like that it will still allow you to do it if you agree, so be exceptionally careful.
Once you’re comfortable with your choices, click on the drive icon to run the cleaner. Once it’s removed your history, close it and then select the second link to run Bleachbit as the root superuser. You’ll probably be asked to enter your password. This new instance of Bleeachbit will feature no custom GTK themes, so it might look bland and even quite dated.
Make sure to open Edit – Preferences again and set the same settings you set under the user account. Do the same to those in the left-hand panel like before. Keep in mind that while this is an excellent way to remove not just the runner history but all histories and therefore even increase the performance of your Ubuntu installation, operating as the root user carelessly can cause massive damage. One benefit, however, is that you can clear out KDE-related Run history features in Kubuntu installations.
Select the drive icon once you’re sure that you’ve got all the settings the same as those for your user account. Keep in mind that since this is operating under the root account, it’s probably using an older version of the icon. Cleaning should be brief, though if you selected APT autoremove as a function it will scan for unneeded packages as well. This can save disk space and improve system performance, but is in no way needed to relieve the kinds of “Run” dialog box problems you may have been initially dealing with. Running this software can also clear out the list of Bash commands that you might have entered.