Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New X11 screen inside of window
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Tue Dec 23, 2014 1:24 am    Post subject: New X11 screen inside of window Reply with quote

Is there any way to make a new desktop, say, screen :1, inside a window on the current desktop? I ask because some fullscreen games like Papers, Please and Borderlands 2 don't work right in Common Desktop Environment.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2889
Location: Illinois, USA

PostPosted: Tue Dec 23, 2014 1:55 am    Post subject: Reply with quote

Look into Xnest and Xephyr
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2889
Location: Illinois, USA

PostPosted: Tue Dec 23, 2014 2:02 am    Post subject: Reply with quote

Example: Using Xephyr to start a remote session (I've got some C++ code that's better, this was just a "proof of concept")

Code:
#!/bin/bash
DEF_RES="1600x1200"
DEF_PASSWORD="password"
DEF_USER="guest"
DEF_HOST="biostar"
DEF_SESSION="mate-session"
if [ -z "$RES" ]; then
    export RES=$DEF_RES
fi
if [ -z "$PASSWORD" ]; then
    export PASSWORD=$DEF_PASSWORD
fi
if [ -z "$REMOTE_USER" ]; then
    export REMOTE_USER=$DEF_USER
fi
if [ -z "$HOST" ]; then
    export HOST=$DEF_HOST
fi
if [ -z "$SESSION" ]; then
    export SESSION=$DEF_SESSION
fi
Xephyr :1   -screen $RES  -once  &
VAL=$?
echo " return value = $VAL"
if  [ $VAL != 0 ]; then
   echo "Xephyr failed"
   exit 1
fi
export DISPLAY=:1
sshpass -p $PASSWORD ssh -Y  $REMOTE_USER@$HOST "$SESSION;"
VAL=$?
if [ $VAL != 1 ]; then
   echo "remote login failed"
   killall Xephyr
   exit 2
fi

echo "remote ssh ended"
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Sun Jan 04, 2015 12:45 am    Post subject: Reply with quote

Well, both Xnest and Xephyr work, but neither one seems to support GLX, which both of those games need.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2889
Location: Illinois, USA

PostPosted: Sun Jan 04, 2015 1:27 am    Post subject: Reply with quote

emerge -1v xorg-server with useflag xnest will get you both.

I'll be glad to share the code and ebuild too. Where can I send them?
Back to top
View user's profile Send private message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Mon Jan 05, 2015 7:04 pm    Post subject: Reply with quote

Thanks! You can send them to silenthunter.vanguard@gmail.com but I don't know if they will help me unless they can make Xephyr or Xnest support OpenGL.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum