LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Forum rules
Before you post please read how to get help
Post Reply
Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Tue May 21, 2019 10:20 am

After installing LM 19.1 MATE 64bit, I've set it up to use Compiz as the default desktop manager.
I also have Skype in the start-up programms, but when Compiz is used, Skype doesn't start in the background (minimized to tray) properly.
So I decided to use the following bash script, which I added to the start-up programms,
in order to start Mint with "Marco + Compton" and then, with a little delay of a few seconds, start Skype and then Compiz.

Code: Select all

#!/bin/bash

sleep 10

/usr/bin/skypeforlinux %U &

sleep 10

compiz --replace &
Unfortunately, it doesn't start Compiz properly.
It looks like Compiz is started without its settings, so I don't have any effects and no window decoration.

Can anybody tell me how to fix this script to make it do what I want it to, please?

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Wed May 22, 2019 10:00 pm

you can tweak the original start-up procedure instead:

Code: Select all

sh -c “sleep 10s && /usr/bin/skypeforlinux %U”
or might need '%U' in single quote.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Thu May 23, 2019 4:36 am

Sorry, the problem is not to start Skype, but to start Compiz after Skype was started.

Skype does start properly when "Marco + Compton" is used, it just doesn't when Compiz is used.

The command

Code: Select all

compiz --replace &
doesn't work, because Compiz seems to be started without its settings.
So, there are no effects and no window decoration.

That's why I'm trying to start Compiz after Skype was started.

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Sun May 26, 2019 11:28 pm

My apologies, I never saw that reply.
Centauri39 wrote:
Tue May 21, 2019 10:20 am
I've set it up to use Compiz as the default desktop manager.
since Compiz is installed be default with MATE, you mean you simply used the Desktop Settings functionality to select Compiz? just double-checking. You didn't go around installing Compiz ppa's or anything?

I'm just curious about this since Compiz works nicely on my end when using the default provided functionality. And not trying to switch to it after boot like that, just starting clean right from the beginning, Compiz alone.

I can't help with exactly what you are asking for about starting Compiz on your own with shell commands and mixing Skype and stuff.

But, I think, you can let the system start Compiz as it should be, and then simply deal with the Skype window after that.

Leave the Compiz and Skype auto-start entries as stock. and then add another startup entry to wait some seconds, and then close the Skype window(which should tray it). I would suggest remove the "background" setting in Skype. Do something like this:

Skype-minimize

Code: Select all

sh -c "sleep 10s && wmctrl -x -c Skype"
and eventually tweak 10s to whatever is the smallest amount needed.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Tue May 28, 2019 4:17 pm

This is what I did:

First Marco + Compton was the default window manager.

I went to the Control Center, section Display, Desktop settings, Window.

There, I switched to Compiz, after doing my settings in the CompizConfig Settings Manager.

Skype was already set to autostart at boot up.

After the reboot. Skype was started, but it wasn't minimized to tray, but it showed an empty window just like the frame of that window.

As for your code:
Sorry, it doesn't work here.

I also tried to replace

Code: Select all

Skype
by

Code: Select all

skypeforlinux %U
or

Code: Select all

/usr/bin/skypeforlinux %U
All in vain.
With these codes, Skype didn't start at all.

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Wed May 29, 2019 8:10 am

Ok, so Compiz is running as recommended, I was just curious about that.


I've tested 2 versions of Skype. default is 8.34.0.78 and I've used the upgrade as well at 8.45.0.41

Both do work correctly as far as the window does fully open when Skype is starting and it is a fully functioning window including all decorations as normal. After doing some research, these new versions are not providing a minimized-to-system-tray style of functionality. "Launch Skype in the background" is not doing that.

In both cases closing the window with X button minimizes Skype to the panel system area.

The default "Autostart" entry is for Skype and the command says only: /usr/bin/skypeforlinux I do confirm that %U is not provided, and in research it seems these newer versions do not provide any terminal type of interface where any parameters can be available, so that was left over from previous versions.

I did add the autostart item named skype-minimize with that code shown previously. But I do notice that 10s only barely works on this pc since it obviously is taking a full 9 seconds for the Skype window to fully get open and come to rest. then very quickly this 'skype-minimize' command hits it. If i was taking any more time booting then I would surely need more than 10s for it to work, or it would've missed it.

Maybe test it after you've reset Compiz to default settings("Desktop Setting" area). And maybe you should make changes in CCSM after you've activated. It just seems weird, it is working correctly here.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Wed May 29, 2019 11:42 am

Sorry, still no way to start Skype properly, while Compiz is already running.
When I try, I still see an empty window frame, which is quite hard to remove.
To do this, I have to switch to "Marco + Compton", minimize and unminimize Skype and close it.

Then I have to restart Skype and come back to Compiz, which is a terribly annoying procedure, unfortunately.

And I don't have the slightest idea about what to change within CCSM, to prevent this from happening.

So, the only chance I see is to use some sort of a script to start Mint with "Marco + Compton", then start Skype and finally switch to Compiz.

The only problem is, I cannot find the proper commands to do this.

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Wed May 29, 2019 5:44 pm

Centauri39 wrote:
Wed May 29, 2019 11:42 am
, I still see an empty window frame, which is quite hard to remove.
In current internet tube searches, users are saying that you can not start Skype minimized to tray icon like it used to do. And the result is that it glitches the window out and you can't get click reactions or such. So the "Launch Skype in the background" does nothing.. -well, it actually does do something! -it borks the window! ;) So you have to turn that off in the Skype settings.

As for the startup script type of thing, I don't know the answer. Good luck though, seems like a weird thing is going on. Might be hard to figure out.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Thu May 30, 2019 7:03 am

Starting Skype in background does work properly with "Marco + Cromton", it just doesn't with Compiz.
So, I don't have to change anything within Skype, but in Mint.

That's why I want to start Compiz delayed, i.e. after Skype was started.

Let me repeat it, I just need one command line code to start "Marco + Compton", to make sure "Marco + Comton" is used first after Mint was booted,
and then a command line code to start Compiz (including the Compiz settings).

There must be some way to get this done, mustn't it?

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Thu May 30, 2019 2:38 pm

Oh, something like this then:

Code: Select all

sh -c "sleep 25s && compiz --replace"

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Sun Jun 02, 2019 11:57 am

This command doesn't work.
Here's what the terminal said:

Code: Select all

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 : false
compizconfig - Info: Profile     : mint
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 (opengl) - Info: GLX_EXT_buffer_age is supported
Compiz (composite) - Error: Another composite manager is already running on screen: 0
compiz (core) - Info: Loading plugin: compiztoolbox
compiz (core) - Info: Starting plugin: compiztoolbox
compiz (core) - Info: Loading plugin: copytex
compiz (core) - Info: Starting plugin: copytex
compiz (composite) - Error: Another composite manager is already running on screen: 0
compiz (core) - Info: Loading plugin: decor
compiz (core) - Info: Starting plugin: decor
compiz (core) - Info: Loading plugin: grid
compiz (core) - Info: Starting plugin: grid
compiz (core) - Info: Loading plugin: imgjpeg
compiz (core) - Info: Starting plugin: imgjpeg
compiz (core) - Info: Loading plugin: imgpng
compiz (core) - Info: Starting plugin: imgpng
compiz (core) - Info: Loading plugin: matecompat
compiz (core) - Info: Starting plugin: matecompat
compiz (core) - Info: Loading plugin: move
compiz (core) - Info: Starting plugin: move
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: staticswitcher
compiz (core) - Info: Starting plugin: staticswitcher
compiz (core) - Info: Loading plugin: text
compiz (core) - Info: Starting plugin: text
compiz (core) - Info: Loading plugin: winrules
compiz (core) - Info: Starting plugin: winrules
compiz (core) - Info: Loading plugin: wobbly
compiz (core) - Info: Starting plugin: wobbly
compiz (core) - Info: Loading plugin: workspacenames
compiz (core) - Info: Starting plugin: workspacenames
compiz (core) - Info: Loading plugin: animation
compiz (core) - Info: Starting plugin: animation
compiz (core) - Info: Loading plugin: animationaddon
compiz (core) - Info: Starting plugin: animationaddon
compiz (core) - Info: Loading plugin: animationplus
compiz (core) - Info: Starting plugin: animationplus
compiz (core) - Info: Loading plugin: commands
compiz (core) - Info: Starting plugin: commands
compiz (core) - Info: Loading plugin: cube
compiz (core) - Info: Starting plugin: cube
compiz (core) - Info: Loading plugin: rotate
compiz (core) - Info: Starting plugin: rotate
compiz (core) - Info: Loading plugin: td
compiz (core) - Info: Starting plugin: td
compiz (core) - Info: Loading plugin: cubeaddon
compiz (core) - Info: Starting plugin: cubeaddon
compiz (core) - Info: Loading plugin: expo
compiz (core) - Info: Starting plugin: expo
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
compiz (decor) - Warn: requested a pixmap type decoration when compositing isn't available
At this point it got stuck, without returning to the prompt, so I had to close the terminal using the context menu at the tray.

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Sun Jun 02, 2019 5:47 pm

