[GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or XFCE)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
sagirfahmid3

[GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or XFCE)

Post by sagirfahmid3 »

Hello friends, this is a N00B's guide to enabling compositing in the LXDE(and XFCE) desktop environment(s)--my first guide by a noob, for the noob(s).

I am usually a GNOME or KDE type person so most of the time I use those environments, but I've found that not too many people--especially those with low system resources--can run resource hungry desktop environments such as GNOME or KDE. I know that a lot of people want their desktop to look nice in a lightweight environment such as LXDE or XFCE, maybe with a dock, but they can't get it to work properly without enabling a compositor. This guide will show you, baby-step by baby-step, how to install and enable a lightweight compositor that will allow you to run beautiful yet lightweight dock applications such as Docky or Avant Window Navigator, or anything that needs compositing in general.

Docky in LXDE

Image

Docky in XFCE

Image

Step 1: Download and install a lightweight compositor, for example XCompmgr, using either the Terminal or Software Manager.

A.)If you want to install XCompmgr using Software Manager then follow these steps[Note: smiley faces are bullet points]:
Click on the XFCE menu(or LXDE menu)>System>click "Software Manager".
In the searchbox on the top right corner, type in "xcompmgr", without the quotes of course.
Click on the item which says "X composition manager", then click on the green "Install" icon located in the top right corner.
If asked for your password, type it in and press enter; installing programs require admin privileges.
Wait for the installation to finish; it shouldn't take long.

B.)If you want to install XCompmgr using the Terminal then follow these steps[Note: smiley faces are bullet points]:
Click on the XFCE menu(or LXDE menu)>click "Terminal".
Type in "sudo apt-get install xcompmgr", without the quotes! How many times do I have to re-iterate, seriously!? JUST JOKING lol!
If you are asked for your password, which you will be asked for, type it in because installing programs require admin privileges.
If it says, "[This much space] will be used for the installation. Do you want to continue? [Y/N]," type "Y" and press enter.
Wait for the installation to complete; this shouldn't take long. You will know when it's done when green text similar to "{name}@{name}-desktop ~ $" comes up.
Exit the terminal. If it says something like "There is a process running. Closing the terminal may interrupt it," it means installation is still running. Wait for it to finish, then close the terminal.

Step 2: Enabling xcompmgr on startup. This is the hard part....well...not really!!
This my friends, is the hard part....compared to what we had to do earlier. IT'S NOT THAT HARD ACTUALLY!
Open the Terminal and type in "gksu pcmanfm". This command opens the file manager(equal to the "Windows Explorer", for Windows users) as root, or administrator, so please be careful to not delete any files accidentally because the file system contains many important operating system files. Deleting these files may leave LinuxMint inoperable.
In the searchbox on top, type in a "/"(slash).
Look for a folder named "etc" and double click it.
Look for a folder named "xdg" and double click it.
Look for a folder named "autostart" and double click it.
Make a new file in this folder by right clicking anywhere in a white, blank space, then clicking on "Create document", then clicking on "Empty file".
Screenshot-autostart.png
Open this empty file you just created with any text editor(by right clicking the file>open with>LeafPad) and copy and paste this whole thing:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=XCompmgr
Comment=XCompmgr--a light compositor
Exec=xcompmgr
Terminal=false
Type=Application
OnlyShowIn=XFCE;LXDE
Screenshot-XCompmgr.desktop (-etc-xdg-autostart) - gedit.png
Save the file as "Xcompmgr.desktop" by clicking on File>Save as>"Xcompmgr.desktop". Make sure the character encoding is "UTF-8" and "Unix/Linux" respectively, by using the drop-down menus next to "Character coding:".
Screenshot-Save As….png
DONE! Close the editor and file manager. The hard part is now complete! Side note: If you noticed, I put XFCE and LXDE where it says "OnlyShowIn=". This is because GNOME and KDE already have their own compositors built in, which is compiz I believe. However, if you decide to remove that heavyweight compositor in the future, you can add GNOME or KDE to the xcompmgr autostart menu by editing that file and doing this, "OnlyShowIn=GNOME;KDE;" etc etc...

Step 3: The easiest part!
This is the part where you celebrate by installing the dock of your choice and trying it out! Personally I like Docky, but I've tried Avant Window Navigator and both work flawlessly!

Option 1: Installing Docky

A.)Using the Software Manager:
XFCE menu(or LXDE)>System>Software Manager
In the searchbox, type in "docky".
Install Docky.
To run Docky, go to the menu>Accessories>Docky

B.)Using the Terminal:
XFCE menu(or LXDE)>Terminal
Type in "sudo apt-get install docky"
To run Docky, go to menu>Accessories>Docky

Option 2: Installing Avant Window Navigator

A.)Using the Software Manager:
XFCE menu(or LXDE)>System>Software Manager
In the searchbox, type in "avant-window-navigator".
Install it.
To run Avant Window Navigator, go to menu>Accessories>Avant Window Navigator

B.)Using the Terminal:
XFCE menu(or LXDE)>Terminal
Type in "sudo apt-get install avant-window-navigator"
To run Avant Window Navigator, go to menu>Accessories>Avant Window Navigator

Conclusion
Guys, I hope you enjoyed reading and following this guide as much as I did making it. Sure, this guide may be useless to those Linux experts, but for us noobs this could mean much more.

As for the resource usage of these items in LXDE, which was using 95MB RAM idle usage, Docky was using 28MB of RAM and XCompmgr using 1MB of RAM. Avant used a lot less memory, 10MB average, but was more CPU intensive using 2% of processor power.

In XFCE, the idle usage of RAM was 120MB, with these items using 28MB and 1MB for Docky and XCompmgr, respectively; with Avant, it was 12MB and 2% for RAM and processor usage, respectively.

If there happens to be any mistakes in this guide, or you want me to add something, feel free to let me know so I can correct them.
Any questions or comments? Post them and I will try and solve and answer them to the best of my knowledge.

Have a nice day!
Last edited by sagirfahmid3 on Wed Jan 25, 2012 10:58 am, edited 12 times in total.
gosa
Level 4
Level 4
Posts: 317
Joined: Mon Nov 01, 2010 5:12 am
Location: Spain

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by gosa »

Very interesting guide... what I'd like to know is if this is possible to do with fluxbox as well, by just adding fluxbox to the line:
OnlyShowIn=XFCE;LXDE;fluxbox

Or is there something else that needs to be done? Or maybe it doesn't work like that?
(trying in Mint fluxbox 9)
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

Hey, sorry i took 2 days to answer(i had 2 tests to study for; im in college so its tough!), but anyway im also trying to figure out how to do that on Fluxbox.

I read somewhere that Fluxbox's settings are all in simple text files; if i can find out where those configuration files are, then it would be very easy for me to just add a startup entry and voila! compositing enabled! so these days i will be looking into Fluxbox into a bit of detail and probe it around and hopefully i will find the startup file for Fluxbox applications.

By the way, i DID manage to get XCompmgr(and also Docky) running on Fluxbox, but manually; i would rather have it set up as an autorun file instead of manual because many new linux converts wouldnt know how to do that.

I have Mint Xfce, LXDE, KDE. and GNOME desktop environments already, but i run Fluxbox in virtualbox so i dont mess up my computer. =P

Glad you thought this was interesting =)
(Let me know if you got the Fluxbox compositing working so i can add your instructions to this guide and give credit)

