|
寻找机机,目标: remote desktop free acc,
发现一 openSUSE 主机(不确定),
桌面上只能打开 konqueror、firefox 两个程序,
不爽,没有 shell 多难受,左突右撞,
konqueror 无法访问 /,连家目录下少数文件访问都受限制,如访问 ~/.bash_history 弓单出 "You are not authorized to open this file.",
找到 http://api.kde.org/3.5-api/kdeli ... un_8cpp_source.html- [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKRun.html#a7cac381825d4143b03bc19fd563a0674]00198[/url] bool [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKRun.html#a59f662f719e5941f79b56c65c2beeac3]KRun::displayOpenWithDialog[/url]( const KURL::List& lst, bool tempFiles, const [url=http://doc.trolltech.com/3.3/qstring.html]QString[/url]& suggestedFileName )
- 00199 {
- 00200 if (kapp && !kapp->authorizeKAction("openwith"))
- 00201 {
- 00202 // TODO: Better message, i18n freeze :-(
- 00203 KMessageBox::sorry(0L, i18n([color=Red]"You are not authorized to open this file."[/color]));
- 00204 return false;
- 00205 }
- 00206
- 00207 [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKOpenWithDlg.html]KOpenWithDlg[/url] l( lst, i18n("Open with:"), QString::null, 0L );
- 00208 if ( l.[url=http://doc.trolltech.com/3.3/qdialog.html#exec]exec[/url]() )
- 00209 {
- 00210 [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKService.html#a1f779f61688fa83379c3f365cd578118]KService::Ptr[/url] service = l.[url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKOpenWithDlg.html#a8e8db71c2aec0336a8489832ed76a8ed]service[/url]();
- 00211 if ( !!service )
- 00212 return [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKRun.html#ad86a1cb147017c650f441f2a8abbb81f]KRun::run[/url]( *service, lst, 0 /*window*/, tempFiles, suggestedFileName );
- 00213
- 00214 kdDebug(7010) << "No service set, running " << l.[url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKOpenWithDlg.html#a8fbe33fe87c2b6133bb3340e860d5261]text[/url]() << endl;
- 00215 return [url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKRun.html#ad86a1cb147017c650f441f2a8abbb81f]KRun::run[/url]( l.[url=http://api.kde.org/3.5-api/kdelibs-apidocs/kio/html/classKOpenWithDlg.html#a8fbe33fe87c2b6133bb3340e860d5261]text[/url](), lst, suggestedFileName ); // TODO handle tempFiles 00216 }
- 00217 return false;
- 00218 }
复制代码 firefox 通过 file:///,却能像正常 普通用户 一样访问所有资源,
确认机机上无 selinux。
有点意思,kde-3.x 中 kio 代码部分印证 标题 猜测,暂未找到设置方法。
暂未发现 当前新版 kde-4.x 中 kio 对应物,貌似去掉了。 |
|