Xubuntu 14.04需管理员权限的应用无法启动故障求助
Hey there, let's work through this annoying issue with your Xubuntu 14.04 system—where every app that needs admin password (like GParted, Update Manager, or opening folders as root) won't launch even after entering the correct password. I've debugged similar problems before, so here are actionable steps to fix it:
Polkit is the service that handles permission requests for admin-level apps. If it's stuck or not running, that's almost certainly the culprit.
- First, check if the polkit daemon is active: run
ps aux | grep polkitdin your terminal. You should see a line withpolkitdrunning under thepolkitduser. - If it's not running, restart it with
sudo service polkit restart(Xubuntu 14.04 uses Upstart, so this command works instead of systemctl). - If restarting doesn't help, reinstall the polkit package to fix any corrupted files:
sudo apt-get install --reinstall policykit-1
gksudo is the tool that handles graphical admin prompts, and sometimes its lock file gets corrupted.
- First, try launching the app directly from a root terminal to see if it works: run
sudo -ito get a root shell, then typegparted(or the app you're trying to open). If it launches here, the issue is with gksudo's configuration. - Delete the gksudo lock file:
rm ~/.gksu.lock, then restart your system and test again.
Incorrect permissions on system directories or user files can break permission validation:
- Check the
/tmpdirectory permissions (it needs to be world-writable with sticky bit): runls -ld /tmp. The output should bedrwxrwxrwt. If not, fix it withsudo chmod 1777 /tmp. - Verify your
~/.Xauthorityfile (this handles X session permissions): runls -l ~/.Xauthority. It should be owned by your user (not root). If it's owned by root, fix it withsudo chown $USER:$USER ~/.Xauthority.
Sometimes corrupted user configuration files cause this issue. Let's rule that out:
- Create a new admin user:
sudo adduser newadminand follow the prompts, then add them to the sudo group:sudo usermod -aG sudo newadmin. - Log out and log back in as
newadmin, then try launching an admin app. If it works, your original user's config files are damaged. You can either migrate your data to the new user or troubleshoot individual config files in your original home directory.
A full root partition can prevent apps from launching even if they have permission.
- Run
df -hto check disk usage. Look at the/partition—if it's 100% full, you need to free up space:- Delete old package cache:
sudo apt-get clean - Remove unused packages:
sudo apt-get autoremove --purge - Delete old log files in
/var/log/(be careful not to delete active logs!)
- Delete old package cache:
If none of these steps work, share any error messages you see when running the app from a root terminal—those will help narrow down the issue further.
内容的提问来源于stack exchange,提问作者qwerty193

