Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Script to run skype inside a restricted environment.
#!/bin/sh
RESOLUTION=800x600
X_DISPLAY=7
# Save the current keyboard layout, since we want to configure Xephyr
# to use the same
LAYOUT=$(setxkbmap -query | grep layout | cut -d" " -f6)
Xephyr -screen $RESOLUTION -host-cursor -br :$X_DISPLAY &
# Sleep a second while Xephyr start.
# FIXME: There's probably a more elegant way to know when it has finished
# starting up.
sleep 1
export DISPLAY=:$X_DISPLAY
xhost +SI:localuser:_skype
sudo -u _skype setxkbmap -layout $LAYOUT
# Use some lightwight WM because we'll be unable to switch windows otherwise.
sudo -u _skype blackbox &
# Use a tray or we'll loose access to skype when we close the main window.
sudo -u _skype trayer --align right --width 5 &
# Launch Skype
sudo -u _skype /var/skype/skype
# After skype exits, clean everything else
# FIXME: Check which signal to use, because sometimes you kill Xephyr, but it
# doesn't release the DISPLAY
exit
sudo -u _skype pkill -u _skype
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.