Powered by Drupal

Linux Tips

This is just a collection of notes for various projects I am working on.

The categories of notes are at the top nav bar.

Feel free to create an account to post comments on any of the notes I have here.

6
Oct

Test STARTTLS SMTP Connection

Run the following command to connect

openssl s_client -connect {server}:{port} -starttls smtp

Then find out what authentication is supported. It should now show "AUTH LOGIN" now that you have an encrypted connection:

ehlo {domain.com}

If you see "AUTH LOGIN" in the list then do the following:

18
Sep

Common firewall-cmd Examples

List all zones:

 firewall-cmd --list-all-zones

List all active zones:

firewall-cmd --get-active-zone

To add a host or network to allow all connections from:

firewall-cmd --permanent --zone=trusted --add-source=10.10.10.10

Add a service to be allowed from anywhere:

firewall-cmd --permanent --add-service=smtp

When you run firewall-cmd with the "--permanent" it will not be active until the dameon is reloaded. Do the following to make them active:

firewall-cmd --reload
27
Jul

Get epoch with Date Command

Here is a quick way to get the current epoch with the date command:

date +%s
15
Jan

Fix Fn Keys on ASUS Laptops

If you find your Fn keys don't work like volume up/down try the following:

su -
echo asus-nb-wmi > /etc/modules-load.d/asus-nb-wmi.conf
reboot
13
May

Checking for Bad Blocks on a Hard Drive in Linux

In Fedora, the badblocks program is part of the e2fsprogs program. You probably already have that installed. But in case you don't do the following:

yum install e2fsprogs

To just see the bad blocks the following to do a non-destructive read/write test:

badblocks -nvs /dev/sda

To generate generate a list of the bad blocks do the following:

badblocks -nv /dev/sda > badblocks.txt

Now you can mark the bad blocks found with the following:

23
Feb

Sharing Desktop in Fedora 18

NOTE: This is an update from my previous post on sharing the desktop or running a VNC Server. This method works great in Fedora 18.

First install the vino package:

yum install vino

Then click on Activities in the top left corner of the screen.

Next type in "vino" and click on "Desktop Sharing" under Applications or under Settings.

Next click "Allow other users to view your desktop". Make sure "Allow other users to control my desktop" is also check.

6
Feb

Calibrating/Profiling a Monitor in Linux Using a Spyder4Express

First download dispcalGUI. It's a GUI to the command line program Argyll.

It can be downloaded here:

http://dispcalgui.hoech.net/#download

For Fedora get the correct RPM version.

Then install with yum (replace filename with your version):

yum install ./dispcalGUI-1.1.8.3-96.1.x86_64.rpm

You should now be able to run dispcalGUI from the shell. It's easiest to run it from a shell as root so you don't have to change USB device permissions.

8
Dec

Fix Adwaita Theme in Fedora 18

In Fedora 18 the Adwaita GTK+ theme has dropdowns messed up in some programs. The text on the drop downs is light grey on white and it's hard to read.

To fix this install the Gnome Tweak tool and a different GTK+ theme:

yum install greybird-gtk2-theme greybird-gtk3-theme gnome-tweak-tool

Then open Tweak Tool. Under "Gtk+ Theme" select "Greybird".

8
Dec

Preview RAW Thumbnails in Nautilus file manager (Files) for Fedora 18

Simply install the following package and RAW file previews start showing up. You don't even need to logout.

yum install raw-thumbnailer

Pages

Subscribe to blog.kevinfowler.net RSS