lib/x11utils.pm

X11_UTILS

SYNOPSIS

 use lib::x11utils;

desktop_runner_hotkey

 desktop_runner_hotkey();

Returns the hotkey for the desktop runner according to the used desktop

 ensure_unlocked_desktop();

if stay under tty console for long time, then check screen lock is necessary when switch back to x11 all possible options should be handled within loop to get unlocked desktop

ensure_fullscreen

 ensure_fullscreen($tag);

tag can contain a needle name and is optional, it defaults to yast2-windowborder

handle_login

 handle_login($myuser, $user_selected);

Log the user in using the displaymanager. When $myuser is set, this user will be used for login. Otherwise the function will default to $username. For displaymanagers (like gnome) where the user needs to be selected from a menu $user_selected tells the function that the desired user has already been selected before this function was called.

Example:

  handle_login('user1', 1);

handle_logout

 handle_logout();

Handles the logout from the desktop

handle_relogin

 handle_relogin();

First logs out and the log in via handle_logout() and handle_login()

select_user_gnome

 select_user_gnome([$myuser]);

Handle the case when user is not selected in login screen, on gnome. $myuser specifies the username to switch to. If not set, it will default to $username.

turn_off_kde_screensaver

 turn_off_kde_screensaver();

Turns off the screensaver on KDE

turn_off_gnome_screensaver

  turn_off_gnome_screensaver()

Disable screensaver in gnome. To be called from a command prompt, for example an xterm window.

turn_off_gnome_suspend

  turn_off_gnome_suspend()

Disable suspend in gnome. To be called from a command prompt, for example an xterm window.

turn_off_screensaver

 turn_off_screensaver();

Turns off the screensaver depending on desktop environment

untick_welcome_on_next_startup

 untick_welcome_on_next_startup();

untick welcome page on next startup.

workaround_boo1170586

 workaround_boo1170586();

Kill broken opensuse-welcome window and restart it properly to workaround boo#1170586.

handle_welcome_screen

 handle_welcome_screen([timeout => $timeout]);

openSUSE Welcome window should be auto-launched. Disable auto-launch on next boot and close application. Also handle workarounds when needed.