ply_device_manager_flags_t flags)
{
ply_device_manager_t *manager;
+ ply_terminal_t *terminal;
manager = calloc (1, sizeof(ply_device_manager_t));
manager->loop = NULL;
+
manager->xkb_context = xkb_context_new (XKB_CONTEXT_NO_FLAGS);
+
parse_vconsole_conf (manager);
+ terminal = ply_terminal_new (default_tty, manager->keymap);
+
+ if (!ply_terminal_is_vt (terminal)) {
+ ply_terminal_free (terminal);
+ terminal = NULL;
+ }
+
manager->terminals = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
manager->renderers = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
- manager->local_console_terminal = ply_terminal_new (default_tty, manager->keymap);
manager->input_devices = ply_hashtable_new (ply_hashtable_string_hash, ply_hashtable_string_compare);
+ manager->local_console_terminal = terminal;
manager->keyboards = ply_list_new ();
manager->text_displays = ply_list_new ();
manager->pixel_displays = ply_list_new ();
uint32_t is_inactive : 1;
uint32_t is_shown : 1;
uint32_t should_force_details : 1;
+ uint32_t should_force_default_splash : 1;
uint32_t splash_is_becoming_idle : 1;
char *override_splash_path;
return true;
}
+ if (state->should_force_default_splash) {
+ ply_trace ("using default splash because kernel command line has option \"plymouth.graphical\"");
+ return true;
+ }
+
ply_trace ("no default splash because kernel command line lacks \"splash\" or \"rhgb\"");
return false;
}
on_escape_pressed (state_t *state)
{
ply_trace ("escape key pressed");
+
+ if (state->local_console_terminal != NULL) {
+ if (!ply_terminal_is_vt (state->local_console_terminal))
+ return;
+ } else {
+ return;
+ }
+
if (validate_input (state, "", "\e"))
toggle_between_splash_and_details (state);
}
ply_trace ("checking if '%s' exists", state->default_tty);
if (!ply_character_device_exists (state->default_tty)) {
- ply_trace ("nope, forcing details mode");
- state->should_force_details = true;
+ if (!state->should_force_default_splash) {
+ ply_trace ("nope, forcing details mode");
+ state->should_force_details = true;
+ }
state->default_tty = find_fallback_tty (state);
ply_trace ("going to go with '%s'", state->default_tty);
bool no_daemon = false;
bool debug = false;
bool ignore_serial_consoles = false;
+ bool graphical_boot = false;
bool attach_to_session;
ply_daemon_handle_t *daemon_handle = NULL;
char *mode_string = NULL;
"tty", "TTY to use instead of default", PLY_COMMAND_OPTION_TYPE_STRING,
"no-boot-log", "Do not write boot log file", PLY_COMMAND_OPTION_TYPE_FLAG,
"ignore-serial-consoles", "Ignore serial consoles", PLY_COMMAND_OPTION_TYPE_FLAG,
+ "graphical-boot", "Use graphical splashes even if the kernel console is not a VT", PLY_COMMAND_OPTION_TYPE_FLAG,
NULL);
if (!ply_command_parser_parse_arguments (state.command_parser, state.loop, argv, argc)) {
"no-daemon", &no_daemon,
"debug", &debug,
"ignore-serial-consoles", &ignore_serial_consoles,
+ "graphical-boot", &graphical_boot,
"debug-file", &debug_buffer_path,
"pid-file", &pid_file,
"tty", &tty,
signal (SIGABRT, on_crash);
signal (SIGSEGV, on_crash);
+ if (graphical_boot || ply_kernel_command_line_has_argument ("plymouth.graphical")) {
+ state.should_force_default_splash = true;
+ ignore_serial_consoles = true;
+ }
+
/* before do anything we need to make sure we have a working
* environment.
*/