[GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/i3/X11 GUI - Raspberry Pi Forums
table of contents
1. introduction
2. memory usage
3. part 1 - build foundation
4. part 2 - bring in furniture
5. sample screenshots
6. use?
7. virtual machine playground
8. advanced - x11 forwarding (remote applications)
9. advanced - custom desktop environment using i3 wm
10. advanced - custom desktop environment using openbox wm
11. extras
requirements:
1. raspberry pi microcomputer
2. raspbian lite image
3. sd / microsd card (at least 4gb or higher, possible use smaller storage space depending on configuration)
4. keyboard , mouse (for using gui, can vary depending on how raspberry pi used)
5. tv / monitor (for seeing gui) (note: for wanting use touchscreen, not cover in guide. need research this.)
6. normal computer linux, macos, or windows (for burning rasbian lite image sd / microsd)
7. internet connection
introduction
there 2 official linux distributions raspberry pi raspbian , raspbian lite. rasbian full linux distribution raspberry pi , comes new desktop environment called pixel (pi improved xwindows environment lightweight). desktop environment gui (graphical user interface) of operating system. raspbian includes preinstalled applications word processing, games, programming, , on. great beginners , people want start using raspberry pi immediately.
but, of don't that. want ability work gui, our own preferences. in other words, want start clean install, , install whatever packages need on top. packages can consist of desktop environments, drivers, compilers, applications, utilities, , on.
reward, there more storage space, less usage on memory, , gui customization! raspbian lite comes play.
raspbian lite similar of core. core contains essential packages needed make hardware on raspberry pi work correctly. raspbian lite made pi can run headless system pi controlled commands sent external source. raspbian lite not contain gui has command line interface (cli) shown automatically if connected external display. configuration of raspbian lite can done via ssh (secure shell) computer connected same network raspberry pi. more information on ssh in official raspberry pi documentation.
if have ever heard of arch linux, raspbian lite similar that. since raspbian lite supported raspberry pi foundation, preferred operating system raspberry pi microcomputers.
summarize, guide talks how run raspbian lite gui, in case choose desktop environment, pixel, lxde, xfce, or mate. there advanced section in guide talks how create own desktop environment if interested. official rasbian distribution uses pixel default desktop environment, reality, fork (or branch) of lxde. other distributions such xubuntu uses xfce default desktop environment, , ubuntu mate uses mate default desktop environment. if not familiar linux desktop environments, sure watch videos or research on types of guis available. way, have , idea of gui install, if any.
consciousness memory usage, desktop environment based on lxde recommended choice. prefer prettier or modern look, xfce or mate recommended choice. however, both exact same job make raspberry pi simple desktop computer easy use. assuming want use prebuilt desktop environment. otherwise free create own desktop environment.
why this? well, decide how desktop looks like, decide applications install, , finally, decide next!
let's begin!
memory usage
before beginning install raspbian lite gui, let's explore memory usage. in nutshell, less memory raspberry pi consumes, more applications can run. raspbian lite consumes little memory since core. discussed earlier, core has essential packages make hardware on raspberry pi work.
note: the memory used shown in screenshots may different installation may use. use information reference determine desktop environment right you.
how memory raspbian lite use?
*right click > open image in new tab see full size image.
if take @ screenshot, memory displayed in megabytes. raspberry pi has 925mb of total memory. of memory internally allocated gpu default. means operating system , applications can use 925mb of memory.
currently, raspbian lite using 30mb of memory. impressive. means available memory use 895mb.
how compare raspbian pixel?
*right click > open image in new tab see full size image.
on clean installation, raspbian pixel using 90mb of memory. that's pretty good. now, let's see memory usage raspbian lite running various guis.
if raspbian lite running pixel desktop environment:
*right click > open image in new tab see full size image.
here see raspbian lite pixel using 76mb of memory.
if raspbian lite running lxde desktop environment:
*right click > open image in new tab see full size image.
here see raspbian lite lxde using 97mb of memory.
if raspbian lite running xfce desktop environment:
*right click > open image in new tab see full size image.
here see raspbian lite xfce using 107mb of memory.
if raspbian lite running mate desktop environment:
*right click > open image in new tab see full size image.
here see raspbian lite mate using 101mb of memory.
running desktop environment raspbian lite can consume quite bit of memory. now, have remember linux operating systems flexible. not every package required desktop environment needed installed. means memory usage (as storage space) can lowered further, have familiar how package dependencies work. not installing required package or dependency may bring unwanted behavior. however, news won't break raspberry pi long software related!
part 1 - build foundation
in part, focus on preparing raspbian lite.
1. download latest raspbian lite image.
2. format sd / microsd card raspbian lite (plenty of guides out there on how this. macos, linux, , windows users, etcher easy use application can this.)
3. insert sd / microsd card pi.
4. connect pi internet using ethernet cable. if want use wi-fi instead, have read on how configure wireless receiver using command line after pi has finished booting.
5. connect tv / monitor , keyboard. (mouse optional @ time.) turn on pi. pi should boot , prompt log in appear.
6. log raspbian. username pi , password raspberry.
7. need expand file system raspbian takes full use of sd / microsd space. this, need use raspi-config. type in:
code: select all
sudo raspi-config
8. raspberry pi software configuration tool (raspi-config) main menu appear. option interested option #7 (advanced options). select option using arrow keys on keyboard , press enter. select option #a1 (expand filesystem) , press enter. message appear saying boot partition has been resized. select ok using arrow keys on keyboard , press enter. main menu reappear. select finish @ bottom of menu , press enter. popup message ask reboot raspberry pi. reboot pi.
9. log raspbian again. want make sure have latest files , packages type in:
code: select all
sudo apt-get update
code: select all
sudo apt-get upgrade
code: select all
sudo apt-get dist-upgrade
if packages updated , installed, these packages stored somewhere in sd / microsd card. need delete them don't take valuable space. clean leftover packages, type in:
code: select all
sudo apt-get clean
10. @ time, may want configure localization settings include language, keyboard layout, , regional settings. change this, need go raspi-config. type in:
code: select all
sudo raspi-config
option interested option #4 (localization options). select option , press enter. presented 4 different options.
begin selecting option #i1 (change locale) , press enter. find locale scrolling through list using , down arrow keys on keyboard. default, en_gb.utf-8 utf8 contain asterisk, meaning raspbian lite using locale. however, may incorrect if live in country, us. can deselect locale highlighting , pressing space bar on keyboard. example, if live in us, locale used should en.us.utf-8 utf8. find locale on list , press spacebar select it. asterisk appear meaning locale used. once ready, press enter. popup appear asking select default locale used entire system. select same locale selected highlighting using , down arrow keys , press enter. raspbian lite configure system automatically , return main menu.
note: you may notice after have changed locale, if change other internationalization settings, may text randomly popping @ bottom of screen saying setting locale has failed , lc_ctype, lc_message, lc_all complain there no such file or directory. no problem. exit out of raspi-config , type in:
code: select all
sudo reboot
return localization options menu selecting option #4 , press enter. configure timezone selecting option #i2 (change timezone) , press enter. select geological area using arrow keys , press enter. select region or city , press enter. raspbian lite configure system automatically , return main menu.
return localization options menu selecting option #4 , press enter. configure keyboard layout selecting option #i3 (change keyboard layout) , press enter. select keyboard model using arrow keys , press enter (in case don't know keyboard model select, generic 105-key (intl) pc keyboard model choice). now, select keyboard layout. select appropriate keyboard layout , press enter (if don't see keyboard layout, select other , press enter. select keyboard language , press enter. presented various keyboard layouts corresponding language. select appropriate layout , press enter). next few prompts may ask configuring altgr , compose key. decide. select appropriate options , press enter. return main menu.
if using raspberry pi 3, microcomputer come equipped built in wi-fi/bluetooth wireless receiver. may want change wi-fi country settings. return internationalization options menu selecting option #4 , press enter. configure wi-fi country settings selecting option #i4 (change wi-fi country) , press enter. select country using arrow keys , press enter. confirmation message appear confirming selection. select ok. return main menu.
12. select finish , press enter. if asked reboot, reboot pi selecting yes , pressing enter. if not asked reboot, reboot anyways typing in:
code: select all
sudo reboot
part 2 - bring in furniture
next part focuses on installing gui on top of raspbian lite. in order have gui, need these 4 things:
1. display server
2. desktop environment
3. window manager
4. login manager
since need 4 things, make life easier, these 4 things are:
1. xorg display server
2. pi improved xwindows environment lightweight (pixel) or lightweight x11 desktop environment (lxde) or xfce desktop environment (xfce) or mate desktop environment (mate)
3. openbox window manager (pixel/lxde) or xfwm window manager (xfce) or marco window manager (mate)
4. lightdm login manager
know linux, may wondering why login manager chosen here lightdm. part, lightweight , looks nice. 1 feature believe stands out other login managers ability run synergy client without errors. synergy utility allows use computer's mouse , keyboard (windows, mac, or linux) , share computer, in case, raspberry pi. of course can install login manager if don't want lightdm.
users may not want login manager. fine depending on how use raspberry pi. example, may want pi boot command line , if there need launch desktop environment, simple command let launch it. continue read on more information.
since focusing on raspbian lite, gui installed "lite". understand "lite" can have different meanings, beginners main focus here. important thing here users personalize pi, without relying on prebuilt raspbian. believe these best gui options. always, free use whatever want. moving forward, installing core of pixel, lxde, xfce, or mate. give gui. there won't applications installed other required pixel, lxde, xfce, or mate components such file manager, terminal, , settings.
1. turn on pi , log in. install xorg. type in:
code: select all
sudo apt-get install --no-install-recommends xserver-xorg
if install xserver-xorg, not have ability launch xorg display server command line. problem if not planning on installing login manager. otherwise, not need this. if case, may want install xinit typing in:
code: select all
sudo apt-get install --no-install-recommends xinit
-----
2. now, choose path:
pixel gui
1 (pixel). you're reading part because want install pixel right? let's continue. desktop environment, have 2 choices. can either install basic pixel desktop environment or stripped version of it. basic pixel desktop environment same 1 included in regular raspbian distribution, without preinstalled applications. essentials such settings, task manager, terminal , file manager included. install basic pixel desktop environment, type in:
code: select all
sudo apt-get install raspberrypi-ui-mods
stripped version of pixel desktop environment contains file manager , settings appearance, audio, network, , bluetooth. there no trash support, no mounting of drives, or terminal included since required components not installed default. no other applications included either. however, can add these components later if wish. if want install stripped version of pixel desktop environment lxterminal (optional) trash , drive mounting (optional), type in:
code: select all
sudo apt-get install --no-install-recommends raspberrypi-ui-mods lxterminal gvfs
2 (pixel). openbox window manager installed default when install pixel. not need here.
lxde gui
1 (lxde). you're reading part because want install lxde right? let's continue. installing lxde core. when install lxde, essentials such settings, terminal , file manager included. lxappearance used change of applications such panels, icons, progress bars, cursors, , on. optional install recommend installing in order give more customization abilities. install lxde lxappearance type in:
code: select all
sudo apt-get install lxde-core lxappearance
2 (lxde). openbox window manager installed default when install lxde-core. not need here. can customize of titlebar using openbox settings installed default. using lxappearance , openbox settings together, chose lxde looks like!
now, go step 3.
xfce gui
1 (xfce). you're reading part because want install xfce right? let's continue. installing xfce core. when install xfce, essentials such settings , file manager included. default, xfce uses xfce4 terminal. this optional install, if choose not install it, xterm default terminal app.. install xfce xfce4 terminal, type in:
code: select all
sudo apt-get install xfce4 xfce4-terminal
2 (xfce). xfwm window manager installed default when install xfce4. not need here!
now, go step 3.
mate gui
1 (mate). you're reading part because want install mate right? let's continue. installing mate core. when install mate, essentials such settings, terminal, , file manager included. install mate, type in:
code: select all
sudo apt-get install mate-desktop-environment-core
2 (mate). marco window manager installed default when install mate. not need here!
now, go step 3.
-------------
3 (step 3). finally, need install lightdm login manager. if have installed basic or stripped version of pixel desktop environment, lightdm package installed automatically can skip step. of release of raspbian stretch, if installed xfce desktop environment, lightdm installed automatically not need step. otherwise, install lightdm, type in:
code: select all
sudo apt-get install lightdm
if choose not install login manager did install xinit earlier, means everytime pi boots, boot command line. however, desktop environment set , ready launched @ time.
4. need have raspbian lite gui ready! fortunately, don't have else reboot! reboot pi. when finishes booting, see lightdm login screen. here, need use both keyboard , mouse. log in , should see either pixel, lxde, xfce, or mate desktop!
otherwise, if no login manager installed, login via command line! @ anytime, can launch xorg display server typing in:
code: select all
startx
5. now? decide want custom rasbian lite installation gui. can change look, install applications, start programming, necessary make work way want to!
sample screenshots
note: the screenshots shown below not represent desktop see after installation. more information, see gui customization section. aware using composition effects (transparency, shadows, etc.) may impact performance , memory usage depending on configuration.
pixel
right click > open image in new tab see full size image. screenshot shown customized pixel desktop.
clean desktop showing htop system monitor.
desktop showing various windows opened.
lxde
right click > open image in new tab see full size images. screenshots shown of customized lxde desktop. memory used vary depending on how configure lxde.
clean desktop showing terminal.
desktop showing various windows opened.
xfce
right click > open image in new tab see full size images. screenshots shown of customized xfce desktop. memory used vary depending on how configure xfce.
clean desktop showing terminal. no composition effects enabled.
desktop showing various windows opened. no composition effects enabled.
clean desktop showing terminal. composition effects enabled.
desktop showing various windows opened. composition effects enabled.
mate
right click > open image in new tab see full size images. screenshots shown of customized mate desktop. memory used vary depending on how configure mate.
clean desktop showing terminal. no composition effects enabled.
desktop showing various windows opened. no composition effects enabled.
clean desktop showing terminal. composition effects enabled.
desktop showing various windows opened. composition effects enabled.
what use?
question is, desktop environment author of thread use? use own custom desktop environment. let's take @ raspbian lite desktop:
custom desktop environment using openbox foundation. first impression; looks clean, simple, , beautiful (to me of course!). main reason don't use prebuilt desktop environment because want control on how desktop environment looks. however, xfce preferred choice if use prebuilt desktop environment. how desktop environment laid out:
top , bottom panels tint2 panels. customized tint2 panels liking achieve look. notifications displayed on desktop xfce4-notifyd. want notified of things such disconnection internet, or raspberry pi getting hot, or other notifications thrown raspbian lite. let's see memory usage of custom desktop environment:
desktop environment using around ~146 mb good. there plenty of memory left applications. finally, here of how desktop looks when there lot of activities going on:
, that's brief tour of desktop environment use on raspbian lite! that's reason why wrote guide. learn how become independent regular raspbian , personalize raspbian lite own liking. personalization of greatest things linux in general.
virtual machine playground
installing gui on raspbian lite can either easy or hard. if want particular desktop environment, follow steps install environment. majority of raspberry pi users, that's more enough.
if wanted our hands dirty? in other words, if want desktop environment focused solely on particular application. example, desktop environment should focused on web browser, or should focused on music player. necessary file manager in operating system primary focus display web pages? necessary operating system running blown desktop environment play music? explore ideas kind of gui raspian lite should have.
can explore gui ideas directly on raspbian lite? yes, idea of virtual desktop explore gui ideas in comfort of own computer. playground. don't need worry reformatting sd / microsd cards, , can go in time using feature called "snapshots" included in virtual machine virtualizers in case if made mistake or broke installation. there no risk. not that, learn more inner workings of linux.
once build desktop environment liking in virtual machine, follow steps did on virtual machine , apply them raspbian lite installation. if interested in reading more on topic, click on link below see full tutorial:
viewtopic.php?p=1109518#p1109518
advanced - x11 forwarding (remote applications)
x11 forwarding ssh remote tunneling system can run applications installed on linux system remotely system running windows, macos, or linux.
example, let's have clean raspbian lite installation on raspberry pi. now, if physically want use raspberry pi normal computer (with monitor, keyboard, mouse), want install gui on raspbian lite. however, if care running specific applications on rasbian lite , don't have need use normal computer (no monitor/keyboard/mouse/gui), x11 forwarding may you'd use.
here's how works. connect raspberry pi via ssh x11 forwarding option enabled system. when connected, if type in application name, lets "leafpad" , press enter, application open on desktop. that's it! in other words, system show application's gui while raspberry pi handles workload application. pretty neat right?
if want use x11 forwarding, it's simple. follow instructions below:
1. follow steps on part 1 - build foundation have clean installation of raspbian lite. if installed desktop environment , still want enable x11 forwarding, continue step 2.
2. need enable ssh on raspbian lite. using command line (or terminal window), type in:
code: select all
sudo raspi-config
3. obtain ip address of raspberry pi. using command line (or terminal window), type in:
code: select all
hostname -i
4. reboot raspberry pi typing in:
code: select all
sudo reboot
5. once raspberry pi has been rebooted, no longer need physically use raspberry pi since can remotely log onto raspberry pi via ssh.
6 (windows). need install ssh client x11 forwarding capabilities on computer wish run raspberry pi applications on. in order applications appear on computer, need install xorg server on computer well. windows, there application called mobaxterm free , ssh client integrates xorg server. no need install xorg server separately.
create session clicking on "session" icon on toolbar.
enter ip address of raspberry pi raspberry pi username. make sure x11 forwarding enabled click on advanced ssh settings tab. when ready, click ok. asked enter password.
once logged in, ready launch raspberry pi applications remotely! launch applications remotely, type in:
code: select all
nameofapp &
6 (macos). need install ssh client x11 forwarding capabilities on computer wish run raspberry pi applications on. in order applications appear on computer, need install xorg server on computer well. on macos, need install xquartz since no application comes xorg server integrated. once xquartz has been installed, can use terminal connect raspberry pi. start ssh session x11 forwarding, type in:
code: select all
ssh -y username@raspberrypiaddress
once logged in, ready launch raspberry pi applications remotely! launch applications remotely, type in:
code: select all
nameofapp &
wondering memory usage, memory used on raspbian lite application essential processes. usage small. no xorg, no desktop environment, no login manager memory consumption. more memory, more storage space!
advanced - custom desktop environment using i3 wm
let's serious now. real reason use raspbian lite make raspberry pi microcomputer work specific application purpose. operating system should customized specific application. kind of applications?
really. people use raspberry pi for:
clock , weather
internet radio
web browser
music player
surveillance
retro game console
, list goes on , on. building? understand idea of custom desktop environment, go on examples , maybe can give idea of how approach , implement idea. if interested in reading more on topic, click on link below see full tutorial:
viewtopic.php?p=1109520#p1109520
advanced - custom desktop environment using openbox wm
openbox window manager can run standalone desktop environment, or desktop environment. window managers handle application windows window decorations , effects. if run openbox standale desktop environment, have control on how desktop environment looks. openbox not have panels, desktop icons, wallpapers, or other ui elements since not job of openbox. have provide yourself.
there benefits of going route. main benefit resource usage. since have openbox running, of memory used used applications run. second benefit simplicity. there many users want run single application , don't need full desktop environment. third benefit customization. can build own desktop environment , use openbox window manager.
if think openbox window manager sounds want use on raspbian lite, let's continue!
1) in order use openbox, need have xorg display server installed. install xorg, type in:
code: select all
sudo apt-get install --no-install-recommends xserver-xorg
if planning on not using login manager, need install xinit. allow start openbox manually. install xinit, type in:
code: select all
sudo apt-get install --no-install-recommends xinit
2) need install openbox. remember openbox not include applications other openbox configuration manager. if need use terminal in openbox, have install 1 yourself. in command below, included lxterminal. otherwise, install own terminal if needed. install openbox lxterminal, type in:
code: select all
sudo apt-get install openbox lxterminal
3) if planning on installing login manager, install lightdm login manager, type in:
code: select all
sudo apt-get install lightdm
however, if plan on starting openbox manually, need more work. first, need generate .xinitrc file. file have commands start custom desktop environment. case, need implement openbox command file.
first, copy sample xinitrc file , paste home directory. type in:
code: select all
cp /etc/x11/xinit/xinitrc ~/.xinitrc
code: select all
nano ~/.xinitrc
delete inside file. after that, copy command below onto xinitrc file:
code: select all
exec openbox-session
save xinitrc file.
4) now, restart raspberry pi. installed lightdm login manager, should see lightdm appear. login username , password , should see openbox desktop! actually, see nothing. if right-click, see openbox menu.
did not install login manager, log onto raspberry pi. start xorg openbox, type in:
code: select all
startx
that's it! after this, decide next openbox!
wondering memory usage, openbox uses little memory.
can see, it's lightweight!
extras
1. raspberry pi configuration tool
if have used regular rasbian distribution, noticed there tool configuring raspberry pi. no problem, can bring in raspbian lite.
in terminal, type in:
code: select all
sudo apt-get install rc-gui
-----------------------------------------------------------------
hope found guide useful! if there questions, comments, suggestions, or concerns, free down below.
most useful information, thank posting this
raspberrypi
Comments
Post a Comment