如何在服务器上配置Ubuntu Ubuntu?


10

我希望在我的11.10服务器上设置Ubuntu One,但每次尝试从http://manpages.ubuntu.com/manpages/lucid/man1/u1sdtool.1.html运行命令时,似乎都遇到了错误。

例如,当我尝试运行 u1sdtool --start时,遇到以下错误:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

我刚刚安装了Ubuntu One,到目前为止尚未对其进行任何更改。

Answers:


11

Ubuntu One需要X和dbus会话。您可以按照以下说明使其无头工作:https : //wiki.ubuntu.com/UbuntuOne/Headless

在无头模式下运行Ubuntu One

  1. 安装ubuntuone-client软件包:

    sudo apt-get install ubuntuone-client 
    
  2. 设置用户目录:

    mkdir -p ~/.config/ubuntuone ~/bin 
    

    如果登录时没有〜/ bin,则您的路径中不包含〜/ bin,以纠正运行问题(或直接注销并再次登录,ubuntu会为您设置)。

    export PATH=$HOME/bin:$PATH 
    
  3. 获取您帐户的OAuth密钥:

    cd /tmp
    wget http://people.canonical.com/~roman.yepishev/us/ubuntuone-sso-login.py
    python ubuntuone-sso-login.py
    Ubuntu SSO Login: **your Ubuntu SSO Login**
    Password: **your Ubuntu SSO Password**
    oauth=hPQWPsH:rhOokmNiRuuoiHe... 
    
  4. 将以oauth =开头的行作为主要部分下的oauth参数复制到〜/ .config / ubuntuone / syncdaemon.conf (这是ini样式文件):

    [__main__]
    oauth=hPQWPsH:rhOokmNiRuuoiHe... 
    

    (您也可以删除oauth-string中的前两个字段,即oath = aaa:bbb:ccc:ddd => oath = ccc:ddd)

  5. 下载u1sdtool包装器,该包装器将在需要时启动dbus。默认情况下,Ubuntu将〜/ bin /添加到您的路径,因此,当您运行u1sdtool时,将运行包装器。

    wget http://people.canonical.com/~roman.yepishev/us/u1sdtool-wrapper -O ~/bin/u1sdtool
    chmod +x ~/bin/u1sdtool 
    
  6. 启动Ubuntu One,检查Ubuntu One状态并连接(从Oneiric启动,Ubuntu One在启动时会自动连接):

    u1sdtool --start
    u1sdtool --status
    State: READY
      connection: Not User With Network
      description: ready to connect
      is_connected: False
      is_error: False
      is_online: False
      queues: IDLE
    u1sdtool --connect 
    

    如果您对显示管理器错误感到满意,请尝试在u1sdtool前面加上〜/ bin /,因为最可能的原因是上述PATH问题。

  7. 查看字符串后跟“连接”。如果显示“不是用户”,则尚未处理您的凭据,请停止并启动syncdaemon:

    u1sdtool --quit
    u1sdtool --start
    

    然后再试一次。

    如果显示“无网络”,则表明您未连接到互联网,我必须通过安装nmcli(sudo apt-get install network-manager --no-install-recommends)来解决此问题,并摆弄nmcli。您可能还需要安装consolekit。

  8. 开始将文件添加到~/Ubuntu One目录,并使用u1sdtool添加UDF,发布文件等。


如果可能的话,不要使用链接,而是将内容复制到:)
— Rinzwind'1

使我得到帮助的部分是步骤4。因为我的syncdaemon.conf看起来像这样:[notifications] show_all_notifications = True [bandwidth_throttling] on =真read_limit = 2097152 write_limit = 102400 [notifications] show_all_notifications = True现在,当我将第4步添加到文件顶部,仍然遇到显示管理器问题。
— Switchkick 2012年

我希望这对我有用,但是我得到了“ With User Not Network”,而且我不知道“摆弄nmcli”的意思。我已经有网络管理员,并且我的互联网连接很好。
— tamale 2012年


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.