Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kurogane1031/add447283914348cabf7179adacf12b2 to your computer and use it in GitHub Desktop.
Save kurogane1031/add447283914348cabf7179adacf12b2 to your computer and use it in GitHub Desktop.
Misc

Our ASUS Zenbook keep having display issues, despite NVDIA driver was installed. Adding nomodeset to the grub didn't do any justice either.

What kind of error was it? Basically after you selected Ubuntu from grub during startup, nothing came out. Nothing. Not even ubuntu logo. Adding nomodeset to the grub didn't solve the problem. So after some searching, it seems that intel-microcode is the culprit.

So to solve this issue, we need to permanently add dis_ucode_ldr to grub, and for now, it solve my issue. not sure how will it be in the future.

Reference

Linux freezing at boot screen ASUS ZENBOOK / VIVOBOOK - Linux hangs on startup FIX

The student in itolab accidentally make the system corrupted beyond repair (at least with my current capability). So the only way to copy their file without much hassel is using scp. However, our laboratory's network requires setting up static ip. The issue? Of course it is related to the laptop originally default to velodyne's ip, because it is usually used to collect point cloud data. Sad.

So long story short, go to Ubuntu recovery mode, navigate to root and press enter. First, we need to set up the ip address. But before that, we need to confirm the name of our interface.

In the internet, usually people will say it's eth0. But in our case, the name has some digits that doesnt spell eth0 at all. To get them, you need to run

ifconfig

For now, let use use interface_name as an example.

Next we need to edit the interfaces file. I have vim, so I will be using vim for this example.

vim /etc/network/interfaces

Add following to the file

auto lo
iface lo inet loopback

auto interface_name
iface interface_name inet static
address your-in-address
netmask your-net-mask
gateway your-gateway
dns-nameservers your-nameserver1 yournameserver2

Save it, reboot, open ubuntu recovery mode, and enable network. I've only tested this on LAN connection. So, yeah, not sure how it goes for wifi.

Reference

Setting a static IP on Ubuntu: a beginner's guide

So I have a bunch of sequenced images that needs to be converted into animation. Thankfully, there are two options: ffmpeg and convert. So far, I've only tested convert, to here it is the command that I've used.

convert -delay 3 * -loop 0 live_plot_{0..99..1}.png animation.gif

Reference

Creating a GIF animation from PNG files

Notes

  1. Memory Issues
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `live_plot_96.png' @ error/cache.c/OpenPixelCache/3984.
...

So far, I didn't test any solution yet. But some googling sent me to the ImageMagick's github page with the possible solution.

export PATH=$NEOVIM_DIR:$CMAKE_DIR:$DOOM_DIR:$EMACS_DIR:$PATH
[ -r ~/.bashrc ] && source ~/.bashrc

Switching between EN and JP layout

Download Gnome Tweak Tool

sudo apt install gnome-tweak-tool

Then run gnome-tweaks.

At the Keyboard & Mouse tab, select Additional Layout Options

Then, under Switching to another layout, select Alt+Shift

Turning IME on and off

At the keyboard language selectiong on the top bar, select Japanese (Mozc).

Go to Tools and then Properties

Under General tab, go to Keymap style and Customize.

This is where it gets a little bit tricky.

Add new entries with the following selection

Composition	Ctrl `	IMEOff
Conversion	Ctrl `	IMEOff
DirectInput	Ctrl `	IMEOn
Precomposition	Ctrl `	IMEOff

Then select Export to file (it is under Edit in the Mozc Keymap Editor)

Export to any file. For example I named it as keymap.txt

Then open keymap.txt using any text editor.

Find the above keybindings, and manually change them to

Composition	Super `	IMEOff
Conversion	Super `	IMEOff
DirectInput	Super `	IMEOn
Precomposition	Super `	IMEOff

Save keymap.txt.

Then at the Mozc Keymap Editor, select Edit and Import from file

Choose the edited keymap.txt

Press OK, the Apply

Then test them. Hopefully it works. This is tested in Ubuntu 20.04

Reference

Ubuntu – How to switch input modes in mozc without going to the IBus menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment