- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
以下代码作为普通用户 session 运行良好:
#include <gio/gio.h>
int main()
{
const gchar *uri = "https://stackoverflow.com/questions/5758770/";
GFile *in;
GFile *out;
GError *error = NULL;
gboolean ret;
g_type_init();
in = g_file_new_for_uri(uri);
out = g_file_new_for_path("/tmp/a");
ret = g_file_copy(in, out, G_FILE_COPY_OVERWRITE,
NULL, NULL, NULL, &error);
if (!ret)
g_message("%s", error->message);
return 0;
}
(摘自 glib-network-connection-example )
但是当'su -'给另一个用户并执行相同的二进制文件时,我得到以下错误:
**** 消息:不支持操作**
下面的 strace 转储:
execve("./uri_copy", ["./uri_copy"], [/* 24 vars */]) = 0
brk(0) = 0x2318000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757f3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=113424, ...}) = 0
mmap(NULL, 113424, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc8757d7000
close(3) = 0
open("/usr/lib/libgio-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\21\3\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=7332859, ...}) = 0
mmap(NULL, 3481536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc875281000
mprotect(0x7fc8753cd000, 2093056, PROT_NONE) = 0
mmap(0x7fc8755cc000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14b000) = 0x7fc8755cc000
mmap(0x7fc8755d2000, 4032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc8755d2000
close(3) = 0
open("/usr/lib/libgobject-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\256\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1571328, ...}) = 0
mmap(NULL, 2416416, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc875033000
mprotect(0x7fc87507f000, 2097152, PROT_NONE) = 0
mmap(0x7fc87527f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4c000) = 0x7fc87527f000
close(3) = 0
open("/usr/lib/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\230\1\0\0\0\0\0"..., 832) = 832
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757d6000
fstat(3, {st_mode=S_IFREG|0755, st_size=4565491, ...}) = 0
mmap(NULL, 3279624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc874d12000
mprotect(0x7fc874e31000, 2097152, PROT_NONE) = 0
mmap(0x7fc875031000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11f000) = 0x7fc875031000
close(3) = 0
open("/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=776444, ...}) = 0
mmap(NULL, 2212768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc874af5000
mprotect(0x7fc874b0c000, 2097152, PROT_NONE) = 0
mmap(0x7fc874d0c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fc874d0c000
mmap(0x7fc874d0e000, 13216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc874d0e000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \30\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=10464009, ...}) = 0
mmap(NULL, 3820672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc874750000
mprotect(0x7fc8748eb000, 2097152, PROT_NONE) = 0
mmap(0x7fc874aeb000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19b000) = 0x7fc874aeb000
mmap(0x7fc874af1000, 15488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc874af1000
close(3) = 0
open("/usr/lib/libgthread-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\6\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=10190, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757d5000
mmap(NULL, 2100144, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc87454f000
mprotect(0x7fc874550000, 2093056, PROT_NONE) = 0
mmap(0x7fc87474f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0x7fc87474f000
close(3) = 0
open("/usr/lib/libffi.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\30\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=160444, ...}) = 0
mmap(NULL, 2128152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc874347000
mprotect(0x7fc87434e000, 2097152, PROT_NONE) = 0
mmap(0x7fc87454e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fc87454e000
close(3) = 0
open("/usr/lib/libgmodule-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\21\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=48372, ...}) = 0
mmap(NULL, 2107576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc874144000
mprotect(0x7fc874147000, 2093056, PROT_NONE) = 0
mmap(0x7fc874346000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fc874346000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=110348, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757d4000
mmap(NULL, 2109720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc873f40000
mprotect(0x7fc873f42000, 2097152, PROT_NONE) = 0
mmap(0x7fc874142000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fc874142000
close(3) = 0
open("/lib/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\"\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=197331, ...}) = 0
mmap(NULL, 2128888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc873d38000
mprotect(0x7fc873d3f000, 2093056, PROT_NONE) = 0
mmap(0x7fc873f3e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7fc873f3e000
close(3) = 0
open("/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360 \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=102874, ...}) = 0
mmap(NULL, 2188616, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc873b21000
mprotect(0x7fc873b37000, 2097152, PROT_NONE) = 0
mmap(0x7fc873d37000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7fc873d37000
close(3) = 0
open("/lib/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260:\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=397849, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757d3000
mmap(NULL, 2189936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc87390a000
mprotect(0x7fc87391e000, 2093056, PROT_NONE) = 0
mmap(0x7fc873b1d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13000) = 0x7fc873b1d000
mmap(0x7fc873b1f000, 6768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc873b1f000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc873909000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc873908000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc873907000
arch_prctl(ARCH_SET_FS, 0x7fc873908700) = 0
mprotect(0x7fc874aeb000, 16384, PROT_READ) = 0
mprotect(0x7fc873b1d000, 4096, PROT_READ) = 0
mprotect(0x7fc874d0c000, 4096, PROT_READ) = 0
mprotect(0x7fc873f3e000, 4096, PROT_READ) = 0
mprotect(0x7fc874142000, 4096, PROT_READ) = 0
mprotect(0x7fc8757f4000, 4096, PROT_READ) = 0
munmap(0x7fc8757d7000, 113424) = 0
set_tid_address(0x7fc8739089d0) = 3023
set_robust_list(0x7fc8739089e0, 24) = 0
futex(0x7fff6deb5014, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7fc873908700) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7fc874afb7d0, [], SA_RESTORER|SA_SIGINFO, 0x7fc874b047b0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7fc874afb850, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7fc874b047b0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(0) = 0x2318000
brk(0x2339000) = 0x2339000
getresuid([0], [0], [0]) = 0
getresgid([0], [0], [0]) = 0
openat(AT_FDCWD, "/usr/lib/gio/modules", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
stat("/usr/lib/gio/modules/giomodule.cache", {st_mode=S_IFREG|0644, st_size=317, ...}) = 0
open("/usr/lib/charset.alias", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gio/modules/giomodule.cache", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=317, ...}) = 0
read(4, "libgvfsdbus.so: gio-vfs,gio-volu"..., 317) = 317
close(4) = 0
getdents(3, /* 17 entries */, 32768) = 704
stat("/usr/lib/gio/modules/libgvfsdbus.so", {st_mode=S_IFREG|0755, st_size=1008539, ...}) = 0
stat("/usr/lib/gio/modules/libgiognutls.so", {st_mode=S_IFREG|0755, st_size=528214, ...}) = 0
stat("/usr/lib/gio/modules/libgiolibproxy.so", {st_mode=S_IFREG|0755, st_size=38152, ...}) = 0
stat("/usr/lib/gio/modules/libgiognomeproxy.so", {st_mode=S_IFREG|0755, st_size=61385, ...}) = 0
stat("/usr/lib/gio/modules/libgsettingsgconfbackend.so", {st_mode=S_IFREG|0755, st_size=80091, ...}) = 0
stat("/usr/lib/gio/modules/libgioremote-volume-monitor.so", {st_mode=S_IFREG|0755, st_size=520847, ...}) = 0
stat("/usr/lib/gio/modules/libdconfsettings.so", {st_mode=S_IFREG|0755, st_size=197917, ...}) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
stat("/usr/lib/gio/modules/libgvfsdbus.so", {st_mode=S_IFREG|0755, st_size=1008539, ...}) = 0
futex(0x7fc8741430c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/gio/modules/libgvfsdbus.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\311\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1008539, ...}) = 0
mmap(NULL, 2296960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc8736d6000
mprotect(0x7fc873705000, 2097152, PROT_NONE) = 0
mmap(0x7fc873905000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2f000) = 0x7fc873905000
close(3) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=113424, ...}) = 0
mmap(NULL, 113424, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc8736ba000
close(3) = 0
open("/usr/lib/libgvfscommon.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 .\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=935965, ...}) = 0
mmap(NULL, 2338440, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc87347f000
mprotect(0x7fc8734b5000, 2093056, PROT_NONE) = 0
mmap(0x7fc8736b4000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x35000) = 0x7fc8736b4000
close(3) = 0
open("/lib/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\23\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=270107, ...}) = 0
mmap(NULL, 2356392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc87323f000
mprotect(0x7fc87327e000, 2097152, PROT_NONE) = 0
mmap(0x7fc87347e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3f000) = 0x7fc87347e000
close(3) = 0
open("/lib/libudev.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@L\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1088628, ...}) = 0
mmap(NULL, 2173032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc87302c000
mprotect(0x7fc87303d000, 2097152, PROT_NONE) = 0
mmap(0x7fc87323d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7fc87323d000
close(3) = 0
open("/lib/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=33117, ...}) = 0
mmap(NULL, 2105600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc872e29000
mprotect(0x7fc872e2b000, 2093056, PROT_NONE) = 0
mmap(0x7fc87302a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7fc87302a000
close(3) = 0
mprotect(0x7fc87302a000, 4096, PROT_READ) = 0
mprotect(0x7fc87323d000, 4096, PROT_READ) = 0
munmap(0x7fc8736ba000, 113424) = 0
munmap(0x7fc8736d6000, 2296960) = 0
munmap(0x7fc87347f000, 2338440) = 0
munmap(0x7fc87323f000, 2356392) = 0
munmap(0x7fc87302c000, 2173032) = 0
munmap(0x7fc872e29000, 2105600) = 0
open("/usr/lib64/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib64/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56302, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc8757f2000
read(3, "# GNU libc iconv configuration.\n"..., 4096) = 4096
read(3, "lias\tCSISO141JUSIB1002//\tJUS_I.B"..., 4096) = 4096
read(3, "odule\t\tcost\nalias\tISO-IR-110//\t\t"..., 4096) = 4096
read(3, "9-14//\nalias\tL8//\t\t\tISO-8859-14/"..., 4096) = 4096
read(3, "CSEBCDICES//\t\tEBCDIC-ES//\nalias\t"..., 4096) = 4096
read(3, "IBM284//\nalias\tEBCDIC-CP-ES//\t\tI"..., 4096) = 4096
brk(0x235a000) = 0x235a000
read(3, "ias\t864//\t\t\tIBM864//\nalias\tCSIBM"..., 4096) = 4096
read(3, "lias\tCSIBM939//\t\tIBM939//\nmodule"..., 4096) = 4096
read(3, "alias\tcsGB2312//\t\tEUC-CN//\nalias"..., 4096) = 4096
read(3, "//\t\tISO-2022-CN-EXT//\nmodule\tISO"..., 4096) = 4096
read(3, "st\nalias\tISO-IR-55//\t\tISO_5428//"..., 4096) = 4096
read(3, "\tARMSCII-8//\t\tARMSCII-8\t1\n\n#\tfro"..., 4096) = 4096
read(3, "2//\t\tIBM1112\t\t1\n\n#\tfrom\t\t\tto\t\t\tm"..., 4096) = 4096
read(3, "module\tIBM9448//\t\tINTERNAL\t\tIBM9"..., 4096) = 3054
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fc8757f2000, 4096) = 0
futex(0x7fc874af08f8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "** Message: Operation not suppor"..., 36** Message: Operation not supported
) = 36
exit_group(0) = ?
+++ exited with 0 +++
我已将问题缩小到未设置 DBUS_SESSION_BUS_ADDRESS 变量。
我想知道为什么上面的解决方案需要 dbus,因为 glib/gio 文档中没有提到这一点,是否有不需要 dbus 的下载文件解决方案,或者我可以将 DBUS_SESSION_BUS_ADDRESS 设置为无论我如何切换到另一个用户的 session ,它都会正常工作。
最佳答案
通过GIO访问本地文件不需要DBus,但是通过gvfsd进行网络文件访问,DBus用于你的程序和守护进程之间的通信。更多技术细节可以在 GNOME 2.22 Release Notes 中找到.
本题给出的答案Access another user's D-Bus session应该可以解决您的问题。
关于c - 为什么在未设置 DBUS_SESSION_BUS_ADDRESS 时 g_file_copy 返回 Operation not supported,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14670630/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!