Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to run the desktop with Xrdb - Much better perf with Xephyr! #792

Open
chuckmarcotte opened this issue Nov 22, 2024 · 1 comment

Comments

@chuckmarcotte
Copy link

Install Xephyr and Xfce4 first.

$ cat ~/launch_desktop.xfce4 

#!/bin/bash
echo "Current DISPLAY=$DISPLAY"
echo "Finding a free DISPLAY number"
for i in $(seq 1 20);
do
    DISPLAY=":$i" xset q >/dev/null 2>/dev/null ; RET=$?
    if [ "$RET" -ne "0" ] ; then
        export NEW_DISPLAY=":$i"
        break;
    fi
done
echo "Starting Xephyr and a new desktop on DISPLAY=$NEW_DISPLAY"
export XEPHYR_ID 
export DISPLAY
{
    Xephyr "$NEW_DISPLAY" -title "XFCE4 Desktop for $USER" -once -screen 2560x1080 -resizeable >/dev/null 2>/dev/null & XEPHYR_ID="$!" 
    DISPLAY="$NEW_DISPLAY" startxfce4 >/tmp/launch_desktop_xfce4.log 2>&1
    kill $XEPHYR_ID 2>/dev/null
} &

Chuck Marcotte

http://www.linkedin.com/in/charles-marcotte

@chuckmarcotte
Copy link
Author

Better:

#!/bin/bash
echo "Current DISPLAY=$DISPLAY"
echo "Finding a free DISPLAY number"
for i in $(seq 1 20);
do
    DISPLAY=":$i" xset q >/dev/null 2>/dev/null ; RET=$?
    if [ "$RET" -ne "0" ] ; then
        export NEW_DISPLAY=":$i"
        break;
    fi
done
echo "Starting Xephyr and a new desktop on DISPLAY=$NEW_DISPLAY"
export XEPHYR_ID 
export DISPLAY

nohup Xephyr "$NEW_DISPLAY" -title "XFCE4 Desktop for $USER" -once -screen 2560x1080 -resizeable >/dev/null 2>/dev/null & XEPHYR_ID="$!" &
sleep 2
DISPLAY="$NEW_DISPLAY" nohup startxfce4 >/tmp/launch_desktop_xfce4.log 2>&1 &
disown -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant