Solaris不能进入X-Windows解决一例

重新布置了Video Switch后,再开机后就无法进入图形界面了,google下,找到文章一篇

How do I su(1) to another user and run an X application? 

You need to set your $DISPLAY and allow others to use your console. If you don't, you get a message like "Can't open display". By default, only the user who logged in on console can connect to the display.

To allow another user to connect there are two ways - one easy and one secure (unfortunately, you can't have both):

Easy: As user logged in on console run "xhost +LOCAL:" (This gives permission to connect to the display to anyone logged in on the machine—this includes being able to open windows, read your keystrokes, send keystrokes, etc. Obviously not a good idea if you have other users on the system you don't trust completely.) Starting with Solaris 10, you can also use this safer, more-restrictive format: xhost xhost +si:localuser:username For example: xhost +si:localuser:root

As any other user logged in on the box, run "setenv DISPLAY :0" or "DISPLAY=:0; export DISPLAY", depending on your shell type. This all assumes you're connecting from the same host, for a remote host, change to "xhost +other-hostname" and "setenv DISPLAY PutYourHostnameHere:0"

Safe: As user logged in on console run "xauth list" Look for the line for your hostname followed by ":0" and copy it. As the user you want to grant access to run "xauth" and at the xauth> prompt type "add " and paste the line you copied. Now "setenv DISPLAY hostname:0", making sure you match the way it was listed in the line you copied and pasted.

Easier variation of safe method for special cases: If the other user you want to access your screen is root, and your home directory is either local or on an NFS filesystem exported with root permissions, just have root do this:
setenv XAUTHORITY /home/myuserid/.Xauthority ; setenv DISPLAY :0
(replace "/home/myuserid" with your actual home directory).

于是把USB Mouse直接接在服务器的USB接口上,重启后,问题解决,原来,我是把USB Mouse通过USB转接线放置在面板前的,可能是转接线的问题吧,Solaris识别不出USB鼠标,于是无法进入图形界面了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值