I was getting a "similar" error after install a few packages, similar as I am not running ZFS, but same error message.  I search and found your issue. Here is my error (see below).  I was able to get fix by following answer here, New to Linux, I'm getting this recurring error "ERROR "update-grub" returned an error: exit status 1 " please advise
TLDR; /boot was 100% full, cleaned out with sudo apt clean;sudo apt auto-remove, update-initramfs was run as part of sudo apt auto-remove, and was successful.

sudo apt-get install libgtk2.0-0 libgtk-3-0 libnotify-dev
libgconf-2-4 libnss3 libxss1 Reading package lists... Done Building
dependency tree        Reading state information... Done libgtk2.0-0
is already the newest version (2.24.32-4ubuntu4). libnotify-dev is
already the newest version (0.7.9-1ubuntu2). libxss1 is already the
newest version (1:1.2.3-1). libgconf-2-4 is already the newest version
(3.2.6-6ubuntu1). libgtk-3-0 is already the newest version
(3.24.20-0ubuntu1). libnss3 is already the newest version
(2:3.49.1-1ubuntu1.2). The following packages were automatically
installed and are no longer required:   libllvm9
linux-headers-5.4.0-29 linux-headers-5.4.0-29-generic
linux-image-5.4.0-29-generic linux-modules-5.4.0-29-generic
linux-modules-extra-5.4.0-29-generic Use 'sudo apt autoremove' to
remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not
upgraded. 1 not fully installed or removed. After this operation, 0 B
of additional disk space will be used. Do you want to continue? [Y/n]
Y Setting up initramfs-tools (0.136ubuntu6.2) ... update-initramfs:
deferring update (trigger activated) Processing triggers for
initramfs-tools (0.136ubuntu6.2) ... update-initramfs: Generating
/boot/initrd.img-5.4.0-40-generic Error 24 : Write error : cannot
write compressed block  E: mkinitramfs failure cpio 141 lz4 -9 -l 24
update-initramfs: failed for /boot/initrd.img-5.4.0-40-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess
returned error exit status 1 Errors were encountered while processing:
initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code
(1)


Lost phone : is Ubuntu One login linked to SIM card?

You can manage which devices have access to your Ubuntu One account. Simply go into your account settings and delete the stolen phone.


Failed to download repository information from lynis and dell

You might just need to re-add the PPA:

If you want the cisco PPA:

https://packages.cisofy.com/

Not sure if you wan to use customer or community ppa from above, so you will have to link to your desired one and follow the directions there.


Cannot add PPA. Please check that the PPA name or format is correct

Open Terminal and run the command

sudo apt-get install --reinstall ca-certificates

It may work, but if doesn't then run

sudo -E add-apt-repository ppa:ppaname/ppa

instead of sudo add-apt-repository ppa:ppaname/ppa


Is Ubuntu Server required for LAMP server or will anything break if I install LAMP on Ubuntu Desktop?

No, Ubuntu Server is not needed.

You can very easily install all of the required packages for a LAMP server from Ubuntu Desktop. In fact, most web developers use this exact setup to test things!

As mentioned in the question you linked, you can install a LAMP stack with two commands:

sudo apt-get install tasksel
sudo tasksel install lamp-server

You may need to check some other things to make sure that there's nothing else bound on any ports, but (typically) there are no additional steps that are needed. If you want to access your server from the world, you need to set up port-forwarding and probably unblock port 80/443 in your firewall.

However, if you're running a LAMP server on your own system, it is highly recommended to run a firewall on your upstream router or your machine itself, as well as working through (at least, partially) the Ubuntu Wiki's Security guide. LAMP is not the most secure thing in the world. It's important to set up some best-practice topics to make sure your system stays safe, as well.

As mentioned in your question, you can also install the LAMP stack using:

sudo apt install lamp-server^

If you want to determine what packages will be installed/altered (just to be safe), you can run the above command with the -s flag to simulate what will happen to your system.


Mouse speed/acceleration options do not appear for my Logitech K260 combo

relevant previous post.

$ man xset
$ xset m 3/2 50

That works for me on a big screen, where I want slow motion on small moves and fast on quick moves. It's also under a different situation: Ubuntu 16.04 with a Logitech MK270 with unifying nano-adapter plugged direct to the motherboard USB 3.0.
Good luck!


Can't connect to wireless on Ubuntu Server

The following should work:

/etc/network/interfaces file:

auto wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpa_supplicant/wpa_supplicant.conf file:

network={
    ssid="turkradio"
    psk=ENCRYPTED_KEY
}

You get the encrypted key using the wpa_passphrase command:

wpa_passphrase turkradio key

Then to restart the networking(leave out the sudo if you are root):

sudo /etc/init.d/networking restart


How can I remove Ubuntu from the UEFI boot options?

Boot a Linux emergency disc in EFI mode (the Ubuntu installer in its "try before installing" mode should work). You can then use the efibootmgr utility to delete the unwanted entry. You'll use -v to view the list of options and then a combination of -b and -B to eliminate the ones you don't want:

$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,0003
Boot0000* rEFInd Boot Manager   HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(\EFI\refind\shim.efi)
Boot0001* fedora    HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(\EFI\fedora\grubx64.efi)
Boot0003* ubuntu    HD(1,28,96000,bc34b60c-6611-492f-99b0-d2c37bd77f48)File(EFI\Ubuntu\grubx64.efi)
$ sudo efibootmgr -b 3 -B

Some EFIs provide the ability to do this in their own user interfaces, too, but details vary greatly from one to another.


How do I make Ctrl+A to not shift cursor to the beginning of the text line?

I had the same problem after upgrading from Ubuntu 16.04 to 19.10 with Ctrl + A and Ctrl + W.  I fixed the issue by going into Tweaks -> Keyboard & Mouse and desactivate Emacs Input.


According to this discussion on Github, it seems that it has been introduced a change in pip library that breaks it.

The suggested solution for the moment is to downgrade the version of pip to 9.0.3

pip install --user --upgrade pip==9.0.3


usb mouse not working after upgrade from 15.10 to 16.04

This issue is due to Gnome Software. To stop this from happening we can disable the Gnome Software from startup applications.

Here are the steps to solve this issue:-

1:-Open the dash and search for "startup applications" and open it.

2:-Disable Gnome Software (Uncheck the box on the left side).

3:-Close it.

4:-Shutdown or restart and check it again.

this time your mouse will start working.

the same question was asked by some other guy and i just found the solution yesterday.I hope Developers will solve the issue soon in Gnome Software.

UPDATE:

i solved the problem with

sudo rmmod usbhid
sudo modprobe usbhid


Issues installing Apache2 on ubuntu 18.04

Change the ports for apache in two places:

/etc/apache2/ports.conf, and
/etc/apache2/sites-available/000-default.conf

There you will need to modify for (1) the line:
Listen 80

to say
Listen 8080

And for (2), the line
<VirtualHost *:80>

to
<VirtualHost *:8080>

Then restart apache with sudo systemctl restart apache2, Note I use 8080 here you can use any other port.
Also note:

Port numbers 0 to 1024 are reserved for privileged services and designated as well-known ports. This list of port numbers  are specified in RFC 1700.
Port numbers range from 0 to 65535, but only port numbers 0 to 1023 are reserved for privileged services and designated as well-known ports. The following list of well-known port numbers specifies the port used by the server process as its contact port.

1      TCP Port Service Multiplexer (TCPMUX)
5      Remote Job Entry (RJE)
7      ECHO
18     Message Send Protocol (MSP)
20     FTP -- Data
21     FTP -- Control
22     SSH Remote Login Protocol
23     Telnet
25     Simple Mail Transfer Protocol (SMTP)
29     MSG ICP
37     Time
42     Host Name Server (Nameserv)
43     WhoIs
49     Login Host Protocol (Login)
53     Domain Name System (DNS)
69     Trivial File Transfer Protocol (TFTP)
70     Gopher Services
79     Finger
80     HTTP
103    X.400 Standard
108    SNA Gateway Access Server
109    POP2
110    POP3
115    Simple File Transfer Protocol (SFTP)
118    SQL Services
119    Newsgroup (NNTP)
137    NetBIOS Name Service
139    NetBIOS Datagram Service
143    Interim Mail Access Protocol (IMAP)
150    NetBIOS Session Service
156    SQL Server
161    SNMP
179    Border Gateway Protocol (BGP)
190    Gateway Access Control Protocol (GACP)
194    Internet Relay Chat (IRC)
197    Directory Location Service (DLS)
389    Lightweight Directory Access Protocol (LDAP)
396    Novell Netware over IP
443    HTTPS
444    Simple Network Paging Protocol (SNPP)
445    Microsoft-DS
458    Apple QuickTime
546    DHCP Client
547    DHCP Server
563    SNEWS
569    MSN
1080   Socks

Well-known ports range from 0 through 1023.
Registered ports are 1024 to 49151.
Dynamic ports (also called private ports) are 49152 to 65535.

See here for more.
Source: https://www.webopedia.com/quick_ref/portnumbers.asp


It should not make a difference, whether you use the server or the desktop version. The difference between them is mostly that the server version does not come with a gui and the gui related packages.
See also:
What's the difference between the server version and the desktop version?


Problem in Ubuntu 18.04 LTS with Epson L220 printer

Go to Settings and then click on Devices → Printers.

Then click on Additional Printer Settings....

Click on Add.

Select your own printer from the Device tab and make sure that the connection is USB (if your printer is connected via USB) and then click on the Forward button.

If your computer is connected to the internet, it should automatically start searching for a driver and you have to choose your model number and corresponding driver(recommended). Then Select printer from database and click Forward.

Select your printer's brand (like Epson or HP or others ) and click Forward.

Select your printer's model number and recommended driver and then click Forward.

Click Apply.

You are done. If you want to print a test page, click on the Print Test Page button.

The printer is successfully added.

That's all. Enjoy printing with your Epson printer in your Ubuntu 18.04 LTS.


Ubuntu 16.04 Nvidia Obs Studio Screen Flickering GT1030

It turned out the Nvidia 384 driver has a bug. To disable OBS Studio flickering go to Nvidia settings - OpenGL settings - uncheck Allow Flipping. Close Nvidia settings.

Reference: youtube


Dell Vostro 3560 overheats and fan is quiet and it's speed is low

It turned out that dust is the reason. After disassembling (video guides can be found here) and cleaning with dust blowing ball I see about 60°-65°C on all cores.


If you are using Firefox then reset your browser.To reset  your browser go to help>>troubleshooting info>>>now u can see the reset option  at your right hand side. u can visit the official website of Firefox for further info.


the webapps work just fine : https://jupyter.org/try

but if you inisist on having it offline here's a guide

download this : https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh

in a terminal :

