ubuntu下編寫shell指令碼並在桌面上設定快捷方式
1、sudo gedit realsense.sh
#! /bin/bash
realsense-viewer
2、pwd
/home/suns/Workspace/zz/ '''輸出sh檔案所在的資料夾'''
3、go to /usr/share/applications:
sudo gedit realsense.desktop
4、add:
[Desktop Entry]
Encoding=UTF-8
Name=realsense
Type=Application
Icon=cheese '''圖示可自選,換對應的路徑即可'''
Categories=Application;
StartupNotify=true
Terminal=false
Exec=sh /home/suns/Workspace/zz/realsense.sh '''sh 後跟 要執行sh檔案的絕對路徑即可'''
5、sudo chmod a+x realsense.desktop '''給該檔案賦予許可權'''
6、把生成的圖示拖到桌面上即可直接點選開啟
相關推薦
ubuntu下編寫shell指令碼並在桌面上設定快捷方式
1、sudo gedit realsense.sh #! /bin/bash realsense-viewer 2、pwd /home/suns/Workspace/zz/ '''輸出sh檔案所在的資料夾''' 3、go to /usr/share/a
idea下編寫shell指令碼並執行
1.前提是安裝了git,目的是能夠在windows下執行shell指令碼 2.在idea的plugins中找到外掛bashsupport並安裝,然後重啟idea 3.然後新建一個shell檔案:shell.sh 4.右鍵執行,會報錯,因為沒有找到執行shell
Linux系統下編寫shell指令碼傳入引數列印系統當前執行緒數到指定檔案
最近在做效能測試,要檢視系統執行過程中執行緒數,很簡單輸入命令:netstat -anp |grep java |wc -l,可以查詢。但是如何在執行過程定時列印系統執行緒數且將結果輸出到指定檔案呢?也很簡單我們直接寫一個shell指令碼執行下就可以了。以
Ubuntu系統編寫shell指令碼程式一次安裝多個軟體包
#!/bin/sh sudo apt-get install gcc g++ python -y sudo apt-get install gcc g++ python python-dev -y sudo apt-get install mercurial -y sudo apt-get install b
編寫shell指令碼在Linux上無法正常執行
用Windows版的notepad++編寫的指令碼怎麼都無法在Linux上執行,後來才發現是因為沒有轉換成Unix格式,所以Linux上對於空格跟回車識別不了, 解決: 在notepad++右下角window那個地方右鍵(也可以在頂部選單欄尋找),選擇Unix格式再傳到L
windows下編寫shell指令碼放到linux執行問題
在windwos下用記事本編寫了個shell指令碼,拿到cygwin下執行沒問題,但是拿到linux下執行就出問題,顯示: :bad interpreter:no such file or directory 出現問題的原因就是“行終束符”,unix/linux使用 換行符;而dos/windows使用 回
Windows服務System權限下在當前用戶桌面創建快捷方式C#實例程序
col .com inf png font system windows服務 href .cn Windows服務一般運行在System權限下,這樣權限比較高,方便執行一些高權限的操作。 但是,Environment.GetFolderPath等函數獲取的也是System用
如何在Linux桌面上建立快捷方式
在Linux桌面上建立資料夾,應用程式,檔案等快捷方式時遇到了問題,最終根本沒有建立一個快捷方式? 好訊息! 有一種方法可以使用終端程式解決這個問題。 在Linux中,您使用此實用程式ln建立符號連結或軟連結以指向連結檔案。 讓我們來看看吧,好嗎? 執行該命令後,您會注意到桌面上的新資料夾圖示看
ubuntu下安裝微信客戶端以及建立快捷方式
1. 安裝微信客戶端首先,安裝 git 、nodejs 和 npm:(1) git 安裝:sudo apt-get install git(2) nodejs 和 npm 安裝:然後,安裝微信客戶端:# Clone this repository git clone http
在Linux命令行下編寫C語言並上傳到GitHub
shu userinfo dtc blank apc gty disk spc via 1u16z7玫秩唾陡夷奔http://huiyi.docin.com/glk92214lt91p糖磷堪按回駒http://shufang.docin.com/dyi193xe775a羋誆
linux下使用shell指令碼開啟多個terminal並在其中執行程式的方法
gnome-terminal(是一種模擬終端器,一說是ubuntu的terminal就叫gnome-terminal)命令用於開啟一個新的終端,直接在命令列 $ gnome-terminal 就可以開啟一個新的終端,有一些常用引數: 開啟後自動最大化 $ gnome-terminal --maxim
關於nagios系統下使用shell指令碼自定義監控外掛的編寫以及沒有實時監控圖的問題
關於nagios系統下shell自定義監控外掛的編寫、指令碼規範以及沒有實時監控圖的問題的解決辦法 在自已編寫監控外掛之前我們首先需要對nagios監控原理有一定的瞭解 Nagios的功能是監控服務和主機,但是他自身並不包括這部分功能,所有的監控、檢測功能都是通過各種外掛來完成的。 啟動Nagios後,
ubuntu 編寫shell指令碼自動抓包
國慶節之後,好多課結課了,其中一門是實驗課,我們小組的任務是使用wireshark和 編寫ubuntu shell 指令碼抓包 我負責的是編寫shell指令碼抓包 大神們可能覺得超級簡單,可是我是小白,覺得還挺麻煩的。 #!/bin/bash filename='v
ubuntu下編寫並執行第一個c語言程式
對於初入Ubantu系統的小夥伴來說,進入Ubuntu最想做的事莫過於在終端(Terminal)裡執行自己的第一個C/C++程式"hello.c/hello.cpp"了。 Ubuntu預設是不包含編輯器vim和編譯器gcc。如果你是剛安裝好的Ubuntu電腦,下面我們將
linux下的shell指令碼編寫
下面我參考網上寫的較好的文章,加上自己的一點理解修改。僅供看家參考。 Shell是一種具備特殊功能的程式,它是結語使用者和UNIX/Linux作業系統核心程式(kernel)之間的一個介面。是為了遮蔽核心的複雜性,也為了保護核心以免使用者誤
cygwin安裝教程以及使用notepad++編寫shell指令碼,並通過cygwin執行
cygwin是一個windows平臺上的unix模擬環境,主要是通過重新編譯,將posix系統上的軟體移植到windows上。相信很多朋友想安裝cygwin,但是不知道怎麼安裝,因為都是英語,對於跟英語不感冒的人來說是件痛苦的事,下面綠茶小編和大家分享cygwin安裝步驟。
linux下如何編寫shell指令碼_2012-12-21
因為我的同事cwl有事情請假兩天,所以需要我直接和lenovo進行交涉,我需要些一個簡單的測試程式,這裡用到了編寫shell指令碼,實現兩個c程式的編譯。我對shell指令碼的認識,除了執行過同事寫的shell 指令碼外,其他一無所知,為了讓自己強大
linux 下使用expect編寫shell 指令碼互動訪問遠端伺服器
使用命令列登陸遠端伺服器一般需要ip地址以及登陸密碼等,每次都手動輸很不方便,expect可以滿足自動輸入密碼。下面是詳細的介紹: 首先安裝expect: 我用的是ubuntu14.04,使用sudo apt-get install expect即
ubuntu下 給eclipse創建桌面啟動快捷圖標
修改 tar type entry mina sha ubun ati odin 1、在/usr/share/applications創建一個名為“eclipse.desktop”的文件 具體命令為: gedit eclipse.desktop 並添加以下內容: [D
Ubuntu下怎麽編譯並運行C、C++和Pascal語言?
tro 開始 用戶 步驟 ide gcc 但是 col inf 很多同學在安裝了Ubuntu的環境後,發現在Windows下的許多東西都打不開了,但是用網站上的在線IDE又不是很方便。 所以,ljn教你如何在Ubuntu下編譯並運行C、C++和Pascal。 一.編譯並