General > Security & Bug Fixes

Widget Quirk

(1/2) > >>

trinidad:
I have tried a variety of scripts with conditionals, attempting to get the {user_name} to display root when sudo is used. $USER will only display the user name logged in from lightdm login. I intend to fix this. When the terminal goes to sudo I want Conky to change the name to root or sudo, or at least add a warning message. I think the {uid_name} function might do this with an {if_match} conditional but I haven't got it working yet. It is definitely in the works for me though. May have to root the whole widget with user permission to enable on/off. As you know this is problematic with "ioctl" error reporting in root, which is not a good fix because every ssh and bashrc config file has to match with root. Ubuntu thing.

TC

Jerry:
Upon reflection, I'm going to go with $USER in the next Lite Widget. Have you tested this yet tc (multi users)?

trinidad:
Yep. I should have noticed that. The brackets would allow for notifications of logins of root, which of course doesn't happen in Ubuntu setup to use sudoers, and not su root like Debian in the terminal. Easy to miss. Thanks. It's a safe change. Fixed just fine for me. All my clients will be single users. I'll test it tomorrow on a multi user desktop.

TC

unclebaldie:
@TC,

Don't know if this helps.
There is an environment variable set named $USER.
In the ~/.conky/widget, there is a line, towards the bottom of the file:

${color}Logged in as:   ${alignr}${color}${user_names}

I edited the line as follows (alteration in red);

${color}Logged in as:   ${alignr}${color}$USER

It now displays my username, and opening an XFCE4-terminal does not add the name again.
It seems to have fixed that problem, but maybe others can advise if this will have any adverse effect ?


HTH,
Phil

trinidad:
This is going to be an issue for me as it adds the user for new tabs as well, six tabs, six users. I prefer the XFCE terminal on my client desktops because of the customizations it allows, but I like the new highly visible widget as well. I want both to work so I'm searching now for the cause. As I said before this does not occur with LXterm, or ROXterm but I do not want to use them on my client boxes.

TC

Navigation

[0] Message Index

[#] Next page

Go to full version