'compiz-decorator' file changes

Bug #1192376 reported by BryanFRitt on 2013-06-18
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description


# Starts Compiz Decorator depending on the DE
# Copyright (c) 2007 CyberOrg <email address hidden>
# Based on compiz-manager script by Kristian Lyngstøl <email address hidden>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Contributions by: crdlb
# Modifications by: Daniel van Vugt <email address hidden>

# changes made by BryanFRitt to compiz-decorator script:
# Does the '/' in paths work differently in script languages/systems?
# added '/' in paths,
# someone TODO:
# put this(or something like it) in as default for the decor plugin Command option:
# exec "${COMPIZ_BIN_PATH}"/compiz-decorator
# changed to `which metacity`
# changed string to compare $DESKTOP_SESSION with, 'plasma-kde'
# added '--replace &' in the calling function,
# --replace, that way it'll replace the current decorator,
# and the ' &' so that the terminal will be freed up.
# IDEA: rename FALLBACKWM_OPTIONS something different, and use the new name instead of the '--replace' I added
# default the bin path is the same as the path of this file, instead of /usr/bin <- if this isn't a good idea, please revert, or change

if [ -z "$COMPIZ_BIN_PATH" ]; then
   # COMPIZ_BIN_PATH="/usr/bin/"
   # default to the bin path is in the same path as this file, or do above?
    COMPIZ_BIN_PATH=$(cd $(dirname "$0"); pwd)
    #echo "$COMPIZ_BIN_PATH";
KWIN=`which kwin`
METACITY=`which metacity`
# Default to gtk/kde4-window-decorator

#Do not leave users without decoration if decorator fails
# try out `echo "$DESKTOP_SESSION"` it gives back "kde-plasma" on KDE
#if [ "$DESKTOP_SESSION" = "kde" ]; then
if [ "$DESKTOP_SESSION" = "kde-plasma" ]; then

# Set to yes to enable verbose

# Echos the arguments if verbose
    if [ "x$VERBOSE" = "xyes" ]; then
        printf "$*"

# Read configuration from XDG paths
if [ -z "$XDG_CONFIG_DIRS" ]; then
    test -f /etc/xdg/compiz/compiz-manager && . /etc/xdg/compiz/compiz-manager
    test -f $XDG_CONFIG_DIRS/compiz/compiz-manager && . $XDG_CONFIG_DIRS/compiz/compiz-manager

if [ -z "$XDG_CONFIG_HOME" ]; then
    test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager
    test -f $XDG_CONFIG_HOME/compiz/compiz-manager && . $XDG_CONFIG_HOME/compiz/compiz-manager

# start a decorator
# slashes needed here too
if [ -x ${COMPIZ_BIN_PATH}/emerald ] && [ "$USE_EMERALD" = "yes" ]; then
elif [ -x ${COMPIZ_BIN_PATH}/gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then
elif [ -x ${COMPIZ_BIN_PATH}/kde4-window-decorator ] && [ x$KDE_SESSION_VERSION = x"4" ]; then

# fall back to any decorator that is installed
if [ -z "$DECORATOR" ]; then
    verbose "Couldn't find a perfect decorator match; trying all decorators\n"
# These needs '/' in them to get the path
    if [ -x ${COMPIZ_BIN_PATH}/emerald ]; then
    elif [ -x ${COMPIZ_BIN_PATH}/gtk-window-decorator ]; then
    elif [ -x ${COMPIZ_BIN_PATH}/kde4-window-decorator ]; then

if [ -n "$DECORATOR" ]; then
    verbose "Starting ${DECORATOR}\n"
# another spot with a '/' needed, also added --replace
    exec ${COMPIZ_BIN_PATH}/$DECORATOR "$@" --replace &
    verbose "Found no decorator to start\n"

Related branches

BryanFRitt (bryanfritt) wrote :
description: updated
BryanFRitt (bryanfritt) on 2013-06-18
description: updated
MC Return (mc-return) on 2013-06-19
Changed in compiz:
milestone: none →
importance: Undecided → Medium
tags: added: patch
Sam Spilsbury (smspillaz) wrote :

Please propose merge requests for changes.

Changed in compiz:
status: New → Incomplete
status: Incomplete → Invalid
MC Return (mc-return) wrote :

Can you do that ?

BryanFRitt (bryanfritt) wrote :

"Please propose merge requests for changes."

Can you do that ?"

I'm not sure how to "propose merge requests for changes.".
I suppose I can learn how.
You mean something like this?:
and beforehand I can of course make the file better looking for inclusion, like removing comments that are basically there just to show changes, etc...

BryanFRitt (bryanfritt) wrote :

I got a message:
"Committed revision 3743. "
Although, it didn't ask me for my password...

BryanFRitt (bryanfritt) wrote :
BryanFRitt (bryanfritt) wrote :
MC Return (mc-return) on 2013-06-23
Changed in compiz:
assignee: nobody → MC Return (mc-return)
status: Invalid → New
status: New → Triaged
MC Return (mc-return) wrote :

Here you can find information on how to get set up:

Here you can find current merge requests for Compiz:

If you have any questions, just ask. ;)

