Text is blacked out when taking a firefox screenshot running headless with xvfb - selenium

I have a jenkins setup on amazon ec2 and everything is running fine except for a tiny issue with Selenium. Every time I run the whole suite of tests (~30 min), Selenium gets stuck on a test. I've take a screenshot at that moment and it seems that there is an alert on the screen, but the alert text is all blacked out.
I've run xvfb, started selenium, then taken my screen capture with xwd and converted that image with imagemagick.
I've scoured the internet and have no clue.

Figured it out. Turns out that it's a font thing. I've run the steps indicated below and now I can read the text. It's still on a dark green background, but the text is readable.
On amazon ec2 ubuntu instance need to:
1) enable multiverse for apt-get
Open /etc/apt/sources.list with any editor
On ec2 it seems the multiverse isn't present so copied these lines into the file and saved
deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
2) sudo apt-get update
3) sudo apt-get -y install x-ttcidfont-conf cabextract ttf-mscorefonts-installer
this will bring up shell gui, use arrow down, tab, and enter to navigate
accept EULA
4) sudo dpkg-reconfigure x-ttcidfont-conf
- choose freetype fonts

Related

How do I install JetBrains Rider via snap on Linux Ubuntu 20?

I am attempting to install JetBrains Rider on an Ubuntu Linux system using snap.
I use the following commands:
sudo apt update
sudo apt install snapd
sudo snap install rider --classic
It looks like it installs correctly.
I can seem to to figure how to actually start Rider.
How do I run Rider after it's been installed via snap.
Is snap the best way to install?
Enter the command snap run rider in the terminal and hit enter.
A first time installer will run letting you specify Rider customisation and other defaults.
Subsequently you can enter the command /snap/bin/rider in the terminal and hit enter.
Alternatively, create a Rider menu item by running the following command cp /var/lib/snapd/desktop/applications/rider_rider.desktop ~/.local/share/applications/
You will then also have the option to right click and "Add to panel"
Update: Adding /snap/bin to your path (the fact it is missing I suspect is a snap bug) will also fix this issue.
I opened up ~/.bashrc and added the following line at the bottom PATH=/snap/bin:$PATH
Saved and reloaded the file by executing source .bashrc
Now I can load rider from any bash terminal by simply entering rider and hitting enter.
I'm using Debian buster btw.
References:
https://snapcraft.io/docs/getting-started#heading--running
https://forums.linuxmint.com/viewtopic.php?t=319827

Woeusb don't showing in applications Debian 10 Gnome

I am installed woeusb along this instruction https://github.com/slacka/WoeUSB.
git clone https://github.com/slacka/WoeUSB.git
./setup-development-environment.bash
sudo apt-get install devscripts equivs gdebi-core
mk-build-deps
sudo gdebi woeusb-build-deps_3.3.1-1-g7171bff_all.deb
This program didn't showing in applications, search don't finded it.Then i am installed from snap, don't finded too. What's a problem?

Direnv not allowing me to allow

I've installed direnv (v2.18.2) onto my Ubuntu 16.04 machine using:
sudo snap install direnv
as per the website, and added the line:
eval "$(direnv hook bash)"
to my ~/.bashrc file as per the instructions. When I navigate into the directory with my .envrc file, the following message shown:
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
Sweet. So I run direnv allow, and I'm immediately hit with exactly the same error. I've also tried using direnv allow . but that doesn't seem to help. Also, completely restarting my laptop hasn't helped either.
All the advice I've seen is for direnv not finding the .envrc file, but here it is finding it, it's just not allowing me to allow it.
I know this is not a propper solution, but I encountered this aftering installing from a snap on Linux Mint.
After I uninstalled the snap and installed it from aptitude I did not have any issues.
While the OP is on Ubuntu I ran into the same problem with the snap installed binary on CentOS 7.7.
I worked around the problem by installing a go binary and then building direnv from source: git clone https://github.com/direnv/direnv.git; cd direnv; make; make install which got me direnv 2.21.2 in /usr/local/bin

debian 8 chromium infected

I run on
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.16.0-9-686-pae
Architecture: x86.
Under chromium, i regurlarly encounter the following problem : when i click on a link, a new tab opens on a website not related at all with the link. After 2 or 3 clicks on the link with the same weird effect, i finally reach the correct page.
I suspect a malware changing the target URL on the webpage. I also have firefox which is fine.
How can i find the malware ?
I think instead of searching for malware, just uninstall with it's settings and download again. In another way, it will be time consuming.
sudo apt-get uninstall purge chromium-browser
sudo apt-get install chromium-browser
And delete your config files under the .config/chromium in your home folder.

how to ask ambari agent not keep quiet when install packages in ubuntu

I'm installing new service in ambari managed cluster. my connection to hortonwork's repo seems too bad, it took lots of time to install ambari-server and ambari-agent it self (onece i almost thought it was dead).
the problem is that when i'm installing new service (e.g zeppelin, it also requires install other dependencies), the progress bar get stuck at 26% percent. it confused me if the installation get stucked or it's just too slow.
the command
ps -ef|grep apt
shows the the install is still there. only can't track the progress via /var/log/apt/term.log like normal apt-get installation (it shows the download progress).
the command shows the apt-get comes with an "-q" options which prevent me from tracking the log file.
so my question is that is there any place i can change the default behavior?
The -q option is added to "apt-get" command based on log level of ambari-agent. I.e. if log level for ambari-agent is set to DEBUG then apt-get without -q option is executed.
You can edit /etc/ambari-agent/conf/logging.conf, in [logger_root] section comment default line level=WARNING and add level=DEBUG. Then retstart ambari-agent. Now if you install any service them apt-get without -q will be executed.
Note:
If /etc/ambari-agent/conf/logging.conf does not exist then copy it from /etc/ambari-agent/conf/logging.conf.sample
Ambari agent specific changed need to be done on all cluster node