Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 17513  / 12 Months ago, wed, may 31, 2023, 9:39:42

Working on a script to automate some tasks in Firefox.



These tasks should run through a clean Firefox profile, so they are fast and don't interfere with any of my regular surfing.



#!/bin/bash

# Launch clean firefox profile with parameters:
# -no-remote don't connect to any running instance of firefox
# -P run firefox through a profile
firefox -P 'Another Profile' &
sleep 4 # wait for firefox to load

# Open URLs
firefox -new-tab 'http://askubuntu.com/users'
firefox -new-tab 'http://askubuntu.com/badges'


Unfortunately, I can't get the URLs to open in the profile "Another Profile". Instead, Ubuntu launches Firefox with my default user profile and opens them, there.



Any suggestions on how to open them in "Another Profile"?


More From » 12.04

 Answers
7

If you omit the profile, firefox will open the URL in one of your open Firefox programs. You have to explicitly mention it:



firefox -P 'Another Profile' http://example.com/


You can also open multiple URLs at once and combine it, removing the need for a sleep:



firefox -P 'Another Profile' http://example.com/ http://example.net/

[#31372] Thursday, June 1, 2023, 12 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ateact

Total Points: 176
Total Questions: 130
Total Answers: 122

Location: Egypt
Member since Sun, Apr 23, 2023
1 Year ago
;