You use program called xflock4, I can really remember what is the shortcut to that bu i thing it is Ctrl+Alt+Delete. Anyway if it doesn't work make sure it is installed.
Start with installing "gnome-session" then you can change your desktop environment from xfce4 to gnome at log in time.
If you really want to remove xfce4 after trying gnome check out the instructions here. They were written for 12.10 but it will point you in the write direction.
Many of the packages you're instructed to remove are useful programs that work in gnome as well as xfce4 (such as abiword, gmusicbrowser to name two).
I'd start by limiting myself to removing packages named "xf*" or "xubuntu*". After remove those packages many orphaned libraries can be autoremoved.
Don't just cut and paste the instructions there or you'll end up installing Unity again by installing "ubuntu-desktop".
1. Configure the time needed to go for the display in Blank Mode
Open Settings Manager
Go to Hardware Section
Click on Power Manager
Click on Display Tab
There is an option Handle display power management. Enable that option by checking it. And change the timing parameter by using the slider with label Blank After, setting value whatever you want.
Remember, Less than 1 minute means Never.
Note: If you can't find Power Manager settings under Hardware section, you're missing xfce4-power-manager package. Install it with this command
sudo apt install xfce4-power-manager
Here is the screenshot of the Settings Window
2. Configure the time must pass to active lock
This is controlled by Xscreensaver in Xubuntu.
Open Settings Manager
Go to Personal Section
Click Screensaver
While in Display Modes tab, at the bottom of it, there is a settings with label Lock Screen After [N] minutes. This controls the time required for the Lock to active after screen goes blank.
So, the calculation is, The time needed for the display to go blank + the time needed for the lock to be activated. (I set this 0)
Adjust this settings. Then wait for the display to go blank. Wait the time to active lock. There will be lock now.
Best Answer
You use program called
xflock4
, I can really remember what is the shortcut to that bu i thing it is Ctrl+Alt+Delete. Anyway if it doesn't work make sure it is installed.