BryanFRitt (bryanfritt) wrote :

I setup launchpad 'SSH keys' and 'OpenPGP keys', and then ran
bzr push lp:~bryanfritt/compiz/compiz-decorator_script-edit_1192376
Using default stacking branch /+branch-id/736145 at chroot-65422288:///~bryanfritt/compiz/
Created new stacked branch referring to /+branch-id/736145.

BryanFRitt (bryanfritt) wrote :

Did that do it?
Is there a way I can view my submissions from a webpage?
What exactly are branch, commit, merge, pull, push, etc...?
and the order on how/when to use them.

MC Return (mc-return) wrote :

Very good. :)

You've now created your branch, which is your modified Compiz source.

Explanation of terms:
If you commit something you accept a change and add this change to the (in this case) bazaar version control.
This is the commit you already made: http://bazaar.launchpad.net/~bryanfritt/compiz/compiz-decorator_script-edit_1192376/revision/3743 - it is revision (commit number) 3743.
If you push something in the case of version control this means you upload the sourcecode.
To pull means download in this case.
Merging 2 branches means combining them to one.
If you run "bzr merge lp:compiz" in the console, while in the directory of your branch you can merge in http://bazaar.launchpad.net/~compiz-team/compiz/0.9.10/revision/3743 from trunk for example.
A "bzr diff" shows what has changed, but is not yet committed.
A "bzr commit" would commit this revision into your sourcecode/branch.
A "bzr push" would upload this change to your launchpad account.

Important webpages:
Your Code: https://code.launchpad.net/~bryanfritt
Compiz Home: https://launchpad.net/compiz
Recent lp:compiz Revisions: https://code.launchpad.net/~compiz-team/compiz/0.9.10
Active Code Reviews/Merge Proposals: https://code.launchpad.net/~compiz-team/compiz/0.9.10/+activereviews

Milestones/TODO for 0.9.10: https://launchpad.net/compiz/+milestone/

Your TODO:
Propose your code for merging into lp:compiz. Do it from here: https://code.launchpad.net/~bryanfritt/compiz/compiz-decorator_script-edit_1192376 ;)

Hope this helps :)

MC Return (mc-return) wrote :

*trunk/sometimes also called master is the "main" branch all other branches/Merge Proposals are merged into, once they get approved.

MC Return (mc-return) wrote :

Btw., you can also link this bug report to your branch, by clicking "Link a related branch" on the top right side of this page...
This will trigger some automatic mechanisms once your branch is merged into trunk.

BryanFRitt (bryanfritt) wrote :

Thanks, I did the 'Merge Proposal'. and the 'Link a related branch'

Right after I submitted the merge proposal, I realized I left in some comments that I meant to remove:
"# These needs '/' in them to get the path", and // lol... and improper grammar too
"#another spot with a '/' needed",
Should I remove them and resubmit a 'merge proposal'? or ignore?

It looks like it shows me as submitting it as "bryan@(none)", and my "launchpad ssh key" is showing up as "bryan@localhost".
Is there a way to change these?

MC Return (mc-return) wrote :

Change the stuff you want to change in your branch, then commit it and afterwards push your change to upload it to your branch.

Regarding your name and ssh key: The information used is from here: https://launchpad.net/~bryanfritt
You can of course change it, just re-study https://wiki.ubuntu.com/UbuntuDevelopment/GettingSetUp

BryanFRitt (bryanfritt) wrote :

I tried
bzr merge
and got
ERROR: Working tree [tree] has uncommitted changes (See bzr status)

bzr status
pending merge tips: (use -v to see all merge revisions)
  Sam Spilsbury 2013-06-23 [merge] Only mark for no further instantiations...

bzr pull
Using saved parent location: http://bazaar.launchpad.net/~compiz-team/compiz/0.9.10/
bzr: ERROR: These branches have diverged. Use the missing command to see how.
Use the merge command to reconcile them.

bzr missing
You have 1 extra revision
You are missing 2 revisions

bzr commit
modified plugins/decor/src/compiz-decorator
modified src/plugin.cpp
Commit message was not edited, use anyway? ([y]es, [n]o): no
bzr: ERROR: Empty commit message specified. Please specify a commit message with either --message or --file or leave a blank message with --message "".

I didn't make any changes to plugin.cpp.
I've only modified the ./plugins/decor/src/compiz-decorator file.
How can I set it so that it accepts any changes others have made, so I can commit, etc... my changes?

MC Return (mc-return) wrote :

Probably you merged the latest trunk, which did make changes to plugin.cpp, see here: http://bazaar.launchpad.net/~compiz-team/compiz/0.9.10/revision/3743
but you forgot to commit that merge before you continued to hack on the source.
(You probably did a bzr merge lp:compiz, without a following bzr commit to accept merging trunk into your source)

"bzr revert src/plugin.cpp" will revert the changes to plugin.cpp in your local branch

then a

"bzr diff" will show you if everything is correct now (just your modifications to compiz-decorator should show)

"bzr commit" to accept those changes -> enter a commit message detailing what you did change -> Exit vim with :wq to save and quit

"bzr push" to upload to your branch

Here https://code.launchpad.net/~bryanfritt/compiz/compiz-decorator_script-edit_1192376/+merge/171005 you can check if everything is like you planned it to be ;)

MC Return (mc-return) wrote :

I have set your branch to "Work in Progress", please change that to "Needs Review" once your branch is ready for review... ;)

MC Return (mc-return) on 2013-06-26
Changed in compiz:
assignee: MC Return (mc-return) → nobody
assignee: nobody → BryanFRitt (bryanfritt)
BryanFRitt (bryanfritt) wrote :

It asked who I wanted to review it. I put down 'MC Return', if I should have put some one else down let me know.

MC Return (mc-return) on 2013-06-27
Changed in compiz:
status: Triaged → In Progress
importance: Medium → High
Changed in compiz:
milestone: →
MC Return (mc-return) on 2013-07-24
Changed in compiz:
milestone: →
Stephen M. Webb (bregma) on 2014-11-06
Changed in compiz:
milestone: →
Stephen M. Webb (bregma) on 2015-02-03
Changed in compiz:
milestone: →
Harvey Houston (ubuntu-who) wrote :
Download full text (12.8 KiB)

I ran Compiz from a terminal:

