Bug 1238456

Summary: startx let serverauth files in $HOME
Product: [Fedora] Fedora Reporter: Neil <l4coa3fnjplr>
Component: systemdAssignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: dracut-maint-list, harald, hdegoede, johannbg, jonathan, jsynacek, lnykryn, msekleta, negativo17, s, systemd-maint, xgl-maint, zbyszek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-25 11:43:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
startx file none

Description Neil 2015-07-01 23:11:01 UTC
Created attachment 1045259 [details]
startx file

I have over 60+ .serverauth.XXXX files in my home folder, as far I know, startx should remove those files.

this is my bashrc script to login

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec /usr/bin/startx

and .xinitrc

exec 	cinnamon-session

Comment 1 Hans de Goede 2015-07-09 08:43:23 UTC
Hi,

I just checked and the startx script has this:

    trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM

And after running xinit it does:

    if [ x"$xserverauthfile" != x ]; then
        rm -f "$xserverauthfile"
    fi

So it should always cleanup after itself, and I've just run "startx" and then exited my desktop normally and it did indeed cleanup after itself.

The only scenario where it will leave a .serverauth around is when you kill -9 it, and there is nothing we can do about this.

Regards,

Hans

Comment 2 Neil 2015-07-20 20:09:17 UTC
I installed Openbox along with Cinnamon and it leaks those serverauth files only with Cinnamon.

Comment 3 Wolfgang Ulbrich 2015-07-20 20:27:59 UTC
Use simply lightdm as DesktopManager.
We do not support your way of using cinnamon.

Comment 4 Neil 2015-08-25 01:26:18 UTC
Well fortunately this is not a Cinnamon bug.

.serverauth.$$ files are leaked in almost every DE/WM after poweroff. 
Files will be cleaned if restarting X or login out.

Comment 5 Hans de Goede 2015-08-25 07:33:36 UTC
Hi,

(In reply to Duff Padmasana from comment #4)
> Well fortunately this is not a Cinnamon bug.
> 
> .serverauth.$$ files are leaked in almost every DE/WM after poweroff. 
> Files will be cleaned if restarting X or login out.

Hmm, yes I can reproduce the problem with poweroff, I do not unserstand why though, startx has:

    trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM

So if we do a poweroff with the session running, then I expect the startx process to see a HUP as its tty get closed.

Why did you make this a dracut bug now? I do not see how this related to dracut ? It is likely related to how systemd closes / kills vt-logins when doing a poweroff.

Regards,

Hans

Comment 6 Harald Hoyer 2015-08-25 10:05:38 UTC
maybe related: bug 1170765

Comment 7 Hans de Goede 2015-08-25 11:43:54 UTC
Hi,

(In reply to Harald Hoyer from comment #6)
> maybe related: bug 1170765

Yep, sending SIGKILL without first sending SIGTERM and or SIGHUP is pretty rude to do, and definitely sounds like the root cause of this bug, marking this one a dup.

Regards,

Hans

*** This bug has been marked as a duplicate of bug 1170765 ***