Category: Terminal

How to fix “There is no public key available for the following key IDs”

When I run the command

sudo apt-get update

I got this warning:

There is no public key available for the following key IDs: [key_id]

To fix:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys [key_id]

The command above downloads the missing key using the hexadecimal numbers given the [key_id] with apt-key. After running apt-key to download the missing [key_id], any packages from that repositories will be considered trusted.

How to configure the NFS server and mount NFS shares (Xubuntu 14.04)

NFS Server

Just one package to install:

apt-get update
apt-get install nfs-kernel-server

Create the folder which we want to share

mkdir /srv/nfs

Change the ownership of the folder in order to limit the rights of the client:

chown nobody:nogroup /srv/nfs

PS: do not share the /home directory because it will cause a massive permissions problem.

Now we have to inform the NFS server about what we what to share:

nano /etc/exports

and add the sharing point /srv/nfs:

[...]
/srv/nfs          *(rw,no_root_squash,async,no_subtree_check)

or in case we want to limit the share to a single client with IP=192.168.0.100:

[...]
/srv/nfs          192.168.0.100(rw,no_root_squash,async,no_subtree_check)

Next update the NFS table with the new sharing point

exportfs -rav

Finally start the NFS service:

service nfs-kernel-server start

 

NFS Client

Just one package to install:

sudo apt-get update
sudo apt-get install nfs-common

create the NFS mount point:

sudo mkdir -p /mnt/nfs

Next mount the NFS shared folder:

sudo mount -t nfs 192.168.0.80:/srv/nfs /mnt/nfs/

Now we are connected with the NFS share, we will crosscheck it as follows:

mount -t nfs
192.168.2.80:/srv/nfs on /mnt/nfs type nfs (rw,vers=4,addr=192.168.2.80,clientaddr=192.168.2.100)
Permanent NFS mounting

Add the NFS share in /etc/fstab file

 nano /etc/fstab

with:

 [...]
 192.168.0.80:/ /mnt/nfs nfs defaults 0 0

xfce4-terminal and the new RC file path

On Xubuntu my terminal emulator is the new xfce4-terminal.

Since version 0.60 was released, “Terminal” was renamed to “xfce4-terminal” but the path of its configuration file (the RC user file) has changed from

 ~/.config/Terminal/terminalrc

to

~/.config/xfce4/terminal/terminalrc

In order to mantain your personal settings, move the previous config RC file to the new path.

The default configuration RC file is, instead, located in:

/etc/xdg/xdg-xubuntu/xfce4/terminal/terminalrc

 

How to find out the actual screen resolution from a shell script

When I have to personalize the settings of my FreeNX client, I have to know which resolution should I set in order to get a maximized window which perfectly fit my desktop. Once I get connected to my remote desktop and having its window resized, I get the new resolution with:

xdpyinfo  | grep dimensions
dimensions:    3200x1200 pixels (847x318 millimeters)

or

xrandr -q | grep current
Screen 0: minimum 8 x 8, current 3200 x 1200, maximum 8192 x 8192

WordPress Themes