$ compiz --replace
compiz (core) - Info: Loading plugin: core
compiz (core) - Info: Starting plugin: core
compiz (core) - Info: Loading plugin: ccp
compiz (core) - Info: Starting plugin: ccp
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity
compiz (core) - Info: Loading plugin: crashhandler
compiz (core) - Info: Starting plugin: crashhandler
compiz (core) - Info: Loading plugin: composite
compiz (core) - Info: Starting plugin: composite
compiz (core) - Info: Loading plugin: opengl
compiz (core) - Info: Starting plugin: opengl
compiz (core) - Info: Loading plugin: place
compiz (core) - Info: Starting plugin: place
compiz (core) - Info: Loading plugin: compiztoolbox
compiz (core) - Info: Starting plugin: compiztoolbox
compiz (core) - Info: Loading plugin: move
compiz (core) - Info: Starting plugin: move
compiz (core) - Info: Loading plugin: imgsvg
compiz (core) - Info: Starting plugin: imgsvg
compiz (core) - Info: Loading plugin: annotate
compiz (core) - Info: Starting plugin: annotate
compiz (core) - Info: Loading plugin: widget
compiz (core) - Info: Starting plugin: widget
compiz (core) - Info: Loading plugin: switcher
compiz (core) - Info: Starting plugin: switcher
compiz (core) - Info: Loading plugin: imgjpeg
compiz (core) - Info: Starting plugin: imgjpeg
compiz (core) - Info: Loading plugin: grid
compiz (core) - Info: Starting plugin: grid
compiz (core) - Info: Loading plugin: mousepoll
compiz (core) - Info: Starting plugin: mousepoll
compiz (core) - Info: Loading plugin: session
compiz (core) - Info: Starting plugin: session
compiz (core) - Info: Loading plugin: regex
compiz (core) - Info: Starting plugin: regex
compiz (core) - Info: Loading plugin: resize
compiz (core) - Info: Starting plugin: resize
compiz (core) - Info: Loading plugin: imgpng
compiz (core) - Info: Starting plugin: imgpng
compiz (core) - Info: Loading plugin: animation
compiz (core) - Info: Starting plugin: animation
compiz (core) - Info: Loading plugin: workarounds
compiz (core) - Info: Starting plugin: workarounds
compiz (core) - Info: Loading plugin: fade
compiz (core) - Info: Starting plugin: fade
compiz (core) - Info: Loading plugin: trailfocus
compiz (core) - Info: Starting plugin: trailfocus
compiz (core) - Info: Loading plugin: expo
compiz (core) - Info: Starting plugin: expo
compiz (core) - Info: Loading plugin: scale
compiz (core) - Info: Starting plugin: scale
compiz (core) - Info: Loading plugin: unityshell
compiz (core) - Info: Starting plugin: unityshell
WARN 2017-01-25 22:49:47 unity.glib.dbus.server GLibDBusServer.cpp:593 Can't register object 'org.gnome.Shell' yet as we don't have a connection, waiting for it...
WARN 2017-01-25 22:49:47 unity.debug.interface DebugDBusInterface.cpp:217 Unable to load entry point in libxpathselect: libxpathselect.so.1.4: cannot open shared object file: No such file or directory -- full D-Bus introspection will not be available
WARN 2017-01-25 22:49:47 xim.controller XIMController.cpp:103 IBus natively supported.
WARN 2017-01-25 22:49:47 unity.dash.gsettingsscopereader GSettingsScopes.cpp:108 Error fetching protoc...

Harvey Houston (ubuntu-who) wrote :

If I posted my previous post in the wrong place, please move it to a more relevant place. Sorry for any inconvenience I may have caused!

BryanFRitt (bryanfritt) wrote :

@ Harvey Houston (trusty-goes-in-features)

If you have a new question you should start a new thread.

Are you reporting WARN messages?, or are you having problems with `compiz --replace` that you need help with? The post doesn't have questions in it.

For reporting bugs, etc...
You can search through bugs reported with '[ ] Search'.
If you have a new bug goto 'Report a bug'(link is near the top right of the page).
Type in the 'Summary:[ ] Next' field a one line title for your bug.
Do you find your bug already reported? If so click on it and read about it.
If it's not listed, click on 'No, I need to report a new bug'.
Give it 'Summary:' and 'Furher information:', etc...
When completely done click on 'Submit Bug Report'.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers