unity --reset doesn't work if you're not logged in to any unity session

Bug #972721 reported by Thomas Bushnell, BSG
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Unity
Expired
Low
Unassigned
unity (Ubuntu)
Expired
Low
Unassigned

Bug Description

unity --reset is great if you've broken your configuration.

However. If you've broken it so much that it doesn't even start sensibly, or you can't find a terminal, then you need to use a VT or ssh to run it. And then you get this error:

% unity --reset
WARNING: no DISPLAY variable set, setting it to :0

GConf-WARNING **: Client failed to connect to the D-BUS daemon:
//bin/dbus-launch terminated abnormally with the following error: No protocol specified
No protocol specified
Autolaunch error: X11 initialization failed.

Traceback (most recent call last):
 File "/usr/bin/unity", line 222, in <module>
   reset_unity_compiz_profile ()
 File "/usr/bin/unity", line 84, in reset_unity_compiz_profile
   except (GError, AttributeError), e:
NameError: global name 'GError' is not defined
[1] 8838 exit 1 unity --reset

It should definitely work in this case, restoring your config so that you can log in!

Changed in unity (Ubuntu):
assignee: nobody → Didier Roche (didrocks)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Should be a simple case of defaulting to DISPLAY=:0 I think.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although, assuming X is running might be assuming too much.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Daniel: it's already doing that, the issue here is diferent.

@Thomas: unity --reset works in a tty (even doing the export DISPLAY that Daniel is talking about). However, it doesn't work if your session is so broken that even the gconf daemon is not running. This is only the case if you didn't try log in with lightdm or in a gnome-session.
Consequently, this is really an edge case that I don't think we should tackle (we could use the --direct option to gconf maybe though), especially that it will get removed next cycle with the gsettings transition. If someone wants to tackle it, they are welcome, but I think we have bigger concerns too address in the precise release cycle remaining time.

Changed in unity (Ubuntu):
assignee: Didier Roche (didrocks) → nobody
importance: Undecided → Low
summary: - unity --reset doesn't work if you're not logged in to unity
+ unity --reset doesn't work if you're not logged in to any unity session
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thinking about it, there can be a use case when you want to reset your configuration but not starting unity at all (remember that unity --reset resets the configuration AND launch unity on an opened session).

Thomas, what's your use case exactly? Do you want to reset the configuration for a particular user (who is not logged in) and not start unity afterwards? We can imagine doing an unity --reset --nostart for it for instance (or any other meaningful option).

Revision history for this message
Thomas Bushnell, BSG (tbushnell) wrote :

It's not a critical issue, by all means work on other things first. Please leave it open, and it might be addressable by a bug fix later, or closed if it becomes moot with gsettings.

The case is when a user's session is broken and they *cannot* login successfully to unity or gnome, so they are logging in on a vt or via ssh, and trying to repair whatever damage there is to their dotfiles. The problem is not that it tries to relaunch unity (per se), the problem is that it won't reset the configuration if it can't also launch it.

The user *is* logged in, but only via ssh or vt.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Thomas: thanks for the additional explanation (by not "logged in", I meant "not logged in a real session"). I can do that easily with the additional switch I talked above. However changing that right now in the development cycle doesn't make me feel confident. If you think once Precise is released that it's really needed, I can try to fallback to the gconftool --direct access if needed. Keep me in touch (the patch shouldn't be big, unity is just a small python wrapper)

Revision history for this message
Thomas Bushnell, BSG (tbushnell) wrote :

I'm much more interested in the weird white Chrome/Compiz boxes getting fixed than this. :) And if it becomes a big issue for us, we can just write our own script that does what unity --reset does. So let's leave it dormant for now, and if lots of people want it, SRU after sufficient testing.

Revision history for this message
Margarita Manterola (marga-9) wrote :

Hi, it's been many months and this is still present. The case is still valid: if a user breaks their session in a way that they can't login, they also can't run unity --reset. That shouldn't be the case.

Changed in unity:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Alex Baggott (alex-baggott) wrote :

Thank you for taking the time to report this bug. Unfortunately, we can’t work out how to recreate this bug from your description. Please describe the process you go through to trigger this bug and then change the bug status to NEW. See this page for more information: https://wiki.ubuntu.com/BigDesktopBugScrub

Changed in unity (Ubuntu):
status: Confirmed → Incomplete
Changed in unity:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for unity (Ubuntu) because there has been no activity for 60 days.]

Changed in unity (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Unity because there has been no activity for 60 days.]

Changed in unity:
status: Incomplete → Expired
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.