Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
5
votes
4
answers
7419
views
How can I change Zenity dialog icon?
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png i...
I want to change the default icon of any dialog in zenity , I write this line of code for ERROR Dialog
zenity --error --text='Icon As It Is' --window-icon=/home/ --icon-name=64.png --no-wrap
From above Line I succeed To remove default icon, But I want To Change the default icon with 64.png (64.png is 64*64 screen resolution image).
The default icon in the dialog box for error is ' -(Minus) sign in red colour' ,for info ' small i in blue color '. It's this icon I want to change.
I am using Linux mint 19.
AlphaCoder
(173 rep)
Dec 8, 2018, 01:14 PM
• Last activity: May 26, 2025, 09:28 AM
3
votes
1
answers
184
views
zenity-like tool to get multi-element forms with shell scripts?
I like to use `zenity` to prompt the user for input in in shell scripts, or display information to them - those scripts run on a desktop, and might be minimized or stacked behind other windows, so having a little pop-up is nice. Sometimes I would like to prompt for more than one input field at a tim...
I like to use
zenity
to prompt the user for input in in shell scripts, or display information to them - those scripts run on a desktop, and might be minimized or stacked behind other windows, so having a little pop-up is nice.
Sometimes I would like to prompt for more than one input field at a time; say, a login and a password. Is there a tool that would do this in a way that is as trivial to add in a random shell script as zenity
? The prompt should pop up as a little X window just as zenity
does. I have nothing against a more persistent window, but usually don't need it. I do not wish to invert the control flow as is often the case for more "intense" GUI applications (i.e. the control flow should stay as it is in shell scripts, I do *not* wish to make the GUI event loop the main thing, with the shell commands being called from the GUI).
If it matters, this is on a Gnome desktop; I am OK with a Gnome-specific solution, but happy with everything else too.
AnoE
(947 rep)
May 23, 2025, 07:48 AM
• Last activity: May 23, 2025, 08:18 AM
0
votes
0
answers
26
views
Zenity Access Keys
The [Gnome Help zenity manual](https://help.gnome.org/users/zenity/stable/usage.html.en) explains: >An access key is a key that enables you to perform an action from the keyboard rather than use the mouse to choose a command from a menu or dialog. Each access key is identified by an underlined lette...
The [Gnome Help zenity manual](https://help.gnome.org/users/zenity/stable/usage.html.en) explains:
>An access key is a key that enables you to perform an action from the keyboard rather than use the mouse to choose a command from a menu or dialog. Each access key is identified by an underlined letter on a menu or dialog option. Some Zenity dialogs support the use of access keys.
I tried to use this feature with several Zenity dialogues but I had no success. A MWE:
--list --column "Item" "Apples"\ "Oranges"\ "Pears"
Adding an underscore (e.g. "_Apples") as explained by the Help page the Access Key does not seem to work.
Question: the manual says that "some Zenity dialogs" support this feature. Which dialogues? I tried several dialogues but I failed.
Thanks a lot.
alcuinus
(1 rep)
Mar 23, 2025, 09:23 PM
• Last activity: Mar 23, 2025, 10:02 PM
1
votes
1
answers
178
views
Allow a sudo sub process to update Zenity running as original user
1. A script run by user 'staffer' runs [`zenity --progress`](https://help.gnome.org/users/zenity/3.24/progress.html.en). 2. It then calls `sudo -u adminBod adminScript` (and the STDOUT and STDERR are collected to logger) 3. I want `adminScript` which is running as `adminBod` to be able to write to z...
1. A script run by user 'staffer' runs [
zenity --progress
](https://help.gnome.org/users/zenity/3.24/progress.html.en) .
2. It then calls sudo -u adminBod adminScript
(and the STDOUT and STDERR are collected to logger)
3. I want adminScript
which is running as adminBod
to be able to write to zenity's STDIN, in order to provide updates.
## Try 1
I thought I could pipe channel 3 to zenity's STDIN then write to that from my sudo process:
#!/bin/bash
# Main script, run by 'staffer'
{
echo "# Starting work"
exec 3>&1
sudo -u adminBod adminScript 2>&1 | logger -t myTag
exec 3>&-
echo "100" # tells Zenity we're at 100% and it can close
} zenity --progress --auto-close
#!/bin/bash
# adminScript, run by adminBod
echo "# some message for zenity" >/dev/fd/3
echo "# some message for zenity" >&3
This doesn't work because /dev/fd/3
doesn't exist for adminBod
.
## Try 2
Then I thought I could use a named pipe, like
staffer% mkfifo -m666 thePipe
staffer% zenity --progress --auto-close /home/staffer/thePipe
This works in that the message gets received by Zenity, but then it seems to close the channel/pipe (sorry unsure of correct term) so that no further updates can be written.
artfulrobot
(3059 rep)
May 26, 2023, 09:48 AM
• Last activity: May 26, 2023, 12:14 PM
1
votes
2
answers
5272
views
YAD and Zenity - Input Start/Stop Times to Trim Video
I have a bash script and a php script that function in concert to [trim audio/video files using start/stop times](https://unix.stackexchange.com/questions/182602/trim-audio-file-using-start-and-stop-times). PHP script: format('U') - $dt1->format('U'); // echo $dt3."\n"; $h = (int)($dt3 / 3600); $dt3...
I have a bash script and a php script that function in concert to [trim audio/video files using start/stop times](https://unix.stackexchange.com/questions/182602/trim-audio-file-using-start-and-stop-times) .
PHP script:
format('U') - $dt1->format('U');
// echo $dt3."\n";
$h = (int)($dt3 / 3600);
$dt3 %= 3600;
$m = (int)($dt3 / 60);
$dt3 %= 60;
$s = $dt3;
// Dump as H:M:S
echo $h . ":" . $m . ":" . $s;
?>
chopvideoaudio.sh script:
#!/bin/bash
INFILE=$1
START=$2
STOP=$3
OUTFILE=$4
OFFSET=
php TimeDiff.php "$START" "$STOP"
echo "Disecting $INFILE starting from $START to $STOP (duration $OFFSET)"
ffmpeg -ss "$START" -t "$OFFSET" -i "$INFILE" "$OUTFILE"
Usage:
./chopvideoaudio.sh [input.mp4] [startchop] [stopchop] [output.mp4]
Where [startchop] and [stopchop] are both absolute timestamps from the beginning of the track.
Example command to run this script:
./chopvideoaudio.sh input.mp4 00:01:20 00:01:45 output.mp4I want a [YAD (yet another dialog)](http://sourceforge.net/projects/yad-dialog/) script that will open up a dialog box(es) containing an input field to enter a custom file type (e.g. mp3, mp4, avi). Then input fields for the two timestamps, in which I can enter two custom timestamps. After pressing
OK
the script will run and extract the section from between the two timestamps.
I would also be interested in a solution using [Zenity](http://www.linux.org/threads/zenity-gui-for-shell-scripts.5567/) , but I prefer YAD.
whitewings
(2527 rep)
Feb 10, 2015, 07:00 AM
• Last activity: May 12, 2023, 02:42 PM
1
votes
1
answers
291
views
Check which entry is empty with yad or zenity
I'm trying to create an array of four elements using a form consisting of 4 entries: new_prop=($(zenity --forms --title="my-script" --text="Insert the values" --separator=" " \ --add-entry="Name" \ --add-entry="Surname" \ --add-entry="Gender" \ --add-entry="Age")) In general, the user can leave the...
I'm trying to create an array of four elements using a form consisting of 4 entries:
new_prop=($(zenity --forms --title="my-script" --text="Insert the values" --separator=" " \
--add-entry="Name" \
--add-entry="Surname" \
--add-entry="Gender" \
--add-entry="Age"))
In general, the user can leave the
Gender
field empty, but the other 3 must be filled.
The problem is that zenity
(I don't know yad
) doesn't create an empty element if an entry is left empty, but simply it skips that element. For example, if I insert Name
and Age
, zenity
makes an array new_prop
of 2 elements.
How can I check if an entry in the form is left empty? It doesn't matter if the form is made with zenity
or yad
.
Thank you!
user9952796
(81 rep)
May 3, 2023, 03:01 PM
• Last activity: May 4, 2023, 10:07 AM
3
votes
1
answers
3692
views
zenity doesn't display all list with variables
I am making a search and install PPA script for Ubuntu. This script with zenity works 80%, the problem is when this script searches; displays only the first line. I need all lines #!/bin/sh # simple search and install PPA # by David Vásquez if [ $# -gt 0 ] ; then echo "$*" else echo "No input"...
I am making a search and install PPA script for Ubuntu. This script with zenity works 80%, the problem is when this script searches; displays only the first line. I need all lines
#!/bin/sh
# simple search and install PPA
# by David Vásquez
if [ $# -gt 0 ] ; then
echo "$*"
else
echo "No input"
exit
fi
code=$*
cat /dev/null > /tmp/ppa
cat /dev/null > /tmp/ppa-url-tmp
mojito=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=$code | grep -e '+archive/' | grep "$code" | awk -F'' '{print $1}' | uniq | tr -d '~')
echo $mojito | tr ' ' '\n' | tee -a /tmp/ppa-url-tmp
file="/tmp/ppa-url-tmp"
while IFS= read -r line; do
# display $line or do somthing with $line
title=$(curl https://launchpad.net/~$line | grep -e '' | awk -F '' '{print $2}' | awk -F '' '{print $1}' | sed 's/^/"/' | sed 's/$/"/')
description=$(curl https://launchpad.net/~$line | grep -e 'content=' | awk -F 'content="' '{print $2}' | awk -F '.' '{print $1}' | tr -d '/>' | tr -d '"' | sed -e :a -e N -e 's/\n/ /' -e ta | sed 's/^/"/' | sed 's/$/"/')
support=$(curl https://launchpad.net/~$line | grep -e '
davidva
(160 rep)
May 31, 2014, 09:03 AM
• Last activity: Apr 28, 2023, 11:09 PM
1
votes
2
answers
827
views
Is there any program to get the GPG password from the GUI
I am working about a GUI PGP application with Zenity. GPG asks passphrase on terminal screen. But I want to enter passphrase from a GUI dialog box not in terminal (like `zenity --password`) I tried piping `gpg -c ` with Zenity command but not working. Is there any solution for this or another progra...
I am working about a GUI PGP application with Zenity. GPG asks passphrase on terminal screen. But I want to enter passphrase from a GUI dialog box not in terminal (like
zenity --password
) I tried piping gpg -c
with Zenity command but not working. Is there any solution for this or another program feature? I know Kleopatra, GPA and seahorse by the way.
Thanks...
astronaut_cat
(21 rep)
Feb 24, 2017, 04:50 AM
• Last activity: Feb 28, 2023, 11:03 AM
1
votes
2
answers
892
views
Zenity (or alternative) with custom file selector
When I use zenity and type `--file-selection`, if spawns the default GTK file selector. The problem with that is, of course, the lack of image thumbnails. Considering that I want to make an image selection like that, it is a bit of a downside. Is there a possibility to force zenity to use something...
When I use zenity and type
--file-selection
, if spawns the default GTK file selector. The problem with that is, of course, the lack of image thumbnails. Considering that I want to make an image selection like that, it is a bit of a downside.
Is there a possibility to force zenity to use something like nemo
or nautilus
as its file selector?
Or something like qarma
(it is a qt based rewrite of zenity). Can also be yad
etc.
Anyone got any alternatives?
I.P
(221 rep)
Jul 17, 2022, 04:49 PM
• Last activity: Nov 20, 2022, 11:15 AM
1
votes
1
answers
313
views
Calculate checksum for whole content of a device and add a progress bar
I want to make a shell script, that lets the user select a mounted device and calculate a checksum for the whole data on this device. I need the checksum to test if the device has been manipulated by somebody else. My approach to this was like the following: #!/bin/bash cd "${0%/*}" device=$(zenity...
I want to make a shell script, that lets the user select a mounted device and calculate a checksum for the whole data on this device. I need the checksum to test if the device has been manipulated by somebody else. My approach to this was like the following:
#!/bin/bash
cd "${0%/*}"
device=$(zenity --file-selection --directory \
--filename="/run/media/"${USER}"/"
zenity --info \
--title "Info Message" \
--width 500 \
--height 150 \
--text "$(find "$device" -type f -exec md5sum {} \; | sort -k 2 | md5sum | cut -d ' ' -f 1)"
**My questions are:**
1) Is this the right approach?
2) How can I add a progress bar between the selection of the device and the dialog box with the output of the calculation?
stewie
(45 rep)
Oct 27, 2022, 11:57 AM
• Last activity: Nov 2, 2022, 11:56 AM
3
votes
2
answers
767
views
Wait until md5sum command is completed
#!/bin/bash cd /path-to-directory md5=$(find . -type f -exec md5sum {} \; | sort -k 2 | md5sum) zenity --info \ --title= "Calculated checksum" \ --text= "$md5" The process of a recursive checksum calculation for a directory takes a while. The bash script doesn´t wait until the process is finish...
#!/bin/bash
cd /path-to-directory
md5=$(find . -type f -exec md5sum {} \; | sort -k 2 | md5sum)
zenity --info \
--title= "Calculated checksum" \
--text= "$md5"
The process of a recursive checksum calculation for a directory takes a while.
The bash script doesn´t wait until the process is finished it just moves to the next command which is the dialog box, that displays the calculated checksum. So the dialog box shows a wrong checksum.
Is there an option to tell the script to wait until the calculation of the checksum is finished?
Furthermore, is there an option to pipe the progress of the checksum calculation to some kind of progress bar like in zenity for example?
stewie
(45 rep)
Oct 25, 2022, 01:15 PM
• Last activity: Oct 27, 2022, 04:22 PM
0
votes
2
answers
328
views
Zenity select disk/volume
is it possible to select a disk/volume with zenity instead of a single file? I know there is the `zenity --file-selection` command, but can you also select for example `/dev/sda1` ? Thanks for your time!
is it possible to select a disk/volume with zenity instead of a single file?
I know there is the
zenity --file-selection
command, but can you also select for example /dev/sda1
?
Thanks for your time!
stewie
(31 rep)
Sep 22, 2022, 11:31 AM
• Last activity: Oct 21, 2022, 07:30 PM
1
votes
1
answers
806
views
Zenity Progress Bar
I made a shell script which uses this command to calculate a sha256 checksum recursive for a directory for example `/run/media/$USER/directory`: ``` find . -type f -exec sha256sum {} \; | sort -k 2 | sha256sum ``` This process takes some time. Meanwhile I want to display a progress bar via **zenity*...
I made a shell script which uses this command to calculate a sha256 checksum recursive for a directory for example
Thanks for your time! :)
/run/media/$USER/directory
:
find . -type f -exec sha256sum {} \; | sort -k 2 | sha256sum
This process takes some time. Meanwhile I want to display a progress bar via **zenity** that shows the current progress according to the command.
I tried it with:
find . -type f -exec sha256sum {} \; | sort -k 2 | sha256sum | zenity --progress --title="Checksum"
but it doesn't show any percentages:

stewie
(31 rep)
Sep 29, 2022, 12:05 PM
• Last activity: Sep 30, 2022, 10:40 PM
1
votes
0
answers
588
views
Zenity checklist from file
I created a checklist and I want to insert data from a file in a specific order. [![enter image description here][1]][1] The data comes from a terminal command in my bash script: data=$(lsblk -o name,size,model --nodeps >> /data.txt This is the content of the file: [![enter image description here][2...
I created a checklist and I want to insert data from a file in a specific order.
The data comes from a terminal command in my bash script:
data=$(lsblk -o name,size,model --nodeps >> /data.txt
This is the content of the file:
How can I match the checklist with the content of the .txt file?
I tried something like
Thank you for your time!!


cat data.txt | tr "something"
but it didn't work according to my needs. This is the output I get, when combined:

stewie
(31 rep)
Sep 26, 2022, 07:37 AM
• Last activity: Sep 27, 2022, 07:08 AM
-2
votes
1
answers
130
views
no slashes needed in date string provided via zenity
By using the `zenity` utility, select the date from the calendar; the output is `19/09/2022`. I want to remove slashes between the parts of the date to make it `19092022` and store it in a variable.
By using the
zenity
utility, select the date from the calendar; the output is 19/09/2022
. I want to remove slashes between the parts of the date to make it 19092022
and store it in a variable.
Hashim David
(1 rep)
Sep 20, 2022, 06:23 AM
• Last activity: Sep 25, 2022, 09:10 AM
3
votes
1
answers
349
views
zenity failing in crontab but working in shell
I'm trying to run a script that calls zenity from a crontab and it fails. The script works well from the command line. I do pass the DISPLAY in the crontab: ``` * * * * * DISPLAY=:1 bin/myscript.sh > /tmp/debug.txt 2>&1 ``` In the debug logs, I get: ``` This option is not available. Please see --hel...
I'm trying to run a script that calls zenity from a crontab and it fails. The script works well from the command line.
I do pass the DISPLAY in the crontab:
* * * * * DISPLAY=:1 bin/myscript.sh > /tmp/debug.txt 2>&1
In the debug logs, I get:
This option is not available. Please see --help for all possible usages.
Trying to remove the options, I found that the problematic is "--text" because the following doesn't work:
zenity --warning --title "Fais gaffe" --text "Bientôt plus de batterie"
But the following does:
zenity --warning --title "Fais gaffe"
Colin Pitrat
(149 rep)
Sep 20, 2022, 10:23 AM
1
votes
2
answers
6034
views
How does a Zenity progress dialog's cancel button function?
While trying to make the `Cancel` button on a Zenity `--progress` window work for my scripts I've realized I don't understand how the `Cancel` button works at all in the example given on the Zenity Manual page: https://help.gnome.org/users/zenity/stable/progress.html.en #!/bin/sh ( echo "10" ; sleep...
While trying to make the
Cancel
button on a Zenity --progress
window work for my scripts I've realized I don't understand how the Cancel
button works at all in the example given on the Zenity Manual page: https://help.gnome.org/users/zenity/stable/progress.html.en
#!/bin/sh
(
echo "10" ; sleep 1
echo "# Updating mail logs" ; sleep 1
echo "20" ; sleep 1
echo "# Resetting cron jobs" ; sleep 1
echo "50" ; sleep 1
echo "This line will just be ignored" ; sleep 1
echo "75" ; sleep 1
echo "# Rebooting system" ; sleep 1
echo "100" ; sleep 1
) |
zenity --progress \
--title="Update System Logs" \
--text="Scanning mail logs..." \
--percentage=0
if [ "$?" = -1 ] ; then
zenity --error \
--text="Update canceled."
fi
When that script is run, why does the process stop when the Cancel
button is pushed when there is no exit
or break
or any other command visible?
I thought Zenity was just a program to display graphical interfaces and return exit codes that can be used to launch the actual commands desired (like exit
if cancelled, etc), but it seems like Zenity must be doing something much more complicated because there doesn't seem to be any reason for the commands in the example to actually stop when the button is pressed.
Is Zenity doing something more complicated, or am I misunderstanding something? I am new to bash/sh scripting so it seems like I'm probably misunderstanding. If it's just a complex function unique to Zenity then a full technical description of how it works is not necessary; just enough of an explanation so it can be used reliably is what I would like. Thank you.
(I'd like to also ask why this example from the official manual **does not actually work** [on Ubuntu 14.04] because no --error
Zenity window is ever shown, but I don't think StackExchange likes joint questions, so nevermind that unless it's related to how I might be misunderstanding.)
Related post:
https://unix.stackexchange.com/questions/42082/terminate-script-using-zenity-progress-bar (does not answer my question because the top answer there said to use --auto-kill
when in this example the process is cancelled without using --auto-kill
InverseTelecine
(193 rep)
Feb 7, 2016, 05:30 PM
• Last activity: Aug 13, 2022, 01:32 AM
0
votes
1
answers
164
views
Show stdout and stderr in Zenith
I am trying to install `.deb` file by right clicking on it in Nemo. My Nemo Action Looks like: [Nemo Action] Name=Install Deb File Comment=Install %F Exec= Icon-Name=package-x-generic-symbolic Selection=s Extensions=deb; EscapeSpaces=true Dependencies=zenity;dpkg; My `zenity_askpass.sh` file looks l...
I am trying to install
.deb
file by right clicking on it in Nemo.
My Nemo Action Looks like:
[Nemo Action]
Name=Install Deb File
Comment=Install %F
Exec=
Icon-Name=package-x-generic-symbolic
Selection=s
Extensions=deb;
EscapeSpaces=true
Dependencies=zenity;dpkg;
My zenity_askpass.sh
file looks like:
#!/bin/bash
zenity --password --title="Authenticate"
My install_deb_file.sh
file looks like:
#!/bin/dash
export SUDO_ASKPASS="$HOME/.local/share/nemo/actions/scripts/zenity_askpass.sh"
sudo dpkg -i "$1"
How can I modify install_deb_file.sh
so that it install the .deb
package and show the stdout / stderr of sudo dpkg -i "$1"
in zenity.
Ahmad Ismail
(2998 rep)
Jun 21, 2022, 05:16 AM
• Last activity: Jun 21, 2022, 06:58 AM
0
votes
1
answers
845
views
Zenity File Selection - Change Display Options?
Zenity version **3.22** (**Debian Stretch**). ls -a foobar . .. directory foo .foo `zenity --file-selection --filename=/tmp/foobar/` yields (after a right click): [![enter image description here][1]][1] I know that I can just click on the **Show Hidden Files** option in order to view the hidden file...
Zenity version **3.22** (**Debian Stretch**).
ls -a foobar
. .. directory foo .foo
I know that I can just click on the **Show Hidden Files** option in order to view the hidden files, but what can I do so that said **Show Hidden Files** option is always checked whenever I run the above
How can I do this?
zenity --file-selection --filename=/tmp/foobar/
yields (after a right click):

zenity...
command?
As a matter of fact, what I would like to _always_ come up is:

Digger
(407 rep)
May 28, 2022, 07:41 AM
• Last activity: May 30, 2022, 02:44 AM
1
votes
0
answers
1070
views
Unix PAM module fails on login/lock screen - Permission denied - exit code 13
How it works? ----------------- I'm back with yet another issue I can't figure out by myself. Basically what I have is 2 factor authentication (2FA) module based on Python PAM and with NFC card reader. Once user is prompted for password 2FA **Zenity** dialog pops up asking for PIN code, user enters...
How it works?
-----------------
I'm back with yet another issue I can't figure out by myself. Basically what I have is 2 factor authentication (2FA) module based on Python PAM and with NFC card reader. Once user is prompted for password 2FA **Zenity** dialog pops up asking for PIN code, user enters it and auth is successful.
When it breaks?
-----------------
This solution works great while user is logged in, when saving files and being asked for password or using
sudo
in terminal. Once user is locked out (displayed lock screen) or has to login after restart, this solution fails to display **Zenity** dialogs.
Code examples:
-----------------
- Here is my PAM config file /usr/share/pam-config/pprfid_pam.config
that contains:
Name: 2FA PAMpy RFID Authorization
Default: yes
Priority: 192
Auth-Type: Primary
Auth:
[success=end default=ignore] pam_exec.so seteuid debug log=/var/log/pprfid.log /usr/local/bin/pprfid_pam.py
Auth-Initial:
[success=end default=ignore] pam_exec.so seteuid debug log=/var/log/pprfid.log /usr/local/bin/pprfid_pam.py
- Here is my Python PAM module file /usr/local/bin/pprfid_pam.py
that does the magic of 2 factor authentication.. and here is the part of **Zenity** command, that doesn't work:
# ...
Popen("/usr/bin/zenity --forms --width=199 --height=100 --title '2FA' --text='Authorization' --add-password='PIN' --ok-label='Authorize' --cancel-label='Cancel' --separator=',' --display=:0.0", shell=True, stdout=PIPE )
# ...
Error!
-----------------
As mentioned above, once I'm locked out or restarting machine and trying to login via lock/login screen I get this error in /var/log/auth.log
:
Jul 24 18:13:14 ubuntu unix_chkpwd: password check failed for user (testuser)
Jul 24 18:13:14 ubuntu kcheckpass: pam_unix(kde:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0 ruser= rhost= user=testuser
Jul 24 18:13:14 ubuntu kcheckpass: pam_exec(kde:auth): open of /var/log/pprfid.log failed: Permission denied
Jul 24 18:13:14 ubuntu kcheckpass: pam_exec(kde:auth): /usr/local/bin/pprfid_pam.py failed: exit code 13
My attempts to fix this:
-----------------
1. Obviously first thing I did was checking permissions and setting them as follows:
root@ubuntu:~# chown -R root:root /usr/local/bin/pprfid_pam.py
root@ubuntu:~# chown -R root:root /var/log/pprfid.log
root@ubuntu:~# chmod 0755 /usr/local/bin/pprfid_pam.py
root@ubuntu:~# chmod 0755 /var/log/pprfid.log
2. I double checked that DISPLAY
was set correctly, and it indeed was set to :0.0
.
Question!?
-----------------
What am I doing wrong? I'm really new to PAM module development, but I have feeling that permissions are being denied due to fact I'm running GUI as root, but I'm not willing to shoot blindly.. so I'm reaching out to Unix gurus - please help!
*Thanks in advance,*
**@richardev**
Update #1
-----------------
Reading related articles and comments, and talking on some other forums it seems that the issue here is most likely due to **Zenity** or the PAM module itself not being able to run as GUI. To do that I'm supposed ti integrate it via display manager - in my case I have **SDDM**. I will try to test some scenarios in /etc/pam.d/*
config files and see if I can force it to run.
Update #2
-----------------
/usr/share/pam-config/pprfid_pam.config
covers all the auth points.. but **Zenity** won't display outside session (on login/lock screen), so I guess I really need to integrate this module into **SDDM** GUI directly :thinking:.
Dead end / solution (kind of)
-----------------
After some digging I decided to remove /usr/share/pam-config/pprfid_pam.config
that covers common-auth
and simply allow **PAM** module to run within user session after login. *I will have to figure out another way to trigger my python scripts on **SDDM** display manager.*
I'm not 100% sure if **PAM** supports cross-connecting with display managers (**SDDM** in my case) and I've read many posts, that say it's not possible - which is why I'm reducing my **PAM** modules coverage.
richardevcom
(71 rep)
Jul 25, 2021, 01:20 PM
• Last activity: Jul 26, 2021, 12:57 PM
Showing page 1 of 20 total questions