cd Downloads
sudo apt install -y libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
sudo ./Anaconda3-2019.03-Linux-x86_64.sh
jupyter notebook


Machines with identical number of vCPUs, one gives MPI Error, the other does not

AMI 1 is not running at its top speed https://en.wikichip.org/wiki/intel/xeon_e5/e5-2686_v4
 whereas AMI 2 is. I would swap the CPUs and see if the problem moves; if it does, you have a defective CPU to return to Intel under warranty.


Help!!! Cannot boot any version after 10.04

Try these steps:

Disable all other boot devices in your bios except the specific ones
you'll be using (Builtin CD/DVD drive and Hard Drive.)
Try changing your RAM speed to something lower.
Also try taking one of the RAM chips (or sets of chips) out to see if
the problem is in one of the chips.


How to disable screen locking in Ubuntu 18.04/GNOME shell?

Disable screen lock is available in Gnome settings, Pivacy.

You can also type this in a terminal :

gsettings set org.gnome.desktop.screensaver lock-enabled false


A Trash folder is first created when a user deletes a file. Within that folder are three directories:

files, where the deleted files are stored until the trash is
emptied;
info, which stores information on where the files once were and when
they were deleted;
expunged, to which files are briefly moved when the trash is emptied
(but may contain some owned by other users from directories you
deleted).

So whenever you delete a trash indeed you are calling recursively to create a new dir for the newly trashed files.

Also note that Trash exists for every user including the root account plus sometimes you could face some dirs names such as  Trash-0 , Trash-1. Read my answers here and here


Check here instead... /etc/apache2/sites-available/000-default.conf

If it's still not available, you can recreate the file with the default contents.

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    #ServerName www.example.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet


See the "invocation" section of bash's manual (man bash).

Put set +o history in either /etc/profile, ~/.bash_profile,  ~/.bash_login, ~/.profile, or ~/.bashrc.  The 1st one is for all users, and the others are for 1 user. ~/.profile should always be there so use that one.

You still need to remove the current history file. history -c clears it but will leave an empty file so remove ~/.bash_history with rm.


If you want only to search by name, use the --names-only argument. For more information, read the man apt-cache, it would be useful.


.rpm files (Red Hat Package Manager) are for Red Hat based Linux versions like Fedora and CentOS.  Ubuntu is a Debian based version of Linux, so you will want the .deb file.

Once you are done with your download, you can install Chrome by double-clicking on the .deb file or by executing the following command via terminal.

sudo dpkg -i google-chrome-stable_current_amd64.deb

Note, that this command assumes the following:

You have changed to the directory which contains the .deb file.
The name of the Chrome download file is "google-chrome-stable_current_amd64.deb"


DHCP working but clients don't have internet

Your first steps look fine, but you also have to setup IP masquarding(NAT) using iptables.

Issue the following commands:

iptables --table nat --append POSTROUTING --out-interface ethX -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT

That assumes that eth0 is your local LAN and ethX is your external interface(inet).
I also suggest you put these commands into a init script, since they are volatile, the iptables rules are lost after a reboot.

Before you continue i suggest you Google for "Ubuntu NAT", there are a lot of solutions for that problem with ready to use scripts.

Good luck!


It sounds like you may have experienced hardware failure (either transient, such as overheating, or permanent, such as defective disk or memory) and subsequent corruption of your hard disk / SSD.  Since you mention you have important files on this system, I would strongly recommend booting from a LiveCD and copying those files to a removable storage device before attempting to recover or reinstall your Ubuntu installation.

Can you provide more details on what you see on your GRUB screen from a fresh boot?


Cannot change any icon sizes in Kubuntu System Settings...can someone help me please?

I had the same problem...
I installed the "plasma-active-settings" package and the problem is solved.


Upgraded 12.04 to 14.04, splash gets stuck at "Restoring resolver state..."

I was having this problem on an HP Mini netebook when shutting down the system, if I hit Ctrl+Alt+F7 I would see:

restoring resolver state...

These steps cleared the issue:

sudo vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi=force”
sudo update-grub

So basically edit the grub file to add the acpi=force at the end of GRUB_CMDLINE_LINUX_DEFAULT= command.


I know that the synclient tool is maintained by the same people writing the synaptics driver as a way to manipulate the driver directly.  I assume the built in driver is using a more abstract interface.

The problem with using the synclient tools is persisting the changes that you want to keep.  This can be done by some batch file that executes commands on startup through the synclient tool, or saving settings in your Xorg file.

This Arch page has the best writeup on the synaptics tool that I've found.


How can I enable digital output on a FiiO E7 without ending session?

To enable digital output on a FiiO X3 without ending session you need to kill PulseAudio as suggested in How to I get the right Pulseaudio profiles to show up without restarting Pulseaudio?:

pulseaudio -k

Then I can see the device FiiO USB Audio Class 2.0 DAC Digital Stereo (IEC958), while PulseAudio Mixer reports the Digital Output (S/PDIF) port.

I'm not convinced yet that using the Digital Output (vs the Analog Output) changes audio quality that much, though... And the X3 still displays 48kHz/24bits, whichever device is selected, so I suspect that the OS still downsamples the whole thing before passing it to the device...


Ubuntu 20.10 aarch64 (Raspberry Pi CM4) how do I access 1-Wire devices?

This issue appears to be because 20.10 kernel and modules do not support W1 for Raspberry PI.
I've been investigating the early daily Ubuntu 21.04 image and that does have working support for 1-Wire.
I've imported the modules from 21.05 and its working perfectly on my 20.10 platform.


java: error while loading shared libraries: libjli.so cannot open shared object file: no such file or directory

you need to run server command line via command
locate libjli.so

then you need to check executable permission this file apply this command

chmod 755 libjli.so  (specific path where is you file located)

after run you java program it will fix via upper command!


How can I fix apt-get autoremove wanting to uninstall most of my packages?

Searching aptitude I found this command that did it all

sudo aptitude keep-all

And that was it!


Touchpad has been acting crazy since upgrade to 18.04

I have noticed the same issues, in particular I suffer most from mouse pointer being stuck while dragging, I have to release my touchpad and after a 1-1.5 seconds it gets back to normal. I have Asus Q500A, first I have upgraded from 17.10 to 18.4, then because of this and some other issues I made a fresh install of 18.4, and right out of the box with no apps installed or configuration changes I have noticed the same issue with touchpad, while other issues gone. So, something doesn't seem right with touchpad handling in 18.4.

In 17.10 I was able to configure my touchpad sensitivity as described here https://help.ubuntu.com/community/SynapticsTouchpad, but after upgrade there is no "Synaptics Finger" property left, and in case it can help, here is the output of my xinput --watch-props:

alex@Q500A:~$ xinput --watch-props 13
Device 'ETPS/2 Elantech Touchpad':
        Device Enabled (142):   1
        Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Tapping Enabled (279): 1
        libinput Tapping Enabled Default (280): 0
        libinput Tapping Drag Enabled (281):    1
        libinput Tapping Drag Enabled Default (282):    1
        libinput Tapping Drag Lock Enabled (283):       0
        libinput Tapping Drag Lock Enabled Default (284):       0
        libinput Tapping Button Mapping Enabled (285):  1, 0
        libinput Tapping Button Mapping Default (286):  1, 0
        libinput Natural Scrolling Enabled (287):       0
        libinput Natural Scrolling Enabled Default (288):       0
        libinput Disable While Typing Enabled (289):    1
        libinput Disable While Typing Enabled Default (290):    1
        libinput Scroll Methods Available (291):        1, 1, 0
        libinput Scroll Method Enabled (292):   1, 0, 0
        libinput Scroll Method Enabled Default (293):   1, 0, 0
        libinput Click Methods Available (294): 1, 1
        libinput Click Method Enabled (295):    1, 0
        libinput Click Method Enabled Default (296):    1, 0
        libinput Middle Emulation Enabled (297):        0
        libinput Middle Emulation Enabled Default (298):        0
        libinput Accel Speed (299):     0.000000
        libinput Accel Speed Default (300):     0.000000
        libinput Left Handed Enabled (301):     0
        libinput Left Handed Enabled Default (302):     0
        libinput Send Events Modes Available (264):     1, 1
        libinput Send Events Mode Enabled (265):        0, 0
        libinput Send Events Mode Enabled Default (266):        0, 0
        Device Node (267):      "/dev/input/event5"
        Device Product ID (268):        2, 14
        libinput Drag Lock Buttons (303):       <no items>
        libinput Horizontal Scroll Enabled (304):       1

Any ideas?


It sounds like you need to run update-grub from within Ubuntu, and may need to install/check os-prober

See this A. for a little more info, and an option to manually edit the grub.cfg config file https://askubuntu.com/a/12127/129271

After reading updated comments, it sounds like Ubuntu may not be installed correctly after all, so this may not apply...


In order to switch to Ubuntu's default Ambiance experience, execute these commands:

dconf write /org/gnome/desktop/interface/gtk-theme '"Ambiance"'
dconf write /org/gnome/desktop/interface/icon-theme '"ubuntu-mono-dark"'
dconf write /org/gnome/desktop/interface/cursor-theme '"DMZ-White"'

To switch to a different theme, adjust the value(s) accordingly.

Note that the values are case sensitive, and do not necessarily match the ones you see in Unity Tweak Tool. This tool seems to auto-capitalize the first letter and convert the rest to lowercase. Try a couple of variants, or look up the exact spelling in the directory listings of /usr/share/themes and /usr/share/icons.


terminal can't find enchant while running ./configure

Try installing the development components for enchant. sudo apt-get install libenchant-dev. This is usually needed when building software from source: the package (enchant) contains the binaries and runtime libraries, but usually the headers needed to build software that depends on that particular library are split off into a -dev package.


3.19.0-39 is the update to 0-37. It was released on the 2nd of December 2015 - and there is a newer 0-41 released on the 7th.

You can find the change logs here online or in /usr/share/doc/linux-headers-3.19.0-39/changelog.Debian.gz/changelog.Debian on your local machine.

As normal, the kernel is a lot of big fixes etc.


How to stop ubuntu-1 delete sync feature?

As mentioned in Ubuntu One site you have possibility to restore deleted files:

As of October 2013, you also have a way to recover them from the server: In your Ubuntu One profile in the web, you can chose the option "Recover deleted files". This will start a job that will recover the deleted files and will place them in a folder called "Recovered" followed by the date of the recovery.

https://one.ubuntu.com/help/faq/how-can-i-recover-files-deleted-from-my-account/

But there is no possibility to prevent deleting from the cloud.


I can ping static IPs but cannot see them in browser

Seems you entered not enough of the information.
Maybe I'm wrong and don't understood your issue, but if you want to browse another computer via http protocol, on that remote computer must be running some http-server and that host must be listening on the 80 (or differ, but by default - 80) port. Also that port have to be opened via firewall on http-host. To check, if that port is opened, you can try this command from the master computer:

