[SOLVED]Script to replace compiz with metacity and the other way round

Hi. I would like You guys to help me. I don't want to use fusion-icon (many complex reasons I wouldn't like to state here, just please take it for granted) and I'd like to bind a key combination for a command which would let me replace compiz with metacity and the other way round. So I think I need a script.
What I'd need:
detect if compiz is running
yes -> metacity --replace
no -> compiz --loose-binding --replace
Can You help?
Last edited by warnec (2010-06-23 19:38:46)

The scripts by mojlac024 replaces compiz by metacity when compiz is running, but when metacity is running it doesn't bring compiz back.
How to incorporate that test:
dbus-send --print-reply --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/dbus/screen0 org.freedesktop.compiz.list | wc -l
into the script?
PS.:
When compiz is running, it prints 1. But when compiz is not running, it prints:
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.compiz was not provided by any .service files
0
So a simple logical test of "is this 0 or not?" won't work, I'm afraid.
Last edited by warnec (2010-06-23 17:01:44)

Similar Messages

  • Firefox synced new computer with old not the other way round, lost all tabs, etc on old computer

    Using Firefox sync...my new computer synced into my old, not the other way around. I lost all tabs, history, etc on old computer

    Bookmark Backups
    Type '''about:support'''<enter> in the address bar.
    Under the page logo on the left side you will see '''Application Basics.'''
    Under this find '''Profile Folder.''' To it’s right press the button
    '''Show Folder.''' This will open your file browser to the current
    Firefox profile. Now '''Close Firefox.'''
    Enter the '''bookmarkbackups''' folder. This is where Firefox makes backups
    of your bookmarks. Look for the '''jsonlz4''' file you want to restore
    (check the time / date / size). Right click on that file and select '''Copy.'''
    Now go back to the profile folder where you started. Rename the file
    '''places.sqlite''' by adding '''.old''' to it. Now right click in the folder
    and select '''Paste.''' The file you just pasted here, rename it to
    '''places.sqlite.''' After you are done, restart Firefox.

  • My iPad 2 screen has turned a weird colour. The background is black and the letters are white instead of the other way round and colour photos look like negatives. How do I change it back.

    My IPad screen has turned a weird colour, the background is white and the letters white instead of the other way round.  Colour photos look like negatives. How can I turn it back to a white background.

    Dear Steve,
    You are wonderful! You are the best! I'm Stephania and I recently purchased a refurbished ipad2. I've had it for about 3 weeks now and updating & fixing it so my liking. The only thing that I couldn't correct were the photos that looked like negatives. Every photo, even on the internet, on apps, everywhere! I just couldn't figure out how to fix it. I contacted Apple Care and its too difficult to get in touch with them. I had looked through support before but didn't put in the right question. Well, today I got lucky. I did the two things you suggested and turning the "White On Black" off did the trick. I'm so happy! I had a feeling it was something simple and this is not even in the manual!
    stevejobsfan0123 wrote:
    Try triple clicking the home button. If that doesn't work:
    Settings > General > Accessibility > White on Black OFF.

  • I got my Imac and Trackpad in may so its new and the batterys have run out on the trackpad, so i have put new batterys in and its not even turning back on i have tried the batterys the other way round ( i used duracell) and still not working, HELP

    I got my Imac and Trackpad in may so its new and the batterys have run out on the trackpad, so i have put new batterys in and its not even turning back on i have tried the batterys the other way round ( i used duracell) and still not working, so i put the old batterys in and it still wont turn on. I am getting so angry woth apple things, the make it sound better than it is and over pice it, i paid over a grand for my imac and it dont even come with a cd SLOT. Please can some one help!

    Edge has very clear restrictions, one being that you must have 6 months of clean payment history which you don't. Either wait until April 14, or good luck at Sprint.
    I am unsure how it can be determined the payment mix up was the fault of CS, but regardless, the mix up was done. There can be any number of reasons why a payment could be missed without any fault on your part, however you are still the responsible party for the account and must live with the repercussions.

  • When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    Hi Cecilie1,
    I apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having issues with photo rotation, you may want to make sure that your iPhone is detecting the orientation when you take the photos. In iOS 7 and iOS 8, the top menu text when taking a photo should rotate to show orientation (the bottom menu stays oriented to the shutter button). You can see these menus on the following page:
    Camera at a glance - iPhone
    If your iPhone isn't sensing rotation for pictures, you may want to check to see if the Rotation Lock is engaged, as noted here:
    If the screen doesn't rotate on your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • When i add an entry to my ipad calendar it syncs with my iphone but not the other way round. Icloud is turned on on both.

    When i add an entry to my ipad calendar it syncs with my iphone but not the other way round. Icloud is turned on on both.

    Do you have iCloud?
    As it states hereyou need it tp sync.
    Allan

  • Connecting two routers to one internet connection, one with dynamic and the other static?

    My father uses a BEFW11S4 router with firewall  for his home office. It uses a Dynamic IP. I have my computer up stairs and the internet conenction is set up through the router via wired connection. The problem that I have is that in order for several of my online games to work, (Final Fantasy XI and the Playstation 3 network) I need to add Port codes to the router to gain access to the online features in the games. To add the port codes to the router, I need to change to a Static IP.
    My father does not want to change to a Static IP and so I am unable to connect to the online services that the games provide.
    Is it possible to connect another Router to the same internet connection? This one would be a static IP.

    Ok well My father's computer is wired and so is mine. My ps3 is wireless. My father needs the dynamic IP on his computer or he will not be able to use the things needed for his work. I need the router to be Static so that I can play the games. So What you are saying is that I can still use 1 router and have both dynamic and Static IP set up at the same time of the one internet connection?

  • How to create a link with 2 choices in Xcode: one selected with UICollectionViewController and the other with UITableViewController

    Hi
    I want to create a app redirecting to my mebsite.This app permit to select a "area" selected on a UICollectionViewController, and an "event" selected with a UITableViewController.
    I need to integer both informations on the FinalViewController (called in my app AnnoncesViewController) =>
    The fisrst array is selected on CollectionViewController:@"http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=e vents&Itemid=0&ohanah_venue_id=21"
    The second array is selected onUITableViewController:@"&ohanah_category_id=1&textToSearch="
    The final array must be:http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=eve nts&Itemid=0&ohanah_venue_id=21&ohanah_category_id=1&textToSearch=
    How can I integer these 2 NSArray to obtain this result to link  to a UIWebView as FinalViewController?
    Thank you for your help!!
    My App is on Drobox:https://www.dropbox.com/s/43l1p2hj5bqamvn/Carnet%20du%20Jour.zip
    Gracefully
    RémySpehler

    Hi
    I want to create a app redirecting to my mebsite.This app permit to select a "area" selected on a UICollectionViewController, and an "event" selected with a UITableViewController.
    I need to integer both informations on the FinalViewController (called in my app AnnoncesViewController) =>
    The fisrst array is selected on CollectionViewController:@"http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=e vents&Itemid=0&ohanah_venue_id=21"
    The second array is selected onUITableViewController:@"&ohanah_category_id=1&textToSearch="
    The final array must be:http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=eve nts&Itemid=0&ohanah_venue_id=21&ohanah_category_id=1&textToSearch=
    How can I integer these 2 NSArray to obtain this result to link  to a UIWebView as FinalViewController?
    Thank you for your help!!
    My App is on Drobox:https://www.dropbox.com/s/43l1p2hj5bqamvn/Carnet%20du%20Jour.zip
    Gracefully
    RémySpehler

  • Can a 32-bit version of Firefox work with a 64-bit plugin and the other way around?

    I'm using a notebook with Windows 7 x64 and Firefox 4.0.1 x86 and I used to have JDK 1.6.0.24 x64 installed, and also it's corresponding public JRE (also x64). Yesterday, I noticed that Java applets didn't work in Firefox. It asked me to install the required plugin. I did, and JRE 6u22 x86 was installed alongside. Now Java applets did work, hurray.
    Because I didn't want multiple (old) JRE's, I uninstalled all of them and installed JDK 1.6.0.25 with it's public JRE instead. Again, 64-bit. Now Firefox refuses to notice Java again. The plugin menu doesn't show any Java-related plugins. (Not even Java Deployment Toolkit, which used to be there before.) I have tried setting the current Java distribution as default for all browsers with the Java Control Panel, but that didn't work.
    Is this just because Firefox x86 can't deal with x64 plugins? Should I download a x64 build of Firefox instead? Or will that make the rest of my addons stop working?
    EDIT: currently I removed the 64-bit JRE and installed its 32-bit variant. Everything works again, also in Firefox. I would still prefer to have everything 64-bit though.

    Mozilla hasn't yet released a 64-bit version of Firefox for Windows, they're all 32-bit.
    Namoroka is a pre-release version used for testing new features and security fixes, and was available in 32-bit and 64-bit variants for all OS's. Currently only the Nightly version is available in a 64-bit versions for Windows - currently Nightly 10.a1.
    You can get the latest release version here. For Windows it is a 32-bit application. <br />
    http://www.mozilla.com/en-US/firefox/

  • How can I merge two iTunes folder, one with music and the other without?

    Two years ago Apple support suggested moving my iTunes folder out of my Home folder to the HD level in order to share it across users. This is no longer necessary. How do I move my music back to my Home folder since now I have an Itunes folder at the HD level (along with application, library, system, users folders) and an Itunes folder under Music in my Home folder. For example both those itunes folders have a mobile application, album artwork, and previous itunes library subfolder as well as itunes library extras.itdb and itunes library genius.itdb. How do I merge them or which ones do I delete? The files in the mobile app folder in my Home folder have a newer "last modified" date. Currenty under Itunes-->Preferences-->Advanced, it says Itunes media location is /itunes/itunes media/ music. I assumes that is the HD level folder. What happens if I hit reset?
    I am using Itunes 10.6.3.
    Any help tailored to a novice would be great. Thanks.

    Thanks for the links, Limnos.
    If you are willing to continue helping, here's what I found.
    Just to clarify the two iTunes folders I am refering to are:
    username-->Music-->iTunes
    HD-->iTunes
    I am presuming each location has a full set of files as outlined in the above links?
    Not all the files are in both locations. Most are.
    - The Itunes folder in my home folder does not have itunes library.xml.
    - The Itunes folder in my home folder has a subfolder called Mobile Applications (username-->Music-->iTunes--> Mobile application). The Itunes folder at the HD level also has a Mobile Application folder but it is a subfolder of Itunes Media folder (HD-->iTunes--> iTunes Media-->Mobile applications) and has no files in it.
    - I do not have an iTunes Media in the iTunes folder in my home folder.
    - also the Itunes media folder (HD-->iTunes--> iTunes Media) has subfolders by type (books, movies, itunes u, music etc...) but the iTunes Media-->Music also has some of the same subfolders ( iTunes Media-->Music-->books, iTunes Media-->Music-->Movies, iTunes Media-->Music-->iTunes U). Is this normal repetition?
    You say:
    /itunes/itunes media/ music
    but it is important to note what comes before all that.
    There is nothing as far as I can tell before that first forward slash. Since the only iTunes Media folder I have is in the iTunes folder that resides at the HD level (HD-->iTunes--> iTunes Media folder) not the iTunes folder in my home folder (username-->Music-->iTunes) , I assume that's the one that holds the music.
    Keep iTunes media folder organized and Copy files to iTunes Media folder when adding to library are both checked on
    Does that give more clarity into my problem?

  • Every time i open my system pref it never works and it just shows my cursor with the busy signal. and i can't do anything with it and the only way i can exit out of system pref is by going to force quit. and there it shows system pref is not responding.

    How do i fix this?

    no disk is needed.  you can dl the installation files.
    yes, if you uninstall you lose whatever you uninstalled.
    yes, you need to reinstall flash pro using the same suite.  that's the only product with which your serial number will work.
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • HT204053 i used the same apple id for my iphone and my husbands now all our contacts and such are on both phones how do i fix this.  I dont need his contacts on my phone and the other way also.  Should i create a different icloud account for his phone?

    I used the same apple id for my iphone and my husbands now all our contacts and such are together.  How do I undo this?  Do i create him a different icloud account? 

    Yes, start with deleting your account on his device:
    (Settings > iCloud or Settings > Mail, Contacts, Calendar > Your Account)
    In the next step, create a new account on his device:
    (Settings > iCloud or Settings > Mail, Contacts, Calendar > Your Account)

  • I backed up all of my data on my laptop and uploaded songs as well, I then plugged my wifes' phone to upload the music to her device, my laptop then erased all her data (photos, videos etc) and replaced it with mine, is there a way I can restore it all?

    Good day
    I synced my iPhone4s with my laptop and loaded music on it, I then tried to upload the music from the same computer to a different iPhone4s and it deleted all the photos and data and replaced it with mine, is there a way to recover the lost data and photos?
    Please help!?

    You can only sync to one computer at a time. Changing the computer will erase all data on the device and replace it with the content of the new iTunes library. Only if you can restore from the latest backup of your wife's phone, you can get the data back.
    iTunes: Restoring iOS software
    iTunes: About iOS backups

  • I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the worl

    I'm having problems with iPhoto and the facebook set-up.  Every time I attempt to do so it says an error has occured and try again later.  I have not seen a solution posted.  Therefore, how does one contact Apple to solve the problem?  I'm new to the world of iMac but I find it a bit frustrating trying to solve basic issues/problems:(

    For what it's worth, you posted this in 2011, and here in 2014 I am still having this same issue. Over the last two days, I have had to unlock my apple account 8 times. I didn't get any new devices. I haven't initiated a password reset. I didn't forget my password. I set up two factor authentication and have been able to do the unlocking with the key and using a code sent to one of my devices. 
    That all works.
    It's this having to unlock my account every time I go to use any of my devices. And I have many: iMac, iPad, iPad2, iPad mini, iPhone 5s, iPod touch (daughter), and my old iPhone 4 being used as an ipod touch now.  They are all synced, and all was working just fine.
    I have initiated an incident with Apple (again) but I know they are just going to suggest I change my Apple ID. It's a simple one, and one that I am sure others think is theirs. I don't want to change it. I shouldn't have to. Apple should be able to tell me who is trying to use it, or at least from where.
    Thanks for listening,
    Melissa

  • I've Just Replaced My Macbook Battery And The Turning Screw You Twist With A Penny Has Came Of What Do I Do

    I've Just Replaced My Macbook Battery And The Turning Screw You Twist With A Penny Has Came Of What Do I Do

    Don't worry I've sorted it! I just had to turn off Reminders as well in iCloud. Calendar then worked fine, even when I turned Calendar and Reminders back on.

Maybe you are looking for

  • Can't launch Adobe Reader 11.0.06: 'An internal error occurred'

    Today I purchased a highly recommended e-book ('Rally All Around') which is available by download. Double clicking on its file brought up a message that I needed a newer version of Adobe Reader, and linked me directly to 11.0.06 (Mac) on the Adobe si

  • Use APD to fetch data from Query's Structure

    Hi, i have created a query , with a fixed structure in the Row area and two keyfigures. I have this query on DSO. i want to store the same query output to one table.  How can i achive this? I think to use the APD, but as i have fix structure in query

  • New 'resume' feature not working properly

    Hi All! As there does not seem to be a manual for Lion, I am hoping someone can answer the following questions for me: I have assigned various applications to different desktops (spaces). Unfortunately, after a system restart, these are not restored

  • Connecting to an internal HD

    I am going to replace my internal HD with a 120 GB HD. After I install it I want to transfer stuff from the old HD to the new HD. Is there any cable that will connect the old HD, (now outside the computer) to a USB or Firewire port? Mark

  • How to give range value and different value in headerof alv report

    Hi All, If User is giving range value 10 to 20 and also wants 25 28 30 and these all values should be displayed in Alv header.How is it possible.I have tried by using if variable-option eq 'BT'                       elseif variable-option eq 'EQ'.the