Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Desktop Effects & Customization
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Desktop Effects & Customization
This section is for all your compositing needs. This includes Beryl, Compiz, xcompmgr, and other fancy apps which take advantage of compositing managers such as kiba-dock and avant window decorator

 
Thread Tools Display Modes
Old August 5th, 2007   #1
Luksion Knight
A Carafe of Ubuntu
 
Luksion Knight's Avatar
 
Join Date: Jun 2007
Location: In your closet
Beans: 119
Ubuntu 7.10 Gutsy Gibbon
Send a message via AIM to Luksion Knight
turning off compiz fusion to run application

hey is there a way i can edit several of my quick launch commands (mostly concerning games) so that it will revert to metacity before the game runs, and then switch back to compiz fusion when the game exits?
Luksion Knight is offline   Reply With Quote
Old August 5th, 2007   #2
dougfractal
Dipped in Ubuntu
 
dougfractal's Avatar
 
Join Date: Jan 2007
Beans: 590
Gutsy Gibbon Testing
Re: turning off compiz fusion to run application

HTML Code:
metacity --replace &      # for metacity


compiz --replace &      #  for compiz
__________________
[mouse-drag-select] == COPY && [mouse-middle-click]== PASTE
---- 3D Desktop xorg.conf's ---

ubuntu guide ---- Ubuntu Document Storage Facility ---- "Mark thread as [SOLVED]" using "Thread tools"
dougfractal is offline   Reply With Quote
Old August 5th, 2007   #3
Luksion Knight
A Carafe of Ubuntu
 
Luksion Knight's Avatar
 
Join Date: Jun 2007
Location: In your closet
Beans: 119
Ubuntu 7.10 Gutsy Gibbon
Send a message via AIM to Luksion Knight
Re: turning off compiz fusion to run application

can you be more specific? i know the commands for switching window managers but how do i specificly add the switch window command to a run game command, i try tossing it in there, but it only switches the window manager, doesnt launch the game. and then do i put the compiz command on the end of the quick launch command to make it revert to compiz after the fame exits?
Luksion Knight is offline   Reply With Quote
Old August 5th, 2007   #4
AndrewGene
A Carafe of Ubuntu
 
AndrewGene's Avatar
 
Join Date: Apr 2007
Location: Central Arkansas
Beans: 85
Ubuntu 7.04 Feisty Fawn
Re: turning off compiz fusion to run application

I'm no expert at linux but this won't hurt anything to try...I think it will work.

If you don't have a folder in your home directory called "bin" you can create one. In it make a file called "gamestart" (or whatever you want to call it).
Then paste this into the file...

#/bin/bash
sleep 10
compiz --replace -c emerald &
sleep 10
avant-window-navigator

Save the file and then make it executable by opening a terminal and cd'ing to whatever the directory is (in this case "username/bin") where the file is found and type...
chmod +x gamestart (it might be chmod +x gamestart.sh)

Now set the quicklaunch button to start with that script.

Hope this works.
__________________
Screw the fact that it's taking 35% of my CPU power, and that it's drinks my battery power like a thirsty bedouin, that's what eyecandy is all about
--9a3eedi
AndrewGene is offline   Reply With Quote
Old August 6th, 2007   #5
Luksion Knight
A Carafe of Ubuntu
 
Luksion Knight's Avatar
 
Join Date: Jun 2007
Location: In your closet
Beans: 119
Ubuntu 7.10 Gutsy Gibbon
Send a message via AIM to Luksion Knight
Re: turning off compiz fusion to run application

how do i set the quicklaunch button to start with any script???
Luksion Knight is offline   Reply With Quote
Old August 6th, 2007   #6
dougfractal
Dipped in Ubuntu
 
dougfractal's Avatar
 
Join Date: Jan 2007
Beans: 590
Gutsy Gibbon Testing
Re: turning off compiz fusion to run application

basic format:

Code:
metacity --replace ; gimp ; compiz --replace &

original format
metacity --replace && sleep 3 ; gimp && compiz --replace &
&& = do next thing on successful complete.
but this would fail to launch gimp if already in metacity