nmap slave2 -p 80

or

nmap 192.168.1.2 -p 80

But anyway, first, webserver must be installed and configured on the slaves.


I am not sure what's the question, but the answer could well be PySerial. It also comes with a ports console tool to visualize the content communicated to serial ports.


Should a new screenshot tool automatically set itself to work on pressing the PrtSc key?

You could perhaps set the keyboard short cut for your app but record what was previously bound to that shortcut. Then on first run (possibly when the user presses prt sc, you could pop up a dialog that asks them something like:

  This application has been set as the default screenshot application that will be run whenever you press the 'print screen' key. Do you wish to keep to this behaviour or revert to previous settings?

Enabling them to easily get back to the previous settings if they want.


Changing the VirtualBox network settings from NAT to bridged adapter solved the problem. It continued to work after I removed the nf_conntrack_pptp module, so I guess that was irrelevant.


The driver seems to be in the repositories, so try to install it, and reboot.

sudo apt install xserver-xorg-video-savage-hwe-16.04

I don't know if it's going to work, the hardware is so old, it will be no surprise if the support is flaky. ...and even if it does, it will not play youtube videos well. Consider that none of the currently used by youtube codecs existed 20 years ago, not to mention having just 512MB of RAM in 2019 is not ideal.


You can set up a script or program to help you with this.  You'll want to create a directory ~/.bin or ~/.scripts, and add it to your $PATH Environment Variable.  You can do this by editing and saving the following line within ~/.bashrc, towards the end, but exact location isn't key here:
export PATH=$HOME/.bin:$PATH

Now any file within ~/.bin/ with +x (executable) access can be run after sourcing the new ~/.bashrc file (ie: in a new terminal).
touch ~/.bin/mov-dac
chmod +x ~/.bin/mov-dac

#!/bin/bash

MOV="$*"
FILENAME=$(basename "${MOV// /_}" | sed 's/\(.*\)-.*/\1/').mp3
ffmpeg -i "${MOV}" -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 /tmp/"${FILENAME}"

Then, in new terminals, you can run mov-dac /path/to/My\ File.mp4 and you'll get /tmp/My_File.mp3
I prefer to keep the audio as-is, but strip it from the video file and save within that filetype/container.  In additional, any track more than 15m (900s) long is added to the "Sets" album, instead of "Singles", for easier sorting.  $OUTDIR is the final destination and has _Sets/ and _Singles/ within.
#!/bin/bash

# @earthmeLon

MOV="$*"
OUTDIR="/mnt/DAC"
MEDIAINFO=$(mediainfo "${MOV}" --Output=JSON)
FORMAT=$(echo $MEDIAINFO | jq '.[]| .track[] | select(."@type"=="Audio")| .Format' | tr '[:upper:]' '[:lower:]')
FORMAT=$(echo $FORMAT | tr -d '"')
if [ $FORMAT == "vorbis" ]; then
    FORMAT="ogg"
fi
DURATION=$(echo $MEDIAINFO | jq '.[]| .track[] | select(."@type"=="Audio")| .Duration')
DURATION=$(echo $DURATION | tr -d '"')
DURATION=${DURATION%.*}
if [ $DURATION -gt 900 ]; then
    ALBUM="Sets"
else
    ALBUM="Singles"
fi

FILENAME=$(basename "${MOV// /_}" | sed 's/\(.*\)-.*/\1/').${FORMAT}
ffmpeg -y -i "$MOV" -vn -metadata album=$ALBUM -acodec copy /tmp/"${FILENAME}"
if [ -d ${OUTDIR}/_${ALBUM} ]; then
    cp /tmp/"${FILENAME}" ${OUTDIR}/_${ALBUM}/
    rm /tmp/"${FILENAME}"
fi


Mouse cursor seems to change keyboard input focus

Have you enabled a feature called "focus follows mouse" at some point? The behavior you describe sounds like this option is turned on on your system. Check the window preferences, or else gconf (using gconf-editor) for a setting to that effect. Otherwise perhaps googling the term will help you.


The solution is this line in /etc/fstab

UUID=C906-C3E4 /mnt/C906-C3E4 vfat suid,dev,exec,auto,async,rw,user,uid=1000,gid=1000,comment=x-gvfs-show,comment=x-gvfs-name=CardReader 0 0


How can I mount a windows 7 partition from Ubuntu (with no knowledge of what I'm doing)?

in the better scenario you have to do what follow:

if you open the file manager, you can see an hard disk ico on the column in the left.
click it!

if you didn't see any column on the left (in the file manager), just click F9 button (mayby the thenth button of your keyboard)

In the best scenario you have to delete the win7 partition and install ubuntu!! ;)


Tcl/Tk programs fails after upgrade to 18.04

I can confirm this issue on clean installation of Ubuntu 18.04 LTS with installed just one redet package:

$ sudo apt-get install redet

$ redet
Error in startup script: can't find package Itcl 3.4
    while executing
"package require Itcl 3.4"
    (file "/usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl" line 18)
    invoked from within
"source /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl"
    ("package ifneeded Iwidgets 4.1.0" script)
    invoked from within
"package require Iwidgets"
    (file "/usr/bin/redet" line 27)

$ dpkg -S /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl
iwidgets4: /usr/share/tcltk/iwidgets4.1.0/iwidgets.tcl

$ dpkg -S /usr/bin/redet
redet: /usr/bin/redet

$ echo "puts [package req Itcl]" | tclsh
3.4

So I reported bug 1768973 to launchpad.

Quick and dirty work-around is to download package from Xenial, install it and pin:

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/i/itcl3/itcl3_3.4.3-1_amd64.deb
sudo apt-get install ./itcl3_3.4.3-1_amd64.deb

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-itcl
Package: itcl3
Pin: version 3.4.3-1
Pin-Priority: 1337
EOF

After these actions redet is launched normally:


Open up your terminal and install libncurses-dev by using this command:

sudo apt-get install libncurses-dev


I installed rails last week using the instructions here:
http://railsapps.github.io/installrubyonrails-ubuntu.html
Notable differences between the how-to's are:
the addition of the --ruby to the command:
\curl -L https://get.rvm.io | bash -s stable --ruby
The command to updating RVM is instead:
rvm get stable --autolibs=enable
The version of ruby to use is explicitly set:
rvm --default use ruby-2.1.0
Installation of js.Node
sudo apt-get install nodejs
The installation of rails is also preceded by explicitly setting the version:
rvm use ruby-2.1.0@rails4.0 --create


Trying to Install Spotify but it says I need a non administrator account

This seems to be occurring when Wine is configured as Windows 7.
I ran winecfg and set windows version to Windows XP.


How to get full rights in Ubuntu to manipulate a file that is owned by root

If all you want to do is to allow file manipulations as root, but avoiding the command line, then you can launch nautilus as root. Alt+F2 followed by gksudo nautilus will prompt you for a password, and then launch the file manager.

You could create a launcher for this (disclaimer: I haven't tried the methods on that page).


Back in time shows 'saving permission' in the bottom corner of the GUI all the time...is it bad?

I'm not sure about some facts, so I'll try to answer both:

it can happen that the status bar message is frozen. BIT will read the message from ~/.local/share/backintime/worker<ID>.message. Sometimes this file did not get removed correctly and BIT will keep showing that message even if there is no more snapshot running. Deleting the above file will fix this (next major version 1.1.0 will do this automatically).
if a snapshot crashed during saving permissions the raw data is already backed up and you can restore your files. You would only loose permission settings for the files. So in worst case you'd have to manually chown/chmod them. But if this happens every time we should dive in to find the problem. /var/log/syslog should normally show backintime (USER): INFO: Unlock at the end of a snapshot.

When you say filesystem is msdos did you mean fat or ntfs? Because fat doesn't support hardlinks. This means that every new snapshot will use the full size on your disk even if the files didn't change (they are not 'incremental'). Please take a look at this FAQ to find out if your files are incremental.

I'd really recommend using a native Linux filesystem like ext3 especially for serious stuff!


All the information you need is in the following link (customizing login username and password is about a 1/3 of the way down):

https://help.ubuntu.com/community/LiveCDCustomization

This segment talks about it:

Removing the (Casper) Autologin

The autologin feature of the Jaunty/9.04 live CD is a bit of an on-the-fly boot-hack. After extracting the initrd.gz, you need to edit the casper-bottom/25configure_init script and then recreate the initrd.gz file, replacing the original in extract-cd/casper. The process to do so goes like this:

# cd extract-cd/casper
# mkdir tempdir
# cd tempdir
# gunzip -dc ../initrd.gz | cpio -imvd --no-absolute-filenames
# cp scripts/casper-bottom/25configure_init scripts/casper-bottom/25configure_init.orig
# vi scripts/casper-bottom/25configure_init
Now look for line 25 which has the conditional statement to test $USERNAME.

Line 25 performs a conditional evaluation and if it evaluates to true, it will execute the code within the if block. The if block contains code to modify files used in the boot process to create the live cd autologin.

To disable the autologin feature, Remove $USERNAME, but just leave the quotes. The -n modifier tests the $USERNAME string to see if it's length is non-zero. By removing the variable, and leaving two double quotes, this statement evaluates to false because the two double quotes effectively make a zero-byte string. Be sure to leave no whitespace between the quotes because whitespace will make the evaluation true and execution wil fall into the if block.

21:log_begin_msg "$DESCRIPTION"
22:
23:# Arrange for shells on virtual consoles, rather than login prompts
24:
25:if [ -n "$USERNAME" ]; then
After making the change, line 25 will look like this:

25:if [ -n "" ]; then
Save the file and quit the editor. Then, from extract-cd/casper/tempdir run the following command to re-create the initrd.gz file. There are other methods for re-creating the initrd.gz file on this page which may work also.:

# cp ../initrd.gz ../initrd.gz.orig
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz
This will create a new initrd.gz file with no auto login. You can then continue to remaster the CD as described on this page. Be sure to create a user and password to login with before you remaster the cd. If you do not, you will not be able to login after booting!


Startup Disk Creator does not see volumes on my 32 GB USB Flash Drive

I am using Startup Disk Creator in KDE and it doesn't show my flash drive.

Opened KDE Partition Manager and found out that the drive is formatted using ext4. Deleted the partition, created a fat32 one and applied the changes.

After that Startup Disk Creator shows the flash drive.


shutdown -P works, but shutdown -r does not

You should file a bug report on launchpad.net.


Ubuntu 20.04 Wacom Stylus use causes immediate hang

The bug is caused by updating kernel 5.8.0-44 to 5.8.0-45.
With kernel rolled-back to 5.8.0-44, the stylus works as expected.
I submitted a kernel bug report for the issue: https://bugs.launchpad.net/kernel-sru-workflow/+bug/1921052
The problem will be solved with the 5.8.0-49 kernel release. Please update to this kernel if you experience this behavior.


How to make Logitech Anywhere MX work in Ubuntu 12.X?

I enhanced the script up top and then also added a udev rule to fire whenever the mouse was plugged in.  I am using a Logitech Performance MX but the rule should be similar.

#!/bin/bash

# loop up to 10 times trying to fix the mouse insertion
for i in {1..10}
do

  # exit the script if there was no mouse error
  if [ `dmesg | grep "logitech-djreceiver" | tail -1 | grep -c "failed with error -32"` -eq 0 ]; then
    echo "No logitech receiver error...exiting" ;
    exit 0 ;
  else
    # try to reload the mouse driver
    echo `date`" Error detected, trying reload of logitech hid driver" ;
    rmmod hid_logitech_dj ;
    modprobe hid_logitech_dj ;
    sleep 1 ;
  fi

done

This tries up to 10 times to reload the driver before exiting.

I named the script /usr/bin/mousefix and did a chmod +x.

Here is the udev rule, a line that can be added to /etc/udev/rules.d/10-local.rules

SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{manufacturer}=="Logitech", ATTRS{product}=="USB Receiver", ACTION=="add", RUN+="/usr/bin/mousefix"

Hope this helps somebody else.  It seemed like an easier thing to do to have the script run whenever the usb connected.


Google Chrome update and sign-in problem

Cause

32-Bit Chrome builds have been discontinued.

Solution

32-bit system

Replace google-chrome with chromium-browser:

# aptitude purge google-chrome-stable
# aptitude install chromium-browser

(as root, indicated by # as opposed to $) or

$ sudo aptitude purge google-chrome-stable
$ sudo aptitude install chromium-browser

64-bit system

# sed -i -e 's/deb http/deb [arch=amd64] http/' /etc/apt/sources.list.d/google-chrome.list /opt/google/chrome/cron/google-chrome
# aptitude update && aptitude upgrade

or

$ sudo sed -i -e 's/deb http/deb [arch=amd64] http/' /etc/apt/sources.list.d/google-chrome.list /opt/google/chrome/cron/google-chrome
$ sudo aptitude update && sudo aptitude upgrade

PS

Your Ubuntu is 4 years old. An upgrade might fix at least some of your problems.


Reverse scroll wheel only works in some applications

Depending on your X11 input driver, you might be able to reverse the scroll direction at the X layer.

I'm using libinput input driver for my input devices (package xserver-xorg-input-libinput), and I use the following configuration (in /usr/share/X11/xorg.conf.d/90-libinput-settings):

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "1"
EndSection

If you're using the synaptics input driver, it might be something like this (with negative values for VertScrollDelta and HorizScrollDelta -- choose a value that you like):

Section "InputClass"
        Identifier "touchpad catchall"
        MatchIsTouchpad "on"
        Driver "synaptics"
        MatchDevicePath "/dev/input/event*"
        Option "VertScrollDelta" "-100"
        Option "HorizScrollDelta" "-100"
EndSection


How to remove view permission from everything?

You are not very clear on the things your friend is supposed to do in the folder. As you state that www-data should have write rights as well, I assume this is a web data directory. For this, sFTP or scp would be my tools of choice for your friend. This answer explains how to set up both in a chroot environment. If your friend actually has to log in via ssh, you may need to copy some binaries for him to use, or use ln -s to link /usr into the chroot environment.


I use https://launchpad.net/~fkrull/+archive/deadsnakes for all the old python versions.

It seems maintained and new versions are also added.

simply do the following:

sudo apt-add-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.5


Synaptics Touchpad cannot move while pressing a key? V 8.1

actually no, you don't have to, i had this problem and finally figured it out, look for "smart sense" under the synaptics menu thing. when it is highlighted there should be a settings option to the right, click on that and turn the smart sense sensitivity all the way down! hope this works!


Code folding in a good manner is stated to be difficult because the GtkSourceView component would need to be edited.

Still there was this  simple plugin that used to work until gedit 2.28...

And it's on the official roadmap at least...

To answer your question: No currently no option (unless someone would fix the old plugin)


Wanting to Erase all data for windows and install Linux but unsure about hardware complications

I think your concern is with keeping Windows hardware drivers for Ubuntu install? Don't worry- the drivers are OS-specific, and you don't need that "Drivers" folder.

You should be able to pop in the Ubuntu Live CD, and either install it directly over your entire hard drive, or (as I would prefer) use the gparted program to erase your entire disk, and then install Ubuntu there in the entire empty space.

As far as hardware issues, there shouldn't be any unless your computer is extremely old or maybe a few days old. I still think there won't be any.

I have installed Ubuntu on old Emachines, cheap HP-2000, three different IBM (woot) Thinkpads, and my current Lenovo (ew) Yoga. Never an issue; Ubuntu is super good at hardware, usually. Most problems could be a video driver issue but, generally easy to remedy.

If you need to actually explore the files and save some, I would still run the Live CD, open your Windows partition and try to get files that way. Backup to cloud storage or a USB stick, then install away.

Personally, I find a forced loss of tons of data liberating (albeit time consuming and damaging in some instances) from time to time!

Good luck, we're here to help.


Mysterious behaviour of sudo apt-get install when installing wine64

Your /var/log/apt/history.log contains a list of all installed and uninstalled packages. You can use a few commands to make it easier to reinstall the packages without having to type out each package.
First, identify the packages. The following commands will list all the packages that were removed and will also create a file containing the list:
cd
cat /var/log/apt/history.log | grep -A3 "install wine64" | grep "Remove" | tee install-list

Now, we need to clean up the list so run the following command to remove the word "Remove," all the stuff within parentheses, and commas:
sed -e 's/Remove://g;s/([^)]*)//g;s/,//g' install-list

The list should consist of package names that may or may not include the architecture in a format similar to example-packagename:i386 anotherpackage-1-2.3:i386 awesome-packagename:i386 or maybe like this example-packagename:amd64 anotherpackage-1-2.3:amd64 awesome-packagename:amd64
If this list of uninstalled packages looks correct, run the following command to apply the changes (use the up arrow key to get to the last command and simply change sed -e to sed -i so you don't have to type it all over again:
sed -i 's/Remove://g;s/([^)]*)//g;s/,//g' install-list

Now to install the packages, run the following command but this time review the output before you accept the changes (it should list some packages to uninstall like amd64 packages and all the wine stuff):
sudo apt update
sudo apt install $(cat ./install-list)

Please post any errors.


How to disable the behaviour of the power button on Ubuntu 20LTS

I am not sure what is wrong with your files.

The logind-way
Did you try
sudo systemctl restart systemd-logind

or (better) rebooting?

The acpid-way
Besides, this a possible method to obtain the behaviour you are looking for.
Create an ACPI handler with a file in /etc/acpi/events/
sudo nano /etc/acpi/events/powerbtn-acpi-support

(Note: as per official info, "Rules are defined by simple configuration files. acpid will look in a configuration directory (/etc/acpi/events by default), and parse all regular files that do not begin with a period ('.') or end with a tilde (~).")
Make that file contain
event=button[ /]power
action=

Then restart the acpi daemon with
sudo service acpid restart

Notes:

The cardboard-way is funny.

Sources:
https://superuser.com/questions/1523918/run-script-when-power-button-pressed
https://wiki.archlinux.org/index.php/acpid
How to prevent the Power button to shutdown directly the system?
https://superuser.com/questions/699905/change-behavior-of-linux-power-button/699925


How do I get WSL to start my login shell by default?

This is fixed in a currently Insider-only build, with the new wsl.exe command:

  As of build 16188 when running bash.exe without arguments (or with the
  ~ argument) bash will be launched as a login shell. The same is true
  for the new wsl.exe binary (with the exception that wsl launches your
  user's default shell as a login shell).

Prior to this, you'd have to edit the shortcut to add command-line parameters (such as -c 'exec "$SHELL" -l'):


It seems the user as to be part of the sudo group to set the picture, so i added the user to sudo group,logged in with that user, added the user picture on mugshot, and then removed it from the sudo group.
Now my wife as a picture on her profile.

Hope this will help someone.

The tip for the solution came from https://bugs.launchpad.net/mugshot/+bug/1402036


Ubuntu Server on VirtualBox don't let me install anything

http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg

This url is valid, so it's problem with your machine, guest or host. Can you open this URL on your Virtualbox host machine (it's computer you use to run Virtualbox and manage virtual machines)?

Try ping 91.189.91.15 to check if you have connection to repository server.

Also, check your Virtualbox settings. Default network type to use Internet on Virtualbox is NAT. Try to set following settings on your virtual machine (MAC address should be different)


Internal speaker (Audio) is not working in Ubuntu 20.04 LTS after upgrading from Ubuntu 18.04 LTS

Your speakers may be detected as unplugged which causes them to be ignored.

Temporary fix:

sudo apt install pavucontrol
Run pavucontrol
Configuration tab > Profile > Analogue Stereo Output (unplugged) (unavailable)

Speakers should work but it will reset when headphones are unplugged or system rebooted.

Permanent fix:

sudo apt install alsa-tools-gui
Run hdajackretask
Parser hints > jack_detect = no
Apply now
Install boot override


black screen, start up GUI without rebooting?

In a terminal window, type startx to restart your GUI. More detail in man startx.


Poor sound quality on a Dell XPS 15 (L502x)

I'm new to this, so you might have to bear with me. I want to try to help, though, as I am using the exact same computer (Dell XPS L502x) and installed Ubuntu 12.04 LTS last week. I miss the Waves MaxxAudio program, but I don't feel like I'm experiencing loss in audio quality with Ubuntu.

lspci -v | grep -A7 -i audio gives me the same output as you, except Subsystem: Dell Device 050e. I'm assuming one of us just has a sound device with minor differences, and I don't think this is related to your problem.

Have you looked at the information found at this link, specifically question 5? Piping the find command to wc -l gives me 220 results, what does yours return? Since the device is detected with lspci I'm not sure if this is the issue, but worth a check.

Can you paste (paste.ubuntu.com) the output of aplay -l and aplay -L?

Also, in Synaptic Package Manager, make sure you have libportaudio2, libaudio, libasound2, and libsndfile1 installed. If it's a particular type of file that you're playing make sure the proper codecs are installed.


How to stop Ubuntu from constantly synchronizing the time?

From what I understand, the core functions of ntpd have been replaced with timesyncd and timedatectl in that version of Ubuntu, as outlined in the documentation found in the link below:

https://help.ubuntu.com/lts/serverguide/NTP.html

If you run the command timedatectl you'll see data in the following format:

chris@loki:/$ timedatectl
      Local time: Wed 2016-11-30 11:18:42 GMT
  Universal time: Wed 2016-11-30 11:18:42 UTC
        RTC time: Wed 2016-11-30 11:18:40
       Time zone: Europe/London (GMT, +0000)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no

I ran the following to disable NTP synchronization:

timedatectl set-ntp 0

But I still wasn't able to change the time, as below:

chris@loki:/$ sudo timedatectl set-time "2015-11-08 07:14:00"
Failed to set time: Automatic time synchronization is enabled

I was only able to update this once I'd gone to Settings > Date & Time and disabled Network Time. Not sure where the config file is for that though to do via cli.

The result:

chris@loki:/$ timedatectl status
      Local time: Wed 2016-11-30 11:31:33 GMT
  Universal time: Wed 2016-11-30 11:31:33 UTC
        RTC time: Wed 2016-11-30 11:31:31
       Time zone: Europe/London (GMT, +0000)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

chris@loki:/$ sudo timedatectl set-time "2014-11-08 06:40:00"

chris@loki:/$ timedatectl status
          Local time: Sat 2014-11-08 06:40:02 GMT
      Universal time: Sat 2014-11-08 06:40:02 UTC
            RTC time: Sat 2014-11-08 06:40:03
           Time zone: Europe/London (GMT, +0000)
     Network time on: no
    NTP synchronized: no
     RTC in local TZ: no


Kerberos authentication: clock skew too great

Best practice

Because Kerberos is very time sensitive you should configure your client machines to use one of your domain controllers as an NTP server. The DigitalOcean link further down recommends using ntp instead of systemd-timesyncd due to some optimized "smoothing" algorithms that prevent weird clock jumps that can break some applications "timestamp in the future, session aborted, etc".

If on a system with systemd and timedatectl

Run sudo gedit /etc/systemd/timesyncd.conf and uncomment NTP= and set your list of space separated servers to try, if you have laptops that may not be on VPN to access the domain controllers you should also set the FallbackNTP= to include something like pool.ntp.org or other public NTP servers.

Example /etc/systemd/timesyncd.conf

[Time]
NTP=domaincontroller.pithoslabs.com
FallbackNTP=ntp.ubuntu.com pool.ntp.org

Then sudo systemctl restart systemd-timesyncd to put the new changes into effect without rebooting.

If on a system without systemd

sudo apt install ntpdate
ntpdate domaincontroller.yourdomain.com
sudo gedit /etc/default/ntpdate

You will probably need to add a cron entry to run this daily for long running machines. You could also use ntp directly per this excellent DigitalOcean document, https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-16-04

If you also have ntp installed, ntpdate-debian (ntpdate package with some tweaks from the upstream for debian/ubuntu) can also use /etc/ntp.conf, see the /etc/default/ntpdate file's comments.


Which version of Ubuntu is recommended for app developers?

Just use the version you want to use yourself. If you stick to LTS stick with it. If you want the newer Ubuntu use that. In general it does not matter what version you use; of course the more difficult your application, the more dependencies, the more you will run into situations where an older Ubuntu does not have a package you require for it to work. But the difference between 12.04 and 12.10 is not that big.

Even if you include packages that are available as of a certain Ubuntu version you need to take care of that in your application yourself, limit the application to a certain Ubuntu version and newer or provide a version that can be used on that version of Ubuntu. It is even possible to create a backport for your application so you can have users get it to use on Hardy (but... most of us would probably not care for that ;) )

If you want it in the official Ubuntu Software Center you are not going to get in into 12.10 and should aim for 13.04 or 13.10. Since you need to follow the official procedure for submitting it. You can skip those steps by creating a PPA.


how to do administartive tasks from remote X SSH

There is probably a couple solutions for things you requested.

VNC-server. Client-server couple actually. Allows you to control remote screen directly, to the active screen of the remote machine.

NX-server. Again Client-server pair. Allows you to have connection to independent Desktop with GUI, separate/different from the main screen (which is shown at monitor)


There are two things you need to do.

Firstly, the shell will not get ~/bin/ in $PATH when you login if it does not exist. You will have to log out and log in again after creating the directory, or start a new login shell with:

/bin/bash -l

or add ~/bin to your path manually with:

export PATH=/home/user/bin:$PATH

Secondly, the shell keeps a cache of where programs are located. If you create a script in ~/bin/ (or /usr/local/) which shadows something in /usr/ then you must manually update the cache. You can clear it completely with this command which should do the trick:

hash -r


DropBox icon not appearing in AppIndicator section top right in GNOME 3.16

In oldest version of gnome-shell, like the 3.10 that come with Ubuntu Trusty, the icon is there on startup but it is prone to disappear as soon as the lock screen kicks in, the computer resumes from suspend, or the phase of the moon changes too much.

In my case using dropbox stop and then dropbox start make the icon reappear. For a while, at least.

I reported a bug for appindicator, but giving the comments there, it is not clear if it's a bug in the extension, gnome, dropbox or whatever.

That could be related to this problem as well as not; this answer is just a wild shot.


1) There is a problem with the PPA (which used to be very trustable...), it hasn't been updated since Gimp 2.10.14 last fall (current version is 2.10.18), so it doesn't support 20.04 yet.

2) The official solution (from Gimp development) to get the latest Gimp on Ubuntu is to use a flatpak version.

3) IIRC the Gimp that you get with apt install in 20.04 is a "snap" package.

