Freitag, 11. September 2020

Install Xrdp Server (Remote Desktop) on (K)Ubuntu 18.04.x

Had a hard time to install Xrdp Server on Kubuntu, initially all worked fine after doing like this. But then it failed with
another Xserver might already be active on display 10
and it took me quite some time to find the fix here:
sudo apt-get install xorgxrdp-hwe-18.04

Mittwoch, 27. Februar 2019

Switch from systemd-resolved to dnsmasq

So DNS handling is rather messy on (K)Ubuntu, especially if you need to change some settings. Your best bet is to switch back to using dnsmasq, here's how to do that:
  1. Remove /etc/resolv.conf

  2. Install dnsmasq:
    sudo apt-get install dnsmasq

  3. Disable and stop systemd-resolve (if currently being used):
    sudo systemctl disable systemd-resolved.service
    sudo systemctl stop systemd-resolved

  4. Make sure /etc/resolv.conf is a link to /run/resolvconf/resolv.conf, which should just contain the line
    nameserver 127.0.0.1

  5. Edit /etc/NetworkManager/NetworkManager.conf to contain this line in [main] section:
    dns=dnsmasq

  6. Restart the system to be on the safe side.
Now this should use the DNS nameservers NetworkManager received via DHCP. If you need to manually override it, you can edit /etc/dnsmasq.conf, e.g. to override DNS servers from DHCP to resolve Dropbox and Google queries via Google' DNS 8.8.8.8, and fallback to 1.2.3.4 for all other domains:
server=/dropbox.com/8.8.8.8
server=/dropboxapi.com/8.8.8.8
server=/google.com/8.8.8.8
server=/#/1.2.3.4

Dienstag, 31. Dezember 2013

Sharing Garmin Activities/History directories between multiple computers

Finally a new post after a really long pause, my new found love for endurance sports not playing the least part here, so this will be the topic here.

Obviously, I'm using Garmin products for tracking my training, so I can train and play around with technology at the same time :-)  Garmin devices will usually store the training data in Activities/History directories in your Windows user directory, e.g. for XP in C:\Documents and Settings\{USERNAME}\Application Data\GARMIN\Devices\{DEVICE-NUMBER}\ and for Windows 7 in C:\Users\{USERNAME}\AppData\Roaming\GARMIN\Devices\{DEVICE-NUMBER}\.

Now if you synchronize your device with multiple computers, you'll only get new data on the computer you sync with after the activity. Why not use Dropbox to keep the computers in sync?

For Windows XP, create a symbolic link according to http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html, for Windows 7 use mklink according to http://verysimple.com/2008/06/02/create-symbolic-links-in-windows-xp-and-vista/.

Then link Activities and History directories in your Windows user directory from above to some directory in your Dropbox folder. That's it.

Note: I work at Garmin, but this is in no way an official Garmin approach but simply what I found out as an interested Garmin user, so use at your own risk.

Montag, 9. Mai 2011

Combine multiple PDF documents into one

Just a quick one, as I now needed this for the second time and already didn't write it down the first time …
I found this when looking for a way to combine multiple PDF documents into one. You just need to
  • sudo apt-get install gs pdftk

  • gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf
Pretty self explaining, so I'm gonna end early here.

Dienstag, 15. Februar 2011

Setting up my Kubuntu

Just for the record, here's how I configure Kubuntu after installation:
  • install Firefox with the following add-ons:
  • install VirtualBox
  • System Settings: setup Social Desktop opendesktop.org
  • setup ssh server
    • sudo apt-get install openssh-server
  • setup ssh public key authentication
  • setup Dropbox
  • setup Synergy+
  • setup BackupPC client:
    • sudo apt-get install rsync
    • edit /etc/default/rsync to include "RSYNC_ENABLE=true"
    • create /etc/rsyncd.conf
    • sudo chown root:root /etc/rsyncd.conf
    • create /etc/rsyncd.secrets
    • sudo chown root:root /etc/rsyncd.secrets
    • sudo chmod 600 /etc/rsyncd.secrets
    • sudo /etc/init.d/rsync start
  • setup Autostart
    • ~/.dropbox-dist/dropboxd
    • /usr/bin/ssh-add (using ksshaskpass)
    • On desktop, mounting netbook drive: /usr/bin/sshfs eee1005.home.lan:/home/stefan/ /home/stefan/eee1005/
    • On desktop, Synergy+ server: /usr/bin/synergys
    • On netbook, Synergy+ client: /usr/bin/synergyc -f e521mk
  • setup Skype

Freitag, 28. Januar 2011

Installed Linux on an SSD

I have it up and running for some weeks now, I took the most simple approach possible described here: just create one partition on the SSD (I still have Grub on my HD) using

sudo fdisk -H 32 -S 32 /dev/sdg (choose first cylinder as 2, end cylinder as the default one)
sudo mke2fs -t ext4 -E stripe-width=128 /dev/sdg1

when booting Kubuntu 10.10 from installation CD, then install from there.

No need to do any aligning calculations whatsoever. I even have /home, /tmp and /var on the SSD. There is quite some write activity in those directories, but then SSDs get cheaper and cheaper …

All that is left to do after installation is:

  • sudo apt-get install sysfsutils
  • sudo nano /etc/sysfs.conf
  • add the line block/sdf/queue/scheduler = noop at the end
  • sudo nano /etc/fstab
  • change the options for / to noatime,discard,data=ordered,errors=remount-ro

System performing abolutely great now!

Freitag, 17. Dezember 2010

Installing Linux on an SSD

I've got myself an OCZ Vertex 2 60 GB for Christmas :-)

I'll document the process of how to configure, format and install Kubuntu 10.10 here. I've waited until this release, as starting from 2.6.33 Linux Kernel has built in TRIM support making best use of SSDs. I'll try to come up with the best setup for

  • installing Linux as single OS, so no dual booting
  • no RAID or LVM setup
  • keeping /home and /var on my existing HDD as these will be written to rather frequently

I'll make use of knowledge gained by filesystem developer Ted Ts'o and some other blogger regarding alignment considerations, the excellent Ubunti Wiki SSD checklist and the detailed blog entry on Aligning an SSD on Linux by Markus Ewald.

Now the fun can start …