Category Archives: Alle Kategorien

Alle Beiträge, unabhängig von Kategorien

Resizing and extending the disk of a Kubuntu VM in Oracle VirtualBox

First of all, shut off the pertinent VM.

Choose File -> Virtual Media Manager… in Oracle VM VirtualBox Manager. Here you choose the correct disk for your machine and change the size appropriately.

Then boot your Kubuntu VM. Since KDE Partition Manager is NOT able to resize the partition although the OS is aware of the extended storage, you have to

apt-get install gparted

Of course, you could also do this on the command line but using GParted is easy, isn’t it? And it works great! So, that’s all you have to do, resize, apply the changes and reboot.

Done.

Installing R & RStudio on Kubuntu 20.10 Desktop using apt-get install r-base-dev

Step 1:

Download the font from here:

http://www.fontineed.com/font/Hu_Adobe_Garamond

Extract the archive and install the font. This can be done most easily by double-clicking the font file.

Step 2:

Launch the commands apt-get update and apt-cache showpkg r-base:

root@VM-KU2010D:/home/you# apt-get update
Hit:1 http://de.archive.ubuntu.com/ubuntu groovy InRelease
Get:2 http://de.archive.ubuntu.com/ubuntu groovy-updates InRelease [110 kB]
Hit:3 http://security.ubuntu.com/ubuntu groovy-security InRelease 
Get:4 http://de.archive.ubuntu.com/ubuntu groovy-backports InRelease [101 kB]
Get:5 http://de.archive.ubuntu.com/ubuntu groovy-updates/main amd64 DEP-11 Metadata [24,1 kB]
Get:6 http://de.archive.ubuntu.com/ubuntu groovy-updates/universe amd64 DEP-11 Metadata [15,0 kB]
Get:7 http://de.archive.ubuntu.com/ubuntu groovy-backports/universe amd64 DEP-11 Metadata [600 B]
Fetched 251 kB in 1s (281 kB/s) 
Reading package lists... Done
root@VM-KU2010D:/home/you# apt-cache showpkg r-base 
Package: r-base
Versions: 
4.0.2-1build1 (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-amd64_Packages) (/var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-i386_Packages)
Description Language: 
File: /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_binary-amd64_Packages
MD5: 5787ca79ed716232c4cc2087ed9b425b
Description Language: en
File: /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_groovy_universe_i18n_Translation-en
MD5: 5787ca79ed716232c4cc2087ed9b425b


Reverse Depends: 
r-base-core,r-base 1.4.1-1
ugene,r-base
zim,r-base
science-numericalcomputation,r-base
science-meteorology,r-base
science-economics,r-base
reapr,r-base
r-doc-info,r-base 1.4.1-1
r-doc-html,r-base 1.4.1-1
r-base-html,r-base 1.4.1-1
bali-phy,r-base
python3-pywps,r-base
netperfmeter-plotting,r-base
med-physics,r-base
libstatistics-r-perl,r-base
Dependencies: 
4.0.2-1build1 - r-base-core (2 4.0.2-1build1) r-recommended (5 4.0.2-1build1) r-base-html (0 (null)) r-doc-html (0 (null)) elpa-ess (0 (null)) r-doc-info (16 (null)) r-doc-pdf (0 (null)) 
Provides: 
4.0.2-1build1 - 
Reverse Provides: 
root@VM-KU2010D:/home/you#

At the time of this writing R v4.0.3 is the latest one. If you want the somewhat earlier version you may install it now using apt-get install r-base.

To install the newer one, do the following:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

The command is deprecated but it still works.

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu groovy-cran40/'

Install it with apt-get install r-base.

In the following I go with R v4.0.3 BUT I choose r-base-dev! Hence, the following may or may not apply exactly to what you experience if you stay with r-base. In addition I install r-base-core-dbg and r-base-html.

Next comes RStudio.

apt-get install libclang-dev

This is required by RStudio !

If you receive a hint to perform

apt --fix-broken install

do so! Now download the deb package for your system:

https://rstudio.com/products/rstudio/download/#download

and install it:

dpkg -i <your package>

You can now start RStudio via the menu. First of all, I install the packages ggplot2 und ggthemes, and this works right away. I test it with the faithful dataset which is provided by RStudio for testing purposes:

> library(ggplot2)
> library(ggthemes)
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square')
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_bw()
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_dark()
> ggplot(faithful) + geom_point(aes(x=eruptions,y=waiting),shape='square') + theme_economist()

Works! Work done!

 

 

 

 

 

RStudio & Rcmdr: Installation problems w/ tcltk2 on Kubuntu 20.10 Desktop

First, on Linux Mint 20 the installation of Rcmdr is no problem at all. But on Kubuntu, it is. When you try to install Rcmdr from within RStudio by

install.packages("Rcmdr")

you may run into the error msg:

Error: package or namespace load failed for ‘tcltk’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: Tcl/Tk support is not available on this system
Error: package ‘tcltk’ could not be loaded
In addition: Warning message:
S3 methods ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found 
Execution halted
ERROR: lazy loading failed for package ‘tcltk2’
* removing ‘/home/hmb/R/x86_64-pc-linux-gnu-library/4.0/tcltk2’
Warning in install.packages :
installation of package ‘tcltk2’ had non-zero exit status
ERROR: dependency ‘tcltk2’ is not available for package ‘Rcmdr’
* removing ‘/home/hmb/R/x86_64-pc-linux-gnu-library/4.0/Rcmdr’
Warning in install.packages :
installation of package ‘Rcmdr’ had non-zero exit status

This most probably means that your system is missing the libs

tcl-dev

and

tk-dev

Install them using

apt-get install tcl-dev tk-dev

Now rebuild R (make, ./configure…).

Afterwards RStudio should be able to let you install the package tcltk2. And as a consequence, you should be able to install Rcmdr, too.

 

 

The Ultimate Guide to Installing R and RStudio from Scratch

The following recipe is applicable to a machine (maybe a virtual one) running under Kubuntu 20.10 Desktop, but may be helpful for other Linux distros, too. In order to brush things up for Google: We are talking about ./configure, make, make install of R (r-project.org) and installing RStudio (rstudio.com) on a Linux computer.

One advice before you start working on your computer: Please, read this article completely before you begin hammering on your keyboard! It is of utmost importance, that you understand what you do and how you have to do it! Okay? Thank you!

This article is the result of at least two days of hard work, reading more than one hundred articles and error descriptions, searching for libraries, their applicable names for apt-get/apt install, and much more. You know that. But, let’s begin.

One warning: If you have installed Anaconda on your machine, remove it, and do it exactly like it is described by the Anaconda people! I have just tried to repair my installation of R on a second machine which had Anaconda on it, and the make run ended up with errors and there were path references pointing to my Anaconda installation. I’m more than just suspicious that there are only two ways to go: Either you go for native R or you go the Anaconda way. Then you can stop reading any further. Or you read until the end of the article and make a new decision.

When you install RStudio, there is no R environment or R language coming as a companion. You should install R first, and then RStudio on top. And here is how I dit it:

Installing R

First, download the tarball from https://www.r-project.org/.

In the following we use two commands which need two preliminary dashes you have to use, these may be hard to recognize depending on your display. DO NOT enter these two commands right way, this is just an announcement of things to come:

  1. apt --fix-broken install with two dashes before fix like so: --fix
  2. ./configure --enable-R-shlib with two dashes before enable like so: --enable
    
    And do not forget the preliminary ./ (dot slash) directly followed by configure!

Second, do these preparations (either with sudo in front of every single command or better, become root by sudo su) before beginning work on the tarball:

  1. apt-get install libclang-dev
  2. It is possible that you get a hint to use apt --fix-broken install. If so, do it!
  3. apt install gfortran
  4. apt install g++
  5. apt-get install libreadline6 libreadline6-dev
    
    (Read the PS about this command if it fails for you!)
  6. apt install libncurses-dev
  7. apt-get install xorg-dev
  8. apt-get install libbz2-dev
  9. apt-get install liblzma-dev
  10. apt install libpcre2-dev
  11. apt install libbiojava-java

Now we extract the tarball and enter the new R directory. Here we have to do the following:

  1. make clean
  2. ./configure --enable-R-shlib (Do note the leading ./ ! 
    And there are two dashes before enable!)
  3. make
  4. make install

Step 2. is most important! The option ‒‒enable-R-shlib (WordPress shows the two dashes possibly as one! Be careful!) is not documented, but RStudio will tell you about it if you installed without using it! In this case, it doesn’t find its shared library. And this is essential! And you cannot repair it by creating a symbolic link. That’s the wrong way to (pseudo-)resolve the problem.

Installing RStudio

Now download the RStudio package and install it:

dpkg -i rstudio-1.3.1093-amd64.deb

This is the one for standard PCs with 64 bit OS, take care to download the right one for your machine.

Run RStudio, it should start without a problem.

A little unsolved problem in RStudio [SOLVED, see PPS!]

In RStudio I encountered one minor problem though, regarding ggplot.

The command

p1 <- ggplot() + geom_line(aes(y=value, x=run), data = somedata) 
p1

throws this error:

Error in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)) : 
X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 11 could not be loaded

I have tried to install additional fonts and lots and lots of other things, but to no avail.

There are numerous hints out there to resolve this but none of them worked for me. But at least I found out the following: There are different themes to choose from when using ggplot(), if you don’t see themes marked (ggthemes) you may install them by

install.packages("ggthemes")

or use the package menu to do so. You should see a list like this:

RStudio ggplot() themes

RStudio ggplot() themes

You activate them as follows:

p1 <- ggplot() + geom_line(aes(y=value, x=run), data = somedata) + theme_calc()

theme_calc() worked fine for me and showed this graph:

Graph w/ theme_calc()

Graph w/ theme_calc()

You may choose theme_void() as an alternative or a starter. It seems as if the default theme doesn’t work at all, but other themes do. If you find a way to repair this, let me know!

Good luck!


PS:

Installation of libreadline-stuff may fail with the error that no targets can be found. In this case, visit

https://www.ubuntuupdates.org/package/core/groovy/main/base/libreadline-dev

Here you can download a deb-package which can be installed using dpkg -i.

PPS:

I’m still working on the ggplot2 bug. At least I consider it a bug. The good news is that I’ve got in contact with one of the developers of RStudio, and I’m somewhat optimistic that we will be able to sort things out, stay tuned!

Update, 2021-01-07: And here we are: I have found a solution! It was not a bug, it was indeed a simple font missing, and I have discovered a website where you can download a suitable font legally and for free:

http://www.fontineed.com/font/Hu_Adobe_Garamond

Once you have installed this font correctly on your system, you can use all themes! I’m so happy about this, I can’t tell 😂😝😃😝😁 ☑

But, folks, the question remains: I have told the developer that from my point of view it is not the best of all ideas to hardcode a fontname in the source code! And this is especially true for software which is supposed to run on quite a number of different OS platforms. The only system I know which has pre-installed Adobe fonts was SUN Solaris in the good days of old. It’s quite typical for people coming from this platform to code things like this.

And I think it is an excellent idea to remove this codepiece from RStudio. Just my two dollars 😬 !

 

How to install Oracle’s guest additions on a Kubuntu VM

I’m sure that you will encounter problems when you fire up your new Kubuntu 20.10 Desktop virtual machine under the impression things would work out fine with just giving the VM the ISO file with these additions.

The install process will most likely fail. This is due to some missing parts which have to be installed beforehand. Here are the necessary commands you may just copy’n paste.

But either enter sudo before each command or become root with sudo su:

  1. sudo su (that's the easy way)
  2. apt-get install gcc
  3. apt-get install make

Now you may mount the ISO file with the additions and start
autorun.sh manually (as root). You find it here:

/media/<username>/VBox_GAs_6.1.16

After that, the Auto-resize Guest Display option should work!

The ISO file can be found here:

http://download.virtualbox.org/virtualbox/6.1.16/

 

Hirnrissige Worttrennung in WordPress abschalten

Diesen Artikel habe ich eigentlich nur für mich selber eingestellt, damit ich nachschauen kann, falls die Änderung wieder überschrieben wird:

Dashboard -> Appearance -> Customize -> Additional CSS:

.site-content article,
.widget-area .widget {
-webkit-hyphens: none;
-moz-hyphens: none;
hyphens: none;
}

Funktioniert jedenfalls super!

Bleibt nur die Frage, warum es keinen Bereich gibt, in dem man so etwas auf einfache Weise dauerhaft verankern kann. Jedenfalls ist mir keiner bekannt.

ZATTOO? Nein danke!

Vor kurzem habe ich ein Testabo bei zattoo.com eingerichtet, da die Werbung versprach, daß ich bei Unzufriedenheit mein Geld zurück erhalten werde und darüberhinaus auch nur in meinem Konto/Profil den Schalter Automatische Verlängerung auf aus setzen müsse, und schwupps, sei ich wieder raus.

Sieht nicht so aus!

Obwohl in meinem Profil Newsletter abgeschaltet sind und der eben erwähnte Aboschalter auf nicht verlängern steht, erreicht mich heute diese Mail von mailings@newsletter.zattoo.com:

Zattoo-Mail

Zattoo-Mail

Also, was zur Hölle zählt jetzt? Das, was ich in meinem Zattoo-Konto einstelle oder das, was mir hier dieser Mailrobot schickt? Vor allen Dingen der schwachsinnige Hinweis, ich könne diese Verlängerung ja abschalten, ärgert mich massiv!

Sind die bei Zattoo zu doof, das korrekt zu programmieren? Oder ist da irgendeine Absicht dahinter?

Unter dieser Mail befindet sich noch dieser Block:

zattoo-3

Natürlich kann man auf die Mail nicht antworten, natürlich führt der Link nur auf support.zattoo.com, dort wiederum kann man nur ein Formular ausfüllen anstatt seinen eigenen E-Mailclient zu benutzen, was einem eine gewisse Rechtssicherheit gegenüber diesem Unternehmen geben würde. Auf diese Weise erhält man natürlich nur ein Fensterchen im Browser des Inhalts, die Anfrage sei erfolgreich versandt worden. Aha. Da bin ich ja beruhigt.

Also, Fazit: Von wegen Schalter umlegen und abschalten? Nein, heute eine Stunde Ärger mit diesem Laden, und nun warten bis zum 03.01. bzw. 04.01., ob sie’s abschalten oder nicht!

Zattoo? Niemals wieder!

 

 

How to change all colors in your Powershell profile

After a long research I’ve gathered hopefully all color variables which can be set in the powershell profile:

$Host.UI.RawUI.ForegroundColor = 'Green'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.UI.RawUI.ForegroundColor = 'Green'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.PrivateData.WarningForegroundColor = 'Green'
$Host.PrivateData.WarningBackgroundColor = 'Black'
$Host.PrivateData.ErrorForegroundColor = 'Green'
$Host.PrivateData.ErrorBackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = 'Black'
$Host.PrivateData.DebugForegroundColor = 'Green'
$Host.PrivateData.DebugBackgroundColor = 'Black'
$host.ui.rawui.ForegroundColor = 'Green'
$host.ui.rawui.BackgroundColor = 'Black'
$Host.PrivateData.ErrorForegroundColor = 'Green'
$Host.PrivateData.ErrorBackgroundColor = 'Black'
$Host.PrivateData.WarningForegroundColor = 'Green'
$Host.PrivateData.WarningBackgroundColor = 'Black'
$Host.PrivateData.DebugForegroundColor = 'Green'
$Host.PrivateData.DebugBackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = 'Black'
$Host.PrivateData.ProgressForegroundColor = 'Green'
$Host.PrivateData.ProgressBackgroundColor = 'Black'
Set-PSReadLineOption -Colors @{
Command = 'Green'
Comment = 'Green'
DefaultToken = 'Green'
Emphasis = 'Green'
Error = 'Green'
Keyword = 'Green'
Number = 'Green'
Member = 'Green'
Operator = 'Green'
Selection = 'Blue'
String = 'Green'
Type = 'Green'
Variable = 'Green'
Parameter = 'Green'
ContinuationPrompt = 'Green'
Default = 'Green'
}
Clear-Host

The names are self-explanatory, so have fun configuring them to your content!

Alle Farben im Powershell-Profil definieren

Um alle Farben in der Powershell zu setzen, muß man 40 (vierzig) Variablen definieren. Zumindest glaube ich, daß das alle sind. Im Verlauf einer langen, mühsamen Recherche waren das zumindest alle, die ich gefunden habe. In meinem Profil habe ich sie zusammengestellt und wie folgt definiert:

$Host.UI.RawUI.ForegroundColor = 'Green'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.UI.RawUI.ForegroundColor = 'Green'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.PrivateData.WarningForegroundColor = 'Green'
$Host.PrivateData.WarningBackgroundColor = 'Black'
$Host.PrivateData.ErrorForegroundColor = 'Green'
$Host.PrivateData.ErrorBackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = 'Black'
$Host.PrivateData.DebugForegroundColor = 'Green'
$Host.PrivateData.DebugBackgroundColor = 'Black'
$host.ui.rawui.ForegroundColor = 'Green'
$host.ui.rawui.BackgroundColor = 'Black'
$Host.PrivateData.ErrorForegroundColor = 'Green'
$Host.PrivateData.ErrorBackgroundColor = 'Black'
$Host.PrivateData.WarningForegroundColor = 'Green'
$Host.PrivateData.WarningBackgroundColor = 'Black'
$Host.PrivateData.DebugForegroundColor = 'Green'
$Host.PrivateData.DebugBackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'Green'
$Host.PrivateData.VerboseBackgroundColor = 'Black'
$Host.PrivateData.ProgressForegroundColor = 'Green'
$Host.PrivateData.ProgressBackgroundColor = 'Black'
Set-PSReadLineOption -Colors @{
Command = 'Green'
Comment = 'Green'
DefaultToken = 'Green'
Emphasis = 'Green'
Error = 'Green'
Keyword = 'Green'
Number = 'Green'
Member = 'Green'
Operator = 'Green'
Selection = 'Blue'
String = 'Green'
Type = 'Green'
Variable = 'Green'
Parameter = 'Green'
ContinuationPrompt = 'Green'
Default = 'Green'
}
Clear-Host

Die Namen sind weitgehend selbsterklärend, somit habt Ihr hier eine umfassende Möglichkeit, die Farbgebung nach Euren Wünschen zu gestalten. Viel Spaß!

Externer Displayport plötzlich kaputt? Teil 2!

Mittlerweile hat sich herausgestellt, daß das Problem des hin und wieder ausfallenden zweiten Monitors auf einer Linux-Mint-Maschine irgendwo im Session Management von xfcwm und xfce steckt. Es ist mir nämlich gelungen, mit dem Session-and-Startup-Tool eine Session zu sichern, die zuverlässig (!) beide Bildschirme aktiviert. Allerdings habe ich in diesem Tool die Option

Display chooser on login

aktiviert. Der Nachteil: Ich muß nach dem Login diese Session im Chooser aktivieren. Zur Zeit versuche ich zu klären, wie ich sie zur expliziten Default Session machen kann, sodaß ich den Chooser nicht mehr benötige.