4) There are also 'AppImage' versions of Gimp.

If you intent to use a rather plain Gimp, snap, flatpak and appimage will do the job, but they have restrictions: for instance the 'snap' version can only edit files under your home directory, while the flatpak version has its own "recent files" list, so you cannot easily upload a file your just edited, or edit a file you just downloaded. Adding compiled plugins that have their own dependencies may also prove difficult.

The better solution is to compile your own, which isn't that difficult, it is documented here. These instructions aren't 100% foolproof (there are some missing dependencies, quite easy to spot). Depending on the GIT branch/tag you use, you have the current 2.10.18, the fixes to be applied toward 2.10.20 (as 2.10 branch), or the future Gimp 3.0 WIP (as the master branch).


Please, try using the

apt-get -f install

command. It should install all missing dependencies.


Why does `type which` say that `which is hashed`?

You likely have a long PATH set and, to find an executable, the shell needs to search the path.  To avoid that time consuming process every time that you want to run a program, the shell may keep a list of programs that it has already found.  That list is called a "hash."  When the shell says that which is hashed, it means that it has already done the PATH search and found which and saved its location in the hash.

man bash explains it as follows:

  Bash uses a hash table to remember the full pathnames of
         executable files (see hash under SHELL BUILTIN COMMANDS  below).
         A full search of the directories in PATH is performed only if
         the command is not found in the hash table.

While the hash normally speeds up shell operations, there is one case where it causes problems.  If you update your system and, as a result, some executable moves to a new location, the shell may get confused.  The solution is to run hash -r which causes the shell to forget all the hashed locations and search the PATH from scratch.

Why are some executables missing from the hash?

An executable is not placed in the hash until after you execute at least once.  Observe:

$ type python
python is /usr/bin/python
$ python --version
Python 2.7.3
$ type python
python is hashed (/usr/bin/python)

python is hashed only after it has been executed.

How to examine what is in bash's hash

The contents of the hash are available in the bash array BASH_CMDS.  You can see what is in it with the command declare -p BASH_CMDS.  When a new shell or subshell is opened, the hash is empty.  Commands are added one by one as they are used.  From a newly opened shell, observe:

$ declare -p BASH_CMDS
declare -A BASH_CMDS='()'
$ which which
/bin/which
$ declare -p BASH_CMDS
declare -A BASH_CMDS='([which]="/bin/which" )'
$ python --version
Python 2.7.3
$ declare -p BASH_CMDS
declare -A BASH_CMDS='([which]="/bin/which" [python]="/usr/bin/python" )'


Unable to install AMD Radeon 7670m graphics driver on 12.04

In 12.04 I used amd propietary drivers from:
http://support.amd.com/us/gpudownload/Pages/index.aspx

Please check your graphic card with lspci or lspci | grep VGA

like:

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Caicos [Radeon HD 6450]

After download driver from amd.com, create deb packages.  and install them with sudo dpkg -i fglrx*.deb
Good information about all details for precise: http://wiki.cchtml.com/index.php/Ubuntu_Precise_Installation_Guide

Example from upper link:
Download the latest Catalyst package.

This package contains both the 32-bit and 64-bit driver.

wget http://www2.ati.com/drivers/linux/amd-catalyst-13.4-linux-x86.x86_64.zip
unzip amd-catalyst-13.4-linux-x86.x86_64.zip
chmod +x amd-catalyst-13.4-linux-x86.x86_64.run

Create and install .deb packages.

sudo sh ./amd-catalyst-13.4-linux-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i fglrx*.deb

Since latests ubuntu version I was trying with "software sources" with default packages, the default installation with graphical assistance works really well and much times better than trying to install amd drivers yourself. I recommend to try with default easy support from ubuntu to activate yours drivers.


How to ensure local filesystems are mounted before NFS server starts?

Following the tips in the comments from @steeldriver and @Rinzwind, I managed to get this working.

First, determine the name of the systemd unit that is generated for the mount point (in my case /storage):

$ systemctl list-units | grep '/storage' | grep 'mount'
  storage-.snapshots.mount      loaded active mounted   /storage/.snapshots
  storage.mount                 loaded active mounted   /storage

Then, following these docs on how to modify an existing unit file, I added the new After= tweak for nfs-server.service:

$ cat /etc/systemd/system/nfs-server.service.d/custom.conf
[Unit]
After=storage.mount

Next, apply the changes and restart nfs-server to confirm that the new config is picked up (note that custom.conf is listed):

$ sudo systemctl daemon-reload
$ sudo systemctl restart nfs-server.service
$ systemctl status nfs-server.service
● nfs-server.service - NFS server and services
     Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/nfs-server.service.d
             └─custom.conf
     Active: active (exited) since Sun 2020-05-24 20:52:08 BST; 6s ago
    Process: 20384 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
    Process: 20385 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
   Main PID: 20385 (code=exited, status=0/SUCCESS)

May 24 20:52:07 box systemd[1]: Starting NFS server and services...
May 24 20:52:07 box exportfs[20384]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/storage/Shared".
May 24 20:52:07 box exportfs[20384]:   Assuming default behaviour ('no_subtree_check').
May 24 20:52:07 box exportfs[20384]:   NOTE: this default has changed since nfs-utils version 1.0.x
May 24 20:52:08 box systemd[1]: Finished NFS server and services.

Lastly, reboot, and bask in a NFS server that was started after the mount point was available.


OK, I solved it. Credits go to @ninetyninezero from the Suse-board for the patches.
The right click does not work properly, though...

I started with a virgin v4.18.13 kernel and then compiled a custom version with the patches.
Here the full code, in case anyone else is running into this problem:

$ sudo apt install git flex bison bc libssl-dev gawk libudev-dev ocl-icd-opencl-dev libpci-dev libelf-dev python2.7 libncurses-dev fakeroot kernel-wedge binfmt-support ksh lsscsi binfmt-support libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libsepol1-dev libattr1-dev libblkid-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libselinux1-dev libsepol1-dev uuid-dev debugedit libarchive13 libdw1 liblua5.2-0 liblzo2-2 libnspr4 libnss3 librpm8 librpmbuild8 librpmio8 librpmsign8 rpm rpm-common rpm2cpio spl-dkms

$ mkdir kerneltest; cd kerneltest

~/kerneltest$ git clone --depth 1 --single-branch --branch v4.18.13 git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack v4.18.13

~/kerneltest$ cd v4.18.13/
~/kerneltest/v4.18.13$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.13/0001-base-packaging.patch
~/kerneltest/v4.18.13$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.13/0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
~/kerneltest/v4.18.13$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.13/0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
~/kerneltest/v4.18.13$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.13/0004-debian-changelog.patch
~/kerneltest/v4.18.13$ wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18.13/0005-configs-based-on-Ubuntu-4.18.0-10.11.patch
~/kerneltest/v4.18.13$ wget -O patch1 https://bugzilla.kernel.org/attachment.cgi?id=277217
~/kerneltest/v4.18.13$ wget -O patch2 https://bugzilla.kernel.org/attachment.cgi?id=277483
~/kerneltest/v4.18.13$ wget -O patch3 https://bugzilla.kernel.org/attachment.cgi?id=277553
~/kerneltest/v4.18.13$ wget -O patch4 https://bugzilla.kernel.org/attachment.cgi?id=278563

~/kerneltest/v4.18.13$ patch -p1 < 0001-base-packaging.patch
~/kerneltest/v4.18.13$ patch -p1 < 0002-UBUNTU-SAUCE-add-vmlinux.strip-to-BOOT_TARGETS1-on-p.patch
~/kerneltest/v4.18.13$ patch -p1 < 0003-UBUNTU-SAUCE-tools-hv-lsvmbus-add-manual-page.patch
~/kerneltest/v4.18.13$ patch -p1 < 0004-debian-changelog.patch
~/kerneltest/v4.18.13$ patch -p1 < 0005-configs-based-on-Ubuntu-4.18.0-10.11.patch
~/kerneltest/v4.18.13$ patch -p1 < patch1
~/kerneltest/v4.18.13$ patch -p1 < patch2
~/kerneltest/v4.18.13$ patch -p1 < patch3
~/kerneltest/v4.18.13$ patch -p1 < patch4

~/kerneltest/v4.18.13$ cp /boot/config-`uname -r` .config
~/kerneltest/v4.18.13$ yes "" | make oldconfig
~/kerneltest/v4.18.13$ make clean
~/kerneltest/v4.18.13$ make -j `getconf _NPROCESSORS_ONLN` deb-pkg LOCALVERSION=-custom

~/kerneltest/v4.18.13$ sudo dpkg -i ../*.deb
~/kerneltest/v4.18.13$ sudo update-grub

reboot and enjoy.


I have forgotten my password to my laptop, and can't access GRUB

If you forgot your password for your Linux login, you can remove the password and set up a new one.

When Linux is booting, hit the Shift key to access the grub menu.  You have to hit it at the right time.  You also may have to hit it more than once to be sure you hit it at the right time.

Use the arrows to select the Advanced Options -> [Arrow to Enter recovery mode] -> [Arrow to Enter Drop to root shell] ->

Now, remount your drive to write access with:

# mount -o remount,rw /

Edit your /etc/passwd file and remove the "x" from the second field.  This removes the password.

You can now exit out of the shell, reboot your computer and log into your account without a password.

While in your normal access edit the /etc/passwd file again and place the "x" back in to the second field.  Now you can set your password to a new one.


Cockpit - Where is the bridge configuration kept?

Check your netplan configuration.
If your renderer is networkd (common for servers), then check the following locations for the config files:
/usr/lib/systemd/network/
/usr/local/lib/systemd/network/
/run/systemd/network/
/etc/systemd/network/

If your renderer is NetworkManager (common for desktops), then check the following location for config files:
/etc/NetworkManager/system-connections

You can also interact with NetworkManager using nmcli instead of browsing or editing NM config files manually.


How would a local government make the switch from Windows to Ubuntu?

Sensible organizations don't choose their computer systems because of the cost of the operating system. They choose them because the system supports the business operation at an acceptably low level of risk.

If you compare the potential cost of disrupting the business to the cost of continuing to run Windows, quite likely the cost of Windows licenses doesn't even show up on the radar. I would expect an average-sized municipal government organization could incur costs of millions of dollars/pounds/[insert your currency here] per day from an organization-wide IT disruption that took more than a few minutes to fix.

If you want to make a case for change, forget about computer based technical arguments, and grand philosophical propositions about the evils of closed systems and the delights of open ones. Leave that sort of thing to people like Richard Stallman. Make a business case instead!

And don't forget to include the costs (financial, disruption, temporary loss of productivity, additional support required, etc, etc) of retraining every computer user in the organization to work with new systems and software that most of them may never have even heard of, let alone used, and will see no good reason for "change just for the sake of change".

The above is not meant to be "anti change" or "pro Microsoft." It's just being realistic about how an organization works - and that is something which many IT staff seem completely ignorant about.


When I try to start chrome I get a message that says "Failed to load extension from: .Manifest file is missing or unreadable"

After finally fixed it by deleting all the .desktop entries for chrome.

find ~ -name "*chrome*.desktop"
#and then after looking at the list and maybe looking inside the files and deciding
#that you are ok with deleting them just to see if this fixes it....
find ~ -name "*chrome*.desktop" | xargs rm
#or something like
find ~ -name "*chrome*.desktop" | xargs gvfs-trash
#or maybe just save them in a folder or rename them while you make sure
#this is the problem

I can't reproduce the situation so I can't tell you for sure if this was it, but it might be worth a shot if you have the same problem.


There is no KDE compatibility plugin in CCSM in focal

Analysis
This "KDE Compatibility" option was last available in Ubuntu 18.04 LTS. I'm not sure were dockbarx operational here or not.
Then this option was removed at 2019-02-05.
It is very hard to revert this diff as patch. Many things were changed.
Workaround
The most interesting moment here is that we do not need to have KDE Compatibility in the system. The internals are changed. Details are below.
Complete reproducible method to get dockbarx installed with MATE applet previews of minimized windows is presented below.
At first we need to install Compiz into the Ubuntu MATE 20.04 LTS system by:
sudo apt-get install compiz compiz-core compiz-mate compiz-plugins compiz-plugins-default

Then launch MATE Tweak by mate-tweak, select Windows tab, in Window manager switch Select window manager to Compiz (Advanced GPU accelerated desktop effects).
Then add the PPA with the application:
sudo add-apt-repository ppa:xuzhen666/dockbarx
sudo apt-get update
sudo apt-get install dockbarx-mate-panel-applet

Then install CompizConfig Settings Manager by
sudo apt-get install compizconfig-settings-manager

Launch CompizConfig Settings Manager, enable Workarounds and enable the Keep previews of minimized windows (as stated in the newest source code).
Then add Dockbarx to the MATE Panel, enter to its Preferences and ensure that in Window List → Previews you have checked the Show previews of minimized windows.
Logout and login back.
And finally enjoy the obtained result:

Note: sometimes it shows some extra gray rectangle below the actual thumbnail, but it is functional.


This explains how grub boots multiple drives and partitions:
5.3.4 DOS/Windows
GRUB cannot boot DOS or Windows directly, so you must chain-load them (see Chain-loading). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command drivemap (see drivemap), like this:
drivemap -s (hd0) (hd1)

This performs a virtual swap between your first and second hard drive.
Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won’t work.
Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.
If GRUB hides a DOS (or Windows) partition (see parttool), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition, DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:
parttool (hd0,1) hidden-
parttool (hd0,2) hidden+
set root=(hd0,1)
chainloader +1
parttool ${root} boot+
boot

Notes from parttool:

‘boot’ (boolean)

When enabled, this makes the selected partition be the active (bootable) partition on its disk, clearing the active flag on all
other partitions. This command is limited to primary partitions.

‘type’ (value)

Change the type of an existing partition. The value must be a number in the range 0-0xFF (prefix with ‘0x’ to enter it in
hexadecimal).

‘hidden’ (boolean)

When enabled, this hides the selected partition by setting the hidden bit in its partition type code; when disabled, unhides the
selected partition by clearing this bit. This is useful only when
booting DOS or Windows and multiple primary FAT partitions exist in
one disk. See also DOS/Windows.


RTL8811AU + RNX G300EX WiFi adapter driver issues with a twist

If you can download packages on any other PC, then here's a solution, as described in this post to install RTL8811AU driver:

sudo apt install dkms
git clone https://github.com/zebulon2/rtl8812au.git

now copy that directory over onto the machine that does not have Internet access and execute there:

cd ./rtl8812au
sudo ./dkms-install.sh

Though, in addition to cloning git as mentioned above, you would need DKMS for Ubuntu 18.04, and its dependencies too so have a look here on how to install packages off-line


How to review the current state of open source vs. closed source graphics drivers?

Where to review the current state of Linux display drivers:
http://www.phoronix.com/
http://openbenchmarking.org/
Generally a brief lecture of one or two current articles on phoronix dealing with display drivers performance comparison will suffice to make a decision as what driver to install.

General situation in Linux display drivers - open source vs proprietary (doesn't change at least for a year):
Intel: only one driver line available - open source, good
nVidia: proprietary driver far superior / open source decent
AMD / ATI: proprietary driver far superior / open source - dreadful performance
Ultimately with Intel you're all set right after Ubuntu installation while for nVidia and AMD you don't install their proprietary drivers only if you absolutely don't need more than pure desktop tasks performance or you experience problems with said proprietary drivers.

As a buying tip: Avoid AMD/ATI

...when considering buying a rig for Linux. See What Linux Users Need To Know When Holiday Shopping For PC Hardware

December 2012 update
http://www.phoronix.com/scan.php?page=article&item=ubuntu_raring_desktops1&num=1


Just to add -

In unity-2d you can move icons up or down directly in the launcher - just l.click on & hold the click for about a sec. The icon will move slightly & then can be re-positioned

In unity-2d you can only move up or down inside the launcher unlike unity-3d where you can pull the icon out of the launcher


Looks like you hit the bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1457369.

It will be fixed in 3.19.0-20.20 which will be released the end of this week. If you can't wait, you can either downgrade your kernel or grab 3.19.0-20.20 from trusty-proposed (see https://wiki.ubuntu.com/Testing/EnableProposed)


Triggering a UI message based on a terminal ssh'd to another server

Here's one way to do it, assuming you have password-less SSH set up:

ssh my-graphical-workstation 'env DISPLAY=$(w -s $USER | grep -m 1 " :" | awk "{print \$3}") notify-send "Done processing."'

You'll need libnotify-bin  installed on my-graphical-workstation.

Adjust it as necessary.


Where do I add boot parameters to use ks.cfg

system-config-kickstart
Basic Configuration: Location and language settings.
Installation Method: Switch this to ‘CD/ROM’.
Partition information: Create a minimum of a root (/) partition of ext4 format and a swap partition. You can set the root partition to fill the free space on the disk.
User configuration: Create one user account and no root account if you are comfortable with Ubuntu’s standard rootless setup.
Package selection: This isn’t implemented in Ubuntu.
Creating an unattended install consists of the following steps:

Create a configuration file, ks.cfg, using the GUI Kickstart tool.
Extract the files from the Ubuntu install ISO.
Add the ks.cfg file to the install disk and alter the boot menu to add automatic install as an install option.
Reconstitute the ISO file.

Much of Kickstart’s ease of use is thanks to its graphical configuration tool. It’s in the Ubuntu repositories, so search for it using the package manager or install it via the command line, as follows:
sudo apt-get install
system-config-kickstart

Once installed, the Kickstart GUI tool should place itself in the System Tools menu of the application launcher. Launching it, you’ll be presented with about a dozen pages of options, but fortunately, all of them should be fairly self-explanatory to anyone who has installed Ubuntu before.
Now save the Kickstart configuration file. By default it is called ks.cfg, but you can give it any name. It’s a good idea to check over the configuration file manually by launching it in a text editor. We now need to copy the files from the Ubuntu install CD-ROM into a directory on the hard disk. Download the alternative install ISO (rather than the live CD) from the Ubuntu website and place it in your home directory. Mount this disk from the command line:
mkdir iso_mount
sudo mount -o loop ubuntu-10.10-alternate-i386.iso.torrent iso_mount

This makes the files inside the ISO accessible via the directory iso_mount. Note that you can browse this directory using a file manager, but we’d recommend doing the actual file copying from the command line because hidden files and directories must be preserved. Copy the files to a directory inside your home directory and make them writable with:
mkdir ubuntu_files
rsync -a iso_mount/ ubuntu_files/
sudo chmod -R 777 ubuntu_files

Place the Kickstart file that you have created into the ubuntu_files directory. Now we have to tell the install system where to find the Kickstart configuration file when it boots. Load text.cfg, located in the isolinux directory, into a text editor. This file contains the menu options that you first see when you boot an Ubuntu installation disk. Locate the menu options for a standard install and then cut and paste them so that you have a second copy. We’re going to alter it so that it looks something like this:
label autoinstall menu label
^Automatically Install Ubuntu kernel
/install/vmlinuz append
file=/cdrom/preseed/ubuntu.seed
initrd=/install/initrd.gz
ks=cdrom:/ks.cfg –

We’ve altered the label and title of this new menu entry, added a reference to the location of the Kickstart file and removed the ‘quiet’ flag so that we get lots of progress information. This constitutes the entirety of the changes we have to make, and we can now re-create the ISO file.
cd ubuntu_files
mkisofs -D -r -V “$IMAGE_NAME” -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ~/autoinstall.iso .

Take our tip: try booting the ISO inside a virtual machine to make sure it works. Notice that it does require some interaction at the very first menu.


confused about installing python 3.3.4 on ubuntu 12.04lts

There is PPA for Trusty. You can use it on Saucy, but I don't know will it work on Precise or not.
You can enable it by these commands:

sudo add-apt-repository ppa:ubuntu-toolchain-r/python3
sudo sed -i 's/precise/trusty/' /etc/apt/sources.list.d/ubuntu-toolchain-r-python3-precise.list
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install python3.3


How do I get the Matrix theme colors (Lime-Green text over black background) on the Terminal?

Go to 'Edit' > 'Profile Preferences'. Then under the colours tab, untick the 'use colours from the system theme', and select 'Green on black' from built-in schemes (or create a custom one):


df -h shows different size on nfs client than on nfs server

At first view, it seems that client /mnt = server / instead of /mnt/nfsstore, check /etc/export on the server (you should add its content to your question).Try sudo mount -t nfs -o proto=tcp,port=2049 nfs.prod:/mnt/nfsstore /mnt, it should fix it.


Reverse SSH tunnel to allow others to use my machine as a jumping station

I think you want -L, not -R -- forward local port on your machine to remote port.

ssh -N -L 12345:<remote IP>:22 <remote user>@<remote IP>

Then, ssh -p 12345 <user>@<your machine> should get forwarded to port 22 on the remote system.

If you are running any firewalls you will need to be sure port 12345 is open on your machine as well.


I have to refer you to this link from Arch Wiki which compares pacman commands with other package managers:

Arch            Debian/Ubuntu

pacman -[S|Q]i  apt show / apt-cache policy
pacman -Qi      dpkg -s / aptitude show
pacman -Si      apt-cache show / aptitude show
pacman -Ql      dpkg -L
pacman -Fl      apt-file list $pattern
pacman -Qo      dpkg -S / dlocate
pacman -Ql      dpkg-query -L
pacman -Fo      apt-file search
pacman -Fs      apt-file search
pacman -Qc      apt-get changelog

pacman -Ss      apt search
pacman -Qu      apt-get upgrade -> n
pacman -Sl      apt-cache dumpavail
...
...

A shot from page:


FTP Users Authentication error: 530 and File Formatting

I never used it before, but just from reading the manual and some examples, I would try:

wput --ascii "roofsmart_suitecrm_`date "+%m-%d-%Y"`.sql.gz" "ftp://$USER:$PASSWORD@$HOST/backup/"

If you don't have wput yet on your computer, you can install it with:

sudo apt-get install wput


Ubuntu only detects 3.1 GB of ram on Ubuntu 64 bit

About 80% of CPUs in use nowadays (and almost every single new CPU sold) support 64-bit Ubuntu, so this doesn't come as a surprise. There are plans to suggest 64-bit Ubuntu as the default (the way 32-bit is suggested now) as most people's hardware is capable of running it.

Still, to see the total memory as seen by the kernel, as well as a report on how it's initially allocated, you can do this:

dmesg |grep "Memory: "

This will show a line such as this one:

[    0.000000] Memory: 3823988k/4849664k available (6109k kernel code, 874468k absent, 151208k reserved, 4876k data, 984k init)

My system has 4GB of RAM installed, however the total reported is something like 4.7 GB (I'm guessing the BIOS reports more memory due to address space for the video cards, PCI and IO devices and others). In the end only 3.6 GB are available to applications due to these concerns.

Note the "absent" memory amount, this "reflects the memory addressing space lost due to memory holes in the memory map.  Typically holes are left for PCI space, IO, etc..
Every vendor model system is different, and every system will have a different
value reported for the absent memory."

Also look at the question pointed to by fossfreedom, it gives you some more of an explanation of where addressing space may be being used.


Is it Possible to Repair Boot Record on Windows Vista Partition on Dual Boot Ubuntu 12.04.02 LTS Install?

My personal experience is: no you can't. You need tools from the Windows Vista install disk, not available anywhere due to legal concerns.


Directly cloning a disk probably won't work, since the different server providers have very different methods for managing virtual disks and allocations.

I'd recommend you take a look at backup and restore options, for example you could backup the full system from the original server then restore it to the new server you spun up on the new service provider.

I'd recommend duplicity for doing this, since it has a lot of good documentation and backends available. With a full system backup (i.e. include /etc /var /opt /home and whatever else,) it should result in a mostly identical restored system.


Installing Ubuntu 14.04 Dual Boot on Dell XPS 15 9530

You say:

  I have to turn on the "Load Legacy Option Rom" in the UEFI, otherwise Windows doesn't show me the option to boot from it.

The problem with this statement is that Windows doesn't show you boot options, except from its own boot manager, which must be configured much like you'd configure GRUB. The computer's firmware probably has its own boot manager, which should give you an option to boot to an external medium, but that has nothing to do with Windows. This may sound like I'm splitting hairs, but the point is that you need to know which boot manager (the firmware's or Windows') you're seeing so that you know how to configure it. In most cases it's better to use the firmware's boot manager, but how to access that boot manager varies from one machine to another. In most cases, you do so by hitting a function key, such as F8 or F11, although sometimes you'd use Esc or some other key. I don't know offhand what Dells most often use for this. Posting a digital photo of the boot manager menu might enable us to identify what you're seeing.

My first suspicion is that you're using the firmware's boot manager but that it's configured to not fully initialize the USB port, which of course will prevent it from showing you options on USB flash drives. I recommend you go through your firmware options and disable anything that refers to "fast start" or something similar, and to enable anything that refers to USB activation. (I realize you've already made a couple such changes, but it won't hurt to look again.) Note that there's no standardization of names or menus, so you'll just have to dig in and judge the names for yourself.

Another option would be to install my rEFInd boot manager in Windows. It might be able to find your missing USB boot options.


Just install the 64-bit version of IRAF:

% mkdir iraf.v2161
% cd iraf.v2161
% wget ftp://iraf.noao.edu/iraf/v216/iraf.lnux.x86_64.tar.gz
% tar zxf iraf.lnux.x86_64.tar.gz
% ./install                         # accept prompt defaults
% iraf                              # to start IRAF in an XGterm

See http://iraf.net for more details


Check your grub configuration file:
/etc/default/grub

Ensure you have the positive number countdown such as the 10 selected below.
Ensure you have Hidden timeout commented out:

GRUB_DEFAULT=0
# GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10

Run the following to commit your changes:

sudo update-grub


How do you set a default audio output device in Ubuntu 18.04?

EDIT (05/03/2020):
It seems that @phanky5 figured out a simpler solution. Please check it before you try this one.

Here is a well explained tutorial to set a default audio input/output.

First: List the audio output devices using

pactl list short sources

Example of the output:

pactl list short sources
0   alsa_output.pci-0000_02_00.1.hdmi-stereo.monitor    module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
1   alsa_input.usb-AVerMedia_Technologies__Inc._Live_Gamer_Portable_2_5202050100060-03.analog-stereo    module-alsa-card.c
2   alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo.monitor   module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
3   alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo    module-alsa-card.c  s16le 2ch 44100Hz   RUNNING

Second: To set a default output device run the command

pactl set-default-sink <'output_device_name'>

Example: pactl set-default-sink 'alsa_output.pci-0000_00_1f.3.analog-stereo'

Now, to make this work at every restart, follow this :

First, open the file /etc/pulse/default.pa using :

sudo -H gedit /etc/pulse/default.pa

Then scroll to the bottom of the file, where two lines starting with set- will be commented out.

Now, uncomment these lines and replace the words input and output with the number of the sink (for output) / source (for input) that you want to be the default.

Example (sets both default input and output):

### Make some devices default
set-default-sink 3
set-default-source 3

PS: As discussed in the comments with Bim, it is also possible (according to him) to put the input/output name in /etc/pulse/default.pa instead of the input/output number.

Example:

### Make some devices default
set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereo
set-default-source alsa_output.pci-0000_00_1f.3.analog-stereo.monitor

After doing this, save and exit. Then, delete the ~/.config/pulse directory by running rm -r ~/.config/pulse, and then reboot the system. Once the system reboots, the appropriate devices should now be set as the defaults.

EDIT:
As mentioned by ahmorris in his answer, some had to comment this line load-module module-switch-on-connect in the file /etc/pulse/default.pa to be # load-module module-switch-on-connect in order to make the changes persistent.


Eclipse (Aptana-Studio) - strange transparency areas on the IDE

Try reinstalling eclipse, and also java if needed.

Maybe the color scheme is not made for Ubuntu.

Yours,
Daniel


Problem with wireless network menu gnome-shell

Yo probé el mismo montaje, pero dejé usar la tarjeta WLAN USB porque ahora mi tarjeta interna está perfectamente configurada y usando ambas me deja la conección más lenta. Te pregunto ¿porque quieres ambas tarjetas enchufadas sin estar conectado con ambas? Si quieres conectarte a una red con una y otra red con la segunda tarjeta, debería funcionar. Si quieres estar conectado a una red con sólo una tarjeta, mejor desenchufar la otra. Si quieres simplemente tener ambas enchufadas pero usar sólo una tarjeta a la vez, es posible desactivar la otra con el interruptor gráfico en el menú de conecciones internet del Gnome Shell. Ese interruptor sirve para "desconectar". Luego lo puedes activar con el mismo interruptor y conectarte a la misma red o a otra.

Now in English. I've tried pretty much the same thing, but I stopped using my USB WLAN card because I've got the internal WLAN card nicely configured, and using both makes my connection slow. I have to ask, why do you want both WLAN cards connected to your computer without using both simultaneously? If you connect to one network with one card and another network with your 2nd WLAN card, it should work fine. If you want both WLAN cards connected to your computer yet only want to use one at a time, the one you don't wish to use, you can simply use the "switch" in the network applet in Gnome Shell. That switch can be set to "off" (the exact word from your Babelfish translation), but it won't say "disconnect". Afterwards you can re-enable the WLAN card and connect to the same network or a different one by setting that switch back to "on".


my computer is crashing and I think it is overheating

In order to execute nvclock -T, first log in as root and then execute the command:

~$ sudo su
~# nvclock -T


You were close, you just need to remove * which means zero or more match of the preceding token, . in this case. As a result the demn_ is also being showed in the result as it matched the condition of zero ..

So you can do:

grep 'denm\.' file.txt

Similarly in sed:

sed -n '/denm\./p' file.txt

Note that you have missed the -n option of sed, without it sed will print all the lines too.

There are also so many level of precision can be added to get exactly what you want in complex cases but take it as a start.

Example:

% grep 'denm\.' file.txt
denm.xyz
denm.abc
denm.def

% sed -n '/denm\./p' file.txt
denm.xyz
denm.abc
denm.def


Turning off battery management on desktop

All those will be listed and worked as selected in Ubuntu through gnome-power-managerpackage. If you remove that package then It will erase those configurations too .

open your terminal and type as

sudo apt-get remove gnome-power-manager

hope that helps.


Look at the spacing of the second column after python ./. Those files (except for "analysis3.pyo") each have a space at the start of their filename.

You can rename the files with this:

for file in " "*; do
  mv "$file" "${file#' '}"
done

Or if you need to keep the filenames the way they are, you can use autocomplete like so:

$ python " a

Press Tab

$ python " analysis


IP/PORT forward requests to another server

The commands in your question are enough to enable routing and forward 12.345.67.890:3636 to 09.876.54.321:3636.

Use iptables' LOG target to monitor what is happening:

iptables -I FORWARD -j LOG

You should see something like this in /var/log/syslog:

Aug 19 08:43:23 hostname kernel: [190951.964227] IN=eth0 OUT=eth0 SRC=11.22.33.44 DST=09.876.54.321 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=51600 DF PROTO=TCP SPT=41960 DPT=3636 WINDOW=246 RES=0x00 ACK URGP=0

SRC: Source IP address
DST: Destination IP address
SPT: Source port
DPT: Destination port

Flush iptables rules to clean up everything:

iptables -F


On which device do I install the bootloader when I want to dual boot?

You want to run this in Terminal:

sudo grub-install /dev/sda

Then tell your BIOS to boot off the first hard disk.


How to screen mirror android phone to Ubuntu PC?

There are several solutionsHere are the two bests to me

Best but harder: scrcpy (Screen mirror and device control via USB and TCP/IP): This application provides display and control of Android
devices connected on USB (or over TCP/IP)

The Android device requires at least API 21 (Android 5.0).
Make sure you enabled adb debugging on your device(s). On some devices, you also need to enable an additional option to control it using keyboard and mouse.
Install scrcpy from snap or from github snap install scrcpy
Configure
Connect

A good article document on how to do this.

Quick & Easy: Airdroid on Android device & a browser on Linux PC

Install AirDroid app on Android device
Connect a Linux Pc browser to device
Use (from Linux PC) the Airdroid Screenshot feature

Feature is available with free use and without any account to online service.


From the software center you can install yasm, nasm or binutils (the assembler is actually called as) packages, all providing popular assemblers. To disassemble, you can use at least objdump -d binary or gdb binary to also run, trace, or modify it on the fly. Gdb has a learning curve, so you could try ddd as a frontend. Good luck practicing!


Highest version of ubuntu for Sun Fire V100 (UltraSPARC-IIe 648MHz)

You would probably have to do a fresh install since support for 7.10 has been dropped in 2009.
 You could try to install 8.04 from an old ubuntu mirror it was a pretty awesome very stable build.
 However support has ended for it as well (meaning no new updates etc.) and your processor doesn't meet the minimum system requirements I believe.
 You can download it from here

As for newer ubuntu versions I would say you aren't able to run them on that hardware.
You should look into damnsmalllinux or puppy linux if you want new kernel features.


As has been pointed out by doug it is still possible to use an 'unofficial' deb package for k9copy-reloaded (rather than the long defunct k9copy) under Bionic Beaver. Compiling from source would be another option but the benefits of compiling such an older application would probably not outweigh the considerable hassle.

Install this as follows:

wget http://tomtomtom.org/k9copy-reloaded/k9copy_3.0.3-1~deb9u1_amd64.deb
sudo dpkg -i k9copy_3.0.3-1~deb9u1_amd64.deb
sudo apt-get install -f

This installed well enough on my Bionic Beaver installation but to find the application in the Ubuntu 'Finder' some tweaks to the 2 desktop files are required (thanks to cipricus for the detective work!).

Fix for the k9copy desktop file:

sudo sed -i_bak 's|Exec=k9copy -caption|Exec=k9copy|' \
     /usr/share/applications/k9copy.desktop

Fix for the k9copy assistant desktop file:

sudo sed -i_bak 's|Exec=k9copy --assistant -caption|Exec=k9copy --assistant|' \
     /usr/share/applications/k9copy_assistant.desktop

And now all should be well. Gratuitous screenshot below:


http://youtrack.jetbrains.com/issue/WI-11485#comment=27-393224  is the closest I found to a fix, which involves reverting to Oracle JDK's 1.6.

My problem also doesn't seem to be consistent.  Sometimes it works, sometimes it doesn't.  Sometimes a restart of intelliJ makes the issue go away for a period.

Either ways, it's a bug, and I hope IntelliJ fixes it at some point.  It doesn't seem to be Ubuntu specific.


How do I install the latest version of nmap from source on Ubuntu?

I am not that familiar with nmap but I built the very latest version from source reasonably easily under Xenial Xerus with a few easy steps.

Step 1:

First activate the Software Sources:

Dash > Software & Updates > Ubuntu Software > Downloadable from The Internet > Source Code

and allow the Repositories to reload.

Step 2:

Then install the build dependencies as well as checkinstall:

sudo apt-get build-dep nmap
sudo apt-get install checkinstall

Step 3:

Then run the following single command to download, compile and install the latest nmap:

mkdir $HOME/Desktop/nmap_build && cd $HOME/Desktop/nmap_build && \
wget https://nmap.org/dist/nmap-7.31.tar.bz2 && tar xavf nmap-7.31.tar.bz2 && \
cd nmap-7.31 && \
./configure && make && \
sudo checkinstall --pakdir "$HOME/Desktop/nmap_build" \
     --backup=no --deldoc=yes --pkgname nmap --pkgversion 7.31 \
     --fstrans=no --deldesc=yes --delspec=yes --default

Step 4:

On my system this shows:

andrew@athens:~$ nmap --version

Nmap version 7.31 ( https://nmap.org )
Platform: x86_64-unknown-linux-gnu
Compiled with: nmap-liblua-5.3.3 openssl-1.0.2g libpcre-8.38
               libpcap-1.7.4 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
andrew@athens:~$

Hopefully this will also work well on your system :).


I had this problem too, so I installed with apt-get and it worked like a charm. Open terminal (Ctrl+Alt+T) and then type:

sudo apt-get install logkeys

Link to pt_br/uk_table or another language table: Keymaps

sudo logkeys -s -m /home/user/pt_BR.map -o /home/user/logkeys.log


Try installing this ppa:
https://launchpad.net/~eh5/+archive/ubuntu/pulseaudio-a2dp

and using apx or apxhd as codec


How to build .deb files of vim which support both python2 and python3 on Ubuntu14.04?

Use this command instead of dpkg-buildpackage -us -uc and all is fine:

DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -rfakeroot -us -uc -b

Tests are disabled and there are only built binary packages.


Is it safe to remove these files with "microsoft" in the name?

These files have nothing to do with Windows, and are not from Microsoft. Deleting them will simply break some of the packages you have installed (and any features which rely on those files being there), and those files will simply be replaced when those packages get updated later anyway. There's no point in removing them.


I was also once messed up into this kind of problem when I found out my CD drive combo is burnt up like a microwave oven and I could not plug in the USB  as the port were not fixed eiher.

Give Plop Boot Manager a try to according to which

  The boot manager has a built-in IDE CDROM and USB driver to access that hardware without the help/need of a BIOS.

Well, it worked for me in my case. You can give it a try.