ubuntu

Gnome-Do is Pretty Damned Impressive

If you've talked to me about Ubuntu in the past year or so, I probably mentioned to you that one of my favorite things about using it is a program called gnome-do. It's a little hard to explain gnome-do without an example, so I'll explain how I just made the following tweet, sharing a picture from my garden:

Artichoke has finally flowered. It's quite something: http://tinyurl.com/mn7pjp

To make this tweet, I needed to find the picture on my computer, upload it to the web, create a tinyurl of the picture's location, and then tweet the URL.

Traditionally, the process would be the following:

  • Open a web browser
  • Go to a photo sharing site
  • Find the upload button, and press it
  • Browse to the photo on your computer
  • Upload the photo
  • Right click the uploaded photo, and select "Copy Link Location"
  • Go to TinyURL.com, and shorten the URL
  • Copy the new URL
  • Go to twitter
  • Log in if necessary, and write your tweet

All in all a rather arduous process. Using gnome-do, the process is rather simpler. Gnome-do operates by allowing you to choose an object (such as a picture, a contact in your address book, an album, etc.), and then perform an action on it (such as upload the picture, write the contact an email, play the selected album, etc.)

In this case, what I had to do was:

  • Summon gnome-do by pressing Super + Space
  • Type the first few letters in the name of the picture
  • Press tab. Type "u" for "upload," and press enter. This uploads the picture, and tells me its URL at imageshack.com.
  • Press tab, type "t" to "make a tinyurl" of the picture's location at imageshack.
  • Type tab, then "copy" to copy the tinyurl to the clipboard.
  • Summon gnome-do a second time, and type out my twitter message, paste in the tinyurl, and press tab, then "post to twitter".

And that's it. It sounds more complicated than it is. In reality, to make the above tweet, I pressed the following:

Super + Space, Arti, u, enter. This uploaded the photo to imageshack.com, and returned it's location.
Tab, t, enter. This created a tinyurl of the location.
Tab, c, enter. This copied the tinyurl to the clipboard.
Twitter message, CTRL + V, tab, t. This posted my twitter message.

Clearly, there is a bit of a learning curve, and some configuration that you have to set up so it knows your usernames, but once it is set, it makes such complicated posts much easier to complete. And I should mention, this is only the beginning of what it can do.

Change the Default Print to File To PDF in Ubuntu Hardy Heron

Tagged:  

In Ubuntu Hardy Heron there is a new printer driver that will print a webpage as a PDF file. It's pretty useful, but unfortunately it's set to print the page as post script format by default. While I appreciate post script, it's not that compatible for other people, so I usually want to make PDF documents instead.

To change that setting to PDF, navigate in Firefox to about:config, and search for the setting called "print.print_to_filename". Double click on it, and change the value to a more useful name than mozilla.ps, and change the extension to .pdf. I changed the setting to "Printed Page.pdf"

From there you should be all set.

Now, if anybody can figure out how to make the title of the webpage populate for the name of the saved file, we'll be all set.

Wake Your Computer by USB

Tagged:  

I recently began using my laptop at my desk with a USB keyboard and mouse, and I thought I would explain how to set up Ubuntu so that USB peripherals will wake up your computer from sleep mode. This is convenient if you have your laptop set up such that the lid is closed and inaccessible.

In Ubuntu, the way to set this up is to edit the file located at /proc/acpi/wakeup. To see the current contents of this file do this:

% cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
P0P2	  S4	 disabled  
P0P1	  S4	 disabled  pci:0000:00:1e.0
MC97	  S4	 disabled  
HDAC	  S4	 disabled  pci:0000:00:1b.0
P0P4	  S4	 disabled  pci:0000:00:1c.0
P0P5	  S4	 disabled  pci:0000:00:1c.1
P0P7	  S4	 disabled  
P0P8	  S4	 disabled  
P0P9	  S4	 disabled  
USB0	  S3	 disabled  pci:0000:00:1d.0
USB1	  S3	 disabled  pci:0000:00:1d.1
USB2	  S3	 disabled  pci:0000:00:1d.2
USB3	  S3	 disabled  pci:0000:00:1d.3
EUSB	  S3	 disabled  pci:0000:00:1d.7
P0P6	  S4	 disabled  pci:0000:00:1c.2
SLPB	  S4	*enabled
This shows you a number of devices, most of which I don't claim to understand. The ones to notice are the USB ones, which you will see are disabled by default.

Once these are toggled on, your computer will wake up from sleep when USB peripherals are used. To toggle one of these on, as root, run:

echo "USB0" > /proc/acpi/wakeup
This will toggle USB0 from disabled to enabled. To check this, run cat /proc/acpi/wakeup again. You should see that it's enabled, and you should be able to test this by suspending your computer.

This will set up your computer to wake up from USB...for now. To make it work after your computer has been restarted, you will need to write a short init script named wake.sh with the following contents:

#!/bin/bash
echo "USB0" > /proc/acpi/wakeup
Save this file to /etc/init.d, and make it executable by running:chmod +x wake.shFinally, once this file is in /etc/init.d, and is executable, as root run:update-rc.d wake.sh defaultsThat will make init know about the file, and run it at startup. Happy awakenings!

Source: http://ubuntuforums.org/showthread.php?t=711747

Install Citrix In Ubuntu Hardy Heron

Tagged:  

For a while there, I was struggling to get the Citrix client installed on my computer. It was frustrating, and I put hours into debugging it, and trying to get it to work. In the end, I took a circuitous route, installing VirtualBox in Ubuntu, Windows in VirtualBox, Firefox in Windows, and finally Citrix in Firefox.

Last week, I took another stab at getting this done, and for some reason it went very smoothly. To install Citrix in Ubuntu Hardy Heron:

  • Begin by downloading the Citrix client as a .tar.gz.
  • Next, unpack the install file using the terminal by running:
    sudo tar xvfz en.linuxx86.tar.gz
  • Change into the Citrix directory, and run
    sudo ./setupwfc
    This will begin the install script. As it proceeds, simply allow the default settings, and you should be good.
  • The final step is to install the root certificates. To do this, attempt to start a Citrix program, and it may fail, reporting an error message. In the message, it will tell you what certificates it needs installed. Go to this website, and download the certificates the error message informed you that you need by right clicking their download links, and selecting "Save as..." Once those are downloaded, rename their extension so they are .crt files, and move them to /usr/lib/ICAClient/keystore/cacerts
  • Restart Firefox, and you should be good.

Thanks to Skarh for this how to.

Remap Caps Lock as Backspace in Windows and Linux

A while back my wrist started hurting from reaching for the cursed backspace key. I was making too many mistakes. My solution was to remap the caps lock key on all the computers I use to act as an additional backspace key. How did I do it? Well, I'm glad you asked. I'll tell you.

In Windows
EDIT: I noticed that the picture doesn't have all the detail you need. The easier way to do this, is to download the registry key attached to this post, and to right click it, selecting merge. After that, restart the computer, and you should be all set.

To remap the caps lock to function as a backspace key in Windows, one must edit the registry keys. To do that, go to Start > Run..., and type in regedit. In the editor that opens up, navigate to the key shown in the picture below, and create a new key named Scancode Map of the type REG_BINARY. Give it the value shown in the picture, restart, and you're set. If things get wacky, delete the key and try again.

In Linux
I have tested the following in Ubuntu 7.04, 7.10, 8.04, 8.10, and 9.04. Start by opening a terminal, and running the xev program. Once that is running, press the caps lock key, and it will tell you the numerical value of that key. For example, my output from that command looks like this:

mlissner@opal2% xev
KeyPress event, serial 28, synthetic NO, window 0x4800001,
    root 0x59, subw 0x0, time 2775892, (373,636), root:(376,685),
    state 0x0, <strong>keycode 66</strong> (keysym 0xff08, Caps_Lock), same_screen YES,
    XKeysymToKeycode returns keycode: 22
    XLookupString gives 1 bytes: (08) "
    XmbLookupString gives 1 bytes: (08) "
    XFilterEvent returns: False

In there, you will see the keycode for the capslock key, in my case, number 66. Using that, create a file in your home directory called .Xmodmap, and put the following in it:

!
! Make the caps lock button a backspace button
!
remove Lock = Caps_Lock
keycode 66 = BackSpace

Once that is done, the next time you log in, your caps lock will function as a backspace. The only remaining problem is that it still does not have the auto-repeat function that backspace should have. To fix that, run:

xset r 66

That will make things work properly, but you need to run that every time you log in, or else it won't work properly. To fix that run:
sudo gedit /etc/X11/Xsession.d/50x11-common_determine-startup

And add xset r 66 to the bottom.

That should do it.

Source: http://ubuntuforums.org/showthread.php?t=369402

Syndicate content