I've now run into two instances where I've received errors because the ~/.Xauthority file is required but is missing from my user folder. I have read that the .Xauthority file has been deprecated, and the function has moved to:
/var/run/gdm/auth-for-<USER>-<RANDOM_CHARACTERS>/database`
I have attempted the solution provided in How do I create the .Xauthority file?. Which suggests I make a symbolic link from $XAUTHORITY to ~/.Xauthority upon startup. But this method has has not worked for me. I've also tried running that command and variations of it in the terminal, but without success. I am running, in vmware workstation 8, a minimal install of ubuntu server 11.10 64bit with xfce4 on top.
The error, "Unable to copy the user's Xauthorization file", I've received twice now. First when attempting to open a root terminal from the Thunar context menu, using the 'custom action' feature, with the commandgksu "xfce4-terminal -default-working-directory=%f". Then again, when attempting to install truecrypt, which gives me the error a few steps into the installation process.
Is there another way to go about this? And, more fundamentally, why do applications still rely on this file if it has been deprecated? Since they do, why isn't a link provided by default until the software catches up? I understand things are not always so tidy, and also that I may be missing something important and basic, so please forgive my impudence.
"ln: creating symbolic link /home/jds/.Xauthority' -> ': No such file or directory"when I runln -s "$XAUTHORITY" ~/.Xauthority. when I runls -l "$XAUTHORITY ~/.XauthorityI receive the errorls: cannot access : No such file or directory ls: cannot access /home/jds/.Xauthority: No such file or directory– user55968 Apr 21 '12 at 20:39XAUTHORITYenvironment variable is not set. If you have neither$XAUTHORITYnor~/.Xauthority, you can't run X commands. Usually, you shouldn't be running GUI commands as root. – Gilles 'SO- stop being evil' Apr 21 '12 at 20:54XAUTHORITYenvironmental variable? Also would you mind explaining the last sentence for me? Have I been unknowingly running GUI commands as root? As you can see, I am insufficiently familiar with the innerworkings my ubuntu system. – user55968 Apr 21 '12 at 21:45xfce4-terminalis a terminal emulator, it's a GUI program. When you rungksu xfce4-terminal, the terminal emulator is running as root, which is not necessary: at most, you may need to have the shell (the command interpreter) running as root. If you really need to run a GUI command as root, you can runsudo env XAUTHORITY="$XAUTHORITY" gui_command_that_needs_to_be_run_as_rootin any terminal. – Gilles 'SO- stop being evil' Apr 21 '12 at 21:54sudo ./truecrypt-installer-filesolved the installation problem. Thank you again. – user55968 Apr 21 '12 at 22:34