[S] how do I create a link symbolic in Desktop through rules in udev ?

Hi everyone!
My Rule:
[solano@localhost ~]$ cat /etc/udev/rules.d/01-montagem.rules
KERNEL=="sd[c-z]", NAME="%k", SYMLINK+="usb%m", GROUP="users", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/usb%n"
ACTION=="add", KERNEL=="sd[c-z][0-9]", PROGRAM=="/lib/udev/vol_id -t %N", RESULT=="vfat", RUN+="/bin/mount -t vfat -o rw,noauto,flush,quiet,nodev,nosuid,noexec,noatime,dmask=000,fmask=111 /dev/%k /media/usb%n", OPTIONS="last_rule"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,dirsync,noexec,nodev,noatime /dev/%k /media/usb%n", OPTIONS="last_rule"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/usb%n"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir /media/usb%n", OPTIONS="last_rule"
I dont got configure my arch to create a icon in desktop when I plug a USB device, thus I try add a line in my udev.rules in /etc/udev/rules.d/01-montagem.rules to create a link in desktop when mounted device by add :
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/cp /media/usb%n /home/solano/Desktop/usb%n"
however it dont work, then I come here for help of you to try  'fix ' it.
Thanks and sorry by poor english.
Last edited by solanoalves (2008-02-28 03:34:36)

Try these rules
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/ln -s /media/usb%k /home/solano/Desktop/usb%k"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rm -f /home/solano/Desktop/usb%k"
The first rule should be placed before your mount rule and the second rule should be placed before your umount rule (it's important because mount rules are using OPTIONS="last_rule"). Also I'm using %k not %n because when you unplug your usb stick %n might return an empty string causing the second rule to not work. However if %n works for you (which means the link is created and deleted on usb stick removal) you can change %k to %n (the replacement must be done in all rules of course).
Last edited by lanrat (2008-02-28 02:50:53)

Similar Messages

  • How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can"t find in any of the tutorials.

    How do you create a link to a pdf in Muse? Thought it was going to show that with Katie's menu and can't find in any of the tutorials.

    The steps would be :
    - Add files from file menu > select pdf > add to site
    - Select the content (rectangle,text etc) and click on hyperlink dropdown > it should show you the added files list
    - Select the file you want to link
    Thanks,
    Sanjit

  • How can I create a link from a CHM file to a webhelp file?

    How can I create a link from a CHM file to a webhelp file?
    The CHM output (accreditation.chm) is stored in a parent directory, and the webhelp output (index.htm) is stored in a child directory.

    Open the usual Link dialog and enter the relative path from where the CHM will be installed to where the webhelp will be installed.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How can I create a link on an image?

    How can I create a link on an image?

    Select your image and in the hyperlinks tool on the toolbar simply type in your site address you want to link to. be sure to include the http:// before the domain name.

  • How do i create a link to an Anchor in Adobe Muse so that i can add the link in an email?

    How do i create a link to an Anchor in Adobe Muse so that i can add the link in an email?

    Create your anchor normally then in your email for example if your anchor is on your index page your link would look like http://www.yoursite.com/index.html#youranchor

  • How can i Create Database Link

    Dear Expert,
    I have two servers on that there are two databases then
    how can i create database link.

    CREATE [SHARED][PUBLIC] DATABASE LINK link_name
    [CONNECT TO user IDENTIFIED BY password]
    [AUTHENTICATED BY user IDENTIFIED BY password]
    [USING 'connect_string']

  • How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?

    How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
    Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
    I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
    Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
    I need to know details. Thanks.
    USE master
    go
    EXEC sp_addlinkedserver
         @server  = '{Linked Server Name}'
        ,@srvproduct = '{System DSN Name}'
        ,@provider  = 'MSDASQL'
        ,@datasrc  = '{System DSN Name}'
    EXEC sp_addlinkedsrvlogin
         @rmtsrvname = '{Linked Server Name}'
        ,@useself  = 'False'
        ,@locallogin = NULL
        ,@rmtuser  = '{Oracle User Name}'
        ,@rmtpassword = '{Oracle User Password}'

    You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
    You should not use MSDASQL or any DSN.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How do I create a link from my site to my facebook page?

    How do I creat a link on my site to go to my facebook page?

    This MacWorld page may be of interest to you....
    http://www.macworld.com/article/143631/2009/11/fbiweb.html

  • How do I create the copyright symbol in photoshop CS6?

    How do I create the copyright symbol in Photoshop CS6, Windows7?  Alt+0169 does not work. 

    I just use Character Map, and Copy/Paste the © symbol.
    With the Alt+ keys are you using the numerical keypad, or the numbers at the top of the QWERTY? Is NumLk ON?
    Good luck,
    Hunt

  • How do I save a link to my desktop?

    How do I save a link to my desktop. In IE I used to save a link to my desktop for a website that I wanted to look at again. I guess I could bookmark it, but I usually only do that for sites that I visit often. In IE the option was under File > Send Link. Any ideas or suggestions?

    Hey terenceholt,
    This is actually really easy to do. All you have to do is go to the webpage that you want to bookmark. Click on the site icon to the left side of the URL and drag the icon to your desktop.
    It's probably easier to see it done, so you should look at the KB article [[Creating a desktop shortcut to a web page]].
    Hope this helps!

  • How do I redirect HOME link to anonymous desktop?

    Hi,
    May I know how to redirect the Home link back to anonymous desktop?
    Thank you very much.

    You can customize templates for the anonymous desktop by editing the menubar.html file and changing settings in the administration console.
    Edit the HREF definition for the Home link in the /etc/opt/SUNWips/desktop/default/iwtDesktop/menubar.html file.
    The following format reveals on how to set the home link from the desktop to be redirected to the anonymous desktop:
    <a href="/home?goto=/login/Anonymous?domain=mydomain>home</a>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do I create a link to a different page in my portal website

    This is probably a no brainer for someone. I've got Oracle Portal 10.1.4, and I'm writing a portlet. I want to create a link in that portal to another page in the portal. How should I do that in Java? Currently when I put in the link to the other page it just loads in the current portlet cell.
    Thanks mucho!
    ft

    >Would the following be a part of it:
    >
    >Outer join
    Probably not. When updating/inserting/deleting from 2 tables you perform each seperately. Table updates may join two or more tables to resolve the correct row(s) but you still only update one table at a time. Procedurally you would create a transaction, update the first table, update the second table and then commit the transaction.
    EDIT: Well I take back my last comment. I see that MySQL does seem to support multiple table updates. I don't use MySQL so I can't really help you on that but the MySQL manual gives pretty clear syntax.

  • Contact Form: How do i create a link from an XML file to another domain to read a PHP File

    So i purchased a template from Template Monster and im having a little trouble with the contact form. The server that im uploading it to is a privite server that the company owns. It supports ASP and not PHP. I cant seem to get the ASP form to work so all i want to do it create a link to another one of there servers that supports PHP and have the contact form link to there and read the PHP file (that i will upload to that server) and send the email from there.
    This is the XML that i have to fill in in order to make it work
    Everything in Red is what i needed to fill out in order for the form to work.
    <?xml version="1.0" encoding="utf-8"?>
    <!--
            Please read this information to learn how to set up the contact form integrated
            into the template.
            This readme file explains in details the meaning of the settings that can be
            done in the fcContactFormConfiguration.xml configuration file.
            It is recommended for you to use an XML editor to make changes to this file
             because it’s less possible to make an error in the markup which can cause to
            a not working contact form.
      -->
    <contactFormConfiguration>
        <!--
                An e-mail address which will be used to receive messages from your contact form.
                You can specify several e-mail addresses separating them with a comma.
                For example: [email protected], [email protected], [email protected]
          -->
        <emailTo>[email protected]</emailTo>
        <!--
                A server script type which will process sending e-mails. It depends on your
                hosting and in the current version of the contact form it is allowed to use
                two types:  php (Apache, PHP Hosting); asp (IIS web server, ASP).
          -->
        <serverProcessorType>php</serverProcessorType>
        <!--
                A name of the script file which process sending e-mails on your server (without
                extension). The name contact is used by default.
          -->
        <serverProcessorFileName>contact</serverProcessorFileName>
        <!--
                Set whether to validate only required fields (true/false).  The default value is
                true which means the not required fields of your contact form will not be validated.
                For example if the e-mail field of your form is set as not required (imagine it)
                the form will be processed even if the user types in an incorrect e-mail address.
          -->
        <validateRequiredOnly>false</validateRequiredOnly>
        <!--
                Set whether to submit the form when the Enter key is pressed even if the focus is
                not on the Submit button (true/false).
          -->
        <submitFormOnEnter>false</submitFormOnEnter>
        <!--
                Text showing to the user when the form is submitted without any errors.
          -->
        <messageSentText>Thank you for your message.</messageSentText>
        <!--
                Text showing in case the form is not submitted because of a server error.
          -->
        <messageSentFailedText>Sorry, your message couldn't be sent</messageSentFailedText>
        <!--
                Text your visitor will see while waiting till the processing is over.
          -->
        <formProcessingText>processing...</formProcessingText>
        <!--
                Your SMTP server (for ASP only).
          -->
        <smtpServer>localhost</smtpServer>
        <!--
                Your SMTP port (for ASP only).
          -->
        <smtpPort>25</smtpPort>
        <!--
                Set whether to send the message as a plain text (true) or as HTML (false).
          -->
        <plainText>false</plainText>
        <!--
                ID of the input field (in the structure XML file) to use for the “from: ”
                or email to use instead (for example: [email protected]).
          -->
        <emailFromSource>2</emailFromSource>
        <!--
                Subject of the e-mails that will be sent through this contact form or ID of
                the input field (in the structure XML file) to use for the “subject: ” label
                in your e-mail client.
          -->
        <subjectSource>Contact Form from your site</subjectSource>
        <!--
                Validation error messages that are showing to the user when the form fails to
                validate. The form supports different types of validators. You can change the
                text of the error messages the validators produce here.
                You can use the {LABEL} keyword in these messages. It will replace it with the
                label value of the field where an error occurs.
          -->
        <validationErrorMessages>
            <!--
                    A required field is not filled in.
              -->
            <message type="fieldIsRequired">{LABEL} is required.</message>
            <!--   
                    The specified e-mail address is incorrect.
              -->
            <message type="emailNotValid">{LABEL} - is not valid email address.</message>
            <!--
                    The specified number of characters in a field is less than a required minimum.
              -->
            <message type="minCharsLimitError">{LABEL} - The specified number of characters in a field is less than a required minimum.</message>
            <!--
                    The specified string does not match with the regular expression.
              -->
            <message type="reqExpError">{LABEL} - The specified string does not match with the regular expression.</message>
            <!--
                    The specified number is greater than an acceptable biggest number for this field.
              -->
            <message type="biggerThanMaxError">{LABEL} - The specified number is greater than an acceptable biggest number for this field.</message>
            <!--
                    The specified number is lower than an acceptable lowest number for this field.
              -->
            <message type="lowerThanMinError">{LABEL} - The specified number is lower than an acceptable lowest number for this field.</message>
            <!--
                    The data is not a number.
              -->
            <message type="notANumberError">{LABEL} - The data is not a number.</message>
            <!--
                    The specified number must not be negative.
              -->
            <message type="negativeError">{LABEL} - The specified number must not be negative.</message>
            <!--
                    The minimum number of variants is not selected
              -->
            <message type="minRequirementError">{LABEL} - The minimum number of variants is not selected</message>
            <!--
                    The number of variants selected exceeds the maximum
              -->
            <message type="maxRequirementError">{LABEL} - The number of variants selected exceeds the maximum</message>
            <!--
                    The fields that should be equal do not match
              -->
            <message type="shouldBeEqualError">{LABEL} - values do not match</message>
            <!--
                     The date has wrong format.
              -->
            <message type="dateIsNotValidError">{LABEL} - date has wrong format</message>
        </validationErrorMessages>
    </contactFormConfiguration>
    THIS IS THE ACTUAL CONTACT.PHP Form That i would like to link to.
    <?php
    //-----------------Getting data sent by flash---------------------
    foreach ($_POST as $key => $value){
            if ($key != 'mail_to' && $key != 'smtp_server' && $key != 'smtp_port' && $key != 'mail_from' && $key != 'mail_subject' && $key != 'plain_text'){
                $mail_body .= '<b>'.str_replace('_',' ',$key).'</b>:<br/>';
                $mail_body .= ''.stripslashes($value).'<br/>';
    $message = '<html><body>'.$mail_body.'</body></html>'; //  mail body
    //------------if plain text is set to true removing html tags------
    if ($_POST['plain_text']=='true') {
        $message = str_replace('<br/>',"\r\n", $message);
        $message = strip_tags($message);
    } else {
    //----otherwise composing message headers---------------------------
        $headers  = 'MIME-Version: 1.0' . "\r\n";
        $headers .= 'Content-type: text/html; charset=windows-1251' . "\r\n";
    //------------setting conf data-------------------------------------
    $to = $_POST['mail_to'];
    $from = $_POST['mail_from'];
    $subject = $_POST['mail_subject'];
    $smtp_server = $_POST['smtp_server'];
    $smtp_port = $_POST['smtp_port'];
    //---------setting header info--------------------------------------
    $headers .= 'From:' .$from;
    if (mail($to, $subject, $message, $headers)){ // sending mail
        print('&mail=1');  //succes
    } else {
        print('&mail=0');//failure
    ?>

    You can open both Muse files at once, copy the content of a page on one site, then paste it into a new page on the other site. You might have to redo some of the page styling.

  • How do I create a link to the middle of a page with Inherit Zoom?

    I keep going around and around on this.  I am using Adobe Acrobat XI Pro and I'm trying to create an internal link in the PDF to go to the middle of the page somewhere else in the same document.  I don't want to change the user's zoom level.
    I can create a bookmark that does this by adding tags and having the bookmarks created from those tags (which is a ludicrious process, but at least a way).  But links don't seem to attach to bookmarks or tags.
    I can create a link that does exactly this by creating a document in MS Word, using styles and links to those styles and then saving it as a PDF.  So I know the PDF itself can do this, I just can't figure out how to do it through Adobe.
    Is there any way to create a link to a tag or to a bookmark?  Setting a link to Page View always changes the zoom level, and then if I change the zoom back to Inherit Zoom the link just goes to the top of the page.
    Any ideas?
    Thank you,
       Chris

    Hrm, I feel like I'm just missing something obvious.  Here are the exact steps I'm taking:
    Have zoom level up high enough so you're only seeing part of a page.
    Click "Add or Edit Link"
    Draw a box around the text.
    Link Appearance:
    Link Type: Invisible Rectangle
    Highlight Style: Invert
    Link Action: Go to a page view
    Click "Next"
    Scroll down so I'm looking at the middle of the next page.
    Click "Set Link".
    Right-click on the link-box and click "Properties..."
    Click "Actions" tab and then "Edit" and change the Zoom to "Inherit Zoom".  "OK" back to the page.
    Change zoom level, use the hand icon and click on the link.
    I'm taken to the top of the correct page and my zoom level doesn't change.  I am not taken to the middle of that page, though.
    Do you experience different behaviour?

  • How can I create a link to download a file in Captivate?

    So, in my Captivate file, I want people to be able to download an XML file to their machine.  If I create a hyperlink to "open a file", then when a user clicks on it, captivate attempts to open the xml file in a browser window instead of downloading it.  I can't figure out how to use the download attribute for an href in captivate and I'm not sure if javascript to do this would execute properfly.  Anybody know the best way to accomplish a force download of a file from a captivate presentation (Captivate 6)?
    TIA.

    If you want to really do this so that it is consistent for all browsers, you'll need to implement this at the server level.  I did this with the Dynamic PDF Export Widget.  Typically, a PDF will be displayed in the browser, but I added the ability to download it instead.  It does require a PHP file (or some other server side script).  In the PHP file, you'll want to set the response header for Content-Disposition to "attachment"... that's the key.
    The elbow grease part has to do with managing how the browser handles the link.  You'll want the Captivate hyperlink to open a new window so that the student does not navigate away from your course in the current window.  But since you are opening a PHP file, you can inject javascript into the document of the new window/tab to close itself.  The download will still continue eventhough the window/tab was programmatically closed.  However, most modern browsers will automatically close the window/tab for you when downloading a file.  If you want to see an example of a PHP file that implements this, go ahead and download the trial version of the Dynamic PDF Export widget.  You'll see the create.php file in the zip package.
    http://captivatedev.com/2012/07/25/adobe-captivate-6-x-widget-dynamic-pdf-export/
    If you want to go simple as TLC Media Design suggested, just zip it and let your students unzip the xml file, or just rename the xml file with a .zip extension and tell them to rename the file back to .xml after downloading.

Maybe you are looking for

  • Error when activating DSO data

    On activation, I see the following error in ST22: Invalid column name 'TCTIVAL60' Any idea? Thanks in advance!

  • Can't Import Word docs into RH9

    Each time I try importing a Word document into RH9 I get an error message stating the the Import session failed (0x80004005). Word 2010 is installed on my machine. Any clues what could be causing this issue?

  • Download NWDS 7.0

    Hi, I need download NWDS 7.0 for developer web dynpro develoment component, but I don't find where I can download. I only finded NWDS 7.3 and NWDS 7.1, ¿anyone can help me? thanks. 

  • How to export and import cookies with iMac?

    I have an IMac and a new MacBook air. How do I export cookies from the iMac and import to Mac Book Air?

  • Transaction help: "Invalid permission to access service ChartServlet"

    Hi - I am working on a transaction that generates a PDF report. I am using SAP MII v. 12.1.6. The transaction contains two iCharts and one PDF table. When I run the transaction from our web page (a button that runs the transaction) I get the PDF repo