我正在做闪亮的教程,就像在https://shiny.rstudio.com/tutorial/written-tutorial/lesson1/上解释的那样
在某个时候,我必须运行示例应用程序。示例应用程序存储在文件夹/usr/local/lib/R/site-library/shiny/examples/01_hello 中,我想在终端中运行它。所以我输入
sudo -i R # entering my password so that R is being started
library(shiny)
runApp("/usr/local/lib/R/site-library/shiny/examples/01_hello")
但它不起作用。
我的控制台给了我以下错误信息:
Listening on http://127.0.0.1:3530
Running Firefox as root in a
regular user's session is not supported. ($XAUTHORITY is
/run/user/1000/gdm/Xauthority which is owned by tobias.)
Running
Firefox as root in a regular user's session is not supported.
($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by
tobias.)
Running Firefox as root in a regular user's session is not
supported. ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is
owned by tobias.)
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: google-chrome: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks:not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:3530'
此处不支持在常规用户会话中以 root 身份运行 Firefox。($XAUTHORITY 是 /run/user/1000/gdm/Xauthority,归基数所有。)我发现了 firefox 问题,但与 R 无关...
我的目标是在输入runApp()
Firefox 后分别打开一个新选项卡并显示闪亮的应用程序,以便我可以与之交互。
另外我不得不说,我是 ubuntu 的新手——所以在回答我的问题时请记住这一点。提前谢谢了!