xsession can't read .profile

Problem:
xsession can't read .profile

Hello all,
Ive spent the last several days (yes that long) trying to get my nix box back in order. Last week i somehow managed to screw it up big time. I didnt know how and so slowly spent days going through and putting things right.

Im near done, im sure of it, bar one problem which i cant figure out how to get past. You help is much needed.

I got my system to a state where when i authenticate it authenticates me fine, but it fails to load my gnome desktop. It goes black and then reloads the login screen.

I can successfully go into single user mode via the recoveryoption in the grub menu and noticed that .xsession-errors in my users home space was logging:
Code:
34 Can't open /home/superuser/.profile
Ive tried the usual things:
1. Profile is there and looks to have the standard profile content
2. Permisions are rw---r--r so that looks fine also 

What i have i also done is:
1. Deleted the profile (renamed it) in the hope it will generate a new one. When i authenticate it goes to a gnome desktop but the desktop is empty, nothing there, i cant do anything just my background.

2. Created a brand new user but .xsession-error has the same error message for that user's profile.

3. Ran dbpkg to repair any broken dependencies 

But nothing seems to work. 

Thanks for any help
Answer:

Re: xsession can't read .profile

I had this problem today. I managed to fix it but I'm not quite sure what fixed it so I'll just have to list the different things I tried.

First of all the error message
Code:
34 Can't open /home/superuser/.profile
Is in the script /etc/gdm/Xsession on line 34. You can try commenting out that line and line 37 for now to see if that helps you.

For me it stopped the login screen from being shown again but gdm just showed a black screen and did nothing so I had to goto to a terminal (CTRL + ALT + F1) and run

Quote:
sudo service gdm stop
Here are the things I tried:

1.First of all I noticed that in gdm when I clicked on my username and looked at the bottom of the screen I noticed that the list that let me choose my session was blank. You should have at least GNOME in there.

To fix that I created the file (as root)
Code:
/usr/share/xsessions/gnome.desktop
With the following contents:
Code:
[Desktop Entry]
Type=XSession
Exec=gnome-session
TryExec=gnome-session
Name=GNOME
Comment=The GNU Network Object Model Environment. A complete, free and easy-to-use desktop environment
X-Ubuntu-Gettext-Domain=desktop_kdebase-workspace
The syntax is quite correct as I actually copied this from a file designed for kde, but it works for me.

Once you've made the file restart gdm by running.
Code:
sudo service gdm stop && sudo service gdm start
Now select your user and select the Session "GNOME" (set by the Name= attribute in the file you just made).

2. I completly removed gdm and reinstalled it. This requires an internet connection though. Don't do this if you don't have one.
Code:
sudo aptitude remove gdm
sudo aptitude install gdm
3.Check the partition the /home is mounted from and make sure it has available space. Apparently gdm and gnome has problems if there isn't any space left. You can do this by running
Code:
df --si
. Look at the "Use%" column.


I can't guarantee any of these will work for you but I did manage to get my system working again.

As a last resort you could use KDE

To install kdm (KDE) and used it instead of GNOME.
Code:
sudo aptitude install kubuntu-desktopcd

I hope this helps.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值