[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re (2): autostarting a terminal.



On 10/3/13, Pontus Goffe <goffe.pontus@gmail.com> wrote:
> 2013-10-03 00:57, peasthope@shaw.ca skrev:
>>> your issue looks similar to this:
>>>
>>> http://superuser.com/questions/593246/launching-a-shell-script-via-desktop-in-raspbian-wheezy
>>
> And what if the shellscript needs to be prefixed with sudo?
> I have tried the below, both runs sudo which asks for password but
> /home/me/test.sh is not being executed
> Exec=lxterminal --command "sudo /home/me/test.sh"
> Exec=lxterminal --command "sudo bash /home/me/test.sh"
> //PG

Use gksudo, or whatever equivalent for QT.

I ended up creating my own shell script to determine if I am in
command line session, and use sudo or gksudo appropriately - I do wish
gksudo had a fall-back built in, because figuring this out within a
shell script seems like a cludge to me.

Good luck
Zenaan


Reply to: