Showing posts with label fullscreen. Show all posts
Showing posts with label fullscreen. Show all posts

Monday, February 24, 2014

Linux rdesktop fullscreen script

Under Linux with Gnome for example, you might want to rdesktop into a windows host and go full screen. However then it’s a real pain to reduce the window and switch between running apps, so you end up trying to find out the most appropriate resolution for your rdesktop session.

Here is a shell script to detect the screen dimensions, excluding the window manager’s top and bottom bars, and remove the rdesktop window decorations. Also it will map your /tmp and /home/user into the remote desktop session.

Adjust the number of pixels to exclude according to your configuration. I found the value 50 appropriate for a standard gnome-shell in classic mode, each of the bars being 25px.
#!/bin/bash
Xaxis=$(xdpyinfo | grep dimensions | awk '{print $2}' | cut -dx -f1)
Yaxis=$(xdpyinfo | grep dimensions | awk '{print $2}' | cut -dx -f2)
MaxRes=$Xaxis"x"$(($Yaxis-50))
rdesktop $1 -5 -u "$2" -g $MaxRes -r disk:home=${HOME} -r disk:tmp=/tmp -r clipboard:PRIMARYCLIPBOARD -D -K
And then you can run:
sh rdesktop.sh 192.168.0.10 MyUsername
Now go create a launcher for that.