Script to mount drive - mount-menu.sh
The mount-menu.sh script allows you to select unmounted drives/partitions for mounting. To call the script use: sudo mount-menu.sh. This screen appears tailored to your unique machine environment:

Use arrow keys to select the partition and press Enter

The menu clears and leaves this information in your terminal:
=====================================================================
Mount Device:  /dev/nvme0n1p10
Mount Name:    /mnt/mount-menu.FPRAW
File System:   ext4
ID:            Ubuntu
RELEASE:       18.04
CODENAME:      bionic
DESCRIPTION:   Ubuntu 18.04.1 LTS
 Size  Used Avail Use%
  27G  7.9G   18G  32%

Now you can use: cd /mnt/mount-menu.FPRAW to access your external drive's partition.
Then you can use cd home/YOUR_NAME being mindful not to put a / in front of home. Should you use cd /home it would take you to your boot drive and out of the external drive.
mount-menu.sh script contents
To create the script open the terminal and type:
sudo -H gedit /usr/local/bin/mount-menu.sh

Then copy the code below and paste it into gedit. Save the file and exit gedit.
Now mark the file as executable using:
sudo chmod a+x /usr/local/bin/mount-menu.sh

Here's the script to copy:
#!/bin/bash

# NAME: mount-menu.sh
# PATH: /usr/local/bin
# DESC: Select unmounted partition for mounting
# DATE: May 9, 2018. Modified May 11, 2018.

# $TERM variable may be missing when called via desktop shortcut
CurrentTERM=$(env | grep TERM)
if [[ $CurrentTERM == "" ]] ; then
    notify-send --urgency=critical \
                "$0 cannot be run from GUI without TERM environment variable."
    exit 1
fi

# Must run as root
if [[ $(id -u) -ne 0 ]] ; then echo "Usage: sudo $0" ; exit 1 ; fi

#
# Create unqique temporary file names
#

tmpMenu=$(mktemp /tmp/mount-menu.XXXXX)     # Menu list
tmpInfo=$(mktemp /tmp/mount-menu.XXXXX)     # Mount Parition Info
tmpWork=$(mktemp /tmp/mount-menu.XXXXX)     # Work file
MountName=$(mktemp -d /mnt/mount-menu.XXXXX)  # Mount directory name

#
# Function Cleanup () Removes temporary files
#

CleanUp () {
    [[ -f $tmpMenu ]] && rm -f $tmpMenu     # If temporary files created
    [[ -f $tmpInfo ]] && rm -f $tmpInfo     #  at various program stages
    [[ -f $tmpWork ]] && rm -f $tmpWork     #  remove them before exiting.
}

#
# Mainline
#

lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT > $tmpMenu

i=0
SPACES='                                                                     '
DoHeading=true
AllPartsArr=()      # All partitions.

# Build whiptail menu tags ($i) and text ($Line) into array

while read -r Line; do
    if [[ $DoHeading == true ]] ; then
        DoHeading=false                     # First line is the heading.
        MenuText="$Line"                    # Heading for whiptail.
        FSTYPE_col="${Line%%FSTYPE*}"
        FSTYPE_col="${#FSTYPE_col}"         # FS Type, ie `ext4`, `ntfs`, etc.
        MOUNTPOINT_col="${Line%%MOUNTPOINT*}"
        MOUNTPOINT_col="${#MOUNTPOINT_col}" # Required to ensure not mounted.
        continue
    fi

    Line="$Line$SPACES"                     # Pad extra white space.
    Line=${Line:0:74}                       # Truncate to 74 chars for menu.

    AllPartsArr+=($i "$Line")               # Menu array entry = Tag# + Text.
    (( i++ ))

done < $tmpMenu                             # Read next "lsblk" line.

#
# Display whiptail menu in while loop until no errors, or escape,
# or valid partion selection .
#

DefaultItem=0

while true ; do

    # Call whiptail in loop to paint menu and get user selection
    Choice=$(whiptail \
        --title "Use arrow, page, home & end keys. Tab toggle option" \
        --backtitle "Mount Partition" \
        --ok-button "Select unmounted partition" \
        --cancel-button "Exit" \
        --notags \
        --default-item "$DefaultItem" \
        --menu "$MenuText" 24 80 16 \
        "${AllPartsArr[@]}" \
        2>&1 >/dev/tty)

    clear                                   # Clear screen.
    if [[ $Choice == "" ]]; then            # Escape or dialog "Exit".
        CleanUp
        exit 1;
     fi

    DefaultItem=$Choice                     # whiptail start option.
    ArrNdx=$(( $Choice * 2 + 1))            # Calculate array offset.
    Line="${AllPartsArr[$ArrNdx]}"          # Array entry into $Line.

    # Validation - Don't wipe out Windows or Ubuntu 16.04:
    # - Partition must be ext4 and cannot be mounted.

    if [[ "${Line:MOUNTPOINT_col:4}" != "    " ]] ; then
        echo "Partition is already mounted."
        read -p "Press <Enter> to continue"
        continue
    fi

    # Build "/dev/Xxxxx" FS name from "├─Xxxxx" menu line
    MountDev="${Line%% *}"
    MountDev=/dev/"${MountDev:2:999}"

    # Build File System Type
    MountType="${Line:FSTYPE_col:999}"
    MountType="${MountType%% *}"

    break                                   # Validated: Break menu loop.

done                                        # Loop while errors.

#
# Mount partition
#

echo ""
echo "====================================================================="
mount -t auto $MountDev $MountName

# Display partition information.
echo "Mount Device=$MountDev" > $tmpInfo
echo "Mount Name=$MountName" >> $tmpInfo
echo "File System=$MountType" >> $tmpInfo

# Build Mount information (the partition selected for cloning to)
LineCnt=$(ls $MountName | wc -l)
if (( LineCnt > 2 )) ; then
    # More than /Lost+Found exist so it's not an empty partition.
    if [[ -f $MountName/etc/lsb-release ]] ; then
        cat $MountName/etc/lsb-release >> $tmpInfo
    else
        echo "No LSB-Release file on Partition." >> $tmpInfo
    fi
else
    echo "Partition appears empty" >> $tmpInfo
    echo "/Lost+Found normal in empty partition" >> $tmpInfo
    echo "First two files/directories below:" >> $tmpInfo
    ls $MountName | head -n2 >> $tmpInfo
fi

sed -i 's/DISTRIB_//g' $tmpInfo      # Remove DISTRIB_ prefix.
sed -i 's/=/:=/g' $tmpInfo           # Change "=" to ":="
sed -i 's/"//g' $tmpInfo             # Remove " around "Ubuntu 16.04...".

# Align columns from "Xxxx:=Yyyy" to "Xxxx:      Yyyy"
cat $tmpInfo | column -t -s '=' > $tmpWork
cat $tmpWork > $tmpInfo

# Mount device free bytes
df -h --output=size,used,avail,pcent "$MountDev" >> $tmpInfo

# Display partition information.
cat $tmpInfo

CleanUp                             # Remove temporary files

exit 0

umount-menu.sh to Unmount Drives/Partitions
Repeat the file creation / execute bit marking process for the script umount-menu.sh. This script only unmounts drives / partitions that were mounted by mount-menu.sh. It has the same selection menu and completes with the message:
=====================================================================

/dev/nvme0n1p10 mounted on /mnt/mount-menu.FPRAW unmounted.

To call the script use: sudo umount-menu.sh
umount-menu.sh bash script:
!/bin/bash

# NAME: umount-menu.sh
# PATH: /usr/local/bin
# DESC: Select mounted partition for unmounting
# DATE: May 10, 2018. Modified May 11, 2018.

# $TERM variable may be missing when called via desktop shortcut
CurrentTERM=$(env | grep TERM)
if [[ $CurrentTERM == "" ]] ; then
    notify-send --urgency=critical \
                "$0 cannot be run from GUI without TERM environment variable."
    exit 1
fi

# Must run as root
if [[ $(id -u) -ne 0 ]] ; then echo "Usage: sudo $0" ; exit 1 ; fi

#
# Create unqique temporary file names
#

tmpMenu=$(mktemp /mnt/mount-menu.XXXXX)   # Menu list

#
# Function Cleanup () Removes temporary files
#

CleanUp () {
    [[ -f "$tmpMenu" ]] && rm -f "$tmpMenu" #  at various program stages
}

#
# Mainline
#

lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT > "$tmpMenu"

i=0
SPACES='                                                                     '
DoHeading=true
AllPartsArr=()      # All partitions.

# Build whiptail menu tags ($i) and text ($Line) into array

while read -r Line; do
    if [[ $DoHeading == true ]] ; then
        DoHeading=false                     # First line is the heading.
        MenuText="$Line"                    # Heading for whiptail.
        MOUNTPOINT_col="${Line%%MOUNTPOINT*}"
        MOUNTPOINT_col="${#MOUNTPOINT_col}" # Required to ensure mounted.
        continue
    fi

    Line="$Line$SPACES"                     # Pad extra white space.
    Line=${Line:0:74}                       # Truncate to 74 chars for menu.

    AllPartsArr+=($i "$Line")               # Menu array entry = Tag# + Text.
    (( i++ ))

done < "$tmpMenu"                           # Read next "lsblk" line.

#
# Display whiptail menu in while loop until no errors, or escape,
# or valid partion selection .
#

DefaultItem=0

while true ; do

    # Call whiptail in loop to paint menu and get user selection
    Choice=$(whiptail \
        --title "Use arrow, page, home & end keys. Tab toggle option" \
        --backtitle "Mount Partition" \
        --ok-button "Select unmounted partition" \
        --cancel-button "Exit" \
        --notags \
        --default-item "$DefaultItem" \
        --menu "$MenuText" 24 80 16 \
        "${AllPartsArr[@]}" \
        2>&1 >/dev/tty)

    clear                                   # Clear screen.

    if [[ $Choice == "" ]]; then            # Escape or dialog "Exit".
        CleanUp
        exit 1;
     fi

    DefaultItem=$Choice                     # whiptail start option.
    ArrNdx=$(( $Choice * 2 + 1))            # Calculate array offset.
    Line="${AllPartsArr[$ArrNdx]}"          # Array entry into $Line.

    if [[ "${Line:MOUNTPOINT_col:15}" != "/mnt/mount-menu" ]] ; then
        echo "Only Partitions mounted by mount-menu.sh can be unounted."
        read -p "Press <Enter> to continue"
        continue
    fi

    # Build "/dev/Xxxxx" FS name from "├─Xxxxx" menu line
    MountDev="${Line%% *}"
    MountDev=/dev/"${MountDev:2:999}"

    # Build Mount Name
    MountName="${Line:MOUNTPOINT_col:999}"
    MountName="${MountName%% *}"

    break                                   # Validated: Break menu loop.

done                                        # Loop while errors.

#
# Unmount partition
#

echo ""
echo "====================================================================="
umount "$MountName" -l                      # Unmount the clone
rm  -d "$MountName"                         # Remove clone directory

echo $(tput bold)                           # Set to bold text
echo $MountDev mounted on $MountName unmounted.
echo $(tput sgr0)                           # Reset to normal text

CleanUp                                     # Remove temporary files

exit 0


Run doveconf -d which will show you the default values for settings.

Or run doveconf -n which will print you the settings which are currently set to some non-default value.


Can't install CUDA on Ubuntu due to Nouveau - how can I disable / uninstall?

You need to boot to a console to do this.

Boot and hold the shift key
Select Ubuntu and press "E"
Add nouveau.modeset=0 to the bottom of the boot settings
Press F10
From this console, blacklist nouveau, and re-install your nvidia packages. Try using the nvidia packages like nvidia-361 - you can google the drivers PPA to find 367. What card are you trying to support?

Alternatively, you can press Ctrl+Alt+F1 to bring up a console and use the command sudo service lightdm stop to do the same thing, but I'm unsure if this unloads the nouveau kernel module.


How to set the default terminal window screen co-ordinates when Ctrl + Alt + T is pressed?

You can use Compiz features to achieve this. First install compizconfig-settings-manager package. Then launch the Manager, find "Place Windows" plugin (its icon is a blue arrow pointing down) and select second tab, which describes window placement rules. You can set the desired windows and their positions there, in the first field. For additional info take a look here: http://wiki.compiz.org/Plugins/Place and here: http://wiki.compiz.org/WindowMatching. You can get the exact window title with xwininfo (just mark the desired window with the cross and read the title after numeric Window id). Then create new entry, set the selection rule as title=Window_name_from_the_previous_step, set the desired X and Y position of the top left corner, activate the checkbox Constrain workarea. Should work.


Dell Inspiron7520 and Ubuntu 12.04 issues

The solution to #2 seems to be:

$ echo "min_power" | sudo tee /sys/class/scsi_host/host*/link_power_management_policy

But it gets reset at startup or at resume from suspend/hibernate...

So make a script (e.g. /home/user/.powerfix) with the following content:

sleep 5 && echo "min_power" | tee /sys/class/scsi_host/host*/link_power_management_policy

Mark it as executable and then put sh /home/user/.powerfix into /etc/rc.local, before the exit 0 command so it runs at startup. Next, to run it at resume make a file named /etc/pm/sleep.d/90_minpower with the following content:

#!/bin/sh

case "$1" in
    resume|thaw)
        sh /home/user/.powerfix &
        ;;
esac


This glitch is due to system cache accumulation. Therefore one can solve it by clearing cache. To do this one may use Ubuntu Tweak's 'Janitor' feature. For installing Ubuntu tweak use the following commands:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Then open it from the dash. One can also open it from the terminal with the command:

ubuntu-tweak

Then one should select Start Janitor. Then select the cache one desires to clear from the subsequent window and then press Clean to remove cache. This should remove all unnecessary cache and solve the graphical glitch too.

If this doesn't work one may try making edits in CompizConfig settings manager which can be installed from here:


How to invoke a function after sshing to another machine in bash scripts?

You could try executing what you need by redirecting cat yourscript to ssh. If you want the same script to be executed differently on each server, use if condition. For example, you have the next script:

$ cat sshcommands.sh
#!/bin/bash

main () {
  if [ $(hostname) = 'pc' ]; then
    test1
    echo "It claims to be PC......................."
  fi

  if [ $(hostname) = 'ubuntu' ]; then
    test2
    echo "It claims to be UBUNTU"
  fi
}

test1 () {
    echo "with common:"
    common
    hostname
    echo "This is pc"
}

test2 () {
    echo "without common"
    hostname
    echo "This is ubuntu"
}

common () {
    echo "Common start *******************"
    ls /
    lshw -C network
    echo "Common end   ********************"
}

main

You could pass it to your ssh server by command:

cat ./sshcommands.sh | ssh user@your_server_IP

How to work with sudo in this case you could see here. Look at sshpass solutions like this:

$ apt-get install sshpass
$ sshpass -p 'password' ssh username@server


Ubuntu 20.04 snap installed Chromium - Impossible to read Nextcloud folders

snap applications can only read the user's home directory and, depending on the configuration, the user's /media/ mountpoints.

That is the current security model.

All other mount points are off-limits.


Conky: why does upspeedgraph look like downspeedgraph when values are different?

This is normal unless you give your computer something to down/upload. See for example the graph taken in my machine right now from gnome-system-monitor:

Your script looks as far I can see like it is correct.


need help dual booting Ubuntu 13.04 and Windows 7 (Ubuntu installed)

You have to have a NTFS formatted primary (sda1 thru sda4) partition with the boot flag.

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

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


Using intel graphics with nvidia drivers boot loop

download and install nvidia drivers
install drivers

press ctrl  + alt + F2
log in
sudo systemctl stop lightdm.service
chmod +x NVIDIA-Linux-x86_64*
blacklist nouveau driver
sudo nano /etc/modprobe.d/blacklist.conf
append the following

blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

sudo update-initramfs -u
reboot computer
install nvidia driver
press ctrl  + alt + F2
sudo systemctl stop lightdm.service
sudo ./NVIDIA-Linux-* --dkms --no-opengl-files
don't update your x config file when prompted

install m4

sudo apt-get install m4

download corresponding nvidia-modprobe from

http://download.nvidia.com/XFree86/nvidia-modprobe/

extract, compile, and install nvidia-modprobe

tar -xvf nvidia-modprobe-*
cd nvidia-modprobe-*
make all
sudo make install

reboot computer

How to configure igpu for xserver and nvidia gpu for cuda?


This kernel requires an x84-64 CPU, but only detected an i686 CPU

There are two main arch types: x86_64 (64 bit) and x86 (32 bit).
Well it appears that you're trying to install a 64bit version of Ubuntu on a computer with a non 64-bit capable CPU. Pretty sure the i386/32bit installers don't contain 64bit kernels so you must've dwnloaded the wrong version.


Ubuntu Software Center and Update Manager fail to open

you can always run update via terminal with sudo apt-get update -f and then sudo apt-get -f install should do it.Download chrome  deb package from their offocial site and install it with gdebi manager( sudo apt-get install gdebi) or sudo dpkg -i /path to chrome.deb .

sudo dpkg --remove --force-remove-reinstreq google-chrome-stable ( place name of your package here)


A clipboard manager that also supports images?

For a Gnomes-based DE, Diodon is the clipboard manager you need. You can log into the settings of it and check "include images" and your photos will be in your history.
How to install with APT, according to Diodon Github:
sudo add-apt-repository ppa:diodon-team/stable
sudo apt update
sudo apt install -y diodon

You can also use CopyQ. This joker has tons of options and capabilities.


first Last Pass has a native Linux version.

Most Windows Programs can be run using Wine which you can install from the Ubuntu software Center.

To check which programs will run on Wine on Ubuntu you search the program's name on this site Wine App Database

Most version of Quicken and Dragon Speech run pretty well under Wine, I'd recommend 12.0 Premium of Dragon Speech, though if you're looking for an alternative to Dragon speech you might view this question or perhaps Julius, see here.

For Family Tree maker the 2005 version appears to work well under Wine. In addition there are many alternatives that might work well, these include gramps lifelines, and geneweb.


Deploying my customized Ubuntu to other machines

It sounds like Clonezilla is perfect for your problem. Just download the program, burn it to a disk, and use it to back up your installation to an iso file, then burn that file to a disk.


Anyone know how to write bengali or hindi?

For bengali you can use avro phonetic.

Method 1

Using ibus as input method, you can try with avro m17n package.It works like charm. You can download from here

Download the latest dev file, install it.(Read the instruction in README and Install.txt)
Install ibus-m17n from software center.
Switch input method to ibus and configure ibus like this. You can also install hindi from here. (I never tried)
Log out and login. Use ctrl +  space to switch input methods. To change keyboard shortcut, use General tab of the shown picture.

Method 2

Traditionally avro is instructed to setup with scim input method. But it doesn't work well in latest ubuntu version (>= 11.10). A ppa package is available (tutorial here) also or can compile for source.


No such file or directory? But the file exists!

You're probably trying to run a 32-bit binary on a 64-bit system that doesn't have 32-bit support installed.

There are three cases where you can get the message “No such file or directory”:

The file doesn't exist. I presume you've checked that the file does exist (perhaps because the shell completes it).
There is a file by that name, but it's a dangling symbolic link.
The file exists, and you can even read it (for example, the command file shank-linux-120720110-1-bin displays something like “ELF 32-bit LSB executable …”), and yet when you try to execute it you're told that the file doesn't exist.

The error message in this last case is admittedly confusing. What it's telling you is that a key component of the runtime environment necessary to run the program is missing. Unfortunately, the channel through which the error is reported only has room for the error code and not for this extra information that it's really the runtime environment that's to blame. If you want the technical version of this explanation, read Getting “Not found” message when running a 32-bit binary on a 64-bit system.

The file command will tell you just what this binary is. With a few exceptions, you can only run a binary for the processor architecture that your release of Ubuntu is for. The main exception is that you can run 32-bit (x86, a.k.a. IA32) binaries on 64-bit (amd64, a.k.a. x86_64) systems.

In Ubuntu up to 11.04, to run a 32-bit binary on a 64-bit installation, you need to install the ia32-libs package . You may need to install additional libraries (you'll get an explicit error message if you do).

Since 11.10 (oneiric) introduced multiarch support, you can still install ia32-libs, but you can choose a finer-grained approach, it's enough to get libc6-i386  (plus any other necessary library).


Hide GRUB2 menu UNLESS you hold down Shift key: how to make this happen?

I think that I found a simpler resolution.
Modify the following lines in the file /etc/default/grub :

GRUB_HIDDEN_TIMEOUT=0.0

GRUB_TIMEOUT=0.0

Of course we finally run an update-grub.
It works on my PC.


Ubuntu 18.04.3 LTS - can 't empty trash, rm'd from Terminal - Trash folder gone but Trashcan still full!

I use $ trash-empty from the " trash-cli " package ($ sudo apt install trash-cli).

This link provides three more ways to empty trash in Ubuntu: https://vitux.com/four-ways-to-empty-the-trash-recycle-bin-in-ubuntu/ .
Sorry, for your deleted Trashcan I do not know of a solution to propose :( .


Ubuntu (14.04 & 15.10) doesn't boot from USB on a new HP Envy with Win 10

When booting from the Ubuntu installation media highlight Try Ubuntu without installing.
Press "e" and add nouveau.modeset=0 to the end of the linux line. Then press F10 to boot.

Note :

Repeat the same procedure with the Ubuntu entry in GRUB menu after installing Ubuntu !
The first thing you should do is to install the proprietary NVIDIA graphics drivers in Ubuntu.


Kickoff

http://userbase.kde.org/Plasma/Kickoff

  Kickoff Application Launcher

  Kickoff is the default application launcher of the Plasma
  desktop...You can also resize Kickoff: grab the top right corner of
  Kickoff with the mouse pointer (it turns to a pair of arrows directed
  diagonally) and drag Kickoff to the desired size.

There is a wish/bug (Bug 163283 - icon size in kickoff should be configurable): https://bugs.kde.org/show_bug.cgi?id=163283

Other KDE launchers: http://www.kubuntuforums.net/showthread.php?59851-KDE-Application-Launchers


Cannot reinstall Ubuntu, only get error messages

From what I've gathered from your question, the errors are most likely due to the power shortage you faced. These messages indicate that there are BIOS errors related to power management control due to an improper ACPI table. The purpose of ACPI is to control the hardware resources and power management. The ACPI checks and improves upon existing power and configuration standards for hardware devices. However, once power
management is under the control of the operating system, it takes over and has exclusive control of all aspects of power management and device configuration. The OS then usually emulates ACPI compatible system calls, but does not use the BIOS for that. You can try to:

Upgrade BIOS version
Override DSDT/SSDT(very dangerous)

Sources:

https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface
https://access.redhat.com/articles/65378


Overheating Laptop when Ubuntu is running?

I never had a problem overheating because of ubuntu, may your drivers misbehaved or not proper installation cause this problem. Check every drivers installed properly.


What happened to ctrl+alt+numpad in Ubuntu 12?

The answer I came up with, in case anyone else needs it.

I installed compiz-fusion-plugins-extra over ccsm, which gave me access to window management shortcut keys. From there, I was able to enable the maximize option.

Standard warning with ccsm: use it sparingly. It'll turn on you for, like, no reason.

Related link


Although there isn't an official Cyberfox Linux version on their website, the portable Cyberfox version for Windows can be installed in Wine.

To do that:

Download the installer (for me it was CyberfoxPortable_41.0.1.0_English.Amd.paf.exe).
Move that installer to the directory where you want the file installed (In the screen shot below you can see I installed mine in /media/sf_15.04drive). 3. Run the installation in the terminal; E.G.wine CyberfoxPortable_41.0.1.0_English.Amd.paf.exe`

The above will create a Cyberfox directory with CyberfoxPortable.exe in it.

Now, every time you want to run Cyberfox, just call wine /path/to/CyberfoxPortable.exe


Expected mapping trying to configure IP in ubuntu server 18.04

yaml is a structured format that uses indentation to indicate structure.  Your pasted file shows that all your lines are left-aligned in the first column.  It looks like you've lost the whitespace when copying some example, you will need to add it back.


Using man man, we can see that manual pages fall into the following sections:

   1   Executable programs or shell commands
   2   System calls (functions provided by the kernel)
   3   Library calls (functions within program libraries)
   4   Special files (usually found in /dev)
   5   File formats and conventions eg /etc/passwd
   6   Games
   7   Miscellaneous  (including  macro  packages  and  conventions), e.g.
       man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

Note that Section 3 is for functions within program libraries i.e. it is generally individual functions that are documented, rather than specific header files. So for example man strncpy:

STRCPY(3)                  Linux Programmer's Manual                 STRCPY(3)

NAME
       strcpy, strncpy - copy a string

SYNOPSIS
       #include <string.h>

       char *strcpy(char *dest, const char *src);

       char *strncpy(char *dest, const char *src, size_t n);

DESCRIPTION
       The  strcpy()  function  copies the string pointed to by src, including
       the terminating null byte ('\0'), to the buffer  pointed  to  by  dest.
       The  strings  may  not overlap, and the destination string dest must be
       large enough to receive the copy.  Beware  of  buffer  overruns!   (See
       BUGS.)
etc.

In this case there is an overview in man string (as there is for stdio - but not, apparently, for stdlib)

STRING(3)                  Linux Programmer's Manual                 STRING(3)

NAME
       stpcpy,  strcasecmp,  strcat, strchr, strcmp, strcoll, strcpy, strcspn,
       strdup, strfry, strlen, strncat, strncmp, strncpy,  strncasecmp,  strp‐
       brk,  strrchr, strsep, strspn, strstr, strtok, strxfrm, index, rindex -
       string operations

SYNOPSIS
       #include <strings.h>
etc.

NB not to be confused with man strings which documents the strings command line utility from section (1) of the catalog.


Laptop Screen Rapidly Flashes Off/On/Off/On... at Boot

Does your laptop have double GPU ? (integrated GPU and AMD Radeon)
If yes, then try to read the post here.

Generally, this issue is due to the non fully support for AMD and Nvidia drivers on Linux, the best solution is to use the integrated GPU instead of the AMD one.


In Ubuntu you don't need to install 'separate' drivers from manufacturer CDs. Most drivers are already built in the system. Those discs you are mentioning probably designed for Windows and provide some necessary or additional features for the motherboard to work under Windows. But in Ubuntu these features are usually provided by default. So may not bother installing any special drivers.


Command 'ng' not found even after installing it using yarn global

According to yarn cli,
your global package executables are in ~/.yarn/bin location. You will need to add this path to your $PATH variable.
 Read How to add a directory to the PATH? to see how to do that.

Or you need to reinstall using the command:

yarn global add @angular/cli --prefix /usr/local

which will install in /usr/local/bin which should already be in $PATH variable.

You can permanently set this in config as:

yarn config set prefix /usr/local


Why does Ubuntu become unresponsive during high IO (read/write) operations?

For unknown reasons the I/O scheduler has been changed from the default configuration (cfq - completely fair queuing) to deadline.

Since I have the tlp tools installed to reduce the power consumption, my solution was to set the scheduler for all drives back to the default value in /etc/default/tlp:

...
# Select io scheduler for the disk devices: noop/deadline/cfq (Default: cfq)
# Separate values for multiple devices with spaces.
#DISK_IOSCHED="cfq cfq"
...

In this part you uncomment the last line to:

DISK_IOSCHED="cfq cfq"

Alternatively you can do the same with the following command:

sudo sed -i 's/#DISK_IOSCHED/DISK_IOSCHED/' /etc/default/tlp


How to check OS version using php (script) file

You can login on server by putty with same detail (FTP login detail) and run following command:

uname -a

Or, you can execute PHP shell command to get OS info.


The following worked for me, in case someone else is struggling with this issue, I'm gonna post a step by step procedure on how one can go about setting their proxy on dropbox. Right click Dropbox from the system tray, and click on Preference > proxy, see below for step-by-step screenshots:

Click on "proxy":

set your proxy accordingly:


Unknown encoder 'libx264' .I am using x264 and fdk-aac with avconv from libav

You don't need all that.

sudo apt-get update
sudo apt-get install ffmpeg

or

sudo apt-get update
sudo apt-get install libav-tools

This will install avconv as well.


How to make do-release-upgrade stop at 18.04 LTS instead of going to 20.04?

When using the do-release-upgrade command to update an Ubuntu system, it will update the system to the next major release in sequence after the current system release. This means that if you are currently running Ubuntu 16.04 LTS, do-release-upgrade will choose Ubuntu 18.04 LTS as the next major release to upgrade to. It will not skip ahead to the most recent major lease (20.04 LTS in this case).
If you want to upgrade from 16.04 LTS to 18.04 LTS and not to 20.04 LTS, then just run do-release-upgrade once and stop after that has successfully completed.


How do I find out the name of the font used to display some specific text on the screen?

I don't think there is a general solution. Once the text has been rendered, there's no reason why any component of the system would have kept the information of what font it was rendered from around. So you'll have to somehow watch when the program renders the text. In any case, how to get at the information depends on the rendering engine.

Most programs render through the fontconfig library. If you start a fontconfig-using program with the FC_DEBUG environment variable set to a suitable value, it will show some information about fonts being loaded, though not what font is being used for rendering which text. Still, try running FC_DEBUG=2053 myprogram. See /usr/share/doc/fontconfig/fontconfig-user.txt.gz for the meaning of $FC_DEBUG.

Traditional unix programs render text using bitmap fonts managed by the X server. Then you could see what font was used to render what text by spying on the X protocol conversation and watching for OpenFont, ImageText and a few other messages. I don't have ready-for-use tools to suggest.

If you're only interested in a particular application, there may be a better way that's specific to that application.


Apps and data can be installed. The risk is the same as a sudden power failure for an internal drive - i.e. be sure the drive cache is flushed before removal. If in ubuntu, powering off before removing is recommended.

Windows can not read Linux partitions (ext4) without third party software. The easiest solution it to create an NTFS partition to use for shared data.

Note: fast startup in windows is a hybrid hibernate. It must be disabled to use shared partitions.


Loading splash screen freezes unless I use nomodeset

It might have something to do with Wayland. I didn't find a solution, but a workaround:

Boot to the desktop by using 'nomodeset' option in GRUB, or selecting recovery mode in GRUB. Hold Shift early in the boot process if necessary
Log out
Choose an Xorg-based option to log in with. On future boots, it should boot the last-booted option by default.


Black screen when UEFI installing Ubuntu Server 16.04 on GTX 1060 laptop

Finally solved this by switching MSHybrid or DISCRETE SWITCH from MSHybrid to DISCRETE in BIOS.


Installation

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:chris-lea/node.js

sudo add-apt-repository ppa:chris-lea/node.js-devel

sudo apt-get update

sudo apt-get install nodejs npm

sudo apt-get install nodejs-dev

sudo npm config set unsafe-perm true

Then

sudo npm install -g --prefix=/usr/local log.io

                                                       Configuration

# cd /etc/log.io/
# ls

There are 2 file " harvester.conf "  " server.conf "

The server.conf got 2 configuration 1st you can change the port & 2nd one is you can configure it for authentication

/* Log.io log server configuration */

exports.config = {

  // Log server port
  port: 8998,   // < To Change The port

  // Uncomment to enable basic HTTP authentication
  /*
  basic_auth: {
    username: "foo",
    password: "bar"
  }
  */
}

Now 2nd one  harvester.conf

 /* Log.io log harvester configuration */

exports.config = {

  // Log server host & port
  server: {
    host: '127.0.0.1',
    port: 8998,
  },

  // Watch the following log files, defined by label:path mappings
  log_file_paths: {
                  logio_harvester: '/var/log/log.io/harvester.log'
                  },
  // To Monitor Auth Logs
  log_file_paths: {
              Auth_logs: '/var/log/auth.log'
          },
  // To Monitor Fail2ban Logs
 log_file_paths: {
                  Fail2ban_logs: '/var/log/fail2ban.log'
                  },
 // To Monitor Syslogs
 log_file_paths: {
                  Sys_logs: '/var/log/syslog'
                  },
   // Define name of current machine.
  // Alternatively, you can set this name in /etc/profile:
  // export LOGIO_HARVESTER_INSTANCE_NAME='my_log_machine'
  // If so, comment out the line below
  instance_name : 'log_node_1'
}

You can add as many logs path you want to

Now the last part

sudo log.io server start && sudo log.io harvester start

log.io Installation On Ubuntu 12.04


Ubuntu 12.04 ethernet is not working ( Unclaimed Network)

@Vivek: Did you also upgrade the kernel headers module at the time of installing the new kernel? If not, you may try by doing sudo apt-get install linux-headers-$(uname -r). Regards


how to make ubuntu 14.10 recognize Dell u2312hm screen?

Try using only VGA the first time you configure it, i had many problems with HDMI and ended up using first VGA to configure it.


You are experiencing this problem because you are trying to mount the volume to a directory that does not exist. In order to be able to mount there, you must create the directory first. So in the case of your desired mountpoint, /disk20, you would run this command:

sudo mkdir -p /disk20

This will create the directory. Now you can mount the partition as you did before:

sudo mount /dev/sda7 /disk20

Do note, however, that creating your own directories in the root (/) folder is generally not recommended (although shouldn't be harmful). Instead of mounting to /disk20, it would be more ideal to mount to a mountpoint that is designed for mounting partitions. One example of this is the /mnt directory. Assuming this directory is empty, run:

sudo mount /dev/sda7 /mnt

Another advantage of mounting to /mnt is that the directory already exists so you won't need to manually create it with mkdir -p beforehand.


What are the possible threats if internal IP address is publicly revealed?

Giving out your public IP address simply makes you a target. It is like posting your email address. Malicious people will then be able to use your IP and target your computer. Whether they will be successful or not depends on the way you've set up your machine but in any case, the first step will be getting your public IP.

Now, posting your internal IP, is not dangerous at all. For example, my current internal IP is 192.168.0.37. There are certainly thousands of computers all over the world that are connected to their local LAN using the exact same IP. Internal IPs are just that, internal, they have absolutely no meaning outside your own network and sharing them is not dangerous.

The same goes for the rest. All of the information you mention is specific to your local network (assuming you mean the broadcast address of your internal IP, not the public one) and there is no danger in sharing them whatsoever. In fact, please make sure to use real addresses when you ask questions since they can help us understand where the error lies.

In summary, you don't really want to share your public IP or the MAC address of your network card but internal IPs, broadcast address, subnet mask, default route (that's just the internal IP of your router) and DNS servers can be shared with no risk. DNS servers are public anyway and all the rest are internal to your local network and have no meaning outside it.


Configure gnome-terminal to start bash as a login shell, doesn't read .bashrc

Yes, that is the expected behaviour.

The behaviour, in short, is as follows:

bash started as an interactive login shell: reads ~/.profile
bash started as an interactive non-login shell: reads ~/.bashrc

Read the bash manual about startup files for more details.

Personally, I think that this behaviour is strange and I have not yet found a rationalization for this design decision.

Some explanation of the terminology:

An interactive shell is a shell with which you can interact, that means you can type commands in it. Most shells you will use are interactive shells.
A non-interactive shell is a shell with which you cannot interact. Shell scripts run inside non-interactive shells.
A login shell is the shell which is started when you login to your system.
A non-login shell is a shell which is started after the login process.

Most shells you see are interactive non-login shells. This is especially true if you are running a graphical environment like gnome, because then gnome is the "login shell". Any bash session started inside gnome is a non-login shell. If you want to see a real interactive login shell then go to a virtual console (using Ctrl+Alt+F1) and then log in using your username and password. That is a real interactive login bash shell. You can go back to the graphical shell using Ctrl+Alt+F7.

There is an option --login which will make bash behave as if it is a login shell even if started after your have logged in. Configuring gnome-terminal to start bash as a login shell means it will start bash using the --login option.

Usually you want bash to always read ~/.bashrc in an interactive shell. Here is how I recommend to do that:

Create a ~/.bash_profile file. If bash is started as a login shell it will first look for ~/.bash_profile before looking for ~/.profile. If bash finds ~/.bash_profile then it will not read ~/.profile.

Put the following lines in ~/.bash_profile:

[ -f "$HOME/.profile" ] && source "$HOME/.profile"
[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc"

Now if bash is started as an interactive login shell it will read the following files:

~/.bash_profile
~/.profile
~/.bashrc

and if bash is started as an interactive non-login shell:

~/.bashrc

You should put stuff which is bash specific in ~/.bashrc and stuff which is not bash specific in ~/.profile. For example PATH goes in ~/.profile and HISTCONTROL goes in ~/.bashrc.

Note that ~/.profile is not bash specific. Other text based shells (for example sh or ksh) and graphical shells (gnome) also read ~/.profile. That is why you should not put bash specific stuff in ~/.profile.


Does sound like a bad drive, especially if you can literally hear it making funny noises (hear any?). Input/Output errors are generally fatal errors. You might be able to still read from some of the drive, but it probably won't get any better and will probably get worse. An encrypted drive would still be readable (assuming it's not some odd expensive hardware encryption, then you probably wouldn't be able to read & re-partition it at all).

Partitioning may work ok if the start of the drive still works ok, but no guarantees about the rest of the drive.

Trying to read through the whole disk with a program like testdisk (photorec specifically) may yield some interesting results of leftover files, but if it errors out too much that's another fed flag.

And if you formatted the drive to ext3/4 you could try badblocks (with e2fsck -c or -cc) in case it's only a few bad sectors that could be avoided. More info from man badblocks and man e2fsck :

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a  read-only
          scan  of the device in order to find any bad blocks.  If any bad blocks are
          found, they are added to the bad block inode to  prevent  them  from  being
          allocated  to a file or directory.  If this option is specified twice, then
          the bad block scan will be done using a non-destructive read-write test.


Ubuntu whole system goes unresponsive from time to time

Let's increase your /swapfile from 2G to 4G and see if that helps.
Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.
In the terminal...
sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 8G RAM and 4G swap

Edit /dev/fstab, using sudo -H gedit /etc/fstab or sudo pico /etc/fstab.
Confirm this /swapfile line in /etc/fstab... and confirm no other “swap” lines... use SPACES in this line... confirm NO TABS...
/swapfile  none  swap  sw  0  0

reboot                    # reboot and verify operation

Update #1:
Remove nomodeset from your /etc/default/grub and then sudo update-grub.
You have an older version of the AMD video driver. Download and install version 20.20 at https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-20 or https://drivers.amd.com/drivers/linux/amdgpu-pro-20.20-1098277-ubuntu-20.04.tar.xz.
Installation instructions are at https://amdgpu-install.readthedocs.io/en/latest/.
Reboot your computer.


Just download it to your directory project. You could use gcc include directive to set the specific path to that library: https://www.rapidtables.com/code/linux/gcc/gcc-i.html.

If you are using the Eclipse or any other IDE you could change compiler (includes) options.


Append some text at the end of the filename

For a file named file.txt its filename is file and its extension is txt. We want to insert COPY. between the filename and the extension of this file.
FILE="file.txt"
mv -T $FILE "${FILE%%.*}"COPY."${FILE##*.}"

Results: fileCOPY.txt
Explanation
mv - move (rename) files
Filename:
$ echo "${FILE%%.*}"
file

File extension:
$ echo "${FILE##*.}"
txt


Jabbler instant messaging implementation with mysql for a LAN?

OpenFire is a free XMPP server that can use MySQL or LDAP for users, rosters, etc. It's been a while since I've used it, but it used to be very easy to configure. Everything is just point and click and a matter of choosing names and passwords, mostly.

You can find out more about it here: http://www.igniterealtime.org/projects/openfire/

There are also other XMPP servers in the archives, but I don't have any personal experience with them. I would recommend that you try OpenFire first since it's probably the easiest one. It does not necessarily mean it's the best solution for long term use. I'm not qualified to be the judge of that, so I would recommend that you have a look at other servers as well.


Lost all my data after changing Windows 8 to Ubuntu

testdisk is a great tool to recover lost data and partitions. Install testdisk on a live Ubuntu and try to recover, I think in your case you will be able to recover all your data. Take care ;)


How to access shared drive connected to Airport Extreme router?

I'm fairly sure it has something to do with permissions. For me, the solution was to open AirPort Utility on my Mac, go to Disks->File Sharing, and set "AirPort Disks Guest Access" to "Read and write". Once I did that, the drives connected to my AirPort Extreme showed up in the Network browser from Ubuntu.


Japanese input stopped working for QT applications in 18.04

Try/choose to install as many as possible japanese IMEs for ibus:

Mozc: sudo apt install ibus-anthy, and/or;
Anthy: sudo apt install ibus-anthy, and/or;
SKK: sudo apt install ibus-skk, and/or;
KKC: sudo apt install ibus-kkc.

Switch between them.
Maybe one can be used to input your japanese content.


TBS TV card drivers not compliling with latest kernel

*on my main machine I installed ubuntu 20.04, then
git clone https://github.com/tbsdtv/media_build.git
ls
cd media_build/
ls
./build il
*build told me to do this
sudo make install
*so I did and they installed
*the rest of the tbsdtv solution, which I haven't done
sudo install lsdiff
sudo apt install lsdiff
sudo apt install patchutils libproc-processtable-perl
./build
sudo make install
sudo make rmmod
*I did this and it loaded
sudo modprobe saa716x_tbs-dvb
lsmod|grep saa
saa716x_tbs_dvb        65536  0
cx24117                36864  1 saa716x_tbs_dvb
saa716x_core           81920  1 saa716x_tbs_dvb
tas2101                28672  1 saa716x_tbs_dvb
dvb_core              151552  2 saa716x_tbs_dvb,saa716x_core
i2c_algo_bit           16384  2 saa716x_tbs_dvb,radeon
*I now have to install ubuntu 20.04 on my media player machine and keep my fingers crossed.
I have upgraded my media player machine to ubuntu 20.04 and I can confirm that the above solution works.


How should I set my partitions on a system with one small SSD and one large HDD

For Home/Work PC:

/home on HDD
swap on HDD
/ on SSD
/tmp in ramfs


Ubuntu 11.20 launcher disappeared after installing Nvidia Driver

try go to compiz settings manager.To install it run command

sudo apt-get install compizconfig-settings-manager

and check if ubuntu unity plugin is enabled

also check decorating windows is enabled in effects.

if not working you can try this

 setsid compiz --replace

and restart unity with

unity --replace


Steam isn't displaying after running [Kubuntu]
@Nick Weinberg solved the OS migrating problem

(edited out of original post)

Sound solution: Plugged earphones into monitor to see if youtube video sound would output (didn't work) but upon removing the headphones the sound came out of the monitor speakers

Stuttering start menu and youtube videos: go to start menu and type "monitor" to bring up Display Configuration, click Advanced Settings and set it to 60hz instead of auto and apply the settings. fixed


Issues with executable: file not found after using chmod to fix permissions

Turns out the blackbox executable was a 32-bit program, and I am running a 64-bit OS. Here's the (somewhat hacky) steps I took to resolve this issue (partially chronicled in this question on Superuser):

uname -m told me I have a 64-bit OS, but file blackbox told me that this exe was 32-bit.
ldd blackbox (strangely) told me that the file was not a dynamic executable, even though I also saw this from file. Trying readelf -l ./blackbox | grep ld-linux told me [Requesting program interpreter: /lib/ld-linux.so.2], which was a shared library that I didn't have at that location.
sudo apt-get install libc6-i386 to get that library file (found that with a package search on packages.ubuntu.com).
Now ldd gave me output, and I was missing libstdc++.so.6 and libgcc_s.so.1 (see my edit), so I needed to get these files.
After a bit more pacakage searching, I found that the gcc-snapshot package had the two files I was missing. This is probably a massive hammer for my tiny nail, and there are likely better solutions, but sudo apt-get install gcc-snapshot got me the files I needed.
After running ldd again, this resolved the issue with libgcc_s.so.1, but libstdc++.so.6 was still not found. I ended up going to the place where ldd found libgcc_s.so.1 and running sudo ln -s /usr/lib/gcc-snapshot/lib32/libstdc++.so.6 libstdc++.so.6 to get a symlink to the recently installed file.


Actually, it's not possible to access the console session through xRDP software (as far as I know).  xRDP open a different session than the console session.....

The only option available would be to use something like vnc software where you can access the console desktop. It's possible to have vnc service start at bootup. Because vnc service can be started at boot up, you would be able to connect through a vnc client to the correct desktop

Finally, you could also use the console option available in xRDP (so you can still use remote desktop client of your choice) and access the active desktop.  Obviously, the console option is basically telling xRDP software to make a vnc connection

Hope this help
till next time
See ya


You may have removed the application, but you did not purge your calendars. The back-end service is still used by the rest of the system, for contacts and calendar.

If you remove the ~/.local/share/evolution/calendar/system/calendar.ics file, and the ~/.cache/evolution/calendar/ directory for your user, then log out, wait a few seconds, and log back in, you should no longer get any notifications about old calendar events from the local calendar you had been using in Evolution.


How to pay for an app in Software Center

If you pay for the app, it's handled through your Ubuntu Single Sign-on account. You have a username and password (which can be the same as Launchpad).

I don't know what payment options are available, since I've only downloaded free apps that use that system. Upon payment, you get what amounts to a special PPA with the program.

There's a menu item that will let you restore previously-purchased items. I think it just adds the PPA and installs the package.


Configuration files are usually owned by root. For example:

$ ll /etc/default/grub

-rw-r--r-- 1 root root 6801 Jul 18 13:26 /etc/default/grub

 ^^ ^  ^
 || |  +-- Users can only read
 || +----- Members of the group can only read
 |+------- The owner can write
 +-------- The owner can read

In order for a user (yourself) to edit /etc/grub/default you need to use sudo powers. So instead of using:

gedit /etc/default/grub

You must use:

sudo -H gedit /etc/default/grub

At which point you will be prompted for your password.

Note: Related question today: Grub file can't be saved after modification


Actually the old driver for Kinect v1 works also for Kinect v2!
so problem solved

:)


Can't resize gedit window (Cinnamon with Radiance theme)

There are other methods, how to resize window, when the default method is broken.

1.

Right click on top panel and choose "Resize". Then resize window how you want.

2.

The second better method is keyboard shortcut Alt + Middle mouse button (wheel).

Hold down the Alt key and press and hold the middle mouse button.

I think that the second method is more comfortable then resizing through the window edges.


I had this same issue once

To solve, it you need a separate boot manager (unless you are comfortable editing the windows registry, which is VERY dangerous). I used rEFInd.
Find out more at http://www.rodsbooks.com/refind/index.html

Then you must tell Windows to use it

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Also, shut off fast startup (guide for windows 8, should work for 10) https://www.eightforums.com/threads/fast-startup-turn-on-or-off-in-windows-8.6320/

This assumes your PC uses EFI or UEFI and is 64 bit.


how give permission for reset apache without admin permission?

In order to let the user see the log files, I would suggest changing the group ownership of /var/log/apache and all files in that directory to group www. You'll likely have to edit /etc/logrotate.d/apache2 to keep the new group permissions. Then add your user to the group www

Use sudo permissions to let the user reset the service. Using visudo, add a line like username ALL=(root) /usr/sbin/service apache2 start,/usr/sbin/service apache2 stop,/usr/sbin/service apache2 restart.

I would not allow the user to edit the apache config file. It would be difficult to give them permissions to do this without the possibility of them breaking system security.


How to partition a small SSD alongside an HDD when installing Ubuntu

Actually, installing Linux into an SSD is very good... with a little bit of modification.

Install Windows first to the HDD. Only once Windows is installed and working OK do you bring in Ubuntu.

Put the swap partition on the hard drive as well as /var and /tmp because those are written to constantly; moving those off the SSD will prolong the life of the SSD to match the HDD life, because older SSDs live much longer if you don't write to them constantly, and swap, /tmp and /var are the areas which are written to heavily.

(Note: Now that Linux supports TRIM, modern SSDs often outlast HDDs.)

Also put /home in an ext4 partition on the hard drive, for if the SSD fails for whatever reason it is much more difficult to recover data from it than an HDD.  Resizing the partition(s) created by Windows is easy, menu-driven, and painless.

/ (AKA root) takes up as much space on the SSD as you have available. Ubuntu should fit well into the 24GB you have available, since it typically is only 6GB, but if the / partition grows to take it all you can move some parts of the filesystem off to the HDD flexibly.

Other configuration modifications help as well, such as enabling TRIM.

Here's testimony which shows Linux LIKES SSDs... What about the performance enhancement when using an SSD as the main disk? and Setup for dual disk (SSD+HDD) with /home partition .


What happens after someone receives Ubuntu membership?

Here is essentially what happens.

Most people appear at the regional membership boards on IRC.

After you appear at the membership board, in the IRC session, they will ask you some questions related to your membership - logs of the IRC session I was at are here.

After that, what happens is something like this:

Someone adds you to the Ubuntu members group on Launchpad.
Sometime in the next 48 hours, a cronjob adds a @ubuntu.com email alias for you.
At that point, you can apply for the other benefits of membership such as a IRC cloak, add your blog to the Ubuntu Planet etc.


Viber notification is not in the right position

This has already been fixed, Install the following wrapper via PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install viberwrapper-indicator

Alternatively download the deb file, and install it manually:

Index of /nilarimogard/webupd8/ubuntu/pool/main/v/viberwrapper-indicator

After installation it will look like you want it:

Source:

Viber Wrapper Indicator Hides Floating Viber Icon, Adds AppIndicator Support ~ Web Upd8: Ubuntu / Linux blog

Related Pages:

GitHub: karas84/viberwrapper-indicator


Webex and its desktop share feature on 11.10?

webex says that Ubuntu 11 is not supported. So, you gonna experience many weird sad bugs... the most annoying one is the fact that after a while the sound stops for Ubunters 11. To get it back working again you've got to block/unblock the talker's microphone.

Well i gave up after some talks with Webex support. sad sad sad...


Don't upgrade using that method. Instead boot your normal system and run:

sudo apt-get -f install
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get -f install
reboot
sudo do-release-upgrade

You may need to run on a server sudo apt-get install update-manager-core.


Oh yes, you can use the nouveau driver, first delete nvidia, than the nouveau driver keeps left but unfortunately I discovered that games like pinball Emilia do not work anymore, I don't know why since nouveau has opengl.


How do I get my devices connected on port 8000 for SimpleHTTPServer

Try this: iptables -F and try to connect again to the port 8000, even if you have not changed your firewall, maybe your distro comes with a pre configured firewall.
The previous command makes a flush (-F) to the firewall's tables, all chains are cleaned, basically deactivate the firewall.

If you are working with ufw (Uncomplicated Firewall), use the following command: sudo ufw disable for do the same (deactivate the firewall) and try to connect to the port 8000.


GNOME keyring: prompt for password after screen lock

Is there a way to achieve this? A time-based setting similar to ssh-add -t <duration> would also work.

No. It is not possible to do that using gnome-keyring. It has a ssh-store, which picks up the default SSH identities and unlocks them on the first use. There is no way to get them "locked" again on the event of locking screen.

  Bonus: I have to say I don't fully understand the relationship between GK and ssh-agent (despite trying to parse available documentation). Considerations on whether using GK in this scenario is a serious security risk also welcome.

The gnome-keyring is just implementing ssh-agent interface. The gnome-keyring is application written to be secure the same way as the ssh-agent is. It has just a limited functionality.


The easiest way is to delete the partitions.

Run sudo fdisk /dev/sda

To create a new GPT header, press g followed by enter.

To create a new MBR header, press o followed by enter.

Exit fdisk by pressing w followed by enter.

This will create a new, clean, disk label, without any of the previous partitions. You will have to repeat it for each of your disks (sda and sdb in your case). This will obviously delete any data present on the disks.

If there's partitions you want to keep, you can delete the individual partitions used for the md device. In this case, run fdisk as above, but do not create new labels; use d to delete individual partitions.


What is the format of the Ubuntu sources.list file?

The format is exactly the same for Ubuntu.

You can get the Ubuntu distribution release names here. In sources.list use only the lowercased adjective part (precise, trusty, wily, etc.). Example:

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted

The components can be main, restricted, universe and multiverse.

More info: What's the difference between multiverse, universe, restricted and main?


For IntelliJ platform-based IDEs you can enable jayatana by using Help / Edit Custom VM Options menu and adding -javaagent:/usr/share/java/jayatanaag.jar to the end of opened config.


Did my updates in 12.10 break my display driver (nvidia)

You need to install the linux-headers-generic and linux-source packages so the nvidia proprietary drivers can install properly.

Get into login screen after booting.
Press Ctrl+Alt+F1.
Login with your username/password and run the following commands:

sudo apt-get purge nvidia-*

sudo apt-get install linux-source

sudo apt-get install linux-headers-generic

sudo apt-get install nvidia-(whatever version you want to install)
nvidia-xconfig

sudo shutdown -r now

You may have a weird post-grub screen (plymouth) but that is another bug. It should let you now login and setup your dual display properly.

You can also try Ctrl+Alt+T to open a terminal right after logging and so typing

software-center -> Will open ubuntu software center so you can install sources and headers-generic
software-properties-gtk -> Then navigate to other drivers and get back to Nouveau drivers or install whatever nvidia proprietary driver you want.


Ubuntu 16.04: Menu Bar (Sublime Text, Terminal, etc) missing

Open a terminal and type unity and hit return, after you have your desktop back close the terminal and reopen it normally. Actually i have the same problem on my second computer but i do this direct after boot up and have then menu bars everywhere. As far i know this is a known bug and a fix is in the making, just couldn't find the link anymore.


Although you are looking for a GUI solution, I would like to share a command line solution, because I think it is quite handy and easy to use:

tl;dr:

Use grep -w methyldopa *.tex | cut -d":" -f1 if all files are in the same directory.
Use find -name "*.tex" -exec grep -H -w methyldopa {} \; | cut -d":" -f1 in a directory, where all files sou want to find are in subdirectories.
Edit: Shortest Way (credits to @A.B.): grep -rwl methyldopa | grep .tex

long version with explanations:

First Case:

All files, you want to search are in the same directory.
This is the easiest scenario. You can simply use

grep -w methyldopa *.tex | cut -d":" -f1

to find all .tex files containing methyldopa.

Explanation:
Directory and file content:

file1.txt
file2.txt
file3.list

#file1.txt
foo
bar
foobar

#file2.txt
foo
foobar
1337

#file3.list
foo
bar
foobar

Now, you can use grep foo * to search for foo in all files. This is waht you will get:

file1.txt:foo
file1.txt:foobar
file2.txt:foo
file2.txt:foobar
file3.list:foo
file3.list:foobar

Using the -w option, will prevent finding foobar:

grep -w foo *

file1.txt:foo
file2.txt:foo
file3.list:foo

If you want to restrict your search to files with a special ending, you can do the following:

grep -w foo *.txt

file1.txt:foo
file2.txt:foo

Last, but not least, you can pipe the results to a cut command to extract only the filenames (-d":" sets the field separator to :, -f1 returns the first field of each line):

grep -w foo *.txt | cut -d":" -f1

file1.txt
file2.txt

Second Case:

Your files are in different directories. In this case, you should use find to find the files first:

find -name "*.txt" -exec grep -H -w foo {} \; | cut -d":" -f1

Explanation:

find -name "*.txt" searches for files ending with .txt in your current directory and all subdirectories. You can use something like find ~/Documents/ -name "*.txt" to start searching at ~/Documents.

-exec grep -H -w foo {} \; searches for foo in each file that was found and returns something like this (the -H flag makes sure, that the filename is printed):

./testdir/file2.txt:foo
./testdir/file1.txt:foo

Like in the first case, | cut -d":" -f1 cuts out the filenames from the output.


Unmounting dev/sda1 and downloading Ubuntu.iso problem

Make sure you dont have any data on hard drive(backup to some other place like external harddrive) before you follow this method:

I suggest to make boot-able DVD of windows first(you can buy a cheap DVD of 4.4GB from nearest store). link on how to burn DVD with ISO here
You can try downloading Ubuntu ISO using transmission .i.e. torrent link here
make bootable pendrive using "UnetbootIN" software from your present Ubuntu. burn the Ubuntu ISO to a pendrive. and boot into it.
After booting(now you are in live booted ubuntu not the installed one thats already on your PC), install Gparted and delete the whole harddrive and format it into NTFS. and shutdown the live session
now boot in to DVD on which windows in burned. Done. from there you can start installing it.

this time you wont get any error since your harddrive is NTFS.

if you dont have any data on harddrive, you can delete all partitions at the time of installation.
How to delete partition at the time of windows intallation ?
select the partition then you will see drive options(Advanced) click on it and then click delete. do this for all partitions.
after this you will get only one partition, click on it and click new and click next to proceed with the installation


after reinstalling ubuntu my previous home folder mounts as an externall drive

To achieve that you will have to set which partition gets mounted as /home. That involves editing your /etc/fstab.

First make sure your present home folder is empty. Then find out what is the partition name of your home drive, use sudo fdisk -l for that. I am going to assume its /dev/sdaX for this post, replace it with yours.

Then find out its uuid

sudo blkid | grep /dev/sdaX

Take note of UUID and TYPE. Now open your fstab file for editing

gksudo gedit /etc/fstab

Fill in a new entry like this,

UUID=xxxxx  /home  ext4  rw,relatime,data=ordered   0 2

Replace xxxxx with your uuid and ext4 with your TYPE. You could change spaces between columns as you see fit. Reboot your linux and you're done!!

IMPORTANT NOTE!
If you have a separate partition for /home already , you will have to remove its entry from /etc/fstab as you can't mount two drives to same folder.


Ubuntu 13.04 extremely slow on my desktop

You did not mention which graphics card you are using. Unless the kernel contains proper support for it, unity might fallback on LLVMPIPE rendering, which uses the CPU instead of the GPU. This mode, in my own experience, makes the UI very slow and unresponsive.

Check what mode is running with glxinfo:

glxinfo | grep renderer

glxinfo is part of the mesa-util package:

sudo apt-get install mesa-util

Check how supported your current driver is with unity:

/usr/lib/nux/unity_support_test -p

Check these previous threads:

How can I tell if I'm using LLVMPIPE?

Ubuntu 13.04 runs slow

https://askubuntu.com/questions/266613/ubuntu-12-10-desktop-is-too-slow


blackhole exploit kit - Linux Server Script

In cases of malware infection, the best way to eliminate it is to:

Backup everything
Remove everything and do a clean install (as in keep nothing)
Change all passwords and ssh keys.
Check the files you need from your backup, one-by-one.

The process is painful, but is 100% effective.

Install ubuntu server 12.04 since you're reinstalling. :)

UPDATE:

Here are some more info about the blackhole exploit kit: http://www.computerpartsgreenvillesc.com/secrets-of-the-blackhole-exploit-kit-revealed/
Try scanning your website with sucuri scanner: http://sitecheck.sucuri.net/scanner/
Here is a list of helpful applications and links for hardening wordpress:

https://code.google.com/p/wpscan/
https://wordpress.org/extend/plugins/wp-security-scan/
http://www.1stwebdesigner.com/wordpress/security-plugins-wordpress-bulletproof/


How can I back up Ubuntu partition before reinstall?

I am not really sure what you mean by "just bootup a portable linux drive".

If what you want is: hard-copy your sda2 into a usb and then eventually boot from it, it is probably possible.

What you can surely do is:

dd your sda2 to a key (be careful with the dd command and see here)
If you want to restore: dd it back to an appropriate sized partition
Boot up from a live usb key and run the boot-repair utility (this tells your GRUB to give you an option to load the system you cloned back)

I believe this should work even if you omit step 1 (e.g. you can instruct your grub to boot the system that is in the usb-key) but I never tried myself.

Also, maybe lookup something like "Install ubuntu from a USB key" (also see a possibly related thread).

A final word of warning: notice that you have a dual boot with win 8.1, therefore you might have a UEFI installation of UBUNTU, and  have a ESP partition that holds all of your boot files (also for windows). To check if this is the case look if there is /sys/firmware/efi directory as suggested by other users. Keep this in mind when working with partitions and with boot-repair.


Recursively search for RAR files and extract them, once extracted, remove them

Tack another -exec predicate (with rm inside that), which would only be run if the first one succeeds:

find . -name '*.rar' -exec unrar e {} \; -exec rm {} \;

-exec rm {} \; will only be run to remove the .rar file if the unrar-ing succeeds (-exec unrar e {} \;) i.e. unrar returns with exit status 0.

You can also do this using bash, using globstar option to recursively match glob pattern (*.rar), and rm each file if unrar-ing is successful:

shopt -s globstar
for f in **/*.rar; do
    unrar e "$f" && rm "$f"
done


How can I solve Unable to lock the administration directory (/var/lib/dpkg/)

search for processes. Since Ubuntu 16.04, "apt" is used instead of "apt-get"

 ps -A | grep apt-get

or

ps -aux | grep 'apt-get'

or

 ps -A | grep apt

then see if there any process running as apt-get/apt

kill that process it by using:

sudo kill -9 <process-id>

for example if process id is 2345

sudo kill -9 2345

then run the sudo apt-get update

Edit: If you are sure that you have no instances of dpkg or apt running and you still get the message, you can just delete the file:

sudo rm /var/lib/apt/lists/lock

A lock file is just a file with zero size that indicates locking of a resource.

Update:

As of Ubuntu 16.04 release, apt-get was replaced with apt.  The running process can be located with:

ps -A | grep apt


How to invoke kernel with serial console?

There is nothing special in 12.04. Just follow the information from: https://help.ubuntu.com/community/SerialConsoleHowto

1) Paste the following into /etc/init/ttyS0.conf

# ttyS0 - getty
#
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]

respawn
exec /sbin/getty -L 9600 ttyS0 vt102

2) Ask upstart to start the getty

sudo start ttyS0

This will get you access to console. To get access to Linux init console, configure grub.

1) Edit /etc/default/grub to contain the following lines

GRUB_CMDLINE_LINUX="console=tty1 console=ttyS0,9600n8"
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"

2) update grub

sudo update-grub

I am using 9600 just because I am using a server where the BIOS is already redirected over seria using 9600. If you don't care about the BIOS settings, feel free to use a faster serial line.

Enjoy!


VSCode cannot launch in ubuntu14.04 with vnc access

Ubuntu 18.04's tigervnc-server apparently no longer suffers from this problem.

However, as to your case, you would need to say exactly which steps you followed to see why the libxcb.so.1 workaround failed...


Step 4 in that tutorial is instructing you to create that file (/etc/init.d/vncserver). This is how you will make the VNC Server as a service. The person that wrote the tutorial chose poor words, he meant to say:

  Login as root and create /etc/init.d/vncserver and add the following lines:

So, in order to complete the tutorial, just create the file and paste the text mentioned in the tutorial. To do that, you can just type in the command:

touch /etc/init.d/vncserver && nano /etc/init.d/vncserver

This will create and open the file in an editor. Copy and paste (paste by Ctrl+Shift+V) or type it up if you're on a desktop-less Ubuntu.

I suspect that you might also need to create the next file (/home/vnc/.vnc/xstartup) if doesn't already exist.


It's mater of taste, however from security reasons, I think it's better to have more users. Why? Because even "internal workers" of your company may have different works so they need different privileges. It's always better to give only the minimal rights for a given function/program/user/etc which is just enough. If you have only one user for more people, you may need to give more rights, so many people using that single user will have more rights than they need. It can be an issue if that account is cracked, or even if a worker make a mistake like removing files, etc, many examples can be mentioned. Also the worker itself can be an enemy (it's quite usual think in the IT ground ...) so it's better to separate people/their rights etc. I guess it's not an Ubuntu specific topic, it's about all OSes. That's also a reason that Ubuntu - unlike many other Linux and/or UNIX distributions - don't have root user by default (cannot be logged in, since no valid password): it's quite dangerous to log in as root, since you (or anybody who managed to log in ...) have "unlimited" access. It's always better to have more fine tuned security system than "all or nothing".


Iptables firewall rules not restoring on server restart

Your method is the hackish method.

You should consider installing the iptables-persistent package which automatically will handle loading up of iptables rules at boot.

This will store rules in /etc/iptables/rules.v4 and /etc/iptables/rules.v6 and will load at boot.  Make revisions to those files and restore from those if you edit your rule sets.


This is not an Ubuntu problem. Check your printer's settings. Most probable it is set to print multiple pictures on the same sheet. Look for N-page Up setting or similar.


I have installed Brasero 3.4.1 into Xubuntu 12.04 and everything works well. It could be one of the Brasero plugins, blocking the process by sitting in a hidden dialog. Try following:

completely remove brasero

sudo apt-get --purge remove brasero*

and you can let it like this and install k3b or install brasero back again

sudo apt-get update
sudo apt-get install brasero

or use Ubuntu Software center


LAPTOP battery draining faster without overheating issue

You can use powertop (sudo powertop) to see your biggest energy consumers, and to check (under "Tunables") if laptop-mode-tools/TLP are working properly - most parameters are supposed to switch to "Good" once the laptop is unplugged.

Some minor parameters (like VM writeback timeout, swappiness etc.) which are not auto-adjusted can be adjusted manually. Google will help you to find out how.

However, if your laptop has AMD/Nvidia graphics, power drainage is probably caused by the opensource X graphic driver. In which case, as much as we all like opensource, you have no option but to install proprietary video drivers (fglrx/bumblebee respectively). You will easily find the how-to's on the web.


I've accidentally re partitioned my hdd and can't open cub liniuc. How can I recover it using an Ubuntu live disc?

DON'T write anything to that disk for now!

Boot from a Ubuntu Live DVD/USB and install testdisk and see if you can recover.

Go here for instructions... http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step (Archived link)


Is there a "Close Without Saving" shortcut?

I have not found a system-wide shortcut (even on OS X, the shortcut may change depending on the application), but there is a way to find the right shortcut for each prompt:

When the prompt appears, hold alt and look at the underlined characters (as you would for an application top menu). Of course, we are interested in the "Close without saving" option since in general "Cancel" maps to escape and "Save" maps to enter/space.
Use alt+[underlined character] to select the corresponding option (as you would to open a menu in an application). Do not mind upper case.

Alt mode in Sublime Text: alt+w for the 1st option

Note for those wondering how I could print screen while holding alt: you can either press alt just before the system screenshot is taken, or hold alt from another window of Sublime Text to show underlining (in Sublime Text all windows refer to the same prompt) and then click outside the application to cause a graphical bug that freezes the underlining. I did the latter and used Shutter to take the screenshot.

If the text is "Close without saving", odds are the magic character is w. If it is "Don't save", probably d as in many Mac applications, but not always (see examples below.)

Some applications are also kind enough to active alt mode automatically, i.e. you can see the magic characters underlined from the beginning and just have to type it to choose the option (without holding alt).

Some examples below:

Sublime Text: Close Without Saving
Text Editor: Close without Saving
Inkscape: Close without saving
Libre Office: Close without saving (permanent alt mode)
ThunderBird: Don't Save
Geany: Don't Save (permanent alt mode)
Leafpad, Ted: No

Alternatively, you can navigate in the prompt using the left/right arrows and tab/shift+tab, then select the highlighted option with enter/space. However:

some applications make you highlight the prompt message when using tab, and the "close without saving" option is on the far left while the default selected "save" is on the far right, meaning you need to use either tab or the arrow keys twice before pressing enter/space. (Ex: Sublime Text)
the "Close without saving" option is sometimes on the left, sometimes in the middle, so be careful. With Ted, you even have Yes - No - Cancel in this order.

Therefore I recommend the second method only when dealing with less common prompts such as Ted's, where navigating once to the right is faster than checking the magic character and using it.

Screenshot text: from The Bourgeois Gentleman, new translation by Timothy Mooney


I purged the quantal packages (linux-image-generic-lts-quantal, linux-generic-lts-quantal) and ran apt-get update then upgrade. All is well.


wired network connection in xubuntu not working with r8169

You can try to install another driver for this Ethernet card
sudo apt-get install r8168-dkms

If that does not help, check the cable, contacts on both sides.
Expanaition
Realtek Ethernet RTL8111/8168 adapters are generally supported out of the box by Linux kernel. There is r8169 module for that. In most cases it works well.
But some hardware revisions of these adapters may not be well supported yet. It may result in packet loss ar inability to connect, like in this case. It should be reported as a bug to kernel maintainers.
As a workaround a driver developed and maintained by Realtek engineers can be used. It is available in Ubuntu repositories as r8168-dkms.
This package blacklists r8169 and installs r8168 instead. If it is removed, r8169 is restored.


Why my newly created account is asking for a pasword if I didn't set one?

This is because you haven't set a password yet. Login to your admin account, and go to System Settings

Then click user accounts, and unlock it.
Click the user you just created, then click the Account Disabled under Login Options.

Chose one of the 3 options from the drop down menu (Set a password now, Login without a password or enable this account). They will, respectively, ask you to enter a new password, not need one when logging in to the new account (just press enter to login in at the login screen) and ask for one when you first login.

Finally, click the lock button.


PHP interactive interpreter: Delete and Ctrl +Aarrows keys don't work properly

For those who are still experiencing this issue, I raised a bug at php.net and got an answer there - https://bugs.php.net/bug.php?id=65191&thanks=6

My ~/.editrc:

    bind \\e[3~ ed-delete-next-char
    bind \\e[1;5C vi-next-word
    bind \\e[1;5D vi-prev-word


VLC can play .swf videos.  You can install it from the Ubuntu Software Center.


I'd use a 3rd party repository that provides the legacy driver along with downgraded Xorg that is compatible with the driver:
http://www.unixmen.com/ubuntu-12-10-and-amd-catalyst-problem-solved/


What Password do you Use When you're Installing Software on a Virtual Machine running 13.04?

The password which you are looking for is adminuser as mentioned here


Why is your system not booting in the normal mode? Do you see any errors or indications why it failed?

You can install software in the recovery mode, but there are a couple of things to keep in mind:

Only / is mounted, so if you have a separate /var, /usr, /home, you need to mount then yourself
Filesystems are mounted read-only, so you need to remount them using sudo mount -o remount,rw /
Drivers for your network card or wireless interface may not be loaded

Packages installed in the recovery mode do persist in the normal mode.


Where can I get the source code for "Ubuntu for phones"?

You can follow the instructions for building Ubuntu Touch from source from this wiki page.

Building from source is quite an involved process, involving getting Android drivers and flashing a mobile device, which is why I'm not going to attempt to summarise it here. Just follow the link, it's a wiki so hopefully it will be kept up-to-date.

If you just want to try developing Ubuntu Touch apps on your desktop, you don't need to build Ubuntu Touch from source, you just need the Ubuntu Touch SDK.


This question ist quite old and this answer is likely to come late to help during your vacation, still it deserves an answer as you might travel again (and it shows up on google).
I'd suggest to use mosh which is specifically designed for unstable connections, it even survives changing IP addresses. Just install it on your client and server (e.g. apt install mosh) and you are good to go mosh your.server.com.
Alternatively, or in addition, I'd suggest to look at tmux which allows you to open a session that is kept open with all output and all running processes on connection loss (and on explicit disconnect of course). This allows you to reconnect and continue from where you have been or where the running processes has taken you while being disconnected.
Just install it on your server (e.g. apt install tmux) and open a new session with tmux. On connection loss, reconnect to your server, list open sessions with tmux ls and connect to the desired one using tmux attach -d -t <session id from tmux ls>.
tmux is extremly feature rich, see the man page or google for all the glory bells and whistles.


Just upgraded to 20.04.1 LTS and some accentuation is gone

I've found the solution in this answer: https://superuser.com/a/1235405/98798
Basically, you need to tell gtk config files is not loading the cedilla module when using the English locale.
So we change the gtk files to tell it to do it, with these two commands:
sudo sed -i '/^"cedilla/ { s/" $/:en"/; }' /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache
sudo sed -i '/^"cedilla/ { s/" $/:en"/; }' /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache

And make sure you have these two lines in /etc/environment:
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla


Why Do I Have So Many Dbus Processes Running?

Unless these deamons are consuming a lot of CPU or other resources there's no cause for alarm.  I believe the cups service is in play here.  Perhaps you have a lot of printers in your environment.  Or a lot of print jobs running.

you should have a half dozen or so dbus processes running but rarely executing on a home computer.  More on a machine being used as a print server.

The following command will tell you more about who owns these daemons:

ps -ef | grep dbus

I'm guessing it's cups.  Since you have no printers connected you can try stopping cups:

service cups stop

There are other services that communicate using dbus but since lp owns the process in this case, I'm assuming it's cups (or SMB / Samba) that's in play.

Before you disable anything, go into system settings->printers and verify that in fact you do not have any printer connections set up.


18.04: How to disable swap memory? fstab shows no swap; where does it load from, and how to disable it?

Swap is not in RAM (unless you use ZRAM which allows you to use CPU power if you are short on both RAM and disk space for swapping); it's in a swap file or swap partition.  Swap is explained in https://help.ubuntu.com/community/SwapFaq and  https://opensource.com/article/18/9/swap-space-linux-systems and in greater detail at https://www.kernel.org/doc/gorman/html/understand/understand014.html .

It's highly recommended to have a swap partition if you have added Hibernation to your system or use ZFS; otherwise, a swap file is much easier to manage and, ever since kernel 4.13 (i.e., Ubuntu 17.10), is just as fast as a swap partition.  Not having a swap file can lead to disk thrashing and performance problems.


Change KDE Task Switcher thumbnail selected color

KDE Plasma

The KDE task switcher is part of the plasma desktop so it is using the Plasma desktop theme elements.

The plasma theme elements are SVG pictures.

By the Plasma Theme Details: http://techbase.kde.org/Development/Tutorials/Plasma/ThemeDetails the viewitem.svgz is

  viewitem.svgz: controls the background look of selections (results in
  KRunner, networks in network applet), it can have 4 elements of 9
  parts each with prefix normal, hover, selected, selected+hover.

Making and editing the KDE plasma themes: http://techbase.kde.org/Development/Tutorials/Plasma/Theme


Duel boot ubuntu won't boot after install with Win 10

Try pressing fn+f2 or f12 or even f8 depending on your make/model and changing the boot manager in settings. If you can't find grub, try writing the grub super disk iso to a usb flash drive and booting from it, then installing grub onto the mbr partition.


Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7

Have you tried following advice in the error message and actually reading man kernel_lockdown.7?
Let me quote:

Certain facilities are restricted... Unencrypted hibernation/suspend to swap are disallowed.

That pretty much sums it up: enabling swap encryption should fix the problem.


Can anyone help me install Tp Link TL-WN722N?

The

0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n device

is natively supported by the 5.4 Linux kernel and doesn't need any drivers.

See https://kernel.ubuntu.com/git/ubuntu/ubuntu-focal.git/tree/drivers/net/wireless/ath/ath9k/hif_usb.c

You were trying to install a driver for a completely different RTL8188EUS device. Also that driver is obsolete anyway as you can see at the top of the manual. It is for Ubuntu 16.04 with the 4.13 kernel.

It won't install to 20.04 either way.


why do all bad hostnames resolve to 198.105.254.23?

This is your ISP (in this case, Centurylink) trying to be helpful and resolve all unresolvable domains to a "helper" page that shows you a list of search results

According to their "Why am I here link?":

  The CenturyLink Web Helper service provides helpful search results to
  our customers when they would otherwise encounter web address errors.
  You are seeing search results offered by the CenturyLink Web Helper
  service because you clicked on an invalid link or entered an invalid
  Web address into the address bar of your browser. Misspellings and
  typing errors frequently cause these errors. In instances where the
  site you were looking for is clear, you may not see this page at all.
  Instead, the service may take you directly to the site.


I installed Xubuntu and can't find how to make a bootable usb on it to unstall Ubuntu

You could also use "Startup Disk Creator". This comes with the standard Ubuntu desktop but you should be able to use apt-get to install it in other flavours.

sudo apt-get update
sudo apt-get install usb-creator-gtk


An error has occurred when creating debian packaging

I had some problems with Quickly, could you try the next?

Rename your folder.
Create again the project with quickly.
Copy all files from the renamed folder to the new project.
Try again ;)

Between the 2º and 3º step you must configure the branch:

quickly configure bzr lp:~launchpadUserName/launchpadProject/trunk
quickly configure ppa launchpadUserName/launchpadProject


Run a GUI program at startup on top of X with no window manager

I remember way back I had to set up my own X stuff by writing a .xinitrc file and running startx. I suspect that won't work well with modern xorg/distros.

Alternatively, I notice that there's a file named /etc/X11/xinit that just launches the X session manager. I expect you could just edit that to do something else.

BTW, I think you probably do want a window manager or you might have trouble with Firefox. The default one is named x-window-manager.

Ok, here's a better answer ....

Create a new file,  ~/.xsessionrc:

STARTUP=

Create a new file, ~/.Xsession [Note the capital X]:

x-window-manager &
firefox

Logout, and login again.


The problem is you are trying to run a network daemon, and this line is the main problem:

unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITING

First suspect is if you are root or not; low ports are not for non-root users.
The second is it seems also ntpdate is running as damon after install: "ntpd unable to bind to wildcard address 0.0.0.0 - another process may be running"

If your system is already running ntpd, ps ax|grep ntp shows that?
If so, stop it with

sudo service ntp stop

before running

ntpd -g -q


What you are referring to is an OEM install.
See Ubuntu OEM Installer Overview in the Community Wiki.


You have to install the Virtual Box Guest Additions.


How to install the latest versions of LAMP componanents

You can install lamp server by just running,

sudo apt-get install lamp-server^

(Please see this answer for an explanation.)

Then you can copy your files into /var/www folder and view through browser in localhost. Since copying files into /var/www folder needs privileges and annoying you can change that directory to your own one.

you can replace "/var/www" string in following files into your own directory path and then you can use new directory as your www folder.

/etc/apache2/sites-available/default
/etc/apache2/sites-available/default-ssl

After changing contents of the above files, run

sudo /etc/init.d/apache2 restart

to restart webserver. Then you will be able to use new directory as the web folder.

Hope this helps.


Unfortunately, Empathy does not support custom emoticons. You would be better off using pidgin .


How to exclude mask images while extracting images from PDF?

I know that I'm late to the party, but here are my two cents:
1) Extract all the images (regular images and smask images) with pdfimages

pdfimages -j file.pdf images/image

2) Obtain the smask names and remove them (beward of the zero leading names)

pdfimages -list file.pdf  | grep smask | column -t|awk '{print $2}' | xargs -I '{}' printf "%03d\n" '{}' | xargs -I '{}' rm images/image-'{}'.ppm


Commands in terminal and Nautilus hang without explanation after update 14.04 (02/14/2015)

I've searched the Internet and I've found that is realated to samba indeed, as you stated

  If i disable (-x) the init.d scripts for samba and samba-ad-dc the
  problem disappears, but i haven't touched their config since many
  weeks so i don't think samba is the real problem (although i never saw
  the samba-ad-dc script before.. Is it new? file-date: april-1-2014)

Try to follow this fix from Ubuntu Forums

  Do not ever use gadmin-samba again for as long as you live.
  Purging the "samba" package will not resolve your discombobulated
  smb.conf file since that file doesn't come from the "samba" package.
  Restore a factory fresh copy of smb.conf:

  Make sure the following file exists: /usr/share/samba/smb.conf
  Make a backup of your current smb.conf

  sudo cp /etc/samba/smb.conf /etc/samba/smb.confMOD

  Start with a fresh one:

  sudo cp -a /usr/share/samba/smb.conf /etc/samba/

  Correct one mistake in the new one: Find the line:

  encrypt passwords = false

  and change it to:

  encrypt passwords = true

  Restart samba

  sudo service smbd restart

SOURCE


How to preseed installation whithout formatting and mounting a specific partition?

You'll want to use a partman-auto/expert_recipe, but change the attributes for the partition you don't want to have formatted to method{ keep }.  You need to remove format{ }, filesystem{ }, and use_filesystem{ }.

You will also want to add the following lines to your preseed file:

partman-basicfilesystems partman-basicfilesystems/no_mount_point boolean false
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

Here's a link to the example preseed file for Ubuntu 12.04.  Example configuration is included there for several types of setups.


Unable to use java compiler even after installing

It's not a Java problem, it's a NetBeans problem. Open the terminal and type:

sudo apt purge netbeans
sudo apt install netbeans

Tools -> Options -> Java -> Nashorn tab -> select Java Platform

You can edit the path to the Java executable by clicking the Manage Platforms... button in the above screenshot, and editing the field  after where it says Platform Folder which is marked by the mouse cursor in the below screenshot.


Setting up ultrawide (3440x1440) 34" monitor

My laptop have only usb-c ports so I'm using a multi port adapter to connect the HDMI cable which unfortunately doesn't support fast refresh rate (I suspected that). I updated the refresh rate using xrandr and I find out that it can go above 35Hz. At least I can use this super resolution!


High CPU load for 1:30 minutes when mounting ext4-raid partition

suggest the following exercise.

Dont mount the raid partition on boot and see what else is taking up time. If without raid its taking time then we know who is the culprit.


I would say go into your BIOS settings (by mashing the "F" keys, or press the right one if you know which to press). then disable secure boot. then also you should switch from UEFI boot to the other option (maybe "legacy" or "CSM" depending on your motherboard). make sure to set cd or usb to be higher priority on the boot settings (depending on whether you are going to boot from cd or usb). save and exit. you can try to install ubuntu when it comes up, but i am going to disappoint you here: you most likely wont be able to dual boot. it will probably not detect windows 8 in the installer. this is what happened to myself, and i dont know a way to get around it. it may be different on yours but im just warning you. thats all you need to know probably.
hope this helps


I am stuck in the same situation but I know one thing for sure that you can modify the %gconf.xml file directly using

sudo nano <config file path>/%gconf.xml

which should be located in any of the following locations

~/.cache/iptux

~/.gconf/apps/iptux

~/.config/iptux

I did modify the file but when I restart the system it seems to have reverted back to the original.

The entry in the file that you need to look for, to modify is:

name="hide_startup" mtime="1343670281" type="bool" value="true"

change it to:

name="hide_startup" mtime="1343670281" type="bool" value="false"

I believe, the reason for the file reverting back to the previous state is that iptux process must be running in the background and hence not allowing changes to the file.

What I am looking for is a way to kill the iptux process before modifying the config file, but can't find a process for iptux.

Will research it a bit and let you know if I find the process name.


sudo apt-get -f install

Have you tried running this command in terminal? This should help.


Ubuntu temporarily freezes and then highlights text when unfreezing

I have a recent problem with intel and Nvidia graphics card. My system crashed tty7 many times.

when your system come to low energy, use intel, and when use maximum
Performance take Nvidia.

Try to see a YouTube video and unplug power freeze?

try to keep at maximum performance on energy options freeze?

The only solution I have is decide what you want to use and uninstall the other driver. (Nvidia or intel)
That works for me.


Editing/Viewing KDE activity config files

You can use sqliteman as a GUI tool for accessing generic SQLite 3 files (http://sqliteman.com).

Kexi currently supports SQLite-based files it created.


Ubuntu 14.04 unknown (external) monitor every time after reboot

I had the exact same problem with one of my monitors as well.  The best suggestion I can give you would be to put those commands into a script file.  I named mine fixres.bsh and put it in my home ~ directory.  Using your code below, I added the interpreter line as the first line, then added your code.

#!/bin/bash
xrandr --newmode "1680x1050_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
xrandr --addmode VGA1 1680x1050_60.00

After you create the file, make it executable:

sudo chmod +x fixres.bsh

then add it to your start up.

Press the SuperKey (Windows Key) on your keyboard to bring up the dash, then type in startup applications to find the Startup Applications app.

Then once in the app, click the Add button

The add the following line to the command:

bash -c "sleep 5 && /home/username/fixres.bsh"

I like to give it a sleep of 5 seconds at startup to allow other applications to complete loading.

Click Save when completed and close the Startup Applications app.

Hope this helps!


Neil's solution of sudo mdadm --assemble --scan worked, but didn't stay around when I restarted.

The solution is to create a file /etc/init.d/mountraid with the following contents

#!/bin/sh

# scan for raid partitions
sudo mdadm --assemble --scan

# mount the drive here, using either mount or ntfs-3g

Then run sudo chmod 755 /etc/init.d/mountraid to allow it to be executed.

Finally, sudo update-rc.d mountraid defaults runs it on every boot.


If I want 8GB swap, am I supposed to select 8000MB or 8192MB when selecting size?

TL;DR: It does not really matter.

RAM is universally measured in powers of 2. This is often written as GiB, so 8GiB is 8*1024=8192MiB RAM.

If you look at physical RAM chips they'll always come in powers of two, e.g. 1024MiB, 2048, 16384MiB etc.

Hard drives are typically measured in powers of ten, using SI prefixes, for instance, 80GB = 80*1000MB.

So 8GiB of RAM is 8192MiB of RAM. For swap, you typically want a swap space that is big enough to hold all of RAM for suspension, so 8192MiB would be the safe option. Note that it really doesn't matter, as Linux will almost never use 100% of RAM anyway; a lot will be used for caching and so on, which will not be saved when you hibernate.


How to personalize Scopes in Ubuntu Mobile at Aquaris M10 tablet?

With one of the scopes open, swipe up from the bottom of the screen. You'll see the list of scopes starting with the enabled ones. Click on the star on the right to toggle whether a scope shows or not.

The sources contributing to each scope can also be changed with the settings button you found. If the source you're interested in is not available perhaps you could use the RSS scope?

More scopes may be found in the Ubuntu store but the selection is not exhaustive (yet)