- 浏览: 4411048 次
- 性别:
- 来自: 厦门
文章分类
- 全部博客 (634)
- Oracle日常管理 (142)
- Oracle体系架构 (45)
- Oracle Tuning (52)
- Oracle故障诊断 (35)
- RAC/DG/OGG (64)
- Oracle11g New Features (48)
- DataWarehouse (15)
- SQL, PL/SQL (14)
- DB2日常管理 (9)
- Weblogic (11)
- Shell (19)
- AIX (12)
- Linux/Unix高可用性 (11)
- Linux/Unix日常管理 (66)
- Linux桌面应用 (37)
- Windows (2)
- 生活和工作 (13)
- 私人记事 (0)
- Python (9)
- CBO (15)
- Cognos (2)
- ORACLE 12c New Feature (2)
- PL/SQL (2)
- SQL (1)
- C++ (2)
- Hadoop大数据 (5)
- 机器学习 (3)
- 非技术 (1)
最新评论
-
di1984HIT:
xuexilee!!!
Oracle 11g R2 RAC高可用连接特性 – SCAN详解 -
aneyes123:
谢谢非常有用那
PL/SQL的存储过程和函数(原创) -
jcjcjc:
写的很详细
Oracle中Hint深入理解(原创) -
di1984HIT:
学习了,学习了
Linux NTP配置详解 (Network Time Protocol) -
avalonzst:
大写的赞..
AIX内存概述(原创)
使用Ubuntu和Fedora的用户经常会在进入GNOME时出现Could not update /home/$USER/.ICEauthority这样的提示。然后就不能正常进入GNOME了(之前在GNOME上的配置都消失了)
解决办法:以root的用户执行chown $USER:$USER -R /home/$USER/
chmod 644 /home/$USER/.ICEauthority
解决问题很简单,但为什么会出现这种情况呢?下面是我的一些个人理解
首先:先介绍下sudo和gksudo
sudo和gksudo都是使用root权限来执行应用,sudo执行程序时使用的是当前用户的配置和家目录,而gksudo使用的是root用户 的家目录和配置,一般情况下看不出什么区别,但是对于那些针对不同用户有不同的配置文件和表现形式的应用程序来说,这两种方式的结果区别就很明显了。比如 下面原文中举的firefox例子。在不通过终端运行程序时,sudo没有办法提供一个界面来输入管理员密码,比如在快捷方式中。还有些GUI程序只能用 gksudo。细心的朋友肯定发现了,在/root下并没有.ICEauthority。那么当用sudo运行程序之后,由于使用的是当前用户的配置和家 目录,
系统将整个家目录的所属者和所属组归属到root:root下,并将.ICEauthority的权限修改成600。故当再次以普通用户身份登入系统时,由于没有权限故无法读取用户的配置文件。根据上述分析,显然,当使用gksudo将能避免这种情况的发生。
一般情况下,可以这样,运行命令行程序时使用sudo,运行GUI程序时用gksudo。
下面是原文:
What’s the Issue?
Since
most Ubuntu documentation asks you to use sudo even with graphical
applications, I often get asked by Ubuntu users why I recommendgksudo or
kdesu for graphical applications instead of sudo.
For example, a lot of guides (including the first book ever published about Ubuntu) will ask you to type this sort of command:
sudo gedit /etc/apt/sources.list
I will always recommend, however, that people use instead this sort of command:
gksudo gedit /etc/apt/sources.list
And reserve sudo for command-line applications, like so:
sudo nano /etc/apt/sources.list
Why is it an issue?
Well,
to be perfectly honest, most of the time it isn’t. For a lot of
applications, you can run them the improper way—using sudo for graphical
applications and see no adverse side effects.
1. There are other
times, though, when side effects can be as mild as Firefox extensions
not sticking or as extreme as as not being able to log in any more
because the permissions on your .ICEauthority changed. You can read a
full discussion on the issue here.
These errors occur because sometimes when sudo launches an application, it launches with root privileges but uses the user’s configuration file.
For example, if you launch Firefox with the command
gksudo firefox
it uses root’s Firefox configuration file.
But if you launch Firefox with the command
sudo firefox
Change a few settings while launched as root, and you'll see if you dig into your Firefox profile that certain files are now owned by root.
it
runs with root privileges but uses the user’s configuration file (in
this case, you can see the homepage and theme are different).
2.
Running graphical applications with sudo also has the downside of always
having to be run from the terminal. If you don’t use the proper
command—gksudo or kdesu, you will not be able to use the command as an
icon launcher or keyboard shortcut because there will be no graphical
dialogue box to enter your sudo password in.
3. There are also some graphical applications that simply will not run with the sudo command. Kate, for example, can be run as
kdesu kate
but cannot be run as
sudo kate
Why not make exceptions?
Bottom
line: most of the time when you use sudo for graphical applications,
it’s fine. Some of the time, though, it is not fine, and is, in fact,
extremely bad.
If you made exceptions, you would have to give
people a list of all the graphical applications that are okay to run as
sudo and a list of all the graphical applications that must be run as
gksudo or kdesu.
Why make a list that needs to be compiled and
updated, that most people won’t refer to, and that is completely
unnecessary? Just be consistent in suggesting good practice: gksudo and
kdesu for graphical applications. sudo for command-line applications.
But gksudo sometimes gives me an error… even though it appears to work…
You may notice that even though gksudo is the proper way to
launch graphical applications, if you launch a gksudo application it
will sometimes give you what appears to be an error. This, for example:
(
gedit:####): GnomeUI-WARNING **: While connecting to session manager:
Authentication
Rejected, reason : None of the authentication protocols specified are
supported and host-based authentication failed.
or t hese
Initializing nautilus-gdu extension
Nautilus-Share-Message:
Called "net usershare info" but it failed: 'net usershare' returned
error 255: net usershare: cannot open usershare directory
/var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.
That
is not a real error, and there’s already been a bug report filed on the
message appearing. The developers have seen the bug and labeled it a
low priority. In the meantime, just ignore the message and keep
encouraging people to not use sudo for graphical applications so they
won’t potentially mess up their ~/.ICEauthority and other user
configuration files.
参考至:http://www.psychocats.net/ubuntu/graphicalsudo
原创文章,转载请注明出处、作者
如有错误,欢迎指正
邮箱czmcj@163.com
发表评论
-
Sublime-Text-3-OmniMarkupPreviewer
2016-10-21 15:42 3029Markdown 创立的宗旨是实现「易读易写」。其语法简洁直 ... -
安装Fedora-Scientific_KDE后做的事(原创)
2016-10-01 09:20 1816这篇文章用于记录个人在安装了Fedora-Scientif ... -
How to Uninstall (or Reinstall) Windows 10’s Ubuntu Bash Shell
2016-09-19 22:35 1848How to Uninstall (or Reinstall ... -
Linux下./configure,make,make install的作用
2016-09-19 12:12 1771./configure是用来检测你的安装平台的目标特征的。 ... -
rpm包指定安装路径
2016-09-19 12:10 1366rpm包一般都有默认的安装路径,如何你要更改默认路径,有没有 ... -
linux字体安装
2014-12-12 15:12 1408Google查了一下,果然Windows下的ttf字体与G ... -
Linux终端乱码的解决办法
2014-12-12 13:54 1450用SSH连接Linux时经常会遇到乱码的情况,痛苦了好久,在 ... -
yum安装openoffice
2014-12-12 13:34 833安装方法如下: 1、首先安装openoffice.org套 ... -
Linux下yum源配置
2014-12-12 12:30 1123redhat linux 配置yum详解 修改浏览权限 | ... -
VirtualBox修改UUID实现VM复制
2014-05-02 15:24 2849在自己的机器上安装完虚拟机后,想当然在windows下直接 ... -
ubuntu下DbVisualizer 中文乱码,包括JAVA 乱码
2012-01-09 16:32 30181. 在 jre/lib/fonts/ 下建立个目录 fall ... -
Fedora之编辑菜单
2011-12-27 16:03 1625前段时间为自己的Fedora13安装了一个wine,顺便装了一 ... -
Fedora14上Libreoffice的安装与卸载(原创)
2011-09-14 15:38 5240经过笔者使用发现OOO相比于Office实在还是很有差距,在这 ... -
Fedora14字体美化
2011-08-05 12:27 2480Fedora默认的字体渲染效果在各个发行版的中算是首屈一指了, ... -
Fedora中文输入法的安装配置
2011-06-27 20:56 3722Fedora中文输入法的安装 ... -
Fedora14升级到Fedora15问题汇总(原创)
2011-06-02 14:24 3124使用preupgrade升级 ... -
Fedora 14组建Ad-hoc无线网络共享Win7上网(原创)
2011-04-02 21:09 3079客观情况 家里有两台笔记本电脑需要上网,一条有线宽带 ... -
Fedora 14 下安装Chromium(原创)
2011-04-02 21:02 2078Fedora 14默认没有安Chromium,下面采用yum的 ... -
Ubuntu的3D特效
2011-02-20 20:50 3710* 第一部分: ... -
Linux下查看txt文件
2011-02-20 20:49 5138GEDIT gedit ...
相关推荐
在Ubuntu 9.10操作系统中,用户可能会遇到“Could not update ICEauthority file”的错误,这是一个与图形界面登录相关的权限问题。ICEauthority文件是X Window System中用于存储认证信息的文件,它允许用户无须反复...
META-INF/MANIFEST.MF com.ice.jni.registry.HexNumberFormat.class com.ice.jni.registry.NoSuchKeyException.class com.ice.jni.registry.NoSuchValueException.class com.ice.jni.registry.RegBinaryValue.class ...
com.ice.jni.registry.RegMultiStringValue.class com.ice.jni.registry.RegBinaryValue.class com.ice.jni.registry.RegistryException.class com.ice.jni.registry.NoSuchValueException.class ...
这里提到的`com.ice.jni.registry`是一个Java库,它提供了这样的功能,利用JNI(Java Native Interface)技术实现了对注册表的原生访问。JNI是Java平台的一部分,允许Java代码和其他语言写的代码进行交互,特别是在...
标题中的"com.ice.jni.registry"是一个Java包名,暗示了这可能是一个Java库,专门用于处理与Windows注册表相关的操作。这个库利用JNI(Java Native Interface)技术,允许Java代码直接调用本地(通常是C或C++编写的...
io.ice.app.MainApplication.apk
1.下载后将ice的后缀名改成mkv就可以播放啦.ice
matlab ice.fig 函数源代码
zeroc-ice 3.7.4源码.rar 压缩包中有 ice-3.7.4 ice-demos-3.7.4 Ice.framework3.7.4 freeze-3.7.4 IceBuilder ice-builder-gradle-1.4.7 ice-builder-visualstudio-6.0.0 ice-builder-xcode-3.1.0 源码包 ...
本文将深入探讨名为"ICE"的MATLAB源码,它源自冈萨雷斯的《数字图像处理》一书,并结合提供的ice.m文件,解析其核心功能和实现原理。 "ICE"是Image Contrast Enhancement(图像对比度增强)的缩写,是数字图像处理...
Debezium Iceberg消费者 该项目将冰山批处理使用者添加到有人可以使用此使用者并将数据库数据复制到iceberg表,而无需Spark,Kafka或Streaming平台。 iceberg消费者 将json事件附加到目标冰山表中,批大小由debezium...
在"6.ICE.1-npm-webpack"这一主题中,我们将深入探讨这两个工具在软件工程基础中的应用,特别是针对SWE1(Software Engineering 1,软件工程基础)的学习。 首先,让我们从npm开始。npm是Node.js生态系统的一部分,...
mcpp-devel-2.7.2-2ice.rhel6.i386.rpm db48-4.8.30-1ice.rhel6.i386.rpm db48-devel-4.8.30-1ice.rhel6.i386.rpm db48-utils-4.8.30-1ice.rhel6.i386.rpm db48-java-4.8.30-1ice.rhel6.i386.rpm ice-3.4.2-1....
用于在命令行中使用.ice icestudio文件的小型实用程序 测试文件 用于测试的Icestudio文件位于Test-files文件夹中 test-01-info.ice :它仅包含一个基本信息块 外部node.js模块 :在命令行上打印颜色 快速开始 安装...
6. **客户端调用**:在C#客户端,同样需要生成对应的代理类,然后创建`Ice.Communicator`实例,通过代理类调用远程服务。 7. **异常处理**:ZeroIce提供了丰富的异常机制,确保在通信过程中捕获和处理可能出现的...
ZeroC Ice 3.7 手册 Ice(Internet Communications Engine)是ZeroC公司的杰作,继承了CORBA的血统,是新一代的面向对象的分布式系统中间件。Ice是RPC通讯领域里最稳定、强大、高性能、跨平台、多语言支持的老牌开源...
运行以下命令以确保用户对`.ICEauthority`文件的正确权限: ```bash sudo chown $USER:$USER /home/$USER/.ICEauthority sudo chmod 644 /home/$USER/.ICEauthority ``` 8. **安全检查** - 在确认系统稳定运行...
Exception in thread Ice.ConnectionRefusedException error = 0 at IceInternal.Network.doFinishConnect(Network.java:417) at IceInternal.TcpTransceiver.initialize(TcpTransceiver.java:33) at Ice....
Ice-3.4.0.msi Ice-3.4.0.msi Ice-3.4.0.msi