FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2006
    Location
    Sydney Australia (GMT +10)
    Age
    47
    Posts
    123

    How do you create scripts or automation tasks?

    Hi ive just recently installed nicotine on my system and I can only start it by browsing to the folder in terminal and then executing a command to start it. I tried to create an RPM as advised by the install help document that came with it but it only created a new install tree rather than an RPM. The question is can I make a script that will execute these 2 commands
    cd /usr/bin/nicotine+-1.2.2
    python ./nicotine

    for me and then link it to an item on my menu so I dont have to go into terminal and run the commands everytime I want to start the program?

    Or does anyone know what it takes to create an RPM from the source tree?
    electroconvulsive :cool:

  2. #2
    Join Date
    Jun 2005
    Posts
    723
    about the script, use these comands in the terminal:
    cat >> /home/nicotine
    #!/bin/sh
    cd /usr/bin/nicotine+-1.2.2
    python ./nicotine
    press ctrl-C
    chmod 755 /home/nicotine
    now you can take that script and execute it at will.
    Never tried to create a rpm, and can't give advice there

  3. #3
    Join Date
    Jun 2005
    Posts
    723
    Kde has a easy way edit, just right-clik on the kmenu button in the taskbar, and select edit.
    The comand to execute the script is:
    /home/./nicotine

  4. #4
    Join Date
    May 2006
    Location
    Sydney Australia (GMT +10)
    Age
    47
    Posts
    123
    Thanks for the advice multescugeorge@. But I want to know what the commands mean. The first command seems to not want to execute so I need to know what i'm doing. Just so I can get it going and for educational purposes as well.
    electroconvulsive :cool:

  5. #5
    Join Date
    Oct 2005
    Posts
    1,952
    you'll also probably need to do a:

    # chmod +x /home/nicotine

  6. #6
    Join Date
    May 2006
    Location
    Sydney Australia (GMT +10)
    Age
    47
    Posts
    123
    The command cat >> /home/nicotine does not seem to execute. Terminal hangs when this command is used. Is this becauase you are using KDE and not gnome as I am. I am also executiing this from the root account. What does this command do? does it create a file? if it does I can create it manually.
    electroconvulsive :cool:

  7. #7
    Join Date
    May 2006
    Location
    Sydney Australia (GMT +10)
    Age
    47
    Posts
    123
    Thanks I got it happening sorry about the superphelous question. I just thought that without the username etc. in terminal it wouldnt work but that is what the CTRL+C was for to finish the command. AHA. Now if i substitute home for another directory in the first line it will create the shell script in that directory and will still work wont it? Or can I move the shell script to any folder of my choice?

    Thankyou so much. The information was invaluable.
    electroconvulsive :cool:

Similar Threads

  1. F8 keyring automation in KDE?
    By Frank616 in forum Installation, Upgrades and Live Media
    Replies: 5
    Last Post: 22nd December 2007, 10:11 AM
  2. Batch Automation/Scripts in GIMP
    By Logik in forum Using Fedora
    Replies: 3
    Last Post: 14th December 2007, 01:38 AM
  3. Automation of modprobe/dhclient
    By mijokijo in forum Using Fedora
    Replies: 0
    Last Post: 19th June 2005, 04:03 AM
  4. Nvidia graphics automation
    By jameson in forum Using Fedora
    Replies: 8
    Last Post: 24th August 2004, 06:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •