Search found 20 matches
- Monday 13th February 2023 6:09pm
- Forum: General
- Topic: Good practices to ask sudo password in GUI ?
- Replies: 9
- Views: 4399
Re: Good practices to ask sudo password in GUI ?
I understand your point of view. However, I don't want users run as root my app. I want to only run some commands as root. Because, my apps are packaged as AppImage and can run on any Linux as Fedora, Arch, Debian...
- Monday 13th February 2023 3:23pm
- Forum: General
- Topic: Good practices to ask sudo password in GUI ?
- Replies: 9
- Views: 4399
Re: Good practices to ask sudo password in GUI ?
I like the solution to start a terminal (or internal shell) and keep alive with adding multiples commands, in order to ask once password. But, the problem remain: how to ask only once the password, in a security way. If we use pkexec, then each command beginning with pkexec ask password again, even ...
- Sunday 12th February 2023 4:29pm
- Forum: General
- Topic: Good practices to ask sudo password in GUI ?
- Replies: 9
- Views: 4399
Re: Good practices to ask sudo password in GUI ?
You could have a look at my program Sudo_solution that is on the Gambas Farm and available here https://www.cogier.com/gambas/Sudo_Solution.png I did it a try. It works, but it's not very good for security. Why the command is executing twice? First: If InStr(sCommand, "2>&1") Then 'If...
- Sunday 12th February 2023 7:32am
- Forum: General
- Topic: Good practices to ask sudo password in GUI ?
- Replies: 9
- Views: 4399
Good practices to ask sudo password in GUI ?
Hello, My app require sudo to fully operate. In order to avoid start my app with sudo or pkexec, what are the good practices to ask the password while running the GUI app? I tried the following, but each pkexec still ask password instead of once. Exec ["pkexec", "apt", "upda...
- Monday 6th February 2023 6:01am
- Forum: General
- Topic: [Solved] Package as Appimage
- Replies: 15
- Views: 18091
Re: Package as Appimage
Topic solved after some years! I successfully package my gambas apps as AppImage with the following guide: https://appimage-builder.readthedocs.io/en/latest/examples/gambas3.html Note: the full path of the gambas project must to be without space. The AppImage compiled for Ubuntu 20.04 works better t...
- Tuesday 31st March 2020 9:35am
- Forum: General
- Topic: [Solved] Read last line from Process
- Replies: 5
- Views: 7272
Re: Read last line from Process
Solved: I was not on the right the way. In Process_Read() we need to use Line Input instead of Read for that context. hProc = Exec ["command"] For Read As "Contents" Public Sub Contents_Read() Dim sLine As String Repeat Line Input #hProc, sLine Until sLine = "textcondition&q...
- Sunday 29th March 2020 12:26pm
- Forum: General
- Topic: [Solved] Read last line from Process
- Replies: 5
- Views: 7272
Re: Read last line from Process
I known already it, I know read the help of Gambas ;) Read #Last, sLine, -256 It's not the answer I need. Currently, this line return the whole output. Considering a bash command which run in an infinite loop. I want only the last line of the standard output, test it with my condition and let the ru...
- Sunday 29th March 2020 8:28am
- Forum: General
- Topic: [Solved] Read last line from Process
- Replies: 5
- Views: 7272
[Solved] Read last line from Process
Hello, Considering the following concept bash: command | while read line; do if [ "$condition" == "$line" ]; then echo "$line" break fi done With an example: x=10 (while :; do echo "$x"; x=$(( $x + 1 )); done) | while read line; do if [ "256071" == &...
- Wednesday 25th March 2020 3:36pm
- Forum: Lounge
- Topic: B4A will soon be free and partially open source
- Replies: 5
- Views: 11449
- Wednesday 25th March 2020 3:29pm
- Forum: Lounge
- Topic: Ubuntu 18.04
- Replies: 2
- Views: 7693
Re: Ubuntu 18.04
Considering:
https://packages.ubuntu.com/search?suit ... ds=gambas3
Gambas3 is in Ubuntu's repository for 16.04, 19.04, 19.10 and 20.04 but not for 18.04, in your opinion, why ?