最近ubuntu老出问题,动不动界面就不响应鼠标了,不知怎么回事,所以需要重启x,查了下这个
发现很有意思,一个fadora论坛,2004年有人问个问题,2008年被人给翻出来回答了下。 我试了一下,这个是可以的 ctrl + alt + f1 切换到终端,然后执行
sudo kill $(cat /tmp/.X0-lock)
以下是原文
Create a shell script (RestartX.sh):
#!/bin/sh
sudo kill `cat /tmp/.X0-lock`
startx
~$ nohup RestartX.sh
OR - Create some other shell script (Automate.sh):
#!/bin/sh
nohup RestartX.sh
~$ Automate.sh
有人看不过去这种挖坟的行为了
You guys really need glasses :) This thread is four years old! If the OP
hasn't got it figured out by now he never will. Birdy, I suggest you look
carefully at thread dates before posting. While I'm here I also suggest
reading the forum guidelines for some tips. Anything over a couple of months
old is probably already sorted out. I'm closing this thread as I'm not into
digging up the dead! Wayne