make a script /usr/bin/gamestart
Code:
#!/bin/bash
# gamestart.sh
# Usage:    gamestart application
# turn compiz off for application
if  [ `ps -A | grep "compiz" | wc -l` -gt '0' ]; then
metacity --replace ; $1 ; compiz --replace &
else
$1
fi

Code:
sudo chmod 755 /usr/bin/gamestart

quicklauncher

>Create launcher
>Name: Inkscape
>Command: gamestart inkscape
>Comment: plain old inkscape


Or

Drag icon from menu to Desktop.
Right click> properties > Launcher> command:
add gamestart to the previous command. If there are options use quotes.

example: /usr/games/tremulous --quiet >> gamestart "/usr/games/tremulous --quiet"
__________________
[mouse-drag-select] == COPY && [mouse-middle-click]== PASTE
---- 3D Desktop xorg.conf's ---

ubuntu guide ---- Ubuntu Document Storage Facility ---- "Mark thread as [SOLVED]" using "Thread tools"

Last edited by dougfractal; August 6th, 2007 at 10:57 AM.. Reason: update
dougfractal is offline   Reply With Quote
Old August 6th, 2007   #7
jpereira
5 Cups of Ubuntu
 
Join Date: Aug 2007
Beans: 14
Re: turning off compiz fusion to run application

If you're running Xgl, you might want to take a look at this thread on how to easily run a separate X just for a specific application, thus overcoming the inability to run some 3D games in Xgl.
jpereira is offline   Reply With Quote
Old August 7th, 2007   #8
dougfractal
Dipped in Ubuntu
 
dougfractal's Avatar
 
Join Date: Jan 2007
Beans: 590
Gutsy Gibbon Testing
Re: turning off compiz fusion to run application

Quote:
Originally Posted by jpereira View Post
If you're running Xgl, you might want to take a look at this thread on how to easily run a separate X just for a specific application, thus overcoming the inability to run some 3D games in Xgl.

It costs about 180MB per gnome X session, So if you have Xgl it might be less memory intensive to logout and use the non-xgl Session.
__________________
[mouse-drag-select] == COPY && [mouse-middle-click]== PASTE
---- 3D Desktop xorg.conf's ---

ubuntu guide ---- Ubuntu Document Storage Facility ---- "Mark thread as [SOLVED]" using "Thread tools"
dougfractal is offline   Reply With Quote
Old August 7th, 2007   #9
koshari
Ubuntu Extra Shot
 
koshari's Avatar
 
Join Date: Apr 2006
Location: gippsland
Beans: 345
Re: turning off compiz fusion to run application

i posted a thread to pretty much do the same and had limited success.

heres a copy of my opening post,

seems it would be good to merge the posts as were ultimately trying to acheive the same thing..


ok so stellarium doesnt play well with compiz.

so i are attempting to write a little script that switches the desktop manager back to metacity and then executed stellaruin when compiz is running,

i started with this basic script that is touch and go, works sometimes and not others,

Code:
#! /bin/bash
metacity --replace
stellarium
fi
i think i need something like

Code:
if desktop=compiz
metacity --replace
stellarium
else
stellarium
fi
sometimes the batch will change compiz to metacity but doesnt open stellaruium and site in the process running list as sleeping, and then if you select compiz back it leunches stellarium causing havoc.

does anyone know how i can use the if condition to see if compiz is running so satisfy the following conditions?
koshari is offline   Reply With Quote
Old August 7th, 2007   #10
jpereira
5 Cups of Ubuntu
 
Join Date: Aug 2007
Beans: 14
Re: turning off compiz fusion to run application

Quote:
Originally Posted by dougfractal View Post
It costs about 180MB per gnome X session, So if you have Xgl it might be less memory intensive to logout and use the non-xgl Session.
Well, in that script, it's not running Gnome any window manager or any other application (other than a xterm), it's just running plain old X server, so it barely spends any extra memory at all.
jpereira is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:24 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry