lereveur
Posts: 3
Joined: Thu Jan 12, 2017 9:04 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 9:13 am

Hello guys, thx for this guide !

I have the same problem, Mouse and Keyboard no longer working after startx...

So i found many solutions on web like install and try to use rpi-update tool, you can found it here https://github.com/Hexxeh/rpi-update (<3 github)

That's not working for me.

After there're many posts with others solutions like: let's modify some random config file and test... :?

I'm looking for news solutions. Someone had one other ?

thx again :)

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 9:21 am

Oh okay. I wasn't aware that there was a brand new release today. The guide worked fine with previous build. I'll make a fresh copy and see if I have the same symptoms. I'll update the guide accordingly and see if the posted fix solves it.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

w3pmu
Posts: 4
Joined: Thu Jan 12, 2017 5:11 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 1:29 pm

I just tested with the standard full desktop raspbian-jessi image, Jan 11, 2017 version and everything works OK.

Something is missing or a default configuration has changed from raspbian-jessie-lite that now causing startx to stop physical mouse and keyboard i/o. Maybe the physical mouse and keyboard are being redirected to the RPi's video instead of the HDMI. I'm using an HDMI monitor instead of the RPi's ribbon cable video port.

I tried installing and running rpi-update and it did not fix the problem.

w3pmu
Posts: 4
Joined: Thu Jan 12, 2017 5:11 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 4:45 pm

AlPea wrote:
I too had the same problem, was driving me mad. I fixed it by doing the following.

Code: Select all

sudo apt-get install xserver-xorg-input-evdev
and ensuring that

Code: Select all

/usr/share/X11/xorg.conf.d/10-evdev.conf
was present.

After that, all was fine.

Good luck!
Including the following code in the xserver installation tasks fixed the Jan 11, 2017 Raspbian-Jessie-Lite keyboard and mouse problem for me for startx (before lxde-core installed) and LXDE.

Code: Select all

sudo apt-get install xserver-xorg-input-evdev
Thankyou AIPea! Reference: viewtopic.php?p=1096719#p1096719

aupi
Posts: 14
Joined: Wed Jan 11, 2017 9:07 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 6:28 pm

GhostRaider wrote: Now, go to STEP 3.

-------------

3 (STEP 3). Finally, we need to install LightDM login manager. If you have installed the full PIXEL desktop environment, LightDM is installed automatically. Otherwise, to install LightDM, type in:

Code: Select all

sudo apt-get install lightdm
and press Enter. Install the packages.
If I am doing the Pixel install using your guide, do I need to install the above "lightdm" or not?

Thanks

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 6:45 pm

aupi wrote:
GhostRaider wrote: Now, go to STEP 3.

-------------

3 (STEP 3). Finally, we need to install LightDM login manager. If you have installed the full PIXEL desktop environment, LightDM is installed automatically. Otherwise, to install LightDM, type in:

Code: Select all

sudo apt-get install lightdm
and press Enter. Install the packages.
If I am doing the Pixel install using your guide, do I need to install the above "lightdm" or not?

Thanks
It's installed automatically, meaning that lightdm package was included when you installed the pixel desktop environment. If you run that command right now, nothing will happen.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

aupi
Posts: 14
Joined: Wed Jan 11, 2017 9:07 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 7:59 pm

Thanks, I'm going to try again now with the fix that AIPea posted.

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Thu Jan 12, 2017 9:22 pm

Friends, I couldn't reproduce the problem. I just did a clean install of Raspbian Lite with PIXEL and encountered no problems with keyboard or mouse. I believe it was a simple repository bug. The driver used for input devices is xserver-xorg-input-libinput which works in conjunction with xserver-xorg-input-all. These are both installed when you use sudo apt-get install --no-install-recommends xserver-xorg.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

w3pmu
Posts: 4
Joined: Thu Jan 12, 2017 5:11 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Fri Jan 13, 2017 4:44 am

GhostRaider wrote:Friends, I couldn't reproduce the problem. I just did a clean install of Raspbian Lite with PIXEL and encountered no problems with keyboard or mouse. I believe it was a simple repository bug. The driver used for input devices is xserver-xorg-input-libinput which works in conjunction with xserver-xorg-input-all. These are both installed when you use sudo apt-get install --no-install-recommends xserver-xorg.
You are correct - I observed xserver-xorg-input-libinput and xserver-xorg-input-all were installed by the xserver-xorg install. Normally, I could next install xinit and x11-xserver-utils, reboot, login and type startx. When it worked, prior to Jan 11, 2017 raspbian-jessie-lite, I would see and be able to move the "X" mouse cursor and type "exit" to quit. Now, after Jan 11, 2017, there is not "X" cursor and keyboard does not work - not even CTRL+ALT+DEL. Installing the raspberrypi-ui-mods, lxde-core, and lightdm do not make a difference. They start OK, but no mouse or keyboard I/O - not even numlock on/off.

When I add the "sudo apt-get install xserver-xorg-input-evdev", after the xserver-xorg install, then everything works as before Jan 11. In my case, this is certainly an acceptable command to add for repeatability.

I have not tried the Jan 11, 2017 raspbian-jessie-lite image on a RPi Zero yet. I have only tried 2 RPi3B+ units. I am using an HDMI monitor not a TV and not the RPi's ribbon video/touch screen. I'm not sure if that makes a difference. The US keyboard and mouse are from a typical Dell PC. I tried 3Amp power supply and it did not make a difference regarding this issue (I'm back to my 2.1 Amp power supply now).

I appreciate your work on this project. I also like that using this procedure I can create both a Debian virtual machine and a Raspian RPi that look and work almost exactly alike. It is especially valuable for RPi Zero!

ah0bbs
Posts: 1
Joined: Thu Jan 12, 2017 6:52 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Fri Jan 13, 2017 7:21 am

Hello - I had a similar problem where my mouse/kb don't work in pixel after installing from retropie (they work on the same box when I put in SD card with fresh raspbian install).

I don't have 10-evdev.conf in /usr/share/X11/xorg.conf.d/

But when I try to sudo apt-get install xserver-xorg-input-evdev, I get a 111 connection refused error.

Any alternatives for installing that file? I downloaded a copy and tried to drop it in the folder using cyberduck but it didn't seem to want to allow permission there, and not sure if that's a valid way to add such a file.

Thanks

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Fri Jan 13, 2017 9:16 am

w3pmu wrote:
GhostRaider wrote:Friends, I couldn't reproduce the problem. I just did a clean install of Raspbian Lite with PIXEL and encountered no problems with keyboard or mouse. I believe it was a simple repository bug. The driver used for input devices is xserver-xorg-input-libinput which works in conjunction with xserver-xorg-input-all. These are both installed when you use sudo apt-get install --no-install-recommends xserver-xorg.
You are correct - I observed xserver-xorg-input-libinput and xserver-xorg-input-all were installed by the xserver-xorg install. Normally, I could next install xinit and x11-xserver-utils, reboot, login and type startx. When it worked, prior to Jan 11, 2017 raspbian-jessie-lite, I would see and be able to move the "X" mouse cursor and type "exit" to quit. Now, after Jan 11, 2017, there is not "X" cursor and keyboard does not work - not even CTRL+ALT+DEL. Installing the raspberrypi-ui-mods, lxde-core, and lightdm do not make a difference. They start OK, but no mouse or keyboard I/O - not even numlock on/off.

When I add the "sudo apt-get install xserver-xorg-input-evdev", after the xserver-xorg install, then everything works as before Jan 11. In my case, this is certainly an acceptable command to add for repeatability.

I have not tried the Jan 11, 2017 raspbian-jessie-lite image on a RPi Zero yet. I have only tried 2 RPi3B+ units. I am using an HDMI monitor not a TV and not the RPi's ribbon video/touch screen. I'm not sure if that makes a difference. The US keyboard and mouse are from a typical Dell PC. I tried 3Amp power supply and it did not make a difference regarding this issue (I'm back to my 2.1 Amp power supply now).

I appreciate your work on this project. I also like that using this procedure I can create both a Debian virtual machine and a Raspian RPi that look and work almost exactly alike. It is especially valuable for RPi Zero!
From what I've read libinput is the successor for evdev. I tried the new build on a Rasperry Pi 2 earlier today using default libinput and it works fine for me. Not sure what evdev has that libinput doesn't work in your case. However, I did take the time to look at the installed packages on the previous version of Raspbian Lite and I can confirm that xorg-input-evdev was installed instead of xorg-input-libinput. So the change was made by the Raspian team or it's an unintentional bug. I would have to install the official Raspian and see the installed packages to confirm.

Image

And glad the guide helped! It can be implemented on PCs as well. The key thing is to figure out the essential packages to get the os running on the hardware. That's how distros are created.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

aupi
Posts: 14
Joined: Wed Jan 11, 2017 9:07 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Fri Jan 13, 2017 9:32 am

ah0bbs wrote:Hello - I had a similar problem where my mouse/kb don't work in pixel after installing from retropie (they work on the same box when I put in SD card with fresh raspbian install).

I don't have 10-evdev.conf in /usr/share/X11/xorg.conf.d/

But when I try to sudo apt-get install xserver-xorg-input-evdev, I get a 111 connection refused error.

Any alternatives for installing that file? I downloaded a copy and tried to drop it in the folder using cyberduck but it didn't seem to want to allow permission there, and not sure if that's a valid way to add such a file.

Thanks
Seems to be an issue with the main Raspbian repository, I was in the middle of re-doing this guide, and started getting errors. I changed my repository to a local one in my country and now I can continue.

aupi
Posts: 14
Joined: Wed Jan 11, 2017 9:07 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Fri Jan 13, 2017 12:08 pm

Finally ... after some kind of bug in the official repository that caused the mouse/keyboard issue, and now yet another issue with the official repository being offline for the afternoon :roll: ... I have finally managed to get a clean install of Raspbian Lite as per the guide (nothing extra or changed from the guide).

It's all working.

Cheers

rsimmy
Posts: 4
Joined: Mon Jan 23, 2017 8:35 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Mon Jan 23, 2017 8:46 pm

Noob here, and I have a possibly silly but simple question. If I install Pixel or Mate over Raspbian Lite, does the auto USB mount still work like in regular Raspbian/Pixel?

The reason I'm asking is I had the RetroPie image (built on top of Raspbian Lite I believe) and used the setup script to install Pixel. I've tried this several times, and various things within the GUI are broken. Trash/Wastebasket doesn't work, and sticking in a thumb drive does nothing and I have to manually mount it. I had a NOOBS install of Raspbian and all this worked fine before. I'm unsure if it's actually broken though, or some packages aren't installed.

My plan is to follow this guide, using Mate, and then install RetroPie manually instead of using the image. If USB drives will mount automatically, I think I'll be all set.

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Tue Jan 24, 2017 6:44 am

rsimmy wrote:Noob here, and I have a possibly silly but simple question. If I install Pixel or Mate over Raspbian Lite, does the auto USB mount still work like in regular Raspbian/Pixel?

The reason I'm asking is I had the RetroPie image (built on top of Raspbian Lite I believe) and used the setup script to install Pixel. I've tried this several times, and various things within the GUI are broken. Trash/Wastebasket doesn't work, and sticking in a thumb drive does nothing and I have to manually mount it. I had a NOOBS install of Raspbian and all this worked fine before. I'm unsure if it's actually broken though, or some packages aren't installed.

My plan is to follow this guide, using Mate, and then install RetroPie manually instead of using the image. If USB drives will mount automatically, I think I'll be all set.
Well everything works so long as you install the full desktop environment. If you install full PIXEL desktop environment, USB mounting works automatically. As for MATE, you would have to use the command:

Code: Select all

sudo apt-get install mate-desktop-environment
instead of the one seen in the guide. That should also provide auto USB mount. Though honestly it doesn't hurt to experiment.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

rsimmy
Posts: 4
Joined: Mon Jan 23, 2017 8:35 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Tue Jan 24, 2017 2:21 pm

GhostRaider wrote:
rsimmy wrote:Noob here, and I have a possibly silly but simple question. If I install Pixel or Mate over Raspbian Lite, does the auto USB mount still work like in regular Raspbian/Pixel?

The reason I'm asking is I had the RetroPie image (built on top of Raspbian Lite I believe) and used the setup script to install Pixel. I've tried this several times, and various things within the GUI are broken. Trash/Wastebasket doesn't work, and sticking in a thumb drive does nothing and I have to manually mount it. I had a NOOBS install of Raspbian and all this worked fine before. I'm unsure if it's actually broken though, or some packages aren't installed.

My plan is to follow this guide, using Mate, and then install RetroPie manually instead of using the image. If USB drives will mount automatically, I think I'll be all set.
Well everything works so long as you install the full desktop environment. If you install full PIXEL desktop environment, USB mounting works automatically. As for MATE, you would have to use the command:

Code: Select all

sudo apt-get install mate-desktop-environment
instead of the one seen in the guide. That should also provide auto USB mount. Though honestly it doesn't hurt to experiment.
Thank you for the response! I'm just making sure if I build my own setup and install the Mate GUI I will have full functionality and be able to install RetroPie also and launch it from the command prompt.

Can't hurt to try this I guess since I'm having so much trouble with Pixel.

Also this is the only instance in my journey of researching Pi related things where I've learned you can install Mate over Raspian. Everything else points to "Ubuntu Mate for Raspberry Pi" so this is definitely interesting.

ArcAiN6
Posts: 9
Joined: Sat Apr 02, 2016 12:42 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Sat Jan 28, 2017 4:59 pm

I just went through this, and decided to try Pixel, wish i hadn't... Installed matchbox-keyboard, and of coarse, it's not showing up in the menu, went looking for the main menu editor.. nope, no where to be found... tried to do a google search on how to install / enable main menu editor.. blegh, couldn't find anything but people having issues with it...

I have to say, i'm really regretting buying this thing, it's been nothing but one headache after another, and the updates, and development cycle tends to be a lot like ubuntu's, fast paced, but the only real improvements are to the bugs that are introduced / reintroduced at every release.

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Sun Feb 05, 2017 3:17 am

Virtual Machine Playground

When trying to figure out what desktop environment works best for your Raspberry Pi, you would most likely reformat your SD / microSD card several times since there is no option of going back in time. You installed LXDE, but you didn't like it, so you reformatted and installed XFCE. Maybe you didn't like XFCE and reformatted again and tried MATE. Maybe you didn't like MATE and you just decided that you want to build your own desktop environment. In general, its a hassle.

This is where a virtual machine comes into play. The virtual machine itself runs on top of a standard computer running Windows, macOS, or Linux. The operating system on your standard computer is known as the host operating system. The virtual machine running on the host operating system is known as the guest operating system.

Since your Raspberry Pi is running Raspbian Lite, in reality, Rasbpian Lite itself is acutally a form of Debian Linux. Debian runs on a variety of hardware. The difference is that Raspian Lite is a customized distribution of Debian so that it can only run on the Raspberry Pi. The repository used in Raspbian Lite only works there as well.

So what does this all mean? The idea is that you can "simulate" an installation of a desktop environment on a virtual machine rather than installing it on Raspbian Lite directly. It's basically a playground where no damage can me made and allows you to gain ideas on what your desktop environment should look like. All you need to do is write down what changes you made and when ready, repeat them when you are ready to implement it on Raspbian Lite.

Requirements:
1. A normal computer with Linux, macOS, or Windows
2. Internet connection
3. A virtual machine virtualizer (VMware, Virtualbox)
4. A copy of Debian Minimal ISO image

You will basically be creating a Debian Linux minimal virtual machine. As you read along, you will notice how its very similar to Raspbian Lite.

Installation:
1. Install a virtual machine virtualizer on you computer. I will briefly go over the steps so make sure you have a general idea on how your virtual machine virtualizer works. For this guide, I will be using VMware Fusion since I am running this on a Mac.

2. Download the Debian Minimal ISO image from the official website. Simply go to this link below:

https://www.debian.org/CD/netinst/

If you scroll down, you will see this:

Image
Right Click > Open Image in New Tab to see full size images.

You can either obtain the ISO image directly or by downloading it using a BitTorrent client. For 64-bit computers, you would click on amd64. For 32-bit computers, you would click on i386. In reality, it doesn't matter which one to download since it would be running on a virtual machine anyway. The general rule is that a 64-bit computer should run a 64-bit virtual machine.

2. Once you have the ISO image downloaded, you are now ready to create a virtual machine of Debian Linux. Open your virtual machine virtualizer and create a new virtual machine.

Image
Right Click > Open Image in New Tab to see full size images.

You will be creating a virtual machine using an ISO image.

Image

You should be asked to locate the ISO image.

Image

At one point, the virtualizer will recommend default settings. The default settings are fine for this tutorial but you can customize them if you wish.

Image

Once you have created your Debian virtual machine, you are now ready to run it on your computer.

Image

3. Start the Debian virtual machine.

Image
Right Click > Open Image in New Tab to see full size images.

Using your keyboard, select "Install" and press Enter. We like to do things using the command line interface! ;)

Image

Select a language to use and press Enter.

Image

Select your location and press Enter.

Image

Select your preferred keyboard keymap and press Enter.

Image

It will ask you to enter a hostname. It doesn't matter what it is. Once you entered a name select Continue and press Enter.

Image

It will ask you to enter a domain name. Again, it doesn't matter. Once you entered a name select Continue and press Enter.

Image

You will be asked to create a root password for the root user account. You will need to remember this password since you will use it later. Once you entered a password select Continue and press Enter. You will be asked to verify the password.

Image

You will now be asked to create a user account. It will first ask you to enter the name of the user. Once you typed a name select Continue and press Enter.

Image

You will then be asked to enter the login name of the user. Once you typed a login name select Continue and press Enter.

Image

You will be now be asked to create a password for the user account. Once you entered a password, select Continue and press Enter. You will be asked to verify the password.

Image

Select your time zone and press Enter.

Image

Select "Guided - Use Entire Disk" and press Enter.

Image

Since we only created one virtual hard drive disk for the virtual machine, only one disk will appear. Press Enter.

Image

Select "All files in one partition" and press Enter.

Image

All of the changes to the virtual hard drive will appear. Select "Finish partitioning and write changes to disk" and press Enter.

Image

You will be asked to verify the changes. Select "Yes" and press Enter. Debian will now install on the virtual hard drive.

Image

Select your location and press Enter. This will help in finding the closest package mirror in your location.

Image

Select your package mirror and press Enter.

Image

There is no need to enter any HTTP proxy information. Press Enter.

Image

This asks if you want to share information on what packages are installed. Select either "Yes" or "No" and press Enter.

Image

Image

We only want the core of Debian in order to replicate Raspbian Lite. Unselect "Debian Desktop Environment" and "Print Server" by highlighting the option and pressing the Space Bar. Once you made your changes, press Enter. Debian will now only install the necessary packages to get it up and running.

Image

The Grub bootloader is required to boot up Debian. Select "Yes" and press Enter.

Image

Select the option "/dev/sda" since that is the location where Debian is installed. The Grub bootloader will use this location at each startup to find Debian. Press Enter.

Image

The installation is now complete. On some virtualizers, you may need to unmount the Debian ISO image or else it will keep booting to it. Regardless, select "Continue" and press Enter to reboot the virtual machine.

Image

4. After the virtual machine reboots, you should see the Grub bootloader. To boot Debian, select "Debian GNU/Linux" and press Enter.

Image

Once Debian has booted, you will be asked to log in. If you noticed, the command line interface (CLI) looks exactly like Raspbian Lite which means it will feel very familiar.

5. You will log in as root since we need to add a very important package known as Sudo. The Debian core does not include Sudo by default. Sudo allows a regular user to perform administrative commands like "sudo apt-get update" or "sudo apt-get install somepackage".

To log in as root, type in "root" as the login name, and press Enter. Enter the root password.

Image

You are now logged in as root.

To install Sudo type in:

Code: Select all

apt-get install Sudo
and press Enter. The Sudo package will automatically install.

6. Now, you need to add your regular user account to the sudo group so that it can have access to the "sudo" command. To do this, type in:

Code: Select all

sudo adduser YOURUSERNAME sudo
and press Enter. Replace YOURUSERNAME in the command to your username you created earlier.

7. After you have successfully added your user account to the sudo group, restart the virtual machine. Type in:

Code: Select all

reboot
and press Enter.

8. Boot Debian by selecting it in the Grub Bootloader menu. Once booted, you should see the login screen. All that is left to complete the Debian virtual machine installation is to create a "snapshot" of the virtual machine. A snapshot basically stores the state of the virtual machine. For example, if you take a screenshot now, no display server, desktop environment, window manager, login manager, or any other packages are installed. Now, let's suppose that you installed the XFCE4 desktop environment and you decide that you want LXDE instead. If you "restore" the snapshot, you are basically going back in time to where you haven't installed anything!

So before doing anything else at this point, create a snapshot of your Debian virtual machine. This will be your starting point. Refer to the documentation of your virtualizer if you do not know how to do this.

Image

As you can see, a snapshot has been saved and I can restore to it at any time. Remember, you can create snapshots whenever you want. That's it for the installation. Now it's time to play with the Debian virtual machine!

Let's Play:

:!: At this point, you don't have to do any steps I talk about here. You can just read along. This is just to demonstrate what you can do with the Debian virtual machine.

Now that we have created a snapshot, let's play around with the virtual machine. For this demonstration, let's install the XFCE Desktop Environment. To make things interesting, I will copy the exact same steps from the guide as if I'm running Raspbian Lite.

First, we need to install a display server which is Xorg. The command for that is:

Code: Select all

sudo apt-get install --no-install-recommends xserver-xorg
Image
Right Click > Open Image in New Tab to see full size images.

Those are the packages that will have to install.

Next we need to install the XFCE GUI. The command for that is:

Code: Select all

sudo apt-get install xfce4 xfce4-terminal
Image

Those are the packages that we will have to install.

The last thing we need is a login manager which is LightDM. The command for that is:

Code: Select all

sudo apt-get install lightdm
Image

Those are the packages that we will have to install.

According to the guide, we need to restart. After restarting the Debian virtual machine:

Image

Image

It looks like we have the exact same thing as if we did this on Raspbian Lite! In general, the whole point of this section is for you to explore how desktop environments work. You can delete packages, customize the GUI, and so on without having to worry about reformatting your SD / microSD card or having to leave the commodity of your standard computer. If you decide that you want to start all over, simply restore the snapshot you created. That simple.

After you have created a perfect GUI setup on the Debian virtual machine, simply copy those steps you did and implement them on Raspbian Lite. The Debian virtual machine is your test bench.
Last edited by GhostRaider on Thu Mar 23, 2017 7:10 am, edited 3 times in total.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Sun Feb 05, 2017 3:24 am

Advanced - Custom Desktop Environment using i3 WM

:!: Before you begin reading, this section assumes that you have formatted a fresh copy of Raspbian Lite on your SD / microSD card with no prior desktop environment installations.

Let's begin!

Installation

1. Turn on your Pi and log in. The first thing we need to do before we create our custom desktop environment is to create a new user account. This is optional but it might be a good idea for security purposes.

To create a new user account, type in:

Code: Select all

sudo adduser USERNAME
and press Enter. Replace USERNAME with the user name you want. You will then be asked to create a new UNIX password. After you have verified the password for the user account, you will be asked to enter some information such as full name, room number, home phone number, etc. To be honest, you can just leave all of those blank.

Image
*Right Click > Open Image in New Tab to see full size image.

We now need to make sure that the user account is part of the same groups as the default user account "pi". Type in:

Code: Select all

groups pi
and press Enter. You will see the groups that the default user account "pi" is in.

Image
*Right Click > Open Image in New Tab to see full size image.

We will need to include the new user account to those groups. In this case you would simply type in:

Code: Select all

for GROUP in adm dialout cdrom sudo audio video plugdev games users netdev input spi i2c gpio; do sudo adduser USERNAME $GROUP; done 
and press Enter. Remember to replace USERNAME with the user name you created earlier.

You will see that the new user account you created will be added to the same groups as "pi". Once it has finished, simply log out and log in with the new user account. To log out, type in:

Code: Select all

logout
and press Enter. Log back in with the new user account. You are now ready to create your custom desktop environment!

2. Next, we will install a display server. We want the user to see a GUI rather than just command line text. In this case, we need to install Xorg Display Server. To install Xorg, type in:

Code: Select all

sudo apt-get install --no-install-recommends xserver-xorg
and press Enter. We will also need to install xinit so that we can start the desktop environment manually using the "startx" command. To install xinit, type in:

Code: Select all

sudo apt-get install --no-install-recommends xinit
and press Enter.

3. Now, we need a window manager and a Terminal application. A window manager will control how applications appear on the screen. A lightweight and customizable window manager that works perfectly for our needs is i3 WM. We also need a Terminal application since there is no Terminal application included. I picked lxterminal since it is my preferred Terminal application. You can install any other Terminal application if you want. To install i3 WM with lxterminal, type in:

Code: Select all

sudo apt-get install i3 suckless-tools lxterminal
and press Enter.

4. We must now configure "startx" command so that it starts i3 WM whenever that command is executed. What startx does is that it checks for a file called ".xinitrc" in your user's home folder. This ".xinitrc" file contains commands that execute applications as well as window managers and desktop environments at startup. You need to create this file since it doesn't exist by default.

We can copy an existing xinitrc file from another directory so that we can edit it and use it. To create a copy of xinitrc to your user's home folder, type in:

Code: Select all

cp /etc/X11/xinit/xinitrc ~/.xinitrc
and press Enter.

Let's edit the newly copied xinitrc file. Type in:

Code: Select all

nano ~/.xinitrc
and press Enter. Your .xinitrc file should look something like this:

Image
*Right Click > Open Image in New Tab to see full size image.

Delete everything in that file and copy and paste the following code into your .xinitrc file:

Code: Select all

#!/bin/sh

exec i3  
Your .xinitrc file should look like this:
Image
*Right Click > Open Image in New Tab to see full size image.

In this file, what we are basically saying here is to execute the i3 window manager. In general, startx simply executes commands inside the .xinitrc file in order.

Save the file by pressing CTRL+X, then press Y, and then press Enter to confirm file location and name. With the file saved, whenever you execute startx, it will start i3 WM.

5. Execute startx by typing in:

Code: Select all

startx
and then press Enter. You should see i3 WM on your screen.

6. Since this is your first time running i3 WM, two prompts will appear. This will appear first:

Image
*Right Click > Open Image in New Tab to see full size image.

This prompt is asking for you to create an i3 config file. This file will be used to configure i3 WM. Press Enter.

Image
*Right Click > Open Image in New Tab to see full size image.

This next prompt is asking you to select which key to be your modifier key. It can either be your Windows key or Alt key. You can select one of these using the arrow keys on your keyboard. Then press Enter to confirm.

Whenever you read the i3 WM documentation, you will notice that they use "$mod" plus some other key. The "$mod" just means your modifier key.

7. We are now ready to configure i3 WM to our needs.

Image
*Right Click > Open Image in New Tab to see full size image.

That is the desktop of i3 WM. It's simply a black background with a status bar at the bottom. Remember, to open a Terminal window, press $mod + Enter (Modifier Key + Enter).

Customize i3bar

The i3bar is the bar you see at the bottom of the i3 desktop. The i3bar itself can be customized by editing the config file located in ~/.i3/config. If you want to edit this file, go into Terminal and type in:

Code: Select all

nano ~/.i3/config
and press Enter. If you scroll down, you will see this snippet of code:

Code: Select all

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
        status_command i3status
} 
The code inside this bar scope applies to all running instances of i3bar. For example, if you wanted to change the position of the bar, by default it is displayed at the bottom, simply add "position top" inside the bar scope:

Code: Select all

bar {
        position top
        status_command i3status
}  
Save the file and close Terminal. Now to see the changes, simply press $mod + Shift + R on your keyboard.

In order to actually change the contents displayed in i3bar, you need to modify another file. The status contents of i3bar is handled by i3status. This configuration file is not created by default in a fresh install of i3 WM. To create this configuration file so that you can modify it, go to Terminal and type in:

Code: Select all

mkdir -p ~/.config/i3status/ && cp /etc/i3status.conf ~/.config/i3status/config

and press Enter. The configuration file is now located in ~/.config/i3status/config. To edit this file, type in:

Code: Select all

nano ~/.config/i3status/config
and press Enter. You will see this:

Code: Select all

# i3status configuration file.
# see "man i3status" for documentation.

# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!

general {
        colors = true
        interval = 5
}

order += "ipv6"
order += "disk /"
order += "run_watch DHCP"
order += "run_watch VPN"
order += "wireless wlan0"
order += "ethernet eth0"
order += "battery 0"
order += "load"
order += "tztime local"

wireless wlan0 {
        format_up = "W: (%quality at %essid) %ip"
        format_down = "W: down"
}

ethernet eth0 {
        # if you use %speed, i3status requires root privileges
        format_up = "E: %ip (%speed)"
        format_down = "E: down"
}

battery 0 {
        format = "%status %percentage %remaining"
}

run_watch DHCP {
        pidfile = "/var/run/dhclient*.pid"
}

run_watch VPN {
        pidfile = "/var/run/vpnc/pid"
}

tztime local {
        format = "%Y-%m-%d %H:%M:%S"
}

load {
        format = "%1min"
}

disk "/" {
        format = "%avail"
}
For example, to only show the time, these need to be commented using the # symbol except for "order += "tztime local".

Code: Select all

#order += "ipv6"
#order += "disk /"
#order += "run_watch DHCP"
#order += "run_watch VPN"
#order += "wireless wlan0"
#order += "ethernet eth0"
#order += "battery 0"
#order += "load"
order += "tztime local"
If we wanted to change the format of how the time is displayed, you need to edit the contents of "tztime local" scope.

Code: Select all

tztime local {
        format = "%Y-%m-%d %H:%M:%S"
}
If we wanted to format the time to be 12hr and have a format like "Fri 5:00 PM" then the format variable under the tztime local scope must be changed to this:

Code: Select all

tztime local {
        format = "%a %I:%M %p"
}
Save the file and close Terminal. Now to see the changes, simply press $mod + Shift + R on your keyboard.

Image
*Right Click > Open Image in New Tab to see full size image.

I went ahead further and customized it a bit more so that it looks nice. I changed the way Ethernet and Wi-Fi is displayed on i3status.

Image
*Right Click > Open Image in New Tab to see full size image.

This was an example of what you can do with i3bar and i3stautus. If you want to customize the bar further, refer to the i3 WM documentation.

Work in progress...
Last edited by GhostRaider on Fri Mar 24, 2017 11:13 pm, edited 9 times in total.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

pgrunwald
Posts: 2
Joined: Fri Aug 10, 2012 2:14 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Sun Feb 12, 2017 7:11 pm

Hi - thank you for this guide! I'm running Pixel on Pi 3 on Jessie Lite as per your instructions. I installed RealVNC server and I'm able to connect via both Windows 10 and Android with the RealVNC clients. I would like to run the Pi totally headless but X Windows/Pixel won't start without a monitor connected. How can I get this to start?

Code: Select all

pi@raspberrypi:~ $ startx


X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.26-v7+ armv7l Raspbian
Current Operating System: Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l
Kernel command line: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa22082 bcm2709.serial=0xb535e3c5 smsc95xx.macaddr=B8:27:EB:35:E3:C5 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Build Date: 11 November 2016  11:59:59AM
xorg-server 2:1.18.4-2+rpi1 (https://www.debian.org/support)
Current version of pixman: 0.33.3
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sun Feb 12 12:07:16 2017
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console
This worked after some research"

Code: Select all

pi@raspberrypi:~ $ vncserver-virtual
VNC(R) Server 5.3.2 (RasPi) (r22607) ARMv6 (Oct 4 2016 11:26:16)
Copyright (C) 2002-2016 RealVNC Ltd.
RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
registrations and/or pending trademark applications in the European Union,
United States of America and other jurisdictions.
Protected by UK patent 2481870; US patent 8760366.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.3/acknowledgements.txt

Generating private key... done
If a desktop environment fails to load for this virtual desktop, please see:
 http://www.realvnc.com/doclink/kb-345?version=5.3.2.22607
Running applications in /etc/vnc/xstartup

VNC Server catchphrase: "your catchphrase here."
             signature: xx-yy-zz-11-22-33

Log file is /home/pi/.vnc/raspberrypi:1.log
New desktop is raspberrypi:1 (192.168.11.146:1)

In RealVNC Client I connect to 192.168.11.146:1

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Mon Feb 13, 2017 1:02 am

pgrunwald wrote:Hi - thank you for this guide! I'm running Pixel on Pi 3 on Jessie Lite as per your instructions. I installed RealVNC server and I'm able to connect via both Windows 10 and Android with the RealVNC clients. I would like to run the Pi totally headless but X Windows/Pixel won't start without a monitor connected. How can I get this to start?

Code: Select all

pi@raspberrypi:~ $ startx


X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.26-v7+ armv7l Raspbian
Current Operating System: Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l
Kernel command line: 8250.nr_uarts=0 dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa22082 bcm2709.serial=0xb535e3c5 smsc95xx.macaddr=B8:27:EB:35:E3:C5 bcm2708_fb.fbswap=1 bcm2709.uart_clock=48000000 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Build Date: 11 November 2016  11:59:59AM
xorg-server 2:1.18.4-2+rpi1 (https://www.debian.org/support)
Current version of pixman: 0.33.3
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/pi/.local/share/xorg/Xorg.0.log", Time: Sun Feb 12 12:07:16 2017
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/home/pi/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Couldn't get a file descriptor referring to the console
This worked after some research"

Code: Select all

pi@raspberrypi:~ $ vncserver-virtual
VNC(R) Server 5.3.2 (RasPi) (r22607) ARMv6 (Oct 4 2016 11:26:16)
Copyright (C) 2002-2016 RealVNC Ltd.
RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
registrations and/or pending trademark applications in the European Union,
United States of America and other jurisdictions.
Protected by UK patent 2481870; US patent 8760366.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.3/acknowledgements.txt

Generating private key... done
If a desktop environment fails to load for this virtual desktop, please see:
 http://www.realvnc.com/doclink/kb-345?version=5.3.2.22607
Running applications in /etc/vnc/xstartup

VNC Server catchphrase: "your catchphrase here."
             signature: xx-yy-zz-11-22-33

Log file is /home/pi/.vnc/raspberrypi:1.log
New desktop is raspberrypi:1 (192.168.11.146:1)

In RealVNC Client I connect to 192.168.11.146:1
Glad you got it running! I haven't played around with VNC for a while. I remember I tried using my iPad as a monitor for the Raspberry Pi. It did work, I just had to change the resolution to fit the iPad screen.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

pgrunwald
Posts: 2
Joined: Fri Aug 10, 2012 2:14 am

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Mon Feb 13, 2017 1:43 am

Thanks - can you tell me where I can find a list of Pixel commands/programs that are NOT installed with Jessie Lite?

For example, I would like to install the GUI version of raspi-config but I can't find it. I did

Code: Select all

sudo apt-get install -y rpi-chromium-mods
but that only gave me a few commands.

update -
this was useful but a little dated.
https://n8henrie.com/2015/12/default-pa ... nd-wheezy/

found rc-gui and installed.

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Mon Feb 13, 2017 3:48 am

pgrunwald wrote:Thanks - can you tell me where I can find a list of Pixel commands/programs that are NOT installed with Jessie Lite?

For example, I would like to install the GUI version of raspi-config but I can't find it. I did

Code: Select all

sudo apt-get install -y rpi-chromium-mods
but that only gave me a few commands.

update -
this was useful but a little dated.
https://n8henrie.com/2015/12/default-pa ... nd-wheezy/

found rc-gui and installed.
Well you could always get the package list from a Raspbian installation. Then save that list later for reference. I did post the install command for Raspbian Config GUI in the extras section.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

keltik85
Posts: 1
Joined: Tue Feb 21, 2017 2:56 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Tue Feb 21, 2017 3:10 pm

Could you compare the Ram usage of a Raspbian Jessie versus Raspian Jessie Lite with Pixel?

You only compared Raspbian Jessie Lite without Pixel to Raspbian Jessie Lite with Pixel.

GhostRaider
Posts: 37
Joined: Fri Jan 22, 2016 9:04 pm

Re: [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox

Tue Feb 21, 2017 5:14 pm

keltik85 wrote:Could you compare the Ram usage of a Raspbian Jessie versus Raspian Jessie Lite with Pixel?

You only compared Raspbian Jessie Lite without Pixel to Raspbian Jessie Lite with Pixel.
It's already there.
Guides I have created on the Raspberry Pi Forums:

1) [GUIDE] Raspbian Lite with PIXEL/LXDE/XFCE/MATE/Openbox/i3
2) [GUIDE] Communicate between iOS and Raspberry Pi using MQTT

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 16 guests