Posts Tagged HowTo

HOWTO Change Gnome Panel Color

I’ve gotten sick of looking this up everytime I change my desktop theme or colors.  Gnome really needs to make this an easy option somewhere in the preferences:

HOWTO Change Gnome Panel Text & Handle Color

Create an empty file called .gtkrc-2.0 in /home

If you already have a .gtkrc-2.0 then just add the code to your existing file.

Paste the following code inside:

1
2
3
4
5
6
7
8
9
10
11
12
13
style "panel"
{
   bg[NORMAL]     = "#000000"
   fg[NORMAL]      = "#FFFFFF"
}
widget "PanelWidget" style "panel"
widget "PanelApplet" style "panel"
class "Panel" style "panel"
widget_class "Mail" style "panel"
class "notif" style "panel"
class "Notif" style "panel"
class "Tray" style "panel"
class "tray" style "panel"

bg[NORMAL] is what defines your Gnome panel handles color, simply add the hex code for the color that you require.
- you will probably want it to match the colour of your Gnome panels.

fg[NORMAL] is what defines your Gnome panel text colour, again simply add the hex code for the colour that you require.

Now save the file, logout and back in and you should see the changes take effect.

via HOWTO Change Gnome Panel Text & Handle Colour – Ubuntu Forums.

Instead of logging out and back in you can just kill gnome-panel. It’ll restart automatically:

killall gnome-panel

Now my screen looks like this:

Screenshot

Tags: , ,

Crontabbing VLC

My nightly routine for years has involved falling asleep to music. The few times in my life (hospital, sleep clinic, basketball camp) that I didn’t have music to fall asleep to can be counted as some of the most miserable of my life.

What started as a radio, became a boom-box playing cassettes. Then cassettes gave way to CDs. Recently (as in the past 5 years) I’ve come to love internet radio. For a long time I had an old windows laptop that wouldn’t hold a charge and had to be plugged in serving as the nighttime jukebox.
A Little Night Music
Unfortunately, I had an idea one day (my wife hates when she hears that) and that idea ultimately destroyed the old laptop. Meh. No problem. I substituted my netbook. Better CPU, more memory and it ran linux!! I was able to script a cron job to turn the machine off (sort of a sleep timer) automatically at different times during the week and on weekends. It worked great!

Eventually, I started just leaving my netbook at home. That made me sad. The little netbook was good at a lot of things. Being stuck as a dumb jukebox seemed like such a waste.

Until now.

I recently came into possession of an old desktop machine that I stripped for parts. One of those parts was a D-Link wireless PCI card.

Last night I installed the wireless card in Pugsley (another low-power, headless linux server that lives in my living room). After screwing around for a while figuring out how to get a wireless connection from the command line, I moved Pugsley to the bedroom and set him up next to my nightstand.

I installed VLC, because I know it can handle streaming audio and will run from the command line. I stopped by .977 and grabbed some streaming addresses for a couple music channels (80′s and Smooth Jazz!) and set up vlc to play the streams from a script. Cool.

Now to schedule the music. I knew I wanted to have Pugsley start the music at 9:00pm every night (jazz during the week, 80′s on weekends) and shut the music down in the mornings (4:00am during the week, 11:00am on weekends)

First I created a cron job from the root shell to stop the music. That was an easy ‘killall’ command:

# Nighttime music
00 04 * * 1-5 killall vlc
00 11 * * 0,6 killall vlc

Then I wrote the cron job to start the music (depending on the day) from my user shell (VLC doesn’t like being started by root):

# Turn on Night Music (every night @ 9:00pm)
# Friday & Saturday
00 21 * * 5-6 /home/chuck/scripts/80s.sh
# Sunday Thru Thursday
00 21 * * 0-4 /home/chuck/scripts/jazz.sh

Now I just needed to write the scripts to play the music. While the script is an easy one liner, the real trick was specifying a dummy interface to VLC. Without an interface (such as the terminal) VLC will die with an error. So calling it from within a cron job won’t work.

Googling around I found this forum entry

So I wrote my scripts:
80s.sh:

1
2
#!/bin/sh
vlc --volume 30 -I dummy http://www.977music.com/tunein/web/80s.asx

and jazz.sh:

1
2
#!/bin/sh
vlc --volume 30 -I dummy http://www.977music.com/tunein/web/smoothjazz.asx

So now, every weeknight, the computer starts up some smooth jazz and and shuts it down before my alarm goes off for work. Every weekend, it serenades us with 80′s music and shuts it down the next morning before noon! Plus, I got my netbook back! Awesome.

Now, to get some sleep.

Tags: , , , ,

PNG transparency in IE: HowTo

Was working on a project at work and noticed that while a web page looked fine in Firefox, it looked really bad in IE. The culprit was PNG transparency not fully supported in IE versions less than 7. As if I needed another reason to stop using IE….


via PNG in Internet Explorer: How to Use.

Method 2: recommended JS Include File
If you wish to use the code on multiples of pages, you may prefer to use a JS include file. First, save the JS file below as: pngfix.js. Place the file in your webpage directory, then add the following construct on each of your pages somewhere in the section:

1
2
3
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

Note the use of the defer keyword. This trick causes the images to be replaced before they are rendered. Earlier versions of this script did not use this method, occasionally resulting in an unpleasant screen flicker as the PNGs were being filtered.
The Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!--[if lt IE 7]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 &#038; 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) &#038;& (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)
      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML
            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->

Tags: , , ,

Medibuntu – Community Ubuntu Documentation

Adding the Repositories

Below are the instructions to add the Medibuntu repository to your system’s list of APT repositories. These are commands that should be run in the Terminal (Applications -> Accessories -> Terminal).

If you are new to Ubuntu, please see https://help.ubuntu.com/community/Repositories/Ubuntu for an overview of repositories.

Add Medibuntu to your sources.list, as well as its GPG key to your keyring. Make sure to use the correct sources.list that corresponds to your current distribution.

Any Ubuntu Release and keyring:

sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update

Ubuntu 9.04 “Jaunty Jackalope”:

sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list

Ubuntu 8.10 “Intrepid Ibex”:

sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list

Ubuntu 8.04 “Hardy Heron”:

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list --output-document=/etc/apt/sources.list.d/medibuntu.list

Ubuntu 7.10 “Gutsy Gibbon”:

sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list --output-document=/etc/apt/sources.list.d/medibuntu.list

Ubuntu 6.06 “Dapper Drake”:

sudo wget http://www.medibuntu.org/sources.list.d/dapper.list --output-document=/etc/apt/sources.list.d/medibuntu.list

Then, add the GPG Key:

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

You may be asked to accept this package even though it cannot be authenticated. This is normal; typing “Yes” means you trust Medibuntu.


If you have added the entire Medibuntu repository, you just need to install the package using APT:

sudo apt-get install libdvdcss2 w32codecs

via Medibuntu – Community Ubuntu Documentation.

Tags: , , ,

Rip a DVD into a DivX with Mencoder on MisterHowto.com

Rip a DVD into a DivX with Mencoder

We’re going to use Mencoder and Mplayer to backup a DVD you own into a DivX file.

Find out which part and language we want

mplayer dvd://2

A DVD can have several “titles” (parts), and the actual movie is not always the first one. Replace “2″ in the command above with any number, beginning from 1, until you find the part you want. Keep that number in mind.

The language you want is not necessarily the default one either. Run this command:

mplayer -alang en dvd://2

Replace “2″ with the number you found earlier, and “en” (English) with a two-letter code for the language you want (fr for French, etc.).

Make the right crop

The DVD will probably have black borders at the top and bottom of the movie, and we don’t want them in our DivX (they would make the file pointlessly larger), so we need to crop them out. Run this command:

mplayer -ss 60 -vf cropdetect dvd://2

This will make Mplayer start playing the movie 60 seconds after the beginning (replace “2″ with the right title number). Navigate in the movie (Right and Left arrows) until you reach a sequence that is bright enough to let you clearly see the movie’s borders. Close the movie and look at what Mplayer has been outputting in the terminal: lots of lines like this one:

crop area: X: 0..719 Y: 72..503 (-vf crop=720:432:0:72)30.0% 33 0

The part between brackets is exactly what you’ll need to use in a few moments to get the right crop.

Encode!

We’re all set, let’s encode the movie. We’re going to do it in two passes (better quality).

mencoder -alang en dvd://2 -ovc xvid -xvidencopts pass=2:bitrate=-700000 -oac mp3lame -vf crop=720:432:0:72 -o Movie.avi

Of course, replace “en”, “2″ and the crop options with what you need. The “bitrate” value is usually set to how much disk space (in Kb) the video will use for each second. However, by using a negative value (here -700000) you can just ask for a (very) approximate file size (here about 700 M) and Mencoder will calculate the bitrate for you.

via Rip a DVD into a DivX with Mencoder on MisterHowto.com.

Tags: , , ,

ASP syntax Highlight for BlueFish

Re: ASP syntax Highlight for BlueFish
this reply is way overdue, but just in case someone is still looking for it:
add this to the bottom of the ~/.bluefish/highlighting file:
Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
patterns: asp:Numbers:0:\\-?([0-9]*\\.)?[0-9]+::2:^ASP Block$:#330099::2:1:
patterns: asp:Operators:1:[\\+\\-\\*\\/\\.\\\\,<>=\\(\\)_]+::2:^ASP Block$:blue::1:1:
patterns: asp:Variables:1:[a-z_][a-z0-9]*::2:^ASP Block$:#cc0000::1:0:
patterns: asp:Comment (single line):0:'.*?$::2:^ASP Block$:#7777aa::1:2:
patterns: asp:String (double quoted):0:":":1:^ASP Block$:green::1:1:
patterns: asp:String (double quote escaped):0:""::3:^String \\(double quoted\\)$:::1:1:
patterns: asp:Flow Control:1:\\b(if|and|or|then|else|elseif|case|select|while|until|wend|do|loop|for|to|step|next|end|each|in)\\b::2:^ASP Block$:#000000::2:0:
patterns: asp:Keywords:1:\\b(session|server|request|response|dim|redim|end|sub|function|set|nothing|not|true|false)\\b::2:^ASP Block$:#000000::2:0:
patterns: asp:String (SQL Functions):1:\\b(MATCH|AGAINST|ASCII|CHAR|SOUNDEX|MAX|MIN|MD5|LCASE|UCASE|PASSWORD|ENCRYPT|RAND|LAST_INSERT_ID|COUNT|AVG|SUM|NOW|CURDATE|CURDATE|FROM_DAYS|FROM_UNIXTIME|PERIOD_ADD|PERIOD_DIFF|TO_DAYS|UNIX_TIMESTAMP|USER|WEEKDAY|CONCAT|DATE_(FORMAT|ADD|SUB))\\b\\(:\\):1:^String \\(double quoted\\)$:#999966::2:1:
patterns: asp:String (SQL Keywords):1:\\b(SELECT|INSERT|UPDATE|DELETE|DROP|GROUP BY|FROM|IN|INTO|ON|AS|AND|NOT|OR|NULL|SET|VALUES|WHERE|ORDER BY|LIMIT|LEFT|RIGHT|FULL|INNER|OUTER|JOIN|ASC|DESC|AND|OR)\\b::2:^String \\(double quoted\\)$:green:yellow:2:1:
patterns: asp:ASP Block:1:<%:%>:1:^(top|HTML|HTML Attribute Contents)$:#0000FF::0:0:
patterns: asp:Comment:0:<!--:-->:1::#aaaaaa::1:2:
patterns: asp:HTML Entities:1:&[^; ]*;::2::#999999::2:0:
patterns: asp:HTML DocType:1:<![a-z0-9]+:[^?-]>:1::#bb8800::1:1:
patterns: asp:HTML Attribute Contents:1:2::3:^HTML Attributes$:#cc0000::0:0:
patterns: asp:HTML Attributes:1:((?\:xml\:)?[a-z][a-z-]*=)[ \\n\\t]*((?\:"[^"]+")|(?\:'[^']+'))::2:^HTML$:#660099::0:0:
patterns: asp:<html> Tags:1:1::3:^HTML$:#000066::2:0:
patterns: asp:HTML:1:<(/?[a-z][a-z0-9]*):>:1::#0000ee::0:0:

and add this line to the ~/.bluefish/rcfile_v2 file:
Code:

1
filetypes: asp:.asp:::1::0:

via ASP syntax Highlight for BlueFish – Ubuntu Forums.

Tags: , , ,

How To Upgrade Ubuntu

First become root:

sudo su

Then run

apt-get update

and install the package update-manager-core:

apt-get install update-manager-core

Open the file /etc/update-manager/release-upgrades…

vi /etc/update-manager/release-upgrades

… and change Prompt=lts to Prompt=normal:

[...]
 
Prompt=normal

Then run

do-release-upgrade

to start the distribution upgrade.

Confirm that you want to do the upgrade:

Do you want to start the upgrade?
 
2 packages are going to be removed. 48 new packages are going to be
 
installed. 376 packages are going to be upgraded.
 
You have to download a total of 242M. This download will take about 6
 
minutes with your connection.
 
Fetching and installing the upgrade can take several hours. Once the
 
download has finished, the process cannot be cancelled.
 
Continue [yN]  Details [d] Y

At the end of the upgrade process, you should remove obsolete packages:

Remove obsolete packages?
 
21 packages are going to be removed.
 
Continue [yN]  Details [d] Y
 
The server needs to be rebooted to complete the upgrade:
 
System upgrade is complete.
 
Restart required
 
To finish the upgrade, a restart is required.
 
If you select 'y' the system will be restarted.
 
Continue [yN] Y

via How To Upgrade Ubuntu 8.04 (Hardy Heron) To 8.10 (Intrepid Ibex) (Desktop & Server) | HowtoForge – Linux Howtos and Tutorials.

Tags: , ,

Nokia N810 FAQ – Enabling USB Host Mode

How can I enable USB host mode ?

The USB port on the tablet is normally set to “peripheral mode” – it looks like a memory device when connected to a PC. If the tablet is set to “host mode”, it can act as a USB master like a PC and access USB devices such as memory sticks. There are a few alternatives:

  1. Install the “usbcontrol” package
  2. Use a special USB cable
  3. Write to /sys/devices/platform/musb_hdrc/mode from a root shell; e.g.
root
echo XXX > /sys/devices/platform/musb_hdrc/mode

where XXX is one of

  • host – host master mode
  • otg – autosense mode
  • peripheral – peripheral slave mode

You will usually need a Female-Female USB adaptor, available for about $10, to connect the supplied cable to a USB device. Small devices such as memory sticks are usually powered through the USB cable. The tablet has a limited current capability and can typically only power small memory sticks. To connect a bigger device such as an SD card adaptor, disk drive etc. you will need a powered USB hub.

via Nokia N810 FAQ.

Tags: , ,

How To Convert Any Video File Format Under Linux

This video tutorial will explain how to losslessly convert any video file format, including quicktime .mov, flash .flv files, open source .ogv, .mp4, .wmv, .asf and more. I show you how to install ffmpeg, check the formats and codecs available to you, convert a file to a new format (windows media and .asf in this example) without any loss in quality during the decoding and encoding process, and create and run a script file that will enable you to run a batch conversion on any number of files at the same time.

Anyone who has tried to convert multimedia files in Windows knows how challenging it can be. There are a ton of different programs out there to do it, but most of them either leave a watermark in your video, lower the resolution of your video, or both, unless you pay hundreds of dollars. ffmpeg can do this for you quickly, conveniently, and completely free – and can even be used in Windows! This video was created for Ubuntu, but will work for most Linux distributions, and the code you learn here to convert a file can be applied to the Windows version as well, though Windows’ scripting language is different so you will need to adjust the batch conversion script.

Single File Conversion

sudo apt-get install ffmpeg

ffmpeg -formats (lists all available formats based on the currently installed codecs, to be used with -vcodec, -acodec, and -f)

ffmpeg -i inputfilename.ext -vcodec wmv2 -sameq -acodec wmav2 -f asf outfile.asf

ffmpeg – start ffmpeg

(-i inputfilename.ext – tells ffmpeg the file name and extension from which to convert)

(-vcodec wmv2 – use video codec wmv2)

(-sameq – use same video quality as source file)

(-acodec wmav2 – use audio codec wmav2)

(-f asf – choose output format, sometimes known as a container, in this case asf)

Bonus Batch Conversion

sudo touch convert.sh (here we use touch to create a blank file, not always necessary to do that rather than through a text editor but it is safer with permissions and such)

gksu gedit convert.sh (this is only available for gnome desktops, i.e. ubuntu and the like, so you can tell people to use whatever text editor they like)

sudo chmod 0777 convert.sh (like last time, chmod changes file or directory permissions, in this case giving access to everyone to read, write, execute the script)

./convert.sh (runs the script convert.sh on files in the /Videos directory)

ls (ls -l lists all files and directories plus permissions)

script:

for f in *.MOV; do ffmpeg -i “$f” -vcodec wmv2 -sameq -acodec wmav2 “${f%.MOV}.asf”; done

via How To Convert Any Video File Format Under Linux | LinuxHaxor.net.

Tags: , , ,

SOCKS5 Proxy and N800

The built in browser doesn’t have support for using a socks proxy, but you can change that through the use of tsocks.

For a build of tsocks for the armel, see:

http://packages.debian.org/lenny/tsocks  (direct link)

Just wget and “dpkg -i” it.

——

My tsocks configuration file is as follows:

Nokia-N810-50-2:/usr/bin# cat /etc/tsocks.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ip addresses to consider as local (don't forward these)
local = 192.168.0.0/255.255.255.0
local = 10.0.0.0/255.0.0.0
 
# sample of a specific path to follow for certain routes - left so I don't
# forget it if I need to do this at a future date
# path {
# reaches = 150.0.0.0/255.255.0.0
# reaches = 150.1.0.0:80/255.255.0.0
# server = 10.1.7.25
# server_type = 5
# default_user = delius
# default_pass = hello
#}
 
# this is the place where my socks proxy is running
# I use openssh's client to provide "dynamic" port forwarding
# ssh -f -N -D9999 myuser@mysshserver
server = 127.0.0.1
server_type = 5 # socks 5
server_port = 9999

——

Until I determine a better solution (e.g., a daemon that reacts to dbus connection messages, I think), my SSH client is started manually using the command line. In ~/bin/startSOCKS I have this script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
 
# -f - Go into background (detach) once connection is established.
# - Implies -n (redirect input from /dev/null).
# -N - Do not execute a command. This is good for just forwarding
# - ports.
# -C - Compression. Might have negative impact all around and is
# - "guaranteed" to have negative impact on wifi. Perf benefit
# - over cell yet to be established.
# -D - Start "dynamic forwarding" - SOCKS proxy listening on port 9999
SSH_ARGS='-f -N -C -D9999'
 
# remove the preload of the tsocks library
LD_PRELOAD=
 
# try connecting to both servers - eliminate everything
# from the || to the end of the line if you only need one
ssh $SSH_ARGS username1@host1 || ssh $SSH_ARGS

Generate and save a private/public key with ssh-keygen. Accept the defaults. Copy the public key to the proper place on the SSH server. See Google for information. If you don’t do this, password authentication will be used.

To start SSH I just do:

/usr/bin# ~/bin/startSOCKS

This will start the SSH client in background mode (it will detach from the terminal) and it should run as long as the connection is still valid.

It is strongly recommended that you don’t use password authentication and use public/private keys instead.

——

To test, from the command line try:

  • Start SSH tunnel.
  • Close all browser windows.
  • Type “tsocks browser”
  • Go to http://www.whatismyip.com/ to verify IP addresss is that of proxy server.
  • Kill SSH tunnel.
  • Try going to another website. It shouldn’t load.
  • Restart SSH tunnel.
  • Try going to another website it should load now.
  • Rinse, repeat, until satisfied.

via SOCKS5 Proxy and N800 – Page 6 – maemo.org – Talk.

Tags: , ,

Train others how to use email

It may be the year 2006, but most people still don’t know how to use email correctly. Irrelevant subject lines, top-posting, excessive cc’ing, rambling, mixing topics in single threads – the list of prolific bad email habits goes on. Instead of being the tiresome know-it-all who slaps correspondents across the wrist for terrible netiquette, use more subtle methods of teaching better email habits to those with whom you write.

The key is to teach by example. Here are a few ways to wrangle spaghetti email messages from the clueless into more effective communication AND to gently nudge them toward better habits in the future.

Edit the subject line.

The message from your co-worker’s subject is “hi,” and inside he inquires about how your vacation was, and whether or not you can update the web site link to the archive page on the Smith story and widen the graphic just a bit. When you respond, change the subject line to something more obvious, ie, “Re: Smith story updates (was: hi)” so that the rest of the thread is easily identified, sorted and searched.

Facilitate complete responses.

If you send a message with multiple parts that each require a response, format the message with breaks or asterisks to make it obvious and easy. That is, instead of:

Hi Jane,

Got your message about Tuesday, thanks!  What's
the conference room number?  Turns out I'm going
to drive instead of take the train. Will I need
a parking pass?  Also, I have the Powerpoint
presentation on my laptop.  Is there a projector
available I can hook it up to, or should I bring my
own?

Go with this:

Hi Jane,

I'm all set for Tuesday.  A couple of questions for you:

* What is the conference room number?
* If I drive, who should I talk to for
a parking pass?
* Is there a projector available that I can
connect my laptop to?

When Jane sends you a message with a gaggle of questions, break up her response by part and respond inline to each yourself.

Set From: to the best address.

I get tons of Lifehacker-related email to my personal email address, but I want to keep those inboxes separate. So whenever someone sends me a message to my personal box, I hit reply but change the From: field to my editor at lifehacker.com address. This means the rest of the thread goes into my Lifehacker inbox, and recipients update their entry for my Lifehacker personality in their address books.

Respond after a few hours.

Email was never meant for instant, real time communication. Even if you are checking your email real time (and you shouldn’t be unless you don’t get anything else done), don’t respond to non-emergency messages right away, especially from co-workers. It sets an impossible expectation for the future. My goal is to respond to unsolicited email from clients and readers after a few hours, but within 24 to 48 hours.

Set action expectations.

When an email message contains a request that will take more than just a few minutes, respond asking what the deadline is, any other details you need to get started, about how long it will take you to complete and about how busy you are at the moment. A quick response will please the requester but also show him or her that your time is a commodity. These types of questions will often head off and kill unimportant requests and help you schedule necessary ones.

Get outside the inbox.

Although it’s often people’s default mode of communication, email is not a panacea. Some discussions are better had in person or over the phone. If you receive a message that’s unclear, rambling, flamey, too long or confusing cut it off at the pass. Simply respond, “Let’s discuss over the phone. What’s your number and when’s a good time to call?” It’s amazing how much more quickly complex decisions and discussions can be made and had outside the inbox – not to mention the change in tone and reduction of misunderstandings about sensitive subjects.

Gently (but firmly) teach the basics of email lists.

I can’t count the number of times I’ve watched newbies on a mailing list reply to the whole list with messages meant for one or two people. If you’re the list admin or even just a participant, gently remind these folks to double-check the addresses to which they are sending messages, and to only send messages relevant to the ENTIRE list to the list address. Do this off the list. No one likes a public spanking.

Got any tips for teaching others how to make the most of email? Any ticks or troubles you have with the inbox? Let us know in the comments or at tips at lifehacker.com.

Lifehacker – Geek to Live: Train others how to use email – Email.

Tags: , ,

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article.

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.

This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent.

Step 1: Create public and private keys using ssh-key-gen on local-host

jsmith@local-host$ [Note: You are on local-host here]

jsmith@local-host$ ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]