Marco+Compton at default is using the opengl compositor which Compiz is not able to get.

Code: Select all

Compiz (composite) - Error: Another composite manager is already running on screen: 0
Set the default Desktop Setting to only Marco, this way Compiz will be able to setup opengl compositor when starting.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Tue Jun 04, 2019 5:09 pm

I cannot do without Compton, because I need it to avoid screen tearing.

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Tue Jun 04, 2019 6:31 pm

But if you run Compiz, you won't be using Compton anymore, since Compiz is doing composite manager.

When you manually switch it in the Desktop setting, that's what happens. Marco and Compton go away and Compiz takes over entirely. But using this swap-after-startup method, it is not unloading the previous wm + compositor so that's why Compiz can not fully start correctly. Perhaps if you need a compositor during the startup seconds then select Marco+Composite as default. -this is integrated Marco, maybe that switches easier for you with the Compiz swap command.

Centauri39
Level 4
Level 4
Posts: 243
Joined: Sun Mar 23, 2014 2:20 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by Centauri39 » Wed Jun 05, 2019 11:46 am

I think, what I need is this:
Since I want Compiz to be the default window manager, I need a script that switches to Marco or Marco+Compton, start Skype (with its auto-start feature disabled) and then return to Compiz again.
That way, I am without Compiz for only a few seconds, which i guess should be ok.
Do you (or anybody else here) know how to do this, please?

User avatar
zcot
Level 4
Level 4
Posts: 499
Joined: Wed Oct 19, 2016 6:08 pm

Re: LM 19.1 MATE 64bit - How to start Compiz after Skype with bash commands, please?

Post by zcot » Thu Jun 06, 2019 12:00 am

Take the system source code that is activated from within the actual Desktop window manager functionality.

You can find it here: https://github.com/linuxmint/mintdeskto ... r-launcher

-this already considers what previously happened in that GUI selection window, so we can simulate that instead. Download that script file. you could put it in your ~/bin directory(probably have to create that, and this way it is tucked out of the way and also you don't have to use a fully qualified path in your call scripting). Name it for example 'change-wm'. mark it: chmod u+x change-wm (so it can become executable)

Check near line 28: ( https://github.com/linuxmint/mintdeskto ... uncher#L28 )

Code: Select all

if current_desktop == "MATE":
    wm = settings.get_string("mate-window-manager")
else:
    wm = settings.get_string("xfce-window-manager")
and make it look like this instead:

Code: Select all

from sys import argv
script_name, param_2 = argv
if current_desktop == "MATE":
    #wm = settings.get_string("mate-window-manager")
    wm = param_2
else:
    wm = settings.get_string("xfce-window-manager")
Now, you can call that 'change-wm' script with the appropriate parameter (you will see the "parameters" listed in the rest of the file within the 'if' - 'elif' statements) like this:

Code: Select all

change-wm compiz
or:

Code: Select all

change-wm marco-compton

So, now, using that method you can change back and forth in any way and it should firstly unload whatever WM combo is loaded, then load the newly requested option, so start as default, call for marco and/or compton or composite, do Skype, then call back for compiz so you will be back at default. However this is not a good way to change to one or the other and leave it, so going to another WM then back is how this works, -since it doesn't adjust the system settings as far as what the default selection is. Anyway, just something quick and dirty that would also work in this situation.

Post Reply

Return to “Compiz, Conky, Docks, & Widgets”