EDIT: I have found the startup entry for fluxbox. (Note:it's a hidden file, so open up file manager, right click anywhere on a blank space and click on "show hidden items".) It is located in "/root/.fluxbox/startup.sh". You have to edit that file by right click>open with>Leafpad and change the startup entries. I have tried adding xcompmgr and docky but to no avail :cry: let me know if you figure it out.
Bob E

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by Bob E »

@sagirfahmid3 This worked perfectly! But I found out how to get this working the hard way.

I first tried this a few weeks ago on Lubuntu 10.10, which is LXDE, and it failed miserably. So, I just forgot all about it. Tonight, out of boredom and curiosity, I installed LXDE through Synaptic on Mint 10 main edition on my desktop. I already had AWN installed and setup on the Gnome desktop. When I logged into LXDE, the AWN is displayed, but the theme was not configurable, which left me with an ugly blank white box with icons. Then ran through your post above. Logged out/in...POW! It looks GREAT now! :D

Thanks for sharing this neat trick!

(Too bad it doesn't work on Lubuntu. I run that on an old laptop from a flash drive.)
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

Bob E wrote:Thanks for sharing this neat trick!
No problem :D glad you liked it. Please share with your friends, and don't forget to vote! :mrgreen:
Bob E wrote:(Too bad it doesn't work on Lubuntu. I run that on an old laptop from a flash drive.)
Really? I wonder why. It is supposed to work since Lubuntu is technically a LXDE desktop environment. However, it may be because you are running it off a flashdrive (in that case, I don't believe you can add startup entries). As a matter of fact, I am currently booting Mint 11 LXDE off my flashdrive on one of my college's computers (Windows 7 sucks!) and I am unable to access the "/" root partition (it says "not permitted" or something) maybe because the Linux Mint image is read-only (and yes, I've tried "gksu pcmanfm" and it still wont let me access it). You CAN dual-boot on your laptop you know, its not that hard.

Also! NEW UPDATE! I've figured out how to do this for Openbox as well! Open the terminal, type in "gksu pcmanfm." Then go to /etc/xdg/Openbox/autostart.sh <open with gedit. You can add docky easily (and even LXPanel! By default the "logout" button from LXDE wont work with openbox. With a bit of tinkering, you can change the command so that openbox can logout. Right click on the panel, click panel properties or something, then go to the "advanced" tab. Below the box that says "terminal", it should say "logout command" or something. Change the command to "killall openbox" and save it and try it out!) {Note: I will add more details about this tonight. For amateur Linux users, this should be possible to follow even with my short description here. However, I want all people--Linux noobs included--to know how to do this, so I will expand on this by tonight or tomorrow.}

At the moment, I am currently trying to achieve the same thing for FluxBox users because I don't want anyone to be left out of this awesomeness.
Bob E

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by Bob E »

sagirfahmid3 wrote: However, it may be because you are running it off a flashdrive (in that case, I don't believe you can add startup entries).
I've seen the conflict you mention when trying to use a flash drive OS on a computer with an existing OS. On my laptop setup, the flash drive is the only drive. The old laptop has no internal HDD, so the flash is recognized as the HDD. I still think it has something to do with the Lubuntu build itself.
sagirfahmid3 wrote:(Windows 7 sucks!)
Sooooo True!!!! ...BUT, thanks to Windows 7, I discovered Linux. :D

PS. Submitted "Yes" votes, and made a PDF for future reference.
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

Thanks for the votes!

Also, I think I'm pretty close to fixing the issue of compositing in FluxBox; when I added xcompmgr to the startup entry, it shows the process in my taskmanager but it doesn't affect Docky, so there's the annoying black bar on the right side. I'm pretty sure there's a logical explanation for this, just have to be patient and figure it out.
proxima_centauri

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by proxima_centauri »

Please do not cross-post threads. I've consolidated them here.
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

oo sorry :oops:
antikythera

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by antikythera »

Thanks for the clear guide. Now got docky on my LXDE in 3D mode and my frequently used applications pinned. I tried avant and decided to remove that. Docky does what I want and runs smoothly on my notebook. Normal panel has been moved to the top and set to autohide.

Image
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

No problem dude :D If you want the same thing on openbox, edit the autostart.sh file in /etc/xdg/openbox/ and add "docky &" and "xcompmgr &" to the end of the document.
If you need more help with that, let me know.
joefish
Level 1
Level 1
Posts: 1
Joined: Tue Dec 27, 2011 2:14 am

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by joefish »

antikythera wrote:Thanks for the clear guide. Now got docky on my LXDE in 3D mode and my frequently used applications pinned. I tried avant and decided to remove that. Docky does what I want and runs smoothly on my notebook. Normal panel has been moved to the top and set to autohide.

Image
Please tell me where you got that wallpaper from? It looks awesome.
Linux Mint LXDE 11
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

Woops! Easier way to do this in LXDE is to:
Terminal> sudo nano /etc/xdg/lxsession/Mint/autostart
Scroll down to the end and add "@xcompmgr"
Press F2. Save. Quit.
Logout and log back in. Ta daa!!
antikythera

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by antikythera »

joefish wrote:
Please tell me where you got that wallpaper from? It looks awesome.
http://jason-c.deviantart.com/art/deVIN ... k-66222291
sagirfahmid3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by sagirfahmid3 »

000webhost shut down my site because I didn't use it for 3 months...That's so lame. I lost all of my Linux stuff stored there (including the pics)
Here's my LXDE with Docky:
Screenshot.png
I'm gonna get the XFCE screenshot a bit later; gonna have to install XFCE4.
rdanner3

Re: [GUIDE]A noob's guide to ENABLE COMPOSITING in LXDE(or X

Post by rdanner3 »

sagirfahmid3 wrote:000webhost shut down my site because I didn't use it for 3 months...That's so lame. I lost all of my Linux stuff stored there (including the pics)
Here's my LXDE with Docky:
Screenshot.png
I'm gonna get the XFCE screenshot a bit later; gonna have to install XFCE4.
With one difference, worked in MATE. (Was able to set the startup via "Startup Applications", which is loads easier than the edit route, IMO, especially if you happen to have hardened your copy (as I have) with the "Bastille Linux" package. (While it does harden the system, it is seriously annoying to have to do some things via "sudo" that (in stock Linux) doesn't need it. And it apparently also borks trashing files.)
Post Reply

Return to “Tutorials”