the socket should be stored to /var/run

Bug #79620 reported by Daniel J Blueman
4
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Fix Released
Wishlist
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gdm

When the /etc/init.d/bootclean init script is enabled, it starts after the gdm init script (due to the gdm init script starting early to get a login screen quicker). However, when the gdm daemon starts, it creates /tmp/.gdm_socket, which the bootclean script subsequently deletes, thus other gdm processes and gnome processes fail to communicate with gdm.

This results in the symptoms:
 - gdm attempting to start a number of times
 - gdm consequently backing off to the older flowers theme (rather than the default Ubuntu one)
 - the gnome sessions lacks a shutdown, restart and suspend buttons

To fix this case, gdm should create it's socket in the correct location in (eg) /var/run/gdm/socket, like other daemons do.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug. How do you enable bootclean? What version are you using?

Changed in gdm:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Thanks for your help. I enabled bootclean with 'update-rc.d bootclean defaults'; the version of the initscripts package is '2.86.ds1-14.1ubuntu16'.

Hope this helps - let me know if you need any more information!

Revision history for this message
Sebastien Bacher (seb128) wrote :

from /etc/init.d/bootclean on feisty:

"# bootclean
#
# Clean /tmp
#
# DO NOT RUN AFTER S:55bootmisc.sh and do not run this script directly
# in runlevel S. Instead write an initscript to call it."

Your change is not a documented one and doesn't look like a gdm bug, bootclean is not made to be added to the boot like that

Changed in gdm:
status: Needs Info → Rejected
Revision history for this message
zpeedo77 (customer-surfeu) wrote :

Hi,

I had the same Problem (solved by the info above, thanks!). Gnome Display Manager (GDM) startet with an old default theme (all gdm customizations seemed to be gone), a kind of "Reboot Button" at the logout window was not there anymore.

If I tried to start gdmsetup: "Failed to connect to socket", "Could not access GDM configuration file" (In german: "Zugriff auf die GDM-Konfigurationsdatei war nicht möglich").

I run Ubuntu 6.10. I have "Boot Up Manager" (BUM) installed, and disable unneeded serices there. I also use 'sysv-rc-conf" --priority'.

Today I saw in BUM that bootclean script was disabled, anyway I wanted it enabled now. After doing this the problem was there.

After disabling bootclean in BUM the problem is gone.

Obviously it is just a small incompatibility issue between GDM and bootclean (and BUM!?), that occurs, if bootclean is executed after the gdm socketfile is written, as mentioned in the other posts.

I agree that it is not really a GDM bug. But as I don't remember if I installed bootclean or it's installed as standard or wether I disabled it in BUM, it's hard to say, where the problem lies. Anyway I am quite sure that I didn't change anything with the symlinks to init.d manually.

It just has to be taken care of, that bootclean is never run to late in the boot process (hence the note in the script). Or maybe it would be possible, to integrate an (interactive/file creation date aware, etc.) file exception list into the bootclean script?!

thx

Revision history for this message
Sebastien Bacher (seb128) wrote :

bootclean is not a service to activate, read the text I copied to my previous comment about that bug, might be a BUM problem which is listing it

Revision history for this message
Daniel J Blueman (danielblueman) wrote :

Just to state my reasoning for thinking it is a GDM bug:

gdm creates a file in /tmp/.gdm_socket, but /tmp has the sticky bit set, meaning that anyone else can delete other people's files, not possible without the sticky bit set.

/var/run is used for other programs to create sockets, and according to the Linux File Hierarchy Standard, is the correct place:

http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA

This would entirly justify the (acceptable) behaviour of the bootclean script, run from wherever and whenever in the boot process. FHS exists to prevent these classes of races/design bugs from occuring.

Comments/suggestions? What arguments are against having the socket in /var/run?

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reopening, marking confirmed and updating title

Changed in gdm:
importance: Undecided → Wishlist
status: Rejected → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

That upload fixes the problem:

 gdm (2.17.6-0ubuntu3) feisty; urgency=low
 .
   * debian/patches/07_change_socket_directory.patch:
     - use /var/run for the gdm_socket (Ubuntu: #79620)

Changed in gdm:
status: Confirmed → Fix Released
Revision history for this message
zpeedo77 (customer-surfeu) wrote : Very reasonable solution

Thanks for the help, now it will be possible to use bootclean for me again.

I guess this was very well solved like this.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.