LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-09-2010, 10:24 AM   #1
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Rep: Reputation: 30
Xsession: warning: unable to write to /tmp


When browsing in firefox I noticed that although the applications I had open windows for were responding, when I swicthed away from the browser window there was just a plain grey background and the other application window. I exited out of the apps I had open, found that ctrl+esc, ctrl+shift+f1, ctrl+back space and ctrl+alt+del all did nothing. Pressing the power button didn't do anything, so I eventually had to hold it in until it powered off. Unfortunately when I've tried to login since I just get
Quote:
Xsession: warning: unable to write to /tmp: Xsession may exit with an error
after clicking OK I get thrown back to the login screen. Logging in through the console and trying 'startx' gives the same thing, only I don't get a cursor to click the okay button and have to press the power button to reboot.

I've just tried running fsck from a Ubuntu 9.10 live CD:
Quote:
ubuntu@ubuntu:~$ sudo fsck /media/fa09fe96-0e5f-4430-b305-d4c31a7ba107
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
fsck.ext2: No such file or directory while trying to open /media/fa09fe96-0e5f-4430-b305-d4c31a7ba107

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

ubuntu@ubuntu:~$
The partition is valid and EXT3 formatted and can be browsed in nautilus.
 
Old 01-09-2010, 10:35 AM   #2
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403

Rep: Reputation: 51
Quote:
Xsession: warning: unable to write to /tmp: Xsession may exit with an error
Something wrong is with ro/rw mount mode of your /tmp. What does "mount" command (without quotes) say?

Quote:
ubuntu@ubuntu:~$ sudo fsck /media/fa09fe96-0e5f-4430-b305-d4c31a7ba107
Your disk is in /dev/disk/by-uuid/<your_uuid>, not in /media/<your_uuid>

Edit: don't forget to unmount it before fsck.

Last edited by 10110111; 01-09-2010 at 10:40 AM.
 
Old 01-09-2010, 01:09 PM   #3
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
I logged in via the console and got the following from 'sudo mount'
Quote:
/dev/sda1 on / type ext4 (rw, errors=romount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (re,noexec,nosed,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugs (rw)
udev on /dev/ type tempfs (rw,mode=0765)
none on /dev/pts type dev/pts (rw,noexec,nosed,gid=5, mode=0620)
none on /dev/shm type tempfs (rw,nosed,nodev)
none on /var/run type tempfs (rw,nosuid,mode=0755)
none on /var/lock type tempfs (rw,noexec,nosed,nodev)
none on /var/lib/init/rw type tempfs (rw,nosed,mode=0755)
/dev/sda6 on /home type ext3(rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosed,nodev)
Also, I tried running a fsck from the live cd replacing /media/ with /dev/disk/by-uuid and got
Quote:
ubuntu@ubuntu:~$ sudo fsck /dev/disk/by-uuid/fa09fe96-0e5f-4430-b305-d4c31a7ba107
fsck from util-linux-ng 2.16
e2fsck 1.41.9 (22-Aug-2009)
/dev/sda6: clean, 80554/19103744 files, 53499664/76393083 blocks
ubuntu@ubuntu:~$
I really wish Linux was more resilient against this sort of thing. I've had Linux installs completely die on me after being powered off without being shutdown.
 
Old 01-09-2010, 01:19 PM   #4
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Is the partition your /tmp is on full? What's the output of df?

If you have a machine that reboots frequently set it up to clear /tmp on startup.

Otherwise, you can use something like tmpwatch to remove old things from /tmp and manage the space a bit better.

Regards,

Alunduil
 
1 members found this post helpful.
Old 01-09-2010, 03:40 PM   #5
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
/tmp is on it's own 1GB partition, will clearing it on startup make any difference here?
 
Old 01-09-2010, 04:36 PM   #6
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Is it a tmpfs mount or a regular partition with persistent files? If the latter then clearing it on startup will help a lot.

Regards,

Alunduil
 
Old 01-09-2010, 04:50 PM   #7
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
Quote:
Is it a tmpfs mount or a regular partition with persistent files?
I don't know, what would be the best way to find out?
 
Old 01-09-2010, 04:56 PM   #8
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Code:
/dev/sda1 on / type ext4 (rw, errors=romount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (re,noexec,nosed,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugs (rw)
udev on /dev/ type tempfs (rw,mode=0765)
none on /dev/pts type dev/pts (rw,noexec,nosed,gid=5, mode=0620)
none on /dev/shm type tempfs (rw,nosed,nodev)
none on /var/run type tempfs (rw,nosuid,mode=0755)
none on /var/lock type tempfs (rw,noexec,nosed,nodev)
none on /var/lib/init/rw type tempfs (rw,nosed,mode=0755)
/dev/sda6 on /home type ext3(rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosed,nodev)
In the above I don't see /tmp which is why I assumed it was on the / partition.

What is in your /etc/fstab about /tmp? That will tell you what kind (if it is) of partition it is.

Regards,

Alunduil
 
Old 01-10-2010, 04:33 AM   #9
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
The relevant bit from /etc/fstab reads:
Quote:
swap was on /dev/sda5 during installation
UUID=<UUID here> none swap sw 0 0

Last edited by Mark_667; 01-10-2010 at 04:33 AM. Reason: typo
 
Old 01-10-2010, 05:55 AM   #10
10110111
Member
 
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403

Rep: Reputation: 51
It's swap, not /tmp FS. What does
Code:
grep /tmp /etc/fstab
give?
 
Old 01-10-2010, 06:09 AM   #11
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
The grep query returned nothing, here's the contents of my /etc/fstab
Quote:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda1 during installation
UUID=f0f75564-da38-4efb-95ac-0fc97e3970ee / ext4 errors=remount-ro 0 1
# /home was on /dev/sda6 during installation
UUID=fa09fe96-0e5f-4430-b305-d4c31a7ba107 /home ext3 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e637a199-8934-4537-aabc-74b72f25716a none swap sw 0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
 
Old 01-10-2010, 10:10 AM   #12
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
In that case your /tmp is part of your / partition and should be wiped at startup or managed via tmpwatch depending on how often you reboot. How big is your / partition anyway?

Regards,

Alunduil
 
Old 01-10-2010, 12:58 PM   #13
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 20.04
Posts: 383

Original Poster
Rep: Reputation: 30
I created the / partition as 6GB in size on install, GParted reports the size as 5.72 GiB with 5.44 GiB used. Will clearing the contents of /tmp allow me to complete the login?
 
Old 01-10-2010, 01:07 PM   #14
alunduil
Member
 
Registered: Feb 2005
Location: San Antonio, TX
Distribution: Gentoo
Posts: 684

Rep: Reputation: 62
Probably, it is tmp after all. Wipe it out and see how much space that frees up.

Regards,

Alunduil
 
Old 01-10-2010, 01:09 PM   #15
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
I suspect you are short of space on / which is where /tmp is mounted.

Please post the output of df -h

Meanwhile sudo apt-get clean should free up some space for you.

Edit: Apologies for posting late - LQ wouldn't let me post (DNS foulup) and now I see you have the problem almost resolved. I'm out of here
/Edit

Last edited by tredegar; 01-10-2010 at 01:11 PM.
 
1 members found this post helpful.
  


Reply

Tags
xsession



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant write to /tmp czezz Solaris / OpenSolaris 9 06-03-2009 03:22 AM
Xsession:warning:unable to write to /tmp;X session may exit with an error gabsik Linux - Desktop 9 05-31-2007 09:51 PM
Xsession cannot write to /tmp flebber Ubuntu 5 05-03-2006 12:26 AM
Xsession: warning: unable to write to /tmp whatpot Linux - Newbie 2 11-04-2005 09:17 AM
xsession warning sharadshankar Debian 2 06-10-2005 04:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration