2012-11-08 44 views
1

我已經將一個shell腳本與從命令行啓動的選擇菜單放在一起。你們有什麼想法,我怎麼可以從一個關鍵的中風從GUI啓動它?從某個按鍵啓動GUI的選擇菜單(BASH腳本)

我正想着如何在切換到其中一個虛擬終端後立即啓動腳本。 (CTR-ALT-F1)。是這樣的可能嗎?

GUI Shell腳本選項似乎非常有限。

+1

請編輯您的問題,刪除所有不必要的信息。這個網站是針對「一般」問題。讓你的問題更一般化。 –

+0

那是一般的嗎? – Matthew

回答

0

在LXDE中,您可以將操作綁定到組合鍵。請參閱Openbox幫助中的Bindings

+0

完成!我用這個和xterm來啓動我的腳本。感謝您的幫助Choroba – Matthew

0

如果要使用虛擬終端(不含LXDE),則可以編輯/etc/init/tty6.conf並將末尾的exec行更改爲腳本。

# tty6 - getty 
# 
# This service maintains a getty on tty6 from the point the system is 
# started until it is shut down again. 

start on runlevel [23] and not-container 

stop on runlevel [!23] 

respawn 
exec /path/to/your/script 
+0

你是男人!我現在要試試這個! – Matthew

+0

當腳本退出時,是否可以將其啓動回GUI? – Matthew

+0

沒有想到..「chvt 7」 – Matthew