在桌面打不开可执行文件 (application/x-executable)的软链
来源:互联网 发布:ibm云计算产品 编辑:程序博客网 时间:2024/06/15 23:09
https://tower.im/projects/1c0cd0c59ef941298c6e6b2ba6833b91/todos/2f15e4af1bf94dacbf95555b5c9f2b32/** (desktop:15361): DEBUG: activate_file: 到 dock 的链接** (desktop:15361): DEBUG: content_type: application/x-executable** (desktop:15361): DEBUG: is_executable && g_content_type_can_be_executable || is_bin** (desktop:15361): DEBUG: run_file** (desktop:15361): DEBUG: activate_file: dock** (desktop:15361): DEBUG: content_type: application/x-executable** (desktop:15361): DEBUG: is_executable && g_content_type_can_be_executable || is_bin** (desktop:15361): DEBUG: run_filegboolean activate_file (GFile* file, const char* content_type, gboolean is_executable, GFile* _file_arg){ char* file_name = g_file_get_basename (file); gboolean is_bin = g_str_has_suffix(file_name, ".bin"); gboolean result = TRUE; g_debug ("activate_file: %s", file_name); g_free (file_name); g_debug ("content_type: %s", content_type); if (is_executable && (g_content_type_can_be_executable (content_type) || is_bin)) { g_debug("is_executable && g_content_type_can_be_executable || is_bin"); //1. an executable text file. or an shell script if (g_content_type_is_a (content_type, "text/plain")) { g_debug("g_content_type_is_a"); GtkWidget* dialog; int response; char* file_name; char* prompt; char* detail; file_name = g_file_get_basename (file); prompt = g_strdup_printf (_("Do you want to run \"%s\", or display its contents?"), file_name); detail = g_strdup_printf (_("\"%s\" is an executable text file."), file_name); g_free (file_name); //create prompt dialog dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, NULL); g_object_set (dialog, "text", prompt, "secondary-text", detail, NULL); g_free (prompt); g_free (detail); gtk_dialog_add_button (GTK_DIALOG(dialog), _("Run in _Terminal"), RESPONSE_RUN_IN_TERMINAL); gtk_dialog_add_button (GTK_DIALOG(dialog), _("_Display"), RESPONSE_DISPLAY); gtk_dialog_add_button (GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button (GTK_DIALOG(dialog), _("_Run"), RESPONSE_RUN); gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL); gtk_widget_show (GTK_WIDGET (dialog)); response = gtk_dialog_run (GTK_DIALOG(dialog)); gtk_widget_destroy (GTK_WIDGET (dialog)); g_message("response:%d",response); switch (response) { case RESPONSE_RUN_IN_TERMINAL: run_file_in_terminal (file); break; case RESPONSE_DISPLAY: result = display_file (file, content_type); break; case RESPONSE_RUN: run_file (file, NULL); break; case GTK_RESPONSE_CANCEL: break; default: break; } } //2. an executable binary file else { g_debug("run_file"); run_file (file, _file_arg); } } //for non-executables just open it. else { g_debug("for non-executables just open it."); result = display_file (file, content_type); } return result;}
- 在桌面打不开可执行文件 (application/x-executable)的软链
- Ubuntu 执行属性为executable (application/x-executable)的文件
- OllyDbg 在可执行文件中无法定位数据(Unable to locate data in executable file)
- PE(Portable Executable) File Format(Chinese) - PE(可移植的可执行文件) 文件格式说明(中文)
- C# 创建一个application的桌面快捷方式
- application/x-oleobject的解释
- iOS 遇到Could not change executable permissions on the application的情况
- iOS 遇到Could not change executable permissions on the application的情况
- iOS 遇到Could not change executable permissions on the application的情况
- 在网页如何调用客户端的可执行文件
- Xcode生成的可执行文件在哪里!
- 在linux中执行可执行文件的指令
- 在程序中获得可执行文件的路径
- 在X下用xsetroot命令修改你的桌面颜色
- 1-100能被x整除的数显示在桌面
- X桌面
- Linux系统--ELF文件之可执行文件(Executable file)解析
- X Window ---- Linux 桌面的 GUI
- hdu1172(暴力枚举)
- 保存现场的BFS-hdu-2128-Tempter of the Bone II
- u-boot_smdkv210 分析六:内存分配
- Mac 软件清单
- (二十)职责链模式详解(都市异能版)
- 在桌面打不开可执行文件 (application/x-executable)的软链
- /dev/zero和/dev/null的区别
- JS的函数节流与函数去抖
- TCP的FIN、ACK、SYN、URG、PSH及攻击方式
- Discuz的下载及安装
- 技术行业十大过时技能:SEO、COBOL语言等在列
- JS模拟进度条
- 关于Shell中的位置参数变量
- 利用SecureCRT上传、下载文件(使用sz与rz命令),超实用!