Watch videos while playing fullscreen games on Linux

My second monitor died recently and now I miss watching videos while playing games in fullscreen.
Does anyone know of a way to have something like picture in picture on linux?

Here's an image to illustrate what I mean:

Or maybe simulate a second monitor in a small region of the main monitor.

Anyone has an idea for this?

By the way, I'm using gnome 3 with Arch.

Thanks

Right click the title bar and press always on top?

1 Like

I tried that but then the window only stays on top of other windows. I can however play games in windowed mode and have a browser, with "always on top" turned on, playing videos in a corner, it's an idea,,,
would be nice to have a more elegant solution though

Hmm now I think about it this you might end up clicking on the window by accident unless the game locks the cursor to the centre :/ .
Very frustrating, I can visualise what you want but I am too much of a noob to know if it exists or is even possible.

That's fine,
Thanks anyway

This is the closes thing I could find.

The budget solutions seems to work fine with CS:GO with i3.

Also could use Xnest to run a game in fullscreen in a window.
http://www.x.org/archive/X11R7.5/doc/man/man1/Xnest.1.html

Some monitors have options for hooking up multiple inputs and displaying both at the same time, like how you describe.
Look in the OSD Menus for something called PiP/PdP
Otherwise try using you phone as a secondary monitor if you have a smart phone.

Is this a standard on newer monitors or is it a pretty niche feature?
Yeah I read a post where someone created a virutal X display and sent it via vnc to his tablet, very laggy though. Are you suggesting that or a different method?

Can you try using a windowed mode for the game at the same resolution as your display?
Then try the always on top for the video.
That should work.
I have been playing XCom 2 a bunch on Fedora.

I can try to recreate this next time I load XCom.

It's been around for quite a while, I've seen it used in CRT TVs and I have it on my upstar 4k and AOC 1080p monitors, just something to look for.
I was thinking about the app iDisplay or splashtop
iDisplay isn't free and it either works or it doesn't.

The problem especially with a mouse driven game like xcom is you'd need to be able to click through the video/browser window to reach some menus (it would have to be translucent as well - using something like compton).

@Xeth
Fair enough, I'll keep that in mind for when I buy a new monitor.
Those apps might have less latency than a vnc server & client because of the lack of input required but that is most likely an option for vnc.

Hmm good point.

I think if the mouse is bound to the window it should work. I think lol.

Ill still give it a shot tomorrow.

Yeah it works with CS:GO in game but not in menus.

This will not answer your question, but it was something I was struggling with a while back as well.

I think the OS that can solve this will make a big step in pc consumption.

My monitor doesnt have pip but it has PbP, it splits the screen vertically in half for a second input and works as two weird 1280x1080 (almost square) monitors.
I guess I'll just use my smartphone.

This video perfectly describes what I'm talking about.

I wonder what @wendell thinks of this, as I've heard him say in a Tek Syndicate video that he would rather use a very big high res monitor instead of a few smaller ones.

This is a good solution for some old games that dont scale well to Wide 16:9 or even Ultrawide 21:9 monitors. My monitor is 21:9 and I play Doom with black borders that I could be using for other apps.

You should've mentioned your monitor was 21:9! :p
fakexrandr is what I'd do in your shoes.
It even has a GUI! You can draw the lines so you're not limited to what's in the picture.

1 Like

Seems nice. I'm trying to install fakexrandr but I'm getting too many errors.
This seems like a pretty good solution, I should probably look into making it work later.

Tried to install on arch, got some errors. Pretty much copied the fix from a similar error from earlier today.

It compiled without any problems however the program didn't work for me :/.

Here's the updated PKGBUILD though:

# Maintainer: Philipp Schmitt [email protected]
# Upstream: https://github.com/phillipberndt/fakexrandr
pkgname=fakexrandr-git
pkgver=r68.bb5ee75
pkgrel=1
pkgdesc="Fake XRandR configurations for multi-head setups with crappy video drivers, like fakexinerama but with xrandr"
arch=(any)
url="https://github.com/phillipberndt/fakexrandr"
license=('GPL')
depends=('xorg-xrandr')
makedepends=('git' 'glibc' 'sed' 'python2')
source=("$pkgname"::'git://github.com/phillipberndt/fakexrandr.git')
sha1sums=('SKIP')

_pkgname=fakexrandr
libdir=/usr/lib/$_pkgname

pkgver() {
cd "$srcdir/$pkgname"
# Use the tag of the last commit
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
cd "$srcdir/$pkgname"
# Fix python interpreter (python -> python2)
sed -i '1s/python/python2/g' make_skeleton.py
# Add custom fakexrandr lib path (bypass detection)
sed -i "s|^(FAKE_LIBRARY_DIRECTORY=)$|\1${libdir}|" configure
# FIXME THIS AINT WORKING
# Fix missing target
sed -i "s|(install) (.) (.);|\1 \2 \3/\2;|" Makefile
# Fix missing DEST_DIR in Makefile
sed -i "s|(TARGET_DIR=).*|\1${pkgdir}${libdir}; \\|" Makefile
# Don't even try to run ldconfig now
sed -i "s/(ldconfig)/#\1/" Makefile
# Create ld.so.conf.d config file
echo "$libdir" > "${_pkgname}.conf"
}

build() {
cd "$srcdir/$pkgname"
./configure
make
}

package() {
cd "$srcdir/$pkgname"
echo cd "$srcdir/$pkgname"
mkdir -p "$pkgdir/$libdir"
mkdir -p "$pkgdir/usr/bin"
make PREFIX="$pkgdir/usr" install
install -D -m 644 "${pkgname}.conf" "$pkgdir/etc/ld.so.conf.d/${pkgname}.conf"
}

# vim: set et ts=2 sw=2 :

I have no idea what I'm doing lol.

Edit:

Can't get it to work even in CLI :/ , been messing around with the python code and only fixed one error that had the solution in the error message (though I've only been properly learning for less than 6 months).