Code Monkey home page Code Monkey logo

Comments (22)

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Tested in Xubuntu 14.04 it works just fine:

xubuntu

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

I'll look into this. I'm hoping to solve this without having to install Ubuntu myself. I'll update here tomorrow or sooner if I fix it. Thanks for the report.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Let me know if you need more information or to test something. Thanks for making this awesome little app!

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

I ended up using http://virtualboximages.com/Ubuntu+14.04.01+amd64+Desktop+VirtualBox+VDI to run Ubuntu in Virtual Box. Which was a quick and easy way to run Ubuntu. I will eventually add instructions to my README.md for all the Ubuntu flavors.

Anyway, for some reason, Silentcast worked for me when recording the entire window:

anim.gif

Here is what I did to get the dependencies installed for Silentcast. I've only tested recording the entire window so far, so I don't know if everything works, but that did:

sudo apt-get install bash libav-tools imagemagick x11-xserver-utils xdotool wininfo wmctrl python-gobject pyhon-cairo xdg-utils
sudo ln -s /usr/bin/avconv /usr/bin/ffmpeg    # I tried this instead of installing ffmpeg

Used Firefox to open http://www.ubuntuupdates.org/package/webupd8/trusty/main/base/yad
clicked the "64-bit deb package" button in the Download section and let Software Center install yad

sudo apt-add-repository ppa:gurqn/systray-trusty # This stuff is to get systray notifications working
sudo gedit /etc/apt/preferences.d/systray-trusty

copy and pasted the following into the gedit window:

Package: *
Pin: release o=LP-PPA-gurqn-systray-trusty
Pin-Priority: 600

Then, back to the terminal

sudo apt-get update
sudo apt-get upgrade

Finally, did a reboot, and then ran Silentcast and recorded the entire file-browser window. Seems to work for me.

Oh, but I didn't try to record gedit or gnome terminal. Let me try those now.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

This is the output of xwininfo -id $(xdotool getactivewindow) on gnome-terminal in Ubuntu 14.04:

seth@johnson:~/projects/silentcast$ xwininfo -id $(xdotool getactivewindow)

xwininfo: Window id: 0x5000332 "seth@johnson: ~/projects/silentcast"

  Absolute upper-left X:  796
  Absolute upper-left Y:  354
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 722
  Height: 434
  Depth: 32
  Visual: 0x134
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x500000a (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +796+354  -402+354  -402-292  +796-292
  -geometry 80x24+786+316

Key here is:

  Relative upper-left X:  0
  Relative upper-left Y:  0

I will try some other applications.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

I just took a look at your .gif. That doesn't look like entire window to me. To my mind entire window means it will include the titlebar (without moving the window around). If you look at my gedit examples one includes the titlebar, the other doesn't.

Maybe your meaning for entire window is different from mine?

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

OK - yeah, I see that I moved the window and that's the only reason I got the title bar. OK. And here is gedit:

anim.gif

Well, now I can work on fixing this.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

I will try to find out what needs to be done to get the size of the title bar and borders since for some reason xwininfo is giving the wrong answer.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

Google isn't giving me anything. I've posted the question on stackexchange and stackoverflow:

http://unix.stackexchange.com/questions/157613/how-to-get-the-full-window-dimensions-in-unity-on-ubuntu-14-04

http://stackoverflow.com/questions/26050788/in-bash-on-ubuntu-14-04-unity-how-can-i-get-the-total-size-of-an-open-window-i

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Google didn't help me either. Would manually allowing for the decorations work?

If it helps, it appears the titlebar is between 25 and 30 pixels in height:

workspace 1_033

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

I managed to use some manual tweaking for the window decorations. I changed line 176 of genffcom (let y=$y-t) to:

let y=$y-28  

This captured the top window decorations. Unity doesn't have any others, so we should be ok. I tested on gnome-terminal and gedit. Both worked.

anim

This can be scripted by changing:

    if [ "$entire" = true ]
    then
        let x=$x-$b
        let y=$y-28 #$t
        let w=$w+2*$b
        let h=$h+$t+$b
    fi 

to:

    if [ "$entire" = true ]
    then
            if ["$XDG_CURRENT_DESKTOP" == "Unity"]
            then
                let x=$x-$b
                let y=$y-28 #$t
                let w=$w+2*$b
                let h=$h+$t+$b
            else
                let x=$x-$b
                let y=$y-$t
                let w=$w+2*$b
                let h=$h+$t+$b
            fi
    fi

I also tested in Xubuntu and it didn't affect it. I will do some more testing, but this seems like it will probably solve the issue.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

When I tested the system settings some of the bottom was getting clipped, so I had to change it too:

    if [ "$entire" = true ]
    then
            if ["$XDG_CURRENT_DESKTOP" == "Unity"]
            then
                let x=$x-$b
                let y=$y-28 #$t
                let w=$w+2*$b
                let h=$h+$t+$b+10
            else
                let x=$x-$b
                let y=$y-$t
                let w=$w+2*$b
                let h=$h+$t+$b
            fi
        fi

(Note the +10 on h)

That fixed it in the settings.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

Thank your for working on this. For now, I'm not going to put set numbers into it for Unity, but might end up doing that. I've found information that says you are right about the 28, but I think the other borders are 1, and the 10 comes from "the extra size of the input areas". I think you should be setting $b to 1, and adding 10 was correct.

I've sent an email to the author of this page about Unity Theming: https://wiki.ubuntu.com/Unity/Theming. I'm hoping he will answer the question on stack exchange because I'm sure he can. Maybe I can figure it out, but the info on that page isn't making a lot of sense to me at the moment.

I also filed a bug against xorg about xwininfo on Ubuntu 14.04 under Unity, but will be surprised if anyone does anything about it.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

By the way, I don't know if you noticed when you used Silentcast on Xfce, but when you use the transparent window, the title of it tells you the hot key for grabbing the borders with the mouse for resizing. I put that there since so many people use 1px themes that are nearly impossible to grab. I would like to do the same for all the other popular desktops, and had asked this question:

http://unix.stackexchange.com/questions/156083/from-a-bash-script-is-there-a-way-to-get-the-keybinding-for-resize-window

Maybe you'd like to work on an answer for that for Unity?

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

I have posted this question in the proper place now where I think it will eventually be answered:

https://answers.launchpad.net/unity/+question/255025

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

My question was answered and I'm going to have a new version out today. Not sure if I will work on it right away though.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

OK - Finally did this. A new version of genffcom is in this repository now. Luckily, the answer I got works for xfwm4 as well as for Unity, so I don't have to test for what window manager is running. I didn't end up using the extra 10px input area though, so let me know if you're still missing something off the bottom. In my tests, nothing was missing from top or bottom when ignoring the input area. I found that the input area is an extra 10px all around the window and responds when you put your mouse pointer in it as if it was an invisible border. That's why it's so easy to resize Unity windows even though the border is 0 width.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

When you have a chance, let me know if this latest version works properly for you. Then, I'll close this issue. Thanks for this bug report so I could get Silentcast working on Ubuntu.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Awesome, testing now. I see you also fixed the full screen issue. I had already fixed that in my fork, but your fix is better.

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Yup, seems like it works fine! I tested both gnome-terminal and system-settings. No issues. Thanks!

from silentcast.

Seth-Johnson avatar Seth-Johnson commented on August 22, 2024

Oops, closed it myself. Hope you don't mind.

from silentcast.

colinkeenan avatar colinkeenan commented on August 22, 2024

I guess it makes sense for the person who opened an issue to also close it. Thanks.

from silentcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.