Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions data/liveinst/liveinst
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,13 @@ start_anaconda_web_ui() {
echo "Anaconda backend flag file still exists! Probably a problem with cleanup. Removing now!" >&2
rm -f "$BACKEND_READY_FLAG" 2>/dev/null
fi
# early execution of Firefox to reduce starting time
# Start the browser early to reduce installer startup time.
mkdir -p /run/anaconda
/usr/libexec/anaconda/webui-desktop -t live &
echo -n "$!" > /run/anaconda/webui_script.pid
}

start_anaconda() {
# start Firefox to use Anaconda Web UI if it is installed
if [ -e "/usr/share/cockpit/anaconda-webui" ]; then
start_anaconda_web_ui
fi
Expand Down
4 changes: 0 additions & 4 deletions data/profile.d/fedora-budgie.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = budgie

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-cinnamon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = cinnamon

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
5 changes: 0 additions & 5 deletions data/profile.d/fedora-eln.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,5 @@ default_source = CLOSEST_MIRROR
default_rpm_gpg_keys =
/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-eln-$basearch

[User Interface]
# The default browser for the Web UI.
webui_web_engine = firefox

[License]
eula =

4 changes: 0 additions & 4 deletions data/profile.d/fedora-i3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = i3

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
2 changes: 0 additions & 2 deletions data/profile.d/fedora-kde.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ hidden_spokes =
NetworkSpoke
PasswordSpoke
UserSpoke
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
hidden_webui_pages =
anaconda-screen-accounts
anaconda-screen-date-time
Expand Down
4 changes: 0 additions & 4 deletions data/profile.d/fedora-kinoite.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,3 @@ default_partitioning =
/ (min 1 GiB, max 70 GiB)
/home (min 512 MiB, free 50 GiB)
/var (btrfs)

[User Interface]
# Use the server/boot.iso default browser, not the KDE live spin setting.
webui_web_engine = firefox
4 changes: 0 additions & 4 deletions data/profile.d/fedora-lxde.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = lxde

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-lxqt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = lxqt

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-matecompiz.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = matecompiz

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-soas.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = soas

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-sway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = sway

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
4 changes: 0 additions & 4 deletions data/profile.d/fedora-xfce.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ base_profile = fedora
# Match os-release values.
os_id = fedora
variant_id = xfce

[User Interface]
# Live spin default browser for the Web UI.
webui_web_engine = slitherer
3 changes: 0 additions & 3 deletions data/profile.d/fedora.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ btrfs_compression = zstd:1
[User Interface]
custom_stylesheet = /usr/share/anaconda/pixmaps/fedora.css

# The default browser for the Web UI.
webui_web_engine = firefox

[Payload]
default_source = CLOSEST_MIRROR

Expand Down
12 changes: 12 additions & 0 deletions docs/release-notes/fedora-webui-browser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:Type: Web UI
:Summary: Fedora installer media select the Web UI browser through packages

:Description:
On Fedora installation media, the installed Web UI opener package now
determines which browser opens the Anaconda web interface. The Fedora
installer profiles no longer set the ``webui_web_engine`` option. If you
build custom Fedora installation media, select the opener package for your
preferred browser instead of setting that option in the profile.

:Links:
- https://github.com/rhinstaller/anaconda/pull/7428
11 changes: 3 additions & 8 deletions pyanaconda/ui/webui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

log = get_module_logger(__name__)

FIREFOX_THEME_DEFAULT = "default"
FIREFOX_THEME_LIVE = "live"

class CockpitUserInterface(ui.UserInterface):
"""This is the main class for Cockpit user interface."""
Expand Down Expand Up @@ -132,15 +130,14 @@ def _mark_initialized_backend_flag(self):

def _run_webui(self):
# FIXME: We probably want to move this to early execution similar to what we have on live
profile_name = FIREFOX_THEME_DEFAULT
self._main_loop = create_main_loop()

try:
# Avoid filling an unread pipe while the main loop runs.
# startProgram merges stderr into stdout by default.
with tempfile.TemporaryFile() as output:
cmd = ["/usr/libexec/anaconda/webui-desktop",
"-t", profile_name, "-r", str(int(self.remote)),
"-t", "default", "-r", str(int(self.remote)),
"-n", str(int(self.noauth))]
proc = startProgram(cmd, stdout=output, reset_lang=False)

Expand Down Expand Up @@ -169,10 +166,8 @@ def on_process_closed(pid, status):
def _watch_webui_on_live(self):
"""Watch webui-desktop script process on Live.

It takes long time to start Firefox after the user interaction (on live even 20+ seconds).
To avoid that, we are starting the webui-desktop script early in the liveinst script.
Here we are just watching if the process is still running. If the browser is closed
Anaconda main process will stop.
The liveinst script starts webui-desktop early. Stop Anaconda when its
browser window closes.
"""
log.debug("web-ui: watching webui-desktop pid on live environment")
pid = -1
Expand Down
5 changes: 2 additions & 3 deletions tests/unit_tests/pyanaconda_tests/ui/test_webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from pyanaconda.core.constants import PAYLOAD_TYPE_LIVE_IMAGE
from pyanaconda.core.glib import idle_add, source_remove
from pyanaconda.core.process_watchers import PidWatcher
from pyanaconda.ui.webui import FIREFOX_THEME_DEFAULT, CockpitUserInterface
from pyanaconda.ui.webui import CockpitUserInterface


class SimpleWebUITestCase(unittest.TestCase):
Expand Down Expand Up @@ -196,7 +196,7 @@ def run_loop(proc=proc, status=status):

mocked_startProgram.assert_called_once_with(
["/usr/libexec/anaconda/webui-desktop",
"-t", FIREFOX_THEME_DEFAULT, "-r", str(remote),
"-t", "default", "-r", str(remote),
"-n", str(int(noauth))],
stdout=ANY, reset_lang=False
)
Expand Down Expand Up @@ -270,7 +270,6 @@ def on_idle():
@patch("pyanaconda.ui.webui.conf")
def test_run_on_live_success(self, mocked_conf, mocked_create_main_loop, mocked_watch_process):
"""Test webui run call on live environment."""
# Execution is different for live because we need to start FF early as possible
mocked_conf.system.provides_liveuser = True
mocked_main_loop = Mock()

Expand Down
Loading