Bug 842397

Summary: The '.local/share/' directory is not being created under '/root/' and virt-viewer errors
Product: Red Hat Enterprise Linux 7 Reporter: Bill Sanford <bsanford>
Component: gtk3Assignee: Benjamin Otte <otte>
Status: CLOSED WORKSFORME QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: cfergeau, cwei, dblechte, lcui, marcandre.lureau, mclasen, mjenner, mkrcmari, mzhan, pvine, tzheng, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-12 17:55:17 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:

Description Bill Sanford 2012-07-23 18:21:28 UTC
Description of problem:
The '.local/share/' directory is not being created under '/root/

When you start virt-viewer, there is an error message:

(remote-viewer:32593): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.OK7DGW': No such file or directory

I created the directory of '/root/.local/share/' and the error message is gone.

Version-Release number of selected component (if applicable):
RHEL-7.0-20120711.2

How reproducible:
100%

Steps to Reproduce:
1. Start virt-viewer in a terminal window.
2.
3.
  
Actual results:
The directory of '/root/.local/share/' is not being created.

Expected results:
The directory of '/root/.local/share/' is created.

Additional info:

Comment 2 tingting zheng 2012-11-26 07:39:18 UTC
I tried both build RHEL-7.0-20120711.2 and RHEL-7.0-20121120.1,when start virt-viewer and remote-viewer in terminal window,there is no such error as the bug describes,also I checked the directory,there is no /root/.local/share/.

Comment 3 tingting zheng 2012-11-26 07:49:01 UTC
(In reply to comment #2)
> I tried both build RHEL-7.0-20120711.2 and RHEL-7.0-20121120.1,when start
> virt-viewer and remote-viewer in terminal window,there is no such error as
> the bug describes,also I checked the directory,there is no
> /root/.local/share/.

correct the info:
There is no such error for the above 2 build as the bug describes when start virt-viewer and remote-viewer.
For build RHEL-7.0-20120711.2,/root/.local/share/ exist.
For build RHEL-7.0-20121120.1,/root/.local/share/ doesn't exist

Comment 5 Christophe Fergeau 2013-11-04 12:40:47 UTC
This would be up to gtk+ to create that directory if it does not exist already, virt-viewer is not directly trying to manipulate it.

Comment 6 Matthias Clasen 2013-12-11 20:07:47 UTC
GTK+ already creates that directory:


static gchar *
get_default_filename (void)
{
  if (g_mkdir_with_parents (g_get_user_data_dir (), 0755) == -1)
    {
      int saved_errno = errno;

      g_critical ("Unable to create user data directory '%s' for storing "
                  "the recently used files list: %s",
                  g_get_user_data_dir (),
                  g_strerror (saved_errno));

      return NULL;
    }

  return g_build_filename (g_get_user_data_dir (),
                           GTK_RECENTLY_USED_FILE,
                           NULL);
}


You don't need to run virt-manager as root, anyway. Why are you doing that ?

Comment 7 Matthias Clasen 2013-12-12 17:55:17 UTC
I just tried with sudo gedit, and that did create /root/.local/share as expected.
I'll assume this is working now, unless you have specific reproduction instructions.