XFCE desktop on raspberry pi

From ETCwiki
Jump to navigationJump to search

XFCE is a dekstop environment that is build for speed and is compatible with the Raspberry Pi. The Raspberry Pi comes with Debian aka Raspbian and LXDE by default, so we will need to start from a fresh install to do it proper. This guide will walk you through installation and configuration of XFCE desktop on the Raspberry Pi with the ARM 6 processor.

  • Note: I use vim as my text editor, use nano if you want
  • Note: XFCE will be our default Desktop Environment
  • Note: xfwm will be our default Window Manager (comes with xfce)

Materials

  • Raspberry Pi 512MB Revision B (Do NOT overclock!)
    • Overclocking is almost guaranteed not to work on my setup, corrupts SD card if used (worse with class 10+)
  • Power Supply (more than 1200mA!)
  • SD Card (Class 10 or slower!)
  • Raspbian (without dekstop, Raspbian Minimal, use installer)
  • USB Keyboard and mouse (wired, not wireless)
  • Ethernet (dont try on wifi)

Prepare Pi for our use

  • Install Raspbian using the Raspbian Installer
    • When prompted for what to install, just SSH and standard utils
    • Create user pi during install
    • Either download our image of Raspbian Minimal or install it yourself
    • Recommend swap partition 1GB or 512MB
  • Once Raspbian is installed, update it and get rpi stuff
su
apt-get update
apt-get upgrade
apt-get install vim sudo raspi-config rpi-update
raspi-config    (change what you want, do NOT boot to desktop)
  • Reboot and perform a firmware update if you want (optional)
rpi-update
shutdown -r now
  • Edit the file /etc/sudoers and add these lines to the bottom
pi     ALL=(ALL:ALL) ALL
pi     ALL=(ALL) NOPASSWD:ALL
  • Edit the file /root/.bashrc and add these lines (and to /home/pi/.bashrc if you want for user pi)
alias ls='ls -al --color'
alias goho='cd /home/pi'
alias goro='cd /root'
alias savepi='chown -R pi:pi /home/pi'
alias editalias='vi /root/.bashrc'
export PS1="\[\e[31m\]\u\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\] - \[\e[35m\]\w\[\e[m\] "

Install XFCE Desktop

Now we are ready to put the XFCE Desktop on the pi.

alt XFCE on Raspberry Pi
  • Run command to install the xfce4 desktop.
    • This takes about an hour
    • your Pi should NOT be overclocked.
    • Use a class 10 or slower card!
    • Unplug any unneeded USB devices etc.
apt-get install xfce4
  • Now its time to start xfce4
    • Takes about 3 minutes to start, but only the first time
startx     (as user pi, always!)
  • Make XFCE faster on Raspbian
    • I recommend changing any appearance settings to the least taxing on CPU/RAM (no gui animations, etc)
    • Disable any startup items you can and stop what you dont need in services
    • You COULD remove the wallpaper, just saying
    • Less icons and more text
    • Run simpler programs (like Dillo for web browsing) rather than high cpu/ram (like chrome browser, but it DOES work)

Next Steps

  1. Enable auto login of the user pi
  2. Have the raspberry pi auto startx on login
  3. Install a lighter window manager like awesome instead of xfwm which comes with xfce

External Links