Bug 1238456 - startx let serverauth files in $HOME
Summary: startx let serverauth files in $HOME
Keywords:
Status: CLOSED DUPLICATE of bug 1170765
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-01 23:11 UTC by Neil
Modified: 2015-08-25 11:43 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-25 11:43:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
startx file (5.63 KB, application/x-shellscript)
2015-07-01 23:11 UTC, Neil
no flags Details

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 ***


Note You need to log in before you can comment on or make changes to this bug.