About UID and How to autostart an application on boot up in 3rd- Startup List Management API

 

 

Startup List Management API

Steps for auto-starting an EXE on boot time in S60 3rd Edition.

1. Create an .RSS file in your project's directories (e.g. in the <PRJ_DIRECTORY>/DATA directory, where the other RSS files are located too)

For example: 06000001.rss

Here a number is used for the name, which is the same as the Package UID (pUID) of the project. This might help later in identifying the resource and is a good reminder when adding the entry in the PKG file. The name is however irrelevant at this point.

Add the following code to the new .rss file:

#include <startupitem.rh>

RESOURCE STARTUP_ITEM_INFO startexe   

{    

executable_name = "c://sys//bin//StartEXE.exe";    

recovery = EStartupItemExPolicyNone;   

}

In the code above:

    c: represents the drive where the program to be started is expected to have been installed
    If the drive is not known (will be selected at install time) use the wild card encoding for drives, the !:
    StartEXE.exe is the name of the application to be started and this will of course depend on your choice of name for your project. Must be the same as specified for the TARGET statement in the MMP file.

2. Open your .MMP file.

Add the following lines to include the new resource in the build.

START RESOURCE ../DATA/06000001.rss
END


    The path specified above is relative to the MMP file location, usually in the <PRJ_DIRECTORY>/GROUP. The path must point to the new RSS file created so make sure that the string is in sync with the file location decided at step 1. above.


3. Add the following entry in your .PKG file:

"C:/Symbian/9.1/S60_3rd_MR/Epoc32/data/06000001.rsc"-"c:/private/101f875a/import/[06000001].rsc"


    Application can be installed on any drive (either phone memory or memory card) but resource file [uid].rsc must be in c:/private/101f875a/import/ .
    C:/Symbian/9.1/S60_3rd_MR/ represent the install path (aka EPOCROOT) of the SDK you use. If the PKG file is used exclusively under Carbide.c++ you can replace this string with the macro $(EPOCROOT)
    The *.rsc file is the result of compiling the *.rss file created at step one. It will not exist before re-building the project. Also, the extension might be different if your project's supported languages set does not include "SC", e.g. the extension could be *.r01. See Internationalization.
    The resource file must be always copied on the drive c:, in a special data cage, so the destination path is always the same: c:/private/101f875a/import/
    The name of the file must be changed when copied on the device. It will always be the Package UID (pUID) (as specified in the header of the PKG file) but without the 0x prefix and enclosed by square brackets ([ and ]).


4. That's it. Now just build re-build the project making sure that the new resource file is built and if everything else is ok with the project you will obtain a sis files ready to install on the phone. On the next phone reboot your application will be started automatically.



Notes

    If the EXE exits within a few (about 5?) seconds of starting up, a message is displayed, reading: Unable to start <name of EXE>. Application may need to be removed.


    There are several Known Issues and Technical Solutions about using the Startup List logged in the Forum Nokia Technical Library. Search for "Startup List" to get an up-to-date overview.


    Startup List Management API does not work with Self-Signed application. It should be signed with a trusted certificate (Open Signed Online or Open Signed Offline during R&D stage and Symbian Signed when released) even if otherwise the capabilities required for the project do not justify it.


    It is observed that on some phones (tested on E61) this startup list manager API works for self-signed apps with capability WriteUserData (and unprotected-range UID) too.


    The exe to be started must be installed directly from the root of the package that contains the resource file (not accepted from embedded file)



Useful links

    Read this whole thread which contains all the possible cases working with Strtup List Management API http://discussion.forum.nokia.com/forum/showthread.php?t=138079
    In case your application (on 3rd Ed FP1 device) is not starting o phone restart, after following exactly the same steps (obtaining protected range UID3 and Open Signed Online/Offline (for development purpose)) try .rsc instead of .r01.


e.g. first compile the application with the method as told above - "$(EPOCROOT)Epoc32/data/2002F1C8.r01" -"c:/private/101f875a/import/[2002F1C8].r01" once .r01 is generated, rename it to .rsc "$(EPOCROOT)Epoc32/data/2002F1C8.rsc" -"c:/private/101f875a/import/[2002F1C8].rsc" and recompile the file.

 

Overview

UID of self-signed applications

Description

S60 3rd Edition introduces mandatory signing for all installed SIS packages. For an application that uses no capabilities, or only capabilities that are open to all, it is possible to generate a new certificate and sign your SIS package with it. This process is recommended to be used with freeware applications.
More information about self-signed certificates can be found in the SDK Help documentation: see Introduction to S60 3rd Edition >> How to Sign .sis Files.
Using a self-signed certificate means that the application is regarded as untrusted. Untrusted applications should use UIDs from the unprotected range of UIDs; otherwise the installation to a 3rd Edition device may fail.
Protected UID range:   0x00000000 … 0x7FFFFFFF
Unprotected UID range: 0x80000000 … 0xFFFFFFFF
Specifically, there are two important unprotected UID ranges:
UIDs for self-signed app. releases: 0xA0000000 … 0xAFFFFFFF
UIDs for test/development use:      0xE0000000 … 0xEFFFFFFF
UID allocation is managed by Symbian; see
http://www.symbiansigned.com for more information about UIDs.

<think>嗯,用户说在/etc/xdg/autostart/目录下找不到kylin-remote-desktop-daemon.desktop这个文件。首先,我需要确认这个文件通常属于哪个软件包。记得在基于Debian系统里,可以用dpkg或apt-file来查找文件对应的包。 假设用户用的是Ubuntu或者Debian系的系统,我应该建议他们先安装apt-file,然后更新数据库,再用apt-file search来查找这个文件。如果找到对应的包,可能需要重新安装。如果没找到,可能这个包没有被安装,或者这个文件在特定版本中才有。 另外,也有可能用户使用的是基于Ubuntu的衍生版,比如优麒麟(UKylin),这个远程桌面守护进程可能是他们特有的组件。这时候需要检查是否安装了相关的包,或者系统版本是否支持这个功能。 还要考虑用户是否误删了这个文件,或者是否有权限问题导致看不到文件。可能需要用ls命令加上sudo来确认是否存在。同时,如果用户需要这个功能,可能需要安装相应的软件包,比如kylin-remote-desktop。 最后,应该提醒用户如果这个文件缺失会影响远程桌面服务的自动启动,建议他们根据需求决定是否重新安装或忽略这个问题。同时,提供替代的远程桌面方案,比如xrdp或VNC,以备不时之需。</think>根据您提到的 `/etc/xdg/autostart/kylin-remote-desktop-daemon.desktop` 文件缺失问题,以下是逐步分析及解决方案: --- ### **1. 文件背景说明** - **文件作用**:`.desktop` 文件是Linux桌面环境的自启动配置文件。`kylin-remote-desktop-daemon.desktop` 可能关联麒麟系统(Kylin OS)的远程桌面服务,用于开机自动启动远程桌面守护进程。 - **常见路径**:`/etc/xdg/autostart/` 是系统级自启动配置的标准目录,用户级自启动文件通常在 `~/.config/autostart/`。 --- ### **2. 文件缺失的可能原因** - **未安装相关软件包**:系统未安装 `kylin-remote-desktop` 或类似远程桌面服务。 - **版本差异**:不同Linux发行版(如Ubuntu/Kylin/UOS)的软件包命名或文件路径可能不同。 - **手动删除**:可能被用户或管理员误删除。 - **权限问题**:需确认是否因权限不足无法查看(可尝试 `sudo ls /etc/xdg/autostart/`)。 --- ### **3. 解决方案** #### **步骤1:确认软件包是否安装** ```bash # 检查是否安装kylin-remote-desktop dpkg -l | grep kylin-remote-desktop # 若无结果,尝试安装(适用于Ubuntu/Kylin) sudo apt update sudo apt install kylin-remote-desktop ``` #### **步骤2:通过apt-file查找文件归属** ```bash # 安装apt-file工具 sudo apt install apt-file sudo apt-file update # 搜索缺失文件 apt-file search kylin-remote-desktop-daemon.desktop ``` - 若输出类似 `kylin-remote-desktop: /etc/xdg/autostart/kylin-remote-desktop-daemon.desktop`,则表示文件属于 `kylin-remote-desktop` 包。 #### **步骤3:修复或重新安装软件包** ```bash # 重新安装相关包 sudo apt install --reinstall kylin-remote-desktop ``` #### **步骤4:手动创建文件(备用方案)** 如果软件包无此文件,可尝试手动创建(需谨慎): ```bash # 创建.desktop文件 sudo tee /etc/xdg/autostart/kylin-remote-desktop-daemon.desktop <<EOF [Desktop Entry] Type=Application Exec=/usr/bin/kylin-remote-desktop-daemon Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name=Kylin Remote Desktop Daemon Comment=Start Kylin Remote Desktop Service EOF ``` --- ### **4. 影响与替代方案** - **影响**:文件缺失可能导致远程桌面服务无法开机自启,但手动启动仍可能可用。 - **替代工具**:若无需麒麟远程桌面,可改用 `xrdp` 或 `vino`(GNOME默认远程桌面): ```bash sudo apt install xrdp sudo systemctl enable xrdp ``` --- ### **5. 总结建议** - 若依赖麒麟远程桌面功能,优先通过软件包管理器修复。 - 若无需此功能,可忽略该问题或使用其他远程桌面工具。 - 检查系统日志 `journalctl -u kylin-remote-desktop` 进一步排查服务状态。 如有更多细节(如系统版本、错误日志),可提供进一步分析。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值