insert prefix to each line of file if line is not blank otherwise do something else https://askubuntu.com/questions/1559722/insert-prefix-to-each-line-of-file-if-line-is-not-blank-otherwise-do-something-e

I would like sed do do something to each line of a file.

  • if line is NOT blank, do something, (insert prefix_01 before line text),

  • if line is blank, (including spaces, tabs or whatever not printable), do something else, (insert prefix_02 before line text).

this is my code :

f1="f1.txt"

printf "line ONE\n \t \nline THREE  \t\n" > "$f1"

prefix_01="everything good.. "
prefix_02="NOT good !! "

cat "$f1" | sed -E 's/^/'"$prefix_01"'/'

will produce the following output :

everything good.. line ONE
everything good..
everything good.. line THREE

but.. i would like to have the following output (with prefix_02 in case of blank lines) :

everything good.. line ONE
NOT good !! 
everything good.. line THREE

I would like sed to test if line is empty or not, then do action_01 or action_02.

  • if NOT empty line, action_01, (print prefix_01 + text of the line).
  • if empty line, action_02, (print prefix_02).

any help ?

Thanks.

Mario.

My spacebar doesnt work https://askubuntu.com/questions/1559721/my-spacebar-doesnt-work

yesterday i updated my Ubuntu 25.0. Since then my space bar doesn't work. I try to clean it, but it doesn't seem in poor shape at all, it was pretty OK, with no sings hardware damage. I wrote this question recurring to keyboard on screen accessibility toll, witch might indicate that its not a software problem and i am miss correlating events . Can someone help me, please?

Ubuntu 25.10 on Lenovo Thinkpad T480 boots straight to Windows - Boot-Repair shows "Locked-NVram detected" https://askubuntu.com/questions/1559720/ubuntu-25-10-on-lenovo-thinkpad-t480-boots-straight-to-windows-boot-repair-sho

I am trying to dual-boot Ubuntu 25.10 on my Lenovo Thinkpad T480 alongside Windows. The installation seems to complete successfully, but the laptop always boots directly into Windows. The GRUB menu never appears. Here are my system details and the steps I've taken:

Laptop: Lenovo Thinkpad T480

OS: Ubuntu 25.10 (Dual-boot)

BIOS Mode: UEFI

Secure Boot: Disabled

Windows Fast Startup: Disabled

Partitioning: I used the "Something Else" (manual partitioning) option during setup, following a guide similar to this one. My EFI partition is nvme0n1p1, and I have separate partitions for /, /home, /boot, /var, etc. The core problem is that the UEFI boot entry for Ubuntu is not being created.

  1. fdisk -l Output
$ sudo fdisk -l

/dev/nvme0n1p1   EFI System
/dev/nvme0n1p2   Microsoft reserved
/dev/nvme0n1p3   Microsoft basic data
/dev/nvme0n1p4   Windows recovery environment
/dev/nvme0n1p5   Linux swap
/dev/nvme0n1p6   Linux filesystem
/dev/nvme0n1p7   Linux filesystem
/dev/nvme0n1p8   Linux filesystem
/dev/nvme0n1p9   Linux filesystem
/dev/nvme0n1p10  Linux filesystem
  1. efibootmgr -v Output

When I run sudo efibootmgr -v, the "ubuntu" entry is completely missing. It only shows the Windows Boot Manager and hardware options.

$ sudo efibootmgr -v
BootCurrent: 001C
Timeout: 2 seconds
BootOrder: 001E,001F,001C,0000,001A,0019,001B,0018,0017,001D
Boot0000* Windows Boot Manager
Boot0010  Setup 
Boot0011  Boot Menu
Boot0012  Diagnostic Splash Screen
Boot0013  Lenovo Diagnostic
Boot0014  Startup Interrupt Menu
Boot0015  Rescue and Recovery
Boot0016  MEBx Hot Key
Boot0017  USB CD
Boot0018  USB FDD
Boot0019  NVMe1
Boot001A  NVMe0
Boot001B  ATA HDD0
Boot001C  USB HDD
Boot001D  PCI LAN
Boot001E  Other CD
Boot001F  Other HDD
Boot0020  USBR BOOT CDROM
Boot0021  USBR BOOT Floppy
Boot0022  ATA HDD
Boot0023  ATAPI CD
  1. Boot-Repair Utility Output

I ran the Boot-Repair utility from the live session. It failed to add the entry and gave me this specific, critical message:

Locked-NVram detected. Please do not forget to make your UEFI firmware boot on the Ubuntu 25.10 entry (nvme0n1p1/efi/ubuntu/grubx64.efi file)

This "Locked-NVram" seems to be the entire problem. Is there a hidden BIOS setting I need to find that "unlocks" the NVRAM for new UEFI entries? What should I do?

Kubuntu Intel ARC B580 OpenCL, Spectacle Screencapture, and VAAPI not working? https://askubuntu.com/questions/1559718/kubuntu-intel-arc-b580-opencl-spectacle-screencapture-and-vaapi-not-working

I have kubuntu 25.04, Ryzen 5 3400G cpu, and Intel Arc B580 gpu. Reinstalled OS to make sure a config file I modified wasn't causing issues. VAAPI and OPENCL are not recognized by any apps that use them, and when I try to use something like clinfo or any other similar info tool it fails with "Bus error (core dumped)" on pretty much anything related to gpu compute. I'm pretty sure all intel drivers, mesa, kernel, etc are all up to date.

Newish to kubuntu, suggestions on resources to study [duplicate] https://askubuntu.com/questions/1559717/newish-to-kubuntu-suggestions-on-resources-to-study

Relatively new to ubuntu, currently using Kubuntu. I used to do linux back during Knoppix times, but ended up back on windows... I am interested in speeding into more advanced terminal commands and tricks etc... which I know is a thing, any suggestions on where to go to study up on such methods etc...

I know not a technical question, but still had to ask.

How can I use the cmd&c (cut) and cmd&v (paste) on a MacBook now running Ubuntu 24.04? https://askubuntu.com/questions/1559715/how-can-i-use-the-cmdc-cut-and-cmdv-paste-on-a-macbook-now-running-ubuntu

I have an old MacBook that is out of Apple support, so I installed Ubuntu 24.04.03 LTS rather than chucking it out. On a Mac the Cmd + c and Cmd + v keys are the standard keyboard cut and paste. Is there any way to map these commands to allow this functionality?

enter image description here

I tried in Settings -> Keyboard -> keyboard shortcut, but I think this is really for mapping an application to a keyboard shortcut.

Lubuntu 24 - Screen wakes at night and stays on https://askubuntu.com/questions/1559714/lubuntu-24-screen-wakes-at-night-and-stays-on

I have an HP Pavilion running 24.04.3 Lubuntu and Chrome Version 142.0.7444.134. The monitor can randomly come on at night and stay on the rest of the night. It will normally be open to Chrome. I thought it might be a scheduled backup waking the system but backup did not run last night. I don't see anything that looks applicable in settings.

Display Configuration lost with recent Nvidia Driver Update for 580 https://askubuntu.com/questions/1559713/display-configuration-lost-with-recent-nvidia-driver-update-for-580

I’m experiencing an issue with my U2725QE monitor and my 5090 on Ubuntu 25.10 using driver version 580.95.05. (I installed it using the ubuntus additional drivers app)

My display settings (resolution, refresh rate, etc.) appear to save correctly, but they are lost after every reboot. After restarting, I either have to manually reapply the settings or turn the monitor off and on again to restore them. I also have a second monitor connected but turning this one off and on again does not help.

The problem only occurs when the refresh rate is set to 60+ FPS (Display is native 120hz). I’ve already tried reinstalling the driver and even performed a clean reinstall of Ubuntu, but the issue persists. This behavior only started after the latest driver update.

Generic icon in the bar with using Appimage https://askubuntu.com/questions/1559712/generic-icon-in-the-bar-with-using-appimage

I am a beginner in Ubuntu, I decided to stick to me current computer. Windows 11 told me to change it, but I won’t… It works just fine ! So I decided to change and learn from every steps, even the smallest, using Ubuntu now (Ubuntu 24.04.3 LTS).

Here is my problem. I get an AppImage of the app SuperSlicer. https://github.com/supermerill/SuperSlicer/releases/tag/2.5.59.13 Prior to download it, I decided to install the Synaptic app manager, as I read a recommendation for it (just to know it). Everything works fine in the app when running. Except...the icon in the task bar when I launch the SuperSlicer app. The pinned icon on the bar is correct. Pinned icon But the icon of the app after launching is a kind of a generic one AND there is not this little red dot (or dots when the app is running multiple times) just right of the pinned icon (as for Firefox in this example). This should actually be the only mark indicating that the app is running looking at the bar and that is the behavior I am looking for. Generic icon of the app when launched

I read a bit about this problem and learn that it could come from the .desktop file. But I do not see any trouble in it. Below is the icons location I found and the .desktop file content. Icons location and .desktop content

Thank you for your help. And hoping to learn something today!

My low grade Kubuntu can use Steam games whereas my high-end one cannot https://askubuntu.com/questions/1559710/my-low-grade-kubuntu-can-use-steam-games-whereas-my-high-end-one-cannot

I have two PCs:

PC 1
   Ryzen 9 7900x3d (12 core)
   64 GB DDR5 @ 5200 mt/s
   3 x 1TB gen 5 M.2 SSDs
   Radeon RX 7900 XTX 24 GB

PC 2
   Ryzen 7 5800x3d (8 core)
   64 GB DDR4 @ 3600 mt/s
   1 x 1TB gen 4 m.2 SSD
   Radeon RX 5500 xt 8 GB

On PC 2 I have a bare minimal installation of Kubuntu. The only things I've done is add in Steam for Eve Online (which works great). The issue is that I cannot get Steam to work on PC 1. It will install, then it just becomes a tab in the taskbar and will not go further, not even to the point of installing Eve.

Is their some BIOS setting that could cause this? Everything else on the two PCs is identical. BIOS is my weak point.

Ask for specific user input in Ubuntu desktop autoinstall https://askubuntu.com/questions/1559709/ask-for-specific-user-input-in-ubuntu-desktop-autoinstall

I need to configure an Ubuntu desktop ISO that asks the user for the system hostname and configures the rest of the installation unattendedly. I'm using the Ubuntu 24.04.3 desktop image.

I am trying to use autoinstall to request the hostname input, but I have not been able to get it working through the late-commands.

Any ideas on how this can be done?

GRUB 'unknown filesystem' Error https://askubuntu.com/questions/1559707/grub-unknown-filesystem-error

total newbie here i don't know much about grub.
I am trying to boot an Ubuntu Server 24.04 installer from an SD card using a custom entry in the host GRUB (/etc/grub.d/40_custom). The media was created using the dd command, resulting in an iso9660 filesystem.
here is my 40_custom:

menuentry 'Ubuntu Installer (Failing)' {
    # Fails with 'error: unknown filesystem'
    set root='(hd0,gpt2)' 
    linux /casper/vmlinuz boot=casper quiet
    initrd /casper/initrd
}

so during boot, when I select this menuentry I get error: could not find vmlinuz, and when I execute the ls command for (hd0,gpt2) I get unknown filesystem
if anyone had ran into this problem before, please share your experience, that would be much appreciated.
I also find it weird that the host grub of an "ubuntu server OS" failed to read an SD card having the exact "ubuntu server" installer.

btw: (I am seeking a direct solution for the GRUB entry, not external tools like Ventoy.)

Edit:
more context for clarification, I wanted to add a menuentry in the grub pointing to an SD stick so that I can reinstall and format the whole machine quickly from it next time whenever that is needed.
I know that's not how typicall formatting and installing is done, I could change the UEFI settings to boot from the SD
but ! I want to achieve unattended install
only problem with that is in an unattended install I get the problem of a looping install: it finishes, reboots, the UEFI again detects the SD and keeps going like that infinitly until I have to stop it in the right time (which defeats the purpose of unattended install). somehow it fails unmounting the SD, so I give up trying to debug this loop that shouldn't normally happen.
and then I got the idea to delegate this from the UEFI to the grub, so that when the install finishes, a reboot happens, the UEFI boots the freshly install ubuntu with no custom menuentry in it.

"Oh no! Something has gone wrong" message [duplicate] https://askubuntu.com/questions/1559702/oh-no-something-has-gone-wrong-message

I got the "Oh no! Something has gone wrong" message after accepting to upgrade to the newest version.

enter image description here

I'm not a developer, just an ordinary laptop and ubuntu user. I haven't had issues so far and don't know how to tackle this.

I read most of the discussions under similar questions here on the forum but I don't understand everything.

I'm starting to think the only solution is to reinstall the OS (I read that even that might not work and I'm starting to panic because I don't want to lose the information on my laptop). If not, I'll be very happy if someone can guide me through another solution process.

Ubuntu dual boot with Windows on two separate hard drives https://askubuntu.com/questions/1559701/ubuntu-dual-boot-with-windows-on-two-separate-hard-drives

I would like to install Ubuntu on my HP PC in dual boot with Windows on two separate disks and put the Ubuntu boot on a separate disk from the Windows one, I wanted to know how safe it was. A thousand thanks!

can't connect to samba share on different physical drive https://askubuntu.com/questions/1559682/cant-connect-to-samba-share-on-different-physical-drive

I have an old computer with 5 hard drives, and Kubuntu 24.04. I am able to connect locally to a shared folder on the main hard drive where Kubuntu is installed, but I get "permission denied" when trying to connect to a share on one of the other physical drives mounted in /media/mrx/Crucial2TB. Here are the configs:

/etc/samba/smb.conf

[ls1]
path = /media/mrx/Crucial2TB/shared
read only = no
browsable = yes
valid users = sambauser, @sambashare
writeable = yes
force user = sambauser

[ls2]
path=/home/sambauser/shared
read only = no
browsable = yes
valid users = sambauser, @sambashare
writeable = yes
force user = sambauser

and the shares:

$ sudo stat /media/mrx/Crucial2TB/shared
  File: /media/mark/Crucial2TB/shared
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,65    Inode: 110100481   Links: 2
Access: (0777/drwxrwxrwx)  Uid: ( 1001/sambauser)   Gid: (  988/sambashare)

$ sudo stat /home/sambauser/shared
  File: /home/sambauser/shared
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 8,33    Inode: 9832830     Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1001/sambauser)   Gid: (  988/sambashare)

and the mount commands:

sudo mount -t cifs //10.0.0.9/ls1 /mnt/local_shared1/ -o username=sambauser
sudo mount -t cifs //10.0.0.9/ls2 /mnt/local_shared2/ -o username=sambauser

the mount point in /etc/fstab for the crucial drive:

UUID=791ec2e1-fb58-4d17-3214-803ee65ff45 /media/mrx/Crucial2TB        ext4    defaults        0 2

I get "permission denied" for ls1, but ls2 works.

How to remove snap version of docker when snap remove --purge fails https://askubuntu.com/questions/1559665/how-to-remove-snap-version-of-docker-when-snap-remove-purge-fails

I had docker running on my LTS 24.04 system that I had installed from the docker site--not the snap version from Ubuntu. However, I had not installed the docker-compose script (didn't know it wasn't included by default). Anyway, I naively tried to grab it using apt-get and suddenly I have the snap version of docker. This caused all kinds of problems, and I'd like to get rid of it, and start over.

I thought this would be easy, but my computer just hangs whenever I try

sudo snap docker disable
sudo snap remove docker    # have tried with and without --purge

After running the command, I check on the process with

ps aux | grep snap

and see 2 processes that are in interruptible sleep mode (STAT Ss and S+) with sudo, and another process by root that has STAT Sl+, i.e, they are waiting on something...

I've tried killing the process and that causes snap to stop with

error: Change finished in status  Hold with no error message.

I can reset the snap demon following the solution here

How can I force remove a snap

But even after resetting the snap daemon, when I execute

sudo snap remove --purge docker

I'm back to a hung system.

I can see that the docker service and docker.socket are stopped, so that should not be why the snap.daemon is waiting.

@Rinzwind: No the service is not active. The system attempts to load it, but fails.

This did prompt me to remove the manually installed version of docker. That eliminates the docker service from even trying to start (it was broken since the snap install) since nothing is installed anymore. However, I still cannot get rid of the snap docker version. Even after reboot and cleaning the snapd/state.json activity related to previous attempts to remove docker.

snap changes yields

docker   28.4.0   3377   latest/stable    canonical✓  disabled

sudo systemctl status docker

yields

Unit docker.service could not be found.

docker.socket is also not running.

Edit#2 @Rinzwind. As expected dpkg found nothing and most of the directories were empty. However, I did purge /var/lib/containerd and .docker

The zombie remove processes did not awake, so I tried rebooting and remove again. I had to clean the json state again, but no luck afterwards.

Is there a more manual (drastic) way to remove snap app from the system? I just need the snap version gone because I'd rather not blow up my system just to get rid of a snap app, but I need docker. I'm really surprised this is so hard because I thought the whole point of snap apps was that they were containerized and "easy to remove". ha. Any suggestions?

How can i reduce my desktop scale https://askubuntu.com/questions/1471930/how-can-i-reduce-my-desktop-scale

I'm new on ubuntu and my resolution is 1366x768 and scale for big for me. How can i reduce scale %100 to like a %75-80 ?

Thanks for helps and sorry for my English, have a nice day..

Carbon X1 Gen 10 Lenovo not detecting monitor through usb - c connection? https://askubuntu.com/questions/1435932/carbon-x1-gen-10-lenovo-not-detecting-monitor-through-usb-c-connection

I have a new Lenovo machine----X1 gen 10 and its not detecting/displaying the external usb c monitor through the usb-c connection. (My pervious thinkpads T490 worked well in the same set up). Any ideas?

Executable-text-files Option missing on Ubuntu 22.04 LTS / GNOME 42.0 https://askubuntu.com/questions/1425373/executable-text-files-option-missing-on-ubuntu-22-04-lts-gnome-42-0

SH files should be executed when double-clicking, instead of being opened in a Text Editor, e.g. Gedit. One can assumingly change this behavior through option "Executable Text Files" in Files, but this option is no longer available, at least in my Ubuntu 22.04 LTS / GNOME 42.0.

enter image description here

How to install third party softwares after installing ubuntu 22.04 https://askubuntu.com/questions/1410889/how-to-install-third-party-softwares-after-installing-ubuntu-22-04

I made a mistake. I unchecked option for installing 3rd party softwares when installing ubuntu. I followed a instruction that's says to unchecked it when doing dual-boot setup.

I did some research, some say just checked the "software restricted by copyright or legal issues (multiverse)" in software & updates and also do sudo apt-get install ubuntu-restricted-extras. I don't know if this is enough, I haven't yet execute the command. Should I execute this? and there is other things should I do?

my screen goes black after 30 seconds of inactivity in Ubuntu 22.04 https://askubuntu.com/questions/1408394/my-screen-goes-black-after-30-seconds-of-inactivity-in-ubuntu-22-04

My screen goes black after 30 seconds of inactivity and when I press a key, it shows where it was and does not need any password. This problem won't occur when I use it for watching videos in platforms such as youtube etc. My Ubuntu version is 22.04. I have used some methods to overcome it but still couldn't.

  1. I've changed screen blank to "never" in setting>power>screenBlank
  2. I've used commands such as 'gsettings set org.gnome.settings-daemon.plugins.power idle-dim false', and 'gsettings set org.gnome.desktop.screensaver lock-delay 600' with and without sudo in terminal. I restarted my pc after them just in case. could you please help me with this?
systemd-resolved is returning servfail on every request https://askubuntu.com/questions/1222322/systemd-resolved-is-returning-servfail-on-every-request

On one of my servers starting this morning, every DNS lookup sent to systemd-resolved comes backs SERVFAIL and I am completely stuck debugging any further as there are not any errors to go on. I am running a fresh install of Ubuntu 19.10.

DNS Lookup:

$ dig google.com @127.0.0.53

; <<>> DiG 9.11.5-P4-5.1ubuntu2.1-Ubuntu <<>> google.com @127.0.0.53
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 42929
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com.            IN  A

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Mar 29 10:56:07 PDT 2020
;; MSG SIZE  rcvd: 39
$ resolvectl query google.com
google.com: resolve call failed: No appropriate name servers or networks for name found

And the systemd-resolve status:

$ systemd-resolve --status | cat
Global
       LLMNR setting: no
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 9 (vnet1)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 8 (vnet0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 7 (virbr0-nic)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 6 (virbr0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 5 (br0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 10.0.0.1

Link 4 (enp6s0)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 3 (eno2)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 10.0.0.1

Link 2 (eno1)
      Current Scopes: none
DefaultRoute setting: no
       LLMNR setting: yes
MulticastDNS setting: no
  DNSOverTLS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Neither restarting the systemd-resolved service, nor restarting the server fixes things.

When I query a DNS server directly with dig, it resolves as expected.

Has anybody ran into this before or have ideas on what I could look at further to try and figure out what is going on?

As a user, is there any way to change the "confinement" of a snap package? https://askubuntu.com/questions/1214346/as-a-user-is-there-any-way-to-change-the-confinement-of-a-snap-package

At least go to "classic". I don't want to sidestep the issue with links or bindmounts...

Which SIP-Client or SIP Phone is supported by Ubuntu 18.04.3 LTS or 19.10? https://askubuntu.com/questions/1192744/which-sip-client-or-sip-phone-is-supported-by-ubuntu-18-04-3-lts-or-19-10

I recently switched from Windows to Ubuntu and it's hard to stop loving the new change. I need help in regards to finding an SIP phone which is compatible with Ubuntu 18.04.3 LTS or 19.10, and including a recording feature. I researched on Google, Ubuntu 14 supports SFL but that's missing latest version while searching in Ubuntu software store.

How to completely remove flatpak https://askubuntu.com/questions/1174596/how-to-completely-remove-flatpak

I have removed flatpak with sudo apt-get purge flatpak; however, if I run locate flatpak I find several files and several directories. Can I remove them all with rm -r or there is a "better" way? If so, how do I have to do that?

Edit

Since my output is 21909 rows long and, as @mook765 noted, nobody will ever be so crazy to read them all I think I should reformulate the question as follows: if I had a normal installation of flatpak, what would be the best way to remove it and all its files and folders?

Macchanger returns error in the terminal https://askubuntu.com/questions/1078860/macchanger-returns-error-in-the-terminal

I am using Ubuntu 18.04 bionic. When I try to change my mac address using the macchanger on the terminal I get this error message:

[ERROR] Could not change MAC: interface up or insufficient permissions: Operation not permitted

How can I solve this?

Window manager warning: Overwriting existing binding of keysym XXX with keysym XXX (keycode XX) https://askubuntu.com/questions/1062455/window-manager-warning-overwriting-existing-binding-of-keysym-xxx-with-keysym-x

I performed a fresh install of Ubuntu 18.04 LTS on my desktop that I've been using Ubuntu on since Ubuntu 11.04. As I'm setting everything back up and installing all of the 3rd party software I regular use, I noticed in /var/log/syslog that everytime I press the Backspace key on my keyboard is generates the following errors one after another:

Aug 4 18:44:49 mycomputer org.gnome.Shell.desktop[3044]: Window manager warning: Overwriting existing binding of keysym ff09 with keysym ff09 (keycode 17).

Aug 4 18:44:49 mycomputer org.gnome.Shell.desktop[3044]: Window manager warning: Overwriting existing binding of keysym 73 with keysym 73 (keycode 27).

I also notice a short stutter anytime I press the Backspace key (small delay then Backspace starts doing it's thing). Any ideas what the heck this might be and how I can resolve it?

I'm using a Corsair K90 keyboard which hasn't had this issue the past and I didn't configure any custom hotkeys yet so it's not related to anything that I specifically changed regarding key mappings.

One thing I can mention is while I didn't upgrade over my existing Ubuntu installation, my home directory hosted on separate drives was already populated with my personal files and configs from my apps so I'm wondering if something in there that was carried over may be causing this.

Any help is appreciated and please let me know if you need any additional information.

Arduino Ide Port in the tool is greyed https://askubuntu.com/questions/979170/arduino-ide-port-in-the-tool-is-greyed

I have installed Arduino IDE 1.8.5 I in my Laptop and in UBUNTU 16.04 LTS The option in Tools of PORT is grayed. I want to use Arduino Uno on it but i can't fix it.

What are all the apt command-line commands and options? https://askubuntu.com/questions/812689/what-are-all-the-apt-command-line-commands-and-options

I know they think that they are being helpful, but in fact they are being quite the opposite here in the apt --help and manpage:

Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details.

So basically in other words they only list a few of the commands and options and give you no idea about how to find out the rest which is greatly unhelpful if I am to use this tool.

So what are all the commands and options that they feel they are being 'helpful' not to provide, what are their details and usage, and how can I keep up-to-date with this information if they do not provide it officially? Or perhaps that has changed now and they are listed somewhere?

I am running Ubuntu GNOME 16.04 with GNOME 3.20.

apt-get install nfs-common specific version https://askubuntu.com/questions/710308/apt-get-install-nfs-common-specific-version

Short question: I have reason to install a specific version of nfs-common on a new machine. I want to install 1:1.2.8-6ubuntu1.1. I believe that I need to sudo apt-get install nfs-common, but I'm not sure how to specify the version. I've tried the obvious of:

$ sudo apt-get install nfs-common=1:1.2.8-6ubuntu1.1
E: Version '1:1.2.8-6ubuntu1.1' for 'nfs-common' was not found

Long question: I'm trying to install nfs-common over a docker image. At first attempt, I just did apt-get install nfs-common. This failed, presumably because:

The problem is that nfs-common has been updated in the backports repo, but portmap has not, and the new nfs-common and old portmap are not compatible. So to install it either disable backports, or use force version to install the previous version of nfs-common.

— Source: Crunchbang.org: [SOLVED] nfs install failure.

OK, I'm happy to force a previous version of nfs-common. This would match another machine that was setup months ago, presumably before the latest version was available. Going to that machine and running apt-cache policy nfs-common, I see it has installed 1:1.2.8-6ubuntu1.1. Looking at man pages for it and:

  1. How to install specific version of some package?
  2. How to install specific Ubuntu packages, with exact version?

I see that I need to do something like apt-get install nfs-common=1:1.2.8-6ubuntu1.1. However, I cannot figure out the exact syntax. When I tried the above, I received E: Version '1:1.2.8-6ubuntu1.1' for 'nfs-common' was not found. I received the same error if I used 1:1.2.8-6ubuntu1.2, which is the default version that's installed.

Obviously I'm not understanding something about the version specified, and I can't seem to find any examples on the web for installing a specific version of nfs-common (or some component that I can map to installing an old nfs-common).

Any help would be appreciated.

Additional note: I tried following the advice at Debian User Forums: nfs-common and dpkg errors. I had to add an apt-get update. However, doing the apt-get install nfs-common ended up failing with

dpkg: error processing package nfs-common (--configure):
 subprocess installed post-installation script returned error exit status 10
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
 nfs-common
E: Sub-process /usr/bin/dpkg returned an error code (1)