colinkeenan / silentcast

Create silent mkv screencast and animated gif.
GNU General Public License v3.0
512 stars 22 forks source link

Transparent window is black #8

Closed gilibaus closed 9 years ago

gilibaus commented 9 years ago

Hi I have done a full install of Silentcast on Lubuntu 14.10. When I choose Transparent Window Interior, the resulting window is actually black, no transparency at all. Why? Can it be fixed? Thanks.

colinkeenan commented 9 years ago

You need a compositor since LXDE doesn't have one built in. Compositor's handle special effects like transparency and shadows. I've been Googling to find out what you should do, and you're in luck, the light-weight compositor compton is available without PPA in 14.10, so you can install it with apt-get:

sudo apt-get install compton

If you just want to find out if it will work, just run it from the command line and then try silentcast again:

compton

You will have to keep the terminal window open with compton running in it. Stop compton by closing the window. If you want compton to run in the background so you can close the terminal (or run other stuff in that terminal), then:

compton -b

If you want it to start on logging into LXDE, you have to edit the autostart file. The instructions I could find specifically for autostarting compton in Lubuntu say to edit /etc/xdg/lxsession/Lubuntu/autostart, but you normally shouldn't edit system-wide files requiring sudo if you can avoid it because you may lose your edits on an update. Better to have configuration files in your home directory if it's possible.

It turns out, LXDE does look at a file in your home directory to autostart stuff, it looks in subdirectories of the hidden directory .config (notice the leading dot that makes it hidden). I don't know if the necessary subdirectories already exist, so I'll give the command to create them first before giving the command for editing autostart. This is how to edit/create autostart (no sudo required):

mkdir -p ~/.config/lxsession/LXDE
leafpad ~/.config/lxsession/LXDE/autostart

Actually though, looking at the location of the system-wide autostart, you may have to replace LXDE with Lubuntu. If ~/.config/lxsession/Lubuntu already exists, just put autostart there.

Now you can put whatever you want autostarted into that file. Just put @ in front of each command:

@compton -b

If you want to configure compton, you can have a more elaborate command spelling out the configuration on the command line, or telling it where to look for a configuration file. Here is an example using a configuration file:

@compton --config ~/.config/compton.conf

Where you would copy compton.sample.conf to ~/.config/compton.conf:

I would personally do it this way since the configuration file explains what you are configuring.

Otherwise, the following has been suggested for the autostart file, and you would have to read the man page of compton to know what it means:

@compton -c -r 16 -l -24 -t -12 -G -b
colinkeenan commented 9 years ago

Please let me know what you try from my instructions and if it works for you. I will close the issue if it works.

gilibaus commented 9 years ago

Hi Colin, thanks for your reply. It works. I have installed Compton Compositor via sudo apt-get install. Then I have made it autostart opening Menu --> Preferences --> Default applications for LXSession --> Autostart section --> and adding "compton" into the Manual autostarted applications field. Now Silentcast shows a transparent window when setting up the recording area. Thanks again.

colinkeenan commented 9 years ago

Thanks for the information on how to autostart without editing a file. I just would like a little more feedback before I close this issue to help others. I assume you are using the -b option to run it in the background. Did you add other options to configure compton, either all spelled out with the command or using the --config option to tell it where a config file is? If you used --config, did the sample file I pointed you to work out? If you spelled out everything as options, did you just copy and paste the suggested one or did you read the man page. What options did you end up using and why?

gilibaus commented 9 years ago

Hi Colin,

I actually did not do anything special. To configure compton I just downloaded and installed compton-conf from here: http://ppa.launchpad.net/lubuntu-dev/lubuntu-daily/ubuntu/pool/main/c/compton-conf/

After installation, a new item called Window Effect is created in Menu -> Preferences. From there you can configure compton, but I did not change anything in there as compton was already working fine for me.

Sorry if I cannot give you much help.


Da: Colin Keenan [mailto:notifications@github.com] Inviato: martedì 18 novembre 2014 17.43 A: colinkeenan/silentcast Cc: gilibaus Oggetto: Re: [silentcast] Transparent window is black (#8)

Thanks for the information on how to autostart without editing a file. I just would like a little more feedback before I close this issue to help others. I assume you are using the -b option to run it in the background. Did you add other options to configure compton, either all spelled out with the command or using the --config option to tell it where a config file is? If you used --config, did the sample file I pointed you to work out? If you spelled out everything as options, did you just copy and paste the suggested one or did you read the man page. What options did you end up using and why? — Reply to this email directly or view https://github.com/colinkeenan/silentcast/issues/8#issuecomment-63501528 it on GitHub. https://github.com/notifications/beacon/AD-tyGP3Jx7GFyDyQFQe8vzl9fCfntmlks5 nO26wgaJpZM4C8vM3.gif

colinkeenan commented 9 years ago

That is very helpful I'm sure for anyone else with the same issue. Thanks.