Bug 842397 - The '.local/share/' directory is not being created under '/root/' and virt-viewer errors
The '.local/share/' directory is not being created under '/root/' and virt-vi...
Status: CLOSED WORKSFORME
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gtk3 (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Benjamin Otte
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-23 14:21 EDT by Bill Sanford
Modified: 2013-12-12 12:55 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-12 12:55:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Sanford 2012-07-23 14:21:28 EDT
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 02:39:18 EST
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 02:49:01 EST
(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 07:40:47 EST
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 15:07:47 EST
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 12:55:17 EST
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.

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