Category Archives: Ubuntu

How to create a shortcut to copy a password to clipboard (so to be ready to be pasted)


Have you ever dreamed to have one or multiple password ready to be used just making use of a shortcut?

Well if you make use of ubuntu (even in a VM) here is the solution for you!

Install xclip

xclip is an Ubuntu app for dealing with stuff in the “clipboard”. I order to install it, please execute:

sudo apt-get install xclip

Once xclip has been installed you have to create a file that contains the password.

Eg.

echo "the_password" > /home/[username]/.my_unix_password
Creating a shortcut

There is a Keyboard menu in Ubuntu.

  • On the 12.04 the menu is at: Applications > System Tools > System Settings > Keyboard

Steps are:

  1. Select the Shortcuts panel
  2. Select Custom Shortcuts subpanel
  3. Click the +
  4. Enter the name of the shortcut (eg Copy Linux Password to Clipboard)
  5. in the command field enter: “xclip -i /home/[username]/.my_unix_password -selection clipboard”
  6. Click Apply
  7. Right click on Disabled. It should change into New Accelerator
  8. Now press the combination of keys you want to use to copy your password to clipboard (eg. CTRL+ALT+P)
  9. Finally close the keyboard menu

Now open a text editor and press your magic key combination…. now try to paste!

Et voila!

Keyboard and mouse stop working in Virtualbox guest


 
If you ever experience your mouse and or keyboard not working in your Virtualbox guest OS and the only way to make them work again is rebooting, try to install the following packages:
 
sudo apt-get install scim-bridge-client-qt scim-bridge-client-gtk
-Sieze

Execute a command via SSH and terminate the connection without waiting for the command to finish


A few days ago I was trying to update the script used to build the application on which I’m working. Together with the build I also wanted to integrate the script so to release the app on test boxes and restart the JBoss instance.

While the stop was working as a piece of cake, the restart of the server was keeping my ssh connection alive, and causing the release script to not finish.

After a bit of googling that the ssh syntax you’ll have to use if you want to send a command via ssh, redirect std out/err, and close the ssh connection:

ssh username@host “nohup command_to_execute > /dev/null 2>&1 > /../log_folder/log_file &”

Hope this will help someone of you out there 🙂

 

-Sieze

Meaning of load average of the top Linux command


Meaning of “load average” of the top Linux command

The “load average” information given by the top command is of fundamental importance. But how to correctly understand the meaning of it? Which value are bad? Which good?

This article is just simply brilliant in explaining how to interpret this value: http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages

Enjoy!

-Sieze

The Bright Side of Java & Linux

Yet another Java blog

mysoftwarequality

Bringing empathy into knowledge workers life

%d bloggers like this: