Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Thursday, May 9, 2024

Limit CPU and Memory usage in Linux Slack

The Linux Slack consumes a lot of CPU and memory in Linux environment. To limit its resource usages, you can apply a quote via the snap command:

sudo snap set-quota slacklimit --memory=2GB --cpu=20% slack

Monday, June 6, 2022

Separated dock for multiple workspace in Ubuntu

Separated dock for multiple workspace in Ubuntu, set the following to be true:

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true

Saturday, October 24, 2020

Ubuntu WiFi device disappear with dual boot Windows 10

 When your device is dual boot with Ubuntu and Windows 10, you'll got a chance to lose the WiFi device in Ubuntu.


To fix this issues, try to disable the "Fast Startup" feature in Windows 10.


It solves the problem for me, hope this work for you too.


Monday, October 12, 2020

Ubuntu apt-get update with NO_PUBKEY error

 In Ubuntu, I'd encountered the following error when doing a apt-get update:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F7E06F06199EF2F2

This key belongs to the repository https://qgis.org/ubuntu. To add the key, I did the following:

sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 F7E06F06199EF2F2

By default, the command above will called gpg which uses port 11371. I had to force command   to use port 80 instead. Also, please also pay attention that the protocol is called "hkp://"

Ref: https://askubuntu.com/questions/1119727/gpg-keyserver-receive-failed-connection-timed-out



Friday, September 4, 2020

Stop / hide up pcieport error in Ubuntu / Linux

 Number of ways  to try in grub:

  • pci=nomsi
  • pci=noaer
  • pcie_aspm=off

Actual steps:
  1. sudo vi /etc/default/grub
  2. Edit line:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=noaer"
  3. sudo update-grub
  4. Reboot machine

Wednesday, July 15, 2020

curl returns "ssl_choose_client_version:unsupported protocol" error in Ubuntu 20.x

If you encountered "ssl_choose_client_version:unsupported protocol" when using curl in Ubuntu 20:

    $ curl https://somehost/
 
curl: (35) error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol


It may because the "somehost" only accepts old protocol (e.g. TLS v1, etc.), but in Ubuntu 20.x, the OpenSSL assumes minimum = TLS v1.2 by default. 

If the "somehost" just cannot upgrade to TLS v1.2, you might consider fixing it with the following:

1) Modify /etc/ssl/openssl.cnf

Search for the line "oid_section = new_oids"

Add the following lines below it:

openssl_conf = default_conf

[default_conf]
ssl_conf = ssl_sect

[ssl_sect]
system_default = system_default_sect

[system_default_sect]
MinProtocol = TLSv1.1
CipherString = DEFAULT@SECLEVEL=1

2) curl "somehost" with the following parameters

$ curl --tlsv1 https://somehost

3) If the "somehost" just using a self-signed certificate

    $ curl -k --tlsv1 https://somehost

Reference:



Tuesday, June 30, 2020

SQL Developer JavaFX problem

When running SQL Developer in Linux, you may encounter the "JavaFX" problem stating that the JavaFX libraries / components are not found. To solve this issue, you can consider the following solution:

  1. Install SDKMAN
  2. Use SDKMAN to install either "OpenJDK 11" or "Zulu JDK with FX"
    • sdk install java 11.0.7-open
                OR
    • sdk install java 8.0.252.fx-zulu
  1. Check the SQL Developer "product.conf" file to make sure the correct JDK is used.
    • ~/.sqldeveloper/<version>/product.conf
    • SetJavaHome /path_to_java_home
  2. If you just comment out the "SetJavaHome" variable, then the current JDK you use will be used with SQL Developer.
Enjoy!

Monday, May 18, 2020

Using GDAL with SpringBoot in Ubuntu

To use GDAL with SpringBoot in Ubuntu:


  1. Apt install gdal-bin, gdal-data, libgdal-java (optionally libgdal26, don't know whether it's necessary)
  2. Set the Environment variables in Eclipse:
    1. GDAL_DATA = /usr/share/gdal
    2. LD_LIBRARY_PATH = /usr/lib/jni:$LD_LIBRARY_PATH


Reference: http://geoexamples.blogspot.com/2012/05/running-gdal-java.html

Friday, November 22, 2019

Sending F10 in Ubuntu Terminal

By default, you just can't send F10 to Ubuntu Terminal's curses program. This is because F10 is being captured by Terminal.app already.

A quick workaround is to use "ESC 0" to simulate sending F10 inside Terminal.app.

Reference

Tuesday, November 19, 2019

Customized Dash (Launcher / Taskbar) Icon in Ubuntu

To customize application icon in Ubuntu:

  1. Create a .desktop file in ~/.local/share/applications/
    e.g. /home/user/share/applications/<application name>.desktop
  2. Add the following content to the desktop file
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=ApplicationName
GenericName=ApplicationName
Icon=/home/user/application-icon.png
Exec=/home/user/application/application-executable
Categories=Category;Subcategory
Done!

Friday, September 27, 2019

Slow Ubuntu startup time due to apt-daily.service

The  apt-daily.service  makes users feel very slow when running at startup. There is a workaround to delay its execution after system boot up:

Do the following:
 sudo systemctl edit apt-daily.timer 

And paste the config to the config file:
 # apt-daily timer configuration override 
 [Timer] 
 OnBootSec=15min 
 OnUnitActiveSec=1d 
 AccuracySec=1h 
 RandomizedDelaySec=30min 

References:
https://askubuntu.com/questions/800479/ubuntu-16-04-slow-boot-apt-daily-service
https://ubuntu-mate.community/t/shorten-boot-time-apt-daily-service/12297

Thursday, September 19, 2019

Android Emulator 29.2.0 problem with Ubuntu 19.04

It just crashed with segmentation fault.

Display card tested: Radeon RX 550, Intel UHD Graphics 630

From https://androidstudio.googleblog.com/2019/09/emulator-2920-stable.html, the OS may crashes with incompatible Vulkan drivers. 

Temporary rollback to emulator 29.1.12-5839083 as a workaround.


Upgrade nodejs in conda (from v18 to v26)

If your conda env is nodejs v18, doing a conda install nodejs=26 is likely to create a lot of conflict. Consider remove those conflicting p...