Enter passphrase (empty for no passphrase): [Press enter key]

Enter same passphrase again: [Pess enter key]

Your identification has been saved in /home/jsmith/.ssh/id_rsa.

Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.

The key fingerprint is:

33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 jsmith@local-host

Step 2: Copy the public key to remote-host using ssh-copy-id

jsmith@local-host$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host

jsmith@remote-host’s password:

to make sure we haven’t added extra keys that you weren’t expecting.

Now try logging into the machine, with “ssh ‘remote-host’”, and check in:

.ssh/authorized_keys

Note: ssh-copy-id appends the keys to the remote-host’s .ssh/authorized_key.

Step 3: Login to remote-host without entering the password

jsmith@local-host$ ssh remote-host

Last login: Sun Nov 16 17:22:33 2008 from 192.168.1.2

[Note: SSH did not ask for password.]

jsmith@remote-host$ [Note: You are on remote-host here]

The above 3 simple steps should get the job done in most cases.

via 3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id.

Tags: , ,

HOWTO: Oh no! I forgot my password! – Ubuntu Forums

Q: I am a complete moron and forgot my password. How can I get back into my system?

(Hey, YOU forgot it, I think that gives me the right to do some degrading before letting you back in!)

A:

1. Turn off your computer.

2. Tap it 3 times

3. Say your favorite magic word.

—- If that doesn’t fix your problem, do the steps below… #-o

4. Turn your computer on.

5. Press ESC at the grub prompt.

6. Press e for edit.

7. Highlight the line that begins kernel ………, press e

8. Go to the very end of the line, add rw init=/bin/bash

9. press enter, then press b to boot your system.

10. Your system will boot up to a passwordless root shell.

CAUTION: This is a FULL ROOT SHELL! You can damage your system if not careful!

11. Type in passwd . Set your password.

12. Type in reboot.

NOTE: steps 1-3 may help at this point.

13. Bow down to me….

via HOWTO: Oh no! I forgot my password! [Archive] – Ubuntu Forums.

Tags: , ,

Lifehacker – Use a Different Color for the Root Shell Prompt

Linux only: Reader Chris writes in with an excellent tip that changes the prompt to red when using the root account from the terminal—as a reminder to be more careful.

Using the tip is relatively simple—just edit the /root/.bashrc file and add in the following, preferably commenting out the existing lines that set the color, though you can simply add this line to the end of the file.

PS1='${debian_chroot:+$debian_chroot}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Once you’ve added this line, anytime you switch to using the root shell you will see the prompt in red with white text for the command line. Chris takes it further, with a line that turns the prompt green for regular users, which you can enable by adding the following to your ~/.bashrc file:

PS1='${debian_chroot:+$debian_chroot}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

This tip can really come in handy if you have a bunch of terminal windows open at once, so you can tell at a glance which ones are using root mode and which aren’t. Thanks, Chris

via Lifehacker – Use a Different Color for the Root Shell Prompt – Terminal.

Tags: , ,

Prevent websites from resizing Firefox’s browser window

Firefox is my browser of choice. Although we happen to have a rather large number of Opera followers at the TS forums, I have been left unconvinced and kept faithful to Firefox ever since version 1.5 came out. At that point the browser was more secure than ever, rock solid, very polished and popular enough that you had dozens of extensions to customize it to your liking. I haven’t looked back ever since.

Now, one of the most obvious tweaks you can apply to your Firefox installation is removing the annoyance of letting websites resize the browser window at their will. Despite of the more sophisticated pop-up blocker that comes in most recent versions of the browser, many websites still do away with popping those up and in many cases resizing either your main window or maximizing the pop-up window to get your full attention (just before you hit the X button).

You won’t even need an add-on to do this.

1. Go to Tools > Options

2. Click on the Content tab

3. Next to where it says “Enable Javascript”, click on Advanced

4. Uncheck the option “Move or resize existing windows”

You’re done! I will try to bring more of these basic, and other not so basic tips on a regular basis to the blog.

via Prevent websites from resizing Firefox’s browser window – TechSpot Blog.

Tags: ,