Donald Trump has issued a rare denouncement of white supremacy after mass shootings in Texas and Ohio.

The US president, however, in scripted remarks focused on what he see as other causes behind gun  violence, such as video games and mental illness for violence.

Mr Trump did not mention America's lax firearms laws.

He was speaking from the White House about shootings at the weekend that left 30 dead and dozens wounded. One, in El Paso, Texas, is being treated as a terror attack. There the death toll has risen to 21.

Mr Trump said he wants legislation providing "strong background checks" for gun users but provided scant details and has reneged on previous promises after such shootings.

The president has been reluctant to criticise white supremacist groups in the past.

"In one voice, our nation must condemn racism, bigotry and white supremacy," Mr Trump said, adding that he had directed the FBI to examine steps to identify and address domestic terrorism.

"These sinister ideologies must be defeated. Hate has no place in America," he said.

He suggested earlier on Twitter that a background check bill could be paired with his long-sought effort to toughen the nation's immigration system, but did not say how or why he was connecting the issues.

READ MORE: Mum gave her life to protect baby son in El Paso terror attack

Both shooting suspects were US citizens and federal officials are investigating anti-immigrant bias as a potential motive for the massacre in El Paso.

In El Paso, a gunman opened fire on Saturday morning in a shopping area packed with thousands of people during the busy back-to-school season.

The attack in the border city killed 21 and wounded more than two dozen, many of them critically.

Hours later in Dayton, Ohio, a gunman wearing body armour and carrying extra magazines opened fire in a popular nightlife area, killing nine and injuring at least 26 people.

The attacks came less than a week after a 19-year-old gunman killed three people and injured 13 others at the popular Gilroy Garlic Festival in California before dying from a self-inflicted gunshot wound.

Mr Trump has frequently sought to tie his immigration priorities - a border wall and transforming the legal immigration system to one that prioritises merit over familial ties - to legislation around which he perceives momentum to be building. 

READ MORE: Mexico to sue United States over El Paso terror attack

The president offered few specific solutions to address violence, and signalled he would oppose large-scale gun control efforts pushed by Democrats, saying "hatred pulls the trigger, not the gun".

Mr Trump called for law enforcement and social media companies to do more to combat extremism and spot warning signs of violence online.

He also called for a reduction in the "glorification" of violence in American culture, laws to make it easier to commit those with mental illness and "red flag laws" to separate such individuals from firearms.

Mr Trump directed the Department of Justice to seek and prioritise the enforcement of the death penalty in cases of hate crimes and mass shootings.

The president's critics have been unimpressed. 

As Democrats have called on Mr Trump to tone down his rhetoric, the president blamed the news media for the nation's woes.

"Fake News has contributed greatly to the anger and rage that has built up over many years," he claimed.

In recent weeks, the president has issued tweets condemned as racist about four women of colour who serve in Congress, and in rallies has spoken of an "invasion" at the southern border.

The Herald:

El Paso

His re-election strategy has placed racial animus at the forefront in an effort that his aides say is designed to activate his base of conservative voters, an approach not seen by an American president in the modern era.

Mr Trump has also been widely criticised for offering a false equivalency when discussing racial violence, notably when he said there were "very fine people, on both sides", after a white supremacist rally in Charlottesville, Virginia, that resulted in the death of an anti-racism demonstrator.

On gun control, a majority of Americans have consistently said they support stronger laws, but proposals have stalled repeatedly in Congress, a marked contrast to some countries that have acted swiftly after a mass shooting.

In March, a poll conducted by the Associated Press-NORC Centre for Public Affairs Research found a majority of Americans favour stricter gun laws.
The survey was conducted both before and after a mass shooting at two mosques in New Zealand.

READ MORE: Suspected Walmart shooter allegedly penned white supremacist rant

It found that 67% of Americans support making US gun laws stricter, while 22% say they should be left as they are and 10% think they should be made less strict.

Less than a week after the mosque shootings, New Zealand moved to ban "military-style" semi-automatic weapons and high-capacity magazines; similarly, after a mass shooting in 1996, Australia enacted sweeping gun bans within two weeks.

The poll suggested many Americans would support similar measures, but there is a wide gulf between Democrats and Republicans on banning specific types of guns.

Overall, six in 10 Americans support a ban on AR-15 rifles and similar semi-automatic weapons.

Roughly eight in 10 Democrats, but just about four in 10 Republicans, support that policy.