• linux 下 将 shell script 与 一个桌面图标联系在一起


    I
    http://forum.soft32.com/linux2/Run-shell-script-desktop-icon-ftopict51996.html
     am using KDE as my user interface. How can I create a shortcut icon
    on the desktop that will run a shell script in a shell window?

    I want to be able to click an icon on the destop and have it open a
    shell window and start running a shell script.

    Thanks,
    Back to top
    Login to vote
    Michael Heiming

    External


    Since: Aug 19, 2003
    Posts: 2577



    (Msg. 2) Posted: Thu Oct 05, 2006 5:29 am
    Post subject: Re: Run shell script from desktop icon [Login to view extended thread Info.]
    Archived from groups: per prev. post (
    more info?)

    In comp.os.linux.setup Ch <ChrisDLWork06 DeleteThis @gmail.com>:
    > I am using KDE as my user interface. How can I create a shortcut icon
    > on the desktop that will run a shell script in a shell window?

    > I want to be able to click an icon on the destop and have it open a
    > shell window and start running a shell script.

    Well, right click somewhere on the empty desktop.

    Create New ->

    Link to Application
    Application
    (Enter Command Ie. "~/bin/my_script.sh")
    Advanced Options
    [x] Run in terminal

    I wonder that you couldn't figure this out just from clicking
    around?

    Good luck

    --
    Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
    mail: echo zvpunry DeleteThis @urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
    #bofh excuse 117: the printer thinks its a router.
    Back to top
    Login to vote
    marijuanated

    External


    Since: Oct 04, 2006
    Posts: 14



    (Msg. 3) Posted: Thu Oct 05, 2006 10:51 pm
    Post subject: Re: Run shell script from desktop icon [Login to view extended thread Info.]
    Archived from groups: per prev. post (
    more info?)

    You can also do this:

    right click somewhere on the empty desktop

    Create New ->

    Link to Application
    Application
    (Enter Command Ie. "xterm -e -hold ~/bin/my_script.sh")

    If you want the xterm to hold till the script is done running.
  • 相关阅读:
    FastDFS 与 Nginx 实现分布式图片服务器
    git(三) 使用github
    html表单笔记
    Jquery笔记和ajax笔记
    CSS笔记
    javascript笔记
    idea笔记
    spring boot 框架设计步骤
    spring boot启动项的问题
    Loading class `com.mysql.jdbc.Driver'. The new driver class is `com.mysql.cj.jdb 问题
  • 原文地址:https://www.cnblogs.com/cy163/p/1486906.html
Copyright © 2020-2023  润新知