A 21-year-old Idaho man charged with trying to assassinate President Obama by firing a rifle at the White House is competent to stand trial, a federal judge ruled Friday.