Background technology
At present all contain automatic operation (autorun) function in a lot of movable equipments, will automatically move the program of wherein appointment when system identification behind the equipment.If want automatically to move behind the carry movable equipment a certain program in this equipment under the linux system, need in equipment, add the automatically Run Script such as .autorun, autorun, autorun.sh.After this movable equipment was identified, system can go to detect the inside and whether contain above-mentioned script (priority is from high to low), in case find to move this script, thus reach the purpose of a certain application program of automatic operation.
But according to Linux desktop environment specification, each interventional instrument all can eject alarm prompt, contains automatic running program in this equipment of warning user, may have risk, and the user needs manually to click " affirmation " operation or clicks " cancellation " and close this prompting frame.Each plug equipment all can eject this prompting frame is made troubles to the user.
Take the present wireless network card equipment of generally using as example, eject for the first time automatically operation alarm prompt frame during interventional instrument, the user clicks " RUN " and determines rear automatically operation automatic running program wherein, the effect of this program can be for wireless network card backstage and driving to be installed, each when inserting this equipment and using after wishing, directly move background program and can not eject automatic operation prompting frame.Therefore seek to insert under a kind of linux system some to contain the mobile device of automatic running program and do not eject alarm prompt just directly working procedure be very necessary seemingly.
Can arrange to realize shielding the alarm prompt that ejects because detecting movable equipment by the modification system in the prior art.When the modification system arranged, the user can arrange in the panel manual modification for the processing mode of movable equipment in " gconf-editor ", " nautilus " or other system, cancellation " autorun " option.But, the operating main body of this method is the final user, the individual user may not know how to arrange and can't generally adopt, all need to do this unified processing and can't carry out differentiating and processing to equipment for all movable equipments, masking all moves when pointing out automatically, also shielded the AutoPlay function in the movable equipment, so that the autorun program in a lot of equipment can't be moved automatically, affected the user and use.In addition, can also realize not ejecting directly operation autorun program of automatic operation alarm prompt affirmation by revising former code, as revise gvm_ask_autorun () method among the manager.c, the variable of identifying user being confirmed the result is set to "True" forever, calling program is moved no longer downwards, do not eject the affirmation prompting frame, but directly move corresponding program.Because a lot of Linux users only limit to the use aspect to the understanding of Linux, seldom are deep into source code or kernel, such scheme is realized very difficult.And, revise source code itself and have greater risk, and can't distinguish and treat distinct device.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, below in conjunction with embodiment and accompanying drawing, the embodiment of the invention is described in further details.At this, illustrative examples of the present invention and explanation thereof are used for explanation the present invention, but not as a limitation of the invention.
Embodiment one
Present embodiment provides a kind of automatic operation method.As shown in Figure 1, the method comprises:
Step 101: the copy automatic running program is carried out the sensing file of script and this script and is used under the path to local;
Under linux system, automatic running program is carried out script and is usually deposited in the mobile device, such as CD, USB flash disk etc., and automatic running program is carried out the sensing file of script, such as the desktop file, deposits in the CD.Before this step, namely when the user uses mobile device for the first time, eject the alarm prompt frame after detecting the automatic running program in the movable equipment, after clicking and confirm, the user directly transferred the backstage installation procedure.Also can be manually from CD, to move installation procedure after the user clicks cancellation.Execution in step 101 in the background program process is installed is carried out automatic running program the sensing file copy of script and this script and is used under the path to local.Present embodiment is carried out script in order to automatic running program and is deposited in the mobile device, but is not limited in this, also can be those skilled in the art can expect other have the equipment of this function, all should be included within the scope of the present invention.
Automatic running program is carried out script and is used for searching the whether famous file that is called specific label title (such as CD volume " Mobile Partner "), if have then enter according to priority from high to low the program of sequential search " .autorun ", " autorun " by name, " autorun.sh " etc. of this document folder, find any one namely to stop to search and moving this program.If do not find the file with " Mobile Partner " name, then eject automatically operation warning prompt.
Further, automatic running program is carried out script and is also searched the automatic running program that install on the backstage, when the follow-up use equipment of user, the automatic running program that install on automatic running program in the comparison document folder and backstage, when the version of the automatic running program of installing when the backstage is not less than automatic running program in the file, directly move the automatic running program that install on the backstage, otherwise the automatic running program in the operation CD.When described automatic running program is carried out script and do not found particular file folder and when not finding the automatic running program of installing on the backstage, eject automatically operation warning prompt.
Step 102: the sensing file that the ejection in the tabulation of the associated with under the path is moved automatically warning prompt replaces with the sensing file that automatic running program is carried out script.
This step is carried out in the background program process is installed equally.After the installation of finishing equipment backstage and driving, when later on each user uses equipment, after detecting the automatic running program in the movable equipment, tabulate according to associated with, the operation automatic running program is carried out script, if this program is found the current CD that has been mounted with label " Mobile Partner " by name, then move automatic running program wherein, perhaps ought detect to have filled the backstage automatic running program is installed, and when version is not less than version in the CD, then no longer install, directly start the backstage automatic running program; If do not find the CD (being other movable equipment that is of current insertion) of " Mobile Partner " by name, then still carry out and eject automatically operation warning prompt.
Present embodiment is by creating the specific file that points to, the tabulation of modification associated with, realize to insert contain the mobile device of automatic running program after, do not eject alarm prompt and directly move the purpose of automatic running program, simple to operate and do not affect the use of other function of system.
Embodiment two
Present embodiment provides the example of automatic running, and the automatic operation method of embodiment one is described in further detail.As shown in Figure 2, the method comprises:
Step 201: will automatically move the execution script and be stored in the mobile device, such as called after " myautorun.sh ".At this take CD as example, this script is used for searching the whether famous file that is called particular optical disk label title (such as " Mobile Partner "), if have then enter according to priority from high to low the program of sequential search " .autorun ", " autorun " by name, " autorun.sh " etc. of this document folder, find any one namely to stop to search and moving this program.If do not find the file with " MobilePartner " name, then eject automatically operation warning prompt.
Step 202: will automatically move the sensing file of carrying out script and leave in the CD, such as the myautorun.desktop file.
Step 203: when the user uses movable equipment for the first time, detect and eject the alarm prompt frame behind the automatic running program in the movable equipment.
Step 204: directly transferred the backstage installation procedure after the user clicks and confirms, and in installation process, will automatically move carry out script and the sensing program copy to ~/the .local/share/applications path under, revise the associated with tabulation under this path, the sensing file of operation warning prompt replaces with the sensing file that automatic running program is carried out script with ejecting automatically.The user manually moves installation procedure after clicking cancellation from CD.
Step 205: when the user reuses movable equipment, detect the automatic running program in the movable equipment after, according to the associated with list (ACL) regulations, operation myautorun program;
Step 206: if find the current CD that has been mounted with label " Mobile Partner " by name, then move automatic running program wherein, perhaps ought detect to have filled the backstage automatic running program is installed, and when version is not less than version in the CD, then no longer install, directly start the backstage automatic running program;
Step 207: if do not find the CD (being other movable equipment that is of current insertion) of " Mobile Partner " by name, perhaps do not find this CD and backstage that automatic running program is not installed, then still carry out and eject automatically operation warning prompt.
Present embodiment is by creating the specific file that points to, the tabulation of modification associated with, realize to insert contain the mobile device of automatic running program after, do not eject alarm prompt and directly move the purpose of automatic running program, simple to operate and do not affect the use of other function of system; And by the specific file that points to, can only not eject alarm prompt for a certain particular device and directly move the purpose of automatic running program, can not affect the user to the use of other equipment.
Embodiment three
Present embodiment provides a kind of automatic running, and as shown in Figure 3, this device 300 comprises:
Copy module 301 is used under the path to local for the sensing file copy of automatic running program being carried out script and this script;
Modified module 302, the sensing file that automatically moves warning prompt for the ejection with the tabulation of the associated with under the path replaces with the sensing file that automatic running program is carried out script.
In addition, present embodiment also comprises, operation module 303 is used for moving automatic running program when automatic running program is carried out script and found particular file folder automatic running program is arranged; Pop-up module 304 is used for carrying out script when not finding particular file folder when automatic running program, ejects automatically operation warning prompt.
Wherein, operation module 303 can also be used for carrying out script when automatic running program and search the automatic running program of particular file folder and the automatic running program that install on the backstage, the automatic running program that install on automatic running program in the comparison document folder and backstage, when the version of the automatic running program of installing when the backstage is not less than automatic running program in the file, directly move the automatic running program that install on the backstage; When the version of the automatic running program of installing when the backstage is lower than automatic running program in the file, the direct automatic running program in the operating file folder.304 of pop-up modules eject automatically operation warning and carry not when automatic running program is carried out script and do not found particular file folder and when not finding the automatic running program of installing on the backstage.
In addition, present embodiment also comprises detection module 305, ejects warning prompt after being used for detecting automatic running program when the user's operative installations first time; Installation module 306 is used for the user and confirms the described automatic running program of rear installation.When the user used movable equipment for the first time, detection module 305 ejected the alarm prompt frame after detecting automatic running program in the movable equipment.After the user clicks affirmation, installation module 306 has directly been transferred the backstage installation procedure. and in installation process, by copy module 301 will automatically move carry out script and the sensing program copy to ~/the .local/share/applications path under, tabulate by the associated with that modified module 302 is revised under this path, the sensing file of operation warning prompt replaces with the sensing file that automatic running program is carried out script with ejecting automatically.The user manually moves installation procedure after clicking cancellation from CD, then do not carry out automatic running program.When the user reuses movable equipment, after device detects automatic running program in the movable equipment, according to the associated with list (ACL) regulations, operation myautorun program, search the whether famous file that is called particular optical disk label title (such as " Mobile Partner "), if have then enter according to priority from high to low the program of sequential search " .autorun ", " autorun " by name, " autorun.sh " etc. of this document folder, find any one namely to stop to search, by operation module 303 these programs of operation.If do not find the file with " Mobile Partner " name, then there is pop-up module 304 to eject automatically operation warning prompt.Perhaps, operation myautorun program, find the backstage automatic running program is installed, and when version is not less than version in the CD, then no longer install, directly start the backstage automatic running program by operation module 303, otherwise by the automatic running program in the operation module 303 direct operating file folders.When not finding this CD and backstage automatic running program not to be installed, pop-up module 304 ejects automatically operation warning prompt.
In another embodiment of the present invention, a kind of mobile device also is provided, this mobile device comprises above-mentioned automatic running, can realize automatically moving all functions in above-described embodiment, its composition is as described in the previous embodiment, does not repeat them here.
Present embodiment is by creating the specific file that points to, the tabulation of modification associated with, realize to insert contain the mobile device of automatic running program after, do not eject alarm prompt and directly move the purpose of automatic running program, simple to operate and do not affect the use of other function of system.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; the protection domain that is not intended to limit the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.