Fixing Jupyter access denied on Ubuntu 22.04

After the upgrade to Ubuntu 22.04 Jupyter Notebook (on Firefox 99.0.1) would greet me with an Access Denied error. Not exactly conducive to work.

I tried setting access right of the directories (I also thought about access issues given that .local is a hidden directory), but it turns out that creating an explicit configuration helps:

jupyter notebook --generate-config

This creates a file at: ~/.jupyter/jupyter_notebook_config.py

and in this (text) file we’re looking for c.NotebookApp.use_redirect_file, uncomment it, and set it to

c.NotebookApp.use_redirect_file = True

(as explained in the comments; this seems completely fine on a single-user machine).

Read/write access for Samba/cfis drive remotely using GNU/Linux

I’ve had some issues with accessing a remote network drive: I didn’t have the permission to write on the network drive, even though I should. Changing the permissions manually would have worked, but that seemed like the wrong approach. I didn’t log into this particular drive for a while, so I figured my mount options were probably incorrect. Turns out (as usual) that the solution was to set the uid option:

mkdir -p ~/mnt/remote_username

sudo mount -t cifs -o user=remote_username,domain=domain.com,uid=local_username //home/remote_username$ ~/mnt/remote_username

Jitsi on GNU/Linux

We’re currently using Jitsi a lot, an open-source video conferencing solution. On my GNU/Linux machine running Ubuntu, I had issues with using it on Firefox, using up all the CPU and blocking/freezing after a while. Solution: it works fine on Chromium.

Mac *.txt.rtfd to *.txt

In a recent project, an assistant used TextEdit to supposedly save documents as pure (UTF-8) text files. We managed to fix the workflow, but I was left with a bunch of Zip files full of *.rtf from TextEdit. On a Windows or GNU/Linux machine, these files show up as what they are: folders that contain a rich text document (and potentially other stuff). I needed text documents.

After a bit of searching and tweaking, I got the following shell script to convert all the rich text documents in these folders/containers into text documents:

find . -name '*.rtf' -exec unoconv -f txt {} \;

There was a problem, though. The files all had a name containing important meta data. So I had the folder with the name of the file, and inside this folder the file but it was called TXT.txt (converted from TXT.rtf). I’m sure there’s a quick way in a shell script (if you know one, please share it in the comments), but I got stuck with the shell.

Enter LiveCode. Here’s a script that does just that. I guess I could have called the above shell script, but I already had this.

on mouseup
-- INPUT: select a folder with the *.txt.rtfd folders
answer folder "Input: Choose folder:"
put it into infoldername
set the defaultFolder to infoldername
put the folders into listoffolders
-- filter . and .. can cause problems
filter listoffolders without "."
filter listoffolders without ".."
-- OUTPUT: select a destination folder
answer folder "Output: Choose folder:"
put it into outfoldername
repeat with i = 1 to the number of lines of listoffolders
put line i of listoffolders into currentfolder
revCopyFile infoldername & slash & currentfolder &
slash & "TXT.txt", outfoldername & slash & textname
end repeat
end mouseup

Full LiveCode stack here on OSF (it’s nothing more than a button and a text field with a basic log).

Yoshikoder won’t start on Ubuntu

Two days ago my Yoshikoder refused to start on the Ubuntu (GNU/Linux) machine. So I tried in the console java -jar Yoshikoder-0.6.4.jar and was informed that “Error: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper”. A quick on the web look turned out that the solution is simple. In the console, I opened the following file:

sudo leafpad /etc/java-11-openjdk/accessibility.properties

and commented out the line causing problems (in my case it was the last line), so that it reads:

#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

Sorted.