Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Ubuntu workstation with Firefox always open on a (autorefreshing) web page protected by basic auth.

At startup, I have autologin and automatic Firefox start on the page and I have saved the basic auth credentials.

I'd like to confirm in some automated way the username/password dialog box which pops up on the first opening of the page, or I'd like to know if there's any hack to avoid this dialog box.

I tried setting the homepage to http://username%3Apassword@myserver/mypage put that doesn't stop confirmation dialog boxes.

share|improve this question
up vote 1 down vote accepted

Try xdotool or IronAHK. I haven't used either of them, but they're basically tools for simulating mouse and keyboard events, which sounds like one way of solving your problem.

Edit: See the comments for the exact answer.

share|improve this answer
Yay! it works with WID=xdotool search "Authentication Required" | head -1 xdotool windowfocus $WID xdotool key Return Thanks – golemwashere Oct 7 '09 at 10:17

There is an automation addon for firefox called iMacros.
I have not used it first hand and cannot vouch it it will help you solve your problem.
You could give it a short try.

share|improve this answer
I am afraid the unattended parts are not available on linux: – golemwashere Sep 25 '09 at 9:14

For people coming from google:

The easiest way to prevent that annoying popup is to got to "about":config" and add a new integer entry:
Name: network.http.phishy-userpass-length
Value: 255

With this in place you can then use http://username:password@myserver/mypage and there will be no confirmation boxes. More information can be found at

share|improve this answer

PasswordProfiler is protection like this is very weak and a smart user can bypass it easily.

share|improve this answer
I do not need to secure this workstation, it's in a safe and locked place available only to authorized people, the problem is automating the password submission. – golemwashere Sep 25 '09 at 6:55
FYI to those with edit authority, link is dead – Jax May 12 '10 at 17:13

xdotool is really useful! Thanks!

This is my script in Ubuntu Karmic. I have a key combination that launches this code, so I can get really fast to a htaccess password protected site:


#If Firefox is not running, wait 4 seconds to open.       
if [ "$(pidof firefox)" ]

#Launch firefox
firefox &

#Sleep until the window comes up
sleep $timetosleep

#Press enter!
WID=`xdotool search --title Identi`
xdotool windowactivate $WID
xdotool key Return

PD: As my firefox is in spanish I search for "Identificación" instead of "Authentication".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.