There are quite a few bug reports on the kde bug tracking system about kde losing display settings on logout (e.g. Bug 183143). But since this problem has been present for a couple of years and is still existing in the latest version of KDE (i.e. 4.8.5 at this writing), here’s a workaround:
Add a parameter called StartupCommands to the krandr configuration file (usually located at ~/.kde/share/config/krandrrc that adjusts your display layout using xrandr on login:
[Display]
ApplyOnStartup=true
StartupCommands=xrandr --output "HDMI-0" --primary --output "VGA-0" --right-of "HDMI-0"
You also need to make sure that the command is invoked on login by setting the ApplyOnStartup parameter to true.
The actual xrandr command may of course look different, depending on the actual number and layout of screens. So YMMV!
Based on Harald Hoyer’s great tutorial on boot time optimization for Fedora 17, here’s a list of services I usually disable on my Fedora 17 boxes:
cd /lib/systemd/system
for i in abrt* auditd* sendmail* sm-client* firstboot* ip6tables* fedora*storage* plymouth-*.* lvm2-monitor.* mdmonitor*.*;
do
systemctl mask $i
done
for i in livesys livesys-late spice-vdagentd ; do sudo chkconfig $i off;done
This is just a memory hook for myself. YMMV and of course what’s expendable depends on the configuration you use on your box.
For an explanation of the systemctl mask command have a look at Lennart Poettering’s systemd tutorial or the systemctl manpage.
There are basically two ways of archiving this
Changing rsync’s rsh parameter
You can simply feed ssh with a different port parameter as remote shell to ssh:
$ rsync -a --inplace --rsh='ssh -p12345' file user@remotehost:dir/
Create a per host config for ssh
Add a Host entry to ~/.ssh/config
[...]
Host foobar
Port 12345
User user
Hostname host.example
and invoke rsync with that alias
$ rsync -a --inplace file foobar:dir/