As JanC already hinted at, the snap version of nmap has an issue with opening network devices when it is run as root. After removing the snap version and installing the aptitude version it worked as expected.


Set Openbox to be readable on a QHD screen?

I think if you just look in your .i3/config you'll find the answer:

  Font for window titles. Will also be used by the bar unless a different font
   is used in the bar {} block below. ISO 10646 = Unicode

    font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1

  The font above is very space-efficient, that is, it looks good, sharp and
   clear in small sizes. However, if you need a lot of unicode glyphs or
   right-to-left text rendering, you should instead use pango for rendering and
   chose a FreeType font, such as:

    font pango:DejaVu Sans Mono 10

If you just choose a larger font, everything becomes more readable:

    font pango:DejaVu Sans Mono 30


Error pop ups appear everytime I log into Ubuntu

Apparently all I had to do was to delete all the files of crash reports with

sudo rm /var/crash/*

Apparently it was because there were some reports that were not being properly deleted automatically, and they were detected as new ones every time I rebooted.


force your desired resolution in grub

sudo nano /etc/default/grub

Find this line

#GRUB_GFXMODE=640x480

change it to

GRUB_GFXMODE=3200x1800

then rebuild the frames and update grub

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-initramfs -u
sudo update-grub

tell us if this worked.

**EDIT:

if the problem is about the login screen resolution only, read here


It seems there is no priority or a single setting point to set which freedesktop notification daemon to run. I got such problem with XFCE installed on Ubuntu 14.04.

Unity notification launch xfce4-notifyd as it was  the default.

Check for available notification services, example:

$ grep -r org.freedesktop.Notifications /usr/share/dbus-1/services/
/usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service:Name=org.freedesktop.Notifications
/usr/share/dbus-1/services/org.freedesktop.Notifications.service:Name=org.freedesktop.Notifications

Disable non needed ones, leave only the one you want:

sudo mv /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service.disable

pkill xfce4-notifyd

Check

notify-send test

Unity notification style back (notify-osd)

Another way, Unity does not launch any default notifications daemon. So you can add the one you like to startup applications. See How do I start applications automatically on login?. I think it's better because it does not affect other desktop session that relays on the service file to start their notifications daemon.

Helpful Reference:

ArchLinux Wiki: Desktop notifications


I want to get one wallpaper on two monitors streched, i have both of the monitors working fine. ubuntu 12.04

You can use a simple application called nitrogen

sudo apt-get install nitrogen

give the path to your images folde when launching nitrogen

nitrogen /path-to-your-images-directory


Partial distribution upgrade 14.01 to 14.10 lost permissions to do anything

I would verify that /etc/apt/sources.list is set for utopic.

Then I would apt-get remove every package that has unmet dependencies when apt-get dist-upgrade launched. (so, remove libcogl15)

System should not be restarted when some essential packages like linux-image, core-utils, etc are not installed (otherwise there will be some fun with booting from USB and using chroot to install packages; or plain reinstall). But I think that it won't go so far.

Then, after successful apt-get dist-upgrade, I would clean up unused packages (it is apt-get clean, maybe).

If it destroys the desktop environment, then it can be brought back by installing the ubuntu-desktop package.

If something is missing, then search/install as usual.

If lots of stuff is missing, then there is a list of packages from which the Ubuntu 14.10 Install ISO image is made. Install them all.


Assumptions:
1. Ubuntu 18.04
2. lightdm is installed via sudo apt install lightdm

*steps to achieve

make your .png image ready.
resize the image some thing like 100x100pixels or 50x50pixels anything but compare to the original size 22x22 pixels or rectangular shapes also Ok and rename it as ubuntu_badge.png

*22x22 Pixel size is highly recommended.

open the folder /usr/share/unity-greeter
take backup of the file ubuntu_badge.png anywhere and delete it.

paste the image which is our preferred one in step 2.
close & reboot to see the change.

example pics:


Yes, see How do I enable the "Scale Window Title Filter" in Compiz on 12.04?.

You can then use Window Key-W and start typing to get that effect.


Can I control the position of a console window on the screen?

There are X server extensions that allow a program to specify where a window it creates should be drawn.  I don't remember these off the top of my head, but given that it's part of the X libraries (which are presumably used directly or indirectly if the program is creating windows) they should be easy enough to find?

If, on the other hand, this is a console application looking to change the position and/or size of the virtual console from which it is launched... my understanding is that there is no system for doing so.  It's possible to discover its dimensions and terminate with a message if it's too small, but actual direct control is not possible.  This is because a console application could well be run in a dumb text console without the X (GUI) server running at all.

All that said:  I think this question would possibly be more at home on Stack Overflow than on Ask Ubuntu?


Install Windows 10 on a partition with ubuntu 16 already installed

GRUB (GRand Unified Bootloader), as far as i'm aware, is a pre-OS boot loading package that allows you to select the OS you wish to use.

I imagine that a lot of people are saying to partition your drive and install windows. That way, GRUB should detect both systems and give you the choice on boot (with a simple UI) of which OS you want. The issue with this is Window's own bootloader will boot Windows instead of allowing GRUB to allow the selection, or cause conflict with GRUB.

This can be got around by repairing GRUB after the windows installation. This can be done by booting from a Ubutntu Live CD/DVD/USB. This is probably the reason why people are saying to install windows, then Ubuntu, as Ubuntu's version of GRUB would then be the primary bootloader.

I imagine the below link may help if you want to keep your current Ubuntu partition and install windows, but repair GRUB:
Recovering GRUB after installing Windows 7?


How do I reduce the font size on tabs in Chrome in Ubuntu?

Click with the right button of mouse on the Chrome shortcut and "Properties".

Use this:
chromium-browser --force-device-scale-factor=0.5

Now you can scale whatever you want, even bigger shit like factor=2
:D


"Recent Files" entries via command line apps?

Unity uses a system called Zeitgeist for managing that kind of data. There are two proper ways to add things:

Your Python scripts can add Zeitgeist entries using the higher-level Python API.
Your shell scripts can use dbus-send to work with the lower-level D-Bus API.

However, I can't give an example because I haven't yet used either. (I use Lubuntu normally and I only know about Zeitgeist because my brother asked me to figure out how to clear out the Recent list in the Unity Dock)


Update 2020-07-16: This may not work with Ubuntu flavors that have moved away from the Ubiquity installer (eg. Lubuntu which now uses  Calamares) because some of those installers go so far as to deactivate LVM partitions that they did not, themselves, configure in the pre-installation process. Thus, making unavailable the partitions that were configured for system installation.
How to accomplish this with LVM and a single encrypted partition##
Warning
First of all 128M is too small for boot! I use 1G. Otherwise, what is bound to happen is that you may forget to remove old kernels and /boot will fill up, and you'll have to deal with the pain of trying to remove old kernels from the system so that you can get apt or apt-get to work again. Even with 1G, make sure you remove old kernels from time to time.
The next steps are not intended for novice users.
UPDATE: I have created a script that will perform the following operations for you and more! All you have to do is run it from the Live OS before installation. You can find a write-up on my blog.

Pre-installation from live OS
You want to setup LUKS and LVM while manually partitioning! I tested this on Ubuntu 16.04.2 / 18.04 / 20.04
Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/sdb.

Partition the drive with your tool of choice: I used fdisk to set mine  up on an msdos partition table as follows:

other partitions: existing OSs -- we don't care about these
sdb1: /boot (1G)
sdb2: LUKS partition (the rest of the disk)

Setup LUKS

sudo cryptsetup luksFormat --hash=sha512 --key-size=512 --cipher=aes-xts-plain64 --verify-passphrase /dev/sdb2
sudo cryptsetup luksOpen /dev/sdb2 CryptDisk
While not necessary, it is a good idea to fill your LUKS partition with zeros so that the partition, in an encrypted state, is filled with random data. sudo dd if=/dev/zero of=/dev/mapper/CryptDisk bs=4M BEWARE, this could take a really long time!

Setup LVM on /dev/mapper/CryptDisk

sudo pvcreate /dev/mapper/CryptDisk
sudo vgcreate vg0 /dev/mapper/CryptDisk
sudo lvcreate -n swap -L 2G vg0
sudo lvcreate -n root -L 10G vg0
sudo lvcreate -n home -l +100%FREE vg0

Installation from live OS

Now you're ready to install. When you get to the "Installation type" portion of the install, choose the "Something else" option. Then manually assign the /dev/mapper/vg0-* partitions as you would like to have the configured. Don't forget to set /dev/sdb1 as /boot. the /boot partition must not be encrypted. If it is, we won't be able to boot. Change the "Device for boot loader installation" to /dev/sdb, and continue with installation.
When installation is complete, don't reboot! Choose the option to "Continue Testing".

Post-installation configuration from live OS
This bit is really important if you want your system to boot! I spent quite a bit of time researching this to figure out these post-installation steps. In my case I was actually doing it because I wanted to customize the size of /boot on /dev/sda, but all that work should carry over to your situation as well.

In a terminal, type the following and look for the UUID of /dev/sdb2. Take note of that UUID for later.

sudo blkid | grep LUKS
The important line on my machine reads /dev/sdb2: UUID="bd3b598d-88fc-476e-92bb-e4363c98f81d" TYPE="crypto_LUKS" PARTUUID="50d86889-02"

Next lets get the newly installed system mounted again so we can make some more changes.

sudo mount /dev/vg0/root /mnt
sudo mount /dev/vg0/home /mnt/home # this is probably not necessary
sudo mount /dev/sdb1 /mnt/boot
sudo mount --bind /dev /mnt/dev # I'm not entirely sure this is necessary
sudo mount --bind /run/lvm /mnt/run/lvm
(Only if you're using EFI): sudo mount /dev/sd*/your/efi/partition /mnt/boot/efi

Now run sudo chroot /mnt to access the installed system

From the chroot, mount a couple more things

mount -t proc proc /proc
mount -t sysfs sys /sys
mount -t devpts devpts /dev/pts

Setup crypttab. Using your favorite text editor, create the file /etc/crypttab and add the following line, changing out the UUID with the UUID of your disk.

CryptDisk UUID=bd3b598d-88fc-476e-92bb-e4363c98f81d none luks,discard

Lastly, rebuild some boot files.

update-initramfs -k all -c
- update-grub

Reboot, and the system should ask for a password to decrypt on boot!

Special thanks go to Martin Eve, EGIDIO DOCILE, and the folks at blog.botux.fr for tutorials they posted. By pulling pieces from their posts and doing a little extra trouble shooting, I was finally able to figure this out.
I tried this a number of times and failed over and over. The bit that I had to work out for myself based on error messages was sudo mount --bind /run/lvm /mnt/run/lvm


I'm going to take a wild guess here (because I've had it too with my first 64GB USB stick) that these sticks may need exFAT.  Try installing exFAT support first, and see what it does: apt-get install exfat-fuse.  Try inserting them again.

Alternatively, run the "Disks" program, and give me a screenshot of the USB disk in question.

The 2TB disk drives should not have this issue, because they will not use exFAT.  They will most likely be formatted NTFS these days.

Granted.  Wild guess based on experience, given the limited amount of information you give.


Preview ascii files in file explorer (eg nautilus) like in windows 8 under Ubuntu?

Dolphin has this exact feature, and with a lot of options. The size of the preview can be adjusted quickly simply by adjusting the width of the side panel, showing as much as the entire first page. Depending on the configuration, it can also preview music/video files.


How can I detect a keylogger on my system?

Is a keylogger running right now?

First, we'll assume you're using a stock Ubuntu system that X installed and that has always been under X's control -- where X is yourself or someone you absolutely trust.

Since this is a stock system and all software has been installed from the official repositories, you can be certain that there is no hidden keylogger in there, e.g. someone modifies the kernel specially to spy on you such that it is very hard to detect.

Then, if a keylogger is running, its process(es) will be visible. All you need to do is use ps -aux, or htop to look at the list of all running processes and figure out if anything is suspicious.

The most common "legitimate" Linux keyloggers are lkl, uberkey, THC-vlogger, PyKeylogger, logkeys. logkeys is the only one available in the Ubuntu repositories.

Did I accidentally download a trojan/virus keylogger?

Usually this risk is very minimal on Ubuntu/Linux because of the privileges (su) required.
You can try using a "rootkit" detector as Mitch noted in his answer.
Otherwise, it comes down to forensic analysis, such as tracing/debugging processes, looking at file modifications/timestamps between boots, sniffing network activity, etc.

What if I'm on an "untrusted" Ubuntu system?
So what if you're in an internet/cybercafe, at the library, at work, etc.? Or even a home computer used by many family members?
Well, all bets are off in that case. It's fairly easy to spy on your keystrokes if someone has enough skill/money/determination:

Those kernel-modifying hidden keyloggers that are so nearly impossible to introduce into someone else's system are much easier to introduce when you're the administrator of a public computer lab and are putting them on your own systems.
There are hardware USB or PS/2 keyloggers that sit between the keyboard and the computer, logging each keystroke into built-in memory; they can be hidden inside the keyboard, or even inside the computer case.
Cameras can be positioned so that your keystrokes are visible or can be figured out.
If all else fails, a police state can always send their goons after you to force you to tell them what you were typing at gunpoint :/

So, the best you can do with an untrusted system is to take your own Live-CD/Live-USB and use that, take your own wireless keyboard and plug it into a usb port other than the one the system's own keyboard is on (eliminating hardware loggers both hidden in the keyboard, and ones on that port hidden in the computer, in hopes they didn't use a hardware logger for each port on the entire system), learn to spot cameras (including likely spots for hidden ones), and if you're in a police state, finish what you're doing and be somewhere else in less time than the response time of the local police.


How to download games for Steam for another platform?

Valve's SteamCMD does just that. A short and incomplete transcript:

Download and unpack steamcmd.
Install 32-bit compatibility libs: sudo apt-get install lib32gcc1
Login in the command line: ./steamcmd.sh +@sSteamCmdForcePlatformType windows.
In the steamcmd:
login <username>
force_install_dir <path>
Find the app id of the game (it can be found in the game's store page URL: http://store.steampowered.com/app/<app_id>).
Download the game: app_update <app_id>


How can I set up SFTP with chrooted groups?

Reposted from the OP's original question by:

I decided to share what finally worked for me. I am a novice 2 months into Ubuntu so please don't shot me yet :) This is nothing new but I had a hard time finding a complete article that explains how can a novice like me could achieve it.

Sudo vi /etc/ssh/sshd_config

and add

Subsystem sftp internal-sftp
Match group Group-A
    ChrootDirectory /Group-A
    ForceCommand internal-sftp
    AllowTcpForwarding no

Match group Broup-B
    ChrootDirectory /Group-B
    ForceCommand internal-sftp
    AllowTcpForwarding no

save and exit and start creating the users and group directories:

sudo useradd Group-A-Users
sudo useradd Group-B-Users
sudo passwd Username
sudo usermod -G Group-A Group-A-Users= All users that belong to this group
sudo usermod -G Group-B Group-B-Users= All users that belong to this group
sudo mkdir /Group-A
sudo mkdir /Group-B
sudo mkdir /Group-A/Upload
sudo mkdir /Group-B/Upload

Now lets set permission to the directories. The main folder must be own by root and no one should have write access to it by any other user or group or it will result in ssh crashing after restart.

sudo chown root /Group-A
sudo chown root /Group-B
sudo chmod go-w /Group-A
sudo chmod go-w /Group-B
sudo chgrp GroupName /Group-A/Upload
sudo chgrp GroupName /Broup-B/Upload
sudo chmod ug+rwX /Group-A/Upload
sudo chmod ug+rwX /Group-B/Upload

This is a guide for dummy's users like me who are new to Ubuntu and want to setup a secure sftp server for work or friends.


I ran into the same problem and scripted something:

It actually rotates all the data of image files in the current folder using imagemagick convert, and then resets the exif information using exiftool. You may need to add more cases, these here were sufficient for me.

#!/usr/bin/env bash

for filename in ./*; do
        rotation=$(exiftool -Orientation -n $filename)
        rotationnumber=${rotation: -1}

        if [ "$rotationnumber" == "1" ]; then
                echo "not rotated " $filename
        elif [ "$rotationnumber" == "6" ]; then
                echo "rotated 90 CW " $filename
                # rotate data
                convert $filename -rotate 90 $filename
                # set exif orientation to not rotated
                exiftool -Orientation=1 -n $filename
        else
                echo "unknown " $filename $(exiftool -Orientation $filename)
        fi
done
rm *_original

beware, it does delete the original data!


Accessing Plex and Transmission remotely

This is a rather complicated problem. If you are at home (I assume you are), you will need to forward the ports from your router to the Ubuntu server. How to do this depends on your router, but you should look for "Port Forwarding" or similar. Secondly, you'll need to either have a static address for the external interface of your router or you'll need to register for a dynamic DNS service, of which there are many. Simply search for them and choose one that offers free service. You might also check your router to see if it natively supports one of these services.

That should be all you need to do.


How do I upload a .css file to launchpad

You cannot upload individual files such as that to Launchpad PPAs.

You must create a deb source package to upload to a PPA. If all you have is a single CSS file, you probably don't want to package it and manage a PPA. You can instead use the Create a release link on the page for your project, and add it as a download file there.


I can't access the recovery options pressing Shift in the GRUB

You can unhide the boot menu just configuring the GRUB files correctly. With a Live USB open the terminal, then type sudo blkid. You will get a output similar to this:

/dev/sda1: UUID="bf554a2f-a035-4c22-bca8-162def35a03c" TYPE="ext4"
/dev/sda2: UUID="3962db06-3776-4f38-8ab9-eab6feeccc1d" TYPE="ext4"
/dev/sdb3: UUID="75a0854b-8b6b-453f-8aec-2a081a1f19e3" TYPE="swap"

Here you can see that my Hard Drive is in the sda and my pendrive is sdg. We are interested in sda. Now lets look at the descriptions of the partitions. We want the partitions that are ext4. In my case I have two ext4 partitions. This is because I have my /boot separated, I will take note about that, but lets assume that you don't have /boot separated for now and that your / (root) is sda1. Now we will mount sda1.

sudo mount /dev/sda1 /mnt
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /dev/pts /mnt/dev/pts
sudo mount -o bind /sys /mnt/sys

Important note: This is the minimum. If you have a /boot partition (or any other) separated just mount it the same way, in my case sudo mount /dev/sda2 /mnt/boot. Please take note that I used /dev/sda2, you should change it if using other mount points.

Now we will proceed to CHROOTING the partition:

sudo chroot /mnt /bin/bash

Once in this step, use nano /etc/default/grub and made it looks like this:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="vesafb.invalid=1 splash quiet"
GRUB_CMDLINE_LINUX=""

Ignore any entry that starts with # those are comments. Now run:

update-grub

This will show you the boot menu by default.


Broken Emoji After Installing ubuntu-restricted-extras

I had a similar problem because the "minimal install" of ubuntu (19.04 disco) doesn't have emoji by default.

Try this:

# install emoji fonts package
sudo apt install fonts-noto-color-emoji

# reload fonts cache
fc-cache -f -v

from here and here


autopilot ImportError: No module named input

I'm one of the autopilot devs.

The function you're looking for was introduced in autopilot 1.3. To check your autopilot version, run:

dpkg -l python-autopilot

If you are running saucy, you will get the very latest version of autopilot every time you do an upgrade. For all other distro released, you will need to add the autopilot PPA, like this:

sudo add-apt-repository ppa:autopilot/ppa

If you have any more questions, you might want to join us in #ubuntu-autopilot, on irc.freenode.net


This behavior is usual if you have the line set -e in your ~/.bashrc or any user/global configuration file of the shell that will be sourced when you start the shell. From help set:

-e  Exit immediately if a command exits with a non-zero status.

Run the following and try exactly what you were doing, you'll now get the normal behavior i.e. bash_completion:

set +e

To permanently fix this find where the set -e is set (should be in ~/.bashrc) and either comment out that or set it as set +e.


Can I insert my current configuration of grub and boot system Efi from Ubuntu in Kubuntu?

TL;DR: no.

A new installation on a different hard disk will require different parameters to work.  Unfortunately you can't simply copy it. Grub config files identify which disk to boot from, with a new disk the current config will not work without adjustments.

Your options are to save a copy of it and use it as a reference on things to try, once you have the new installation and start having issues, if that happens; or to copy it and make adjustments. But the adjustments needed will require knowledge that most new users don't have. If you're willing to invest the time and learn lots about grub and boot, you can try that.

I'm sorry, but I don't see any easy way for you. Either you'll have to possibly deal with the errors you dealt before, or you'll have to spend a lot of time learning about grub. If not both.


Problem in multi booting Ubuntu 12.04 with existing Windows XP, 7 and 8 in 500GB HDD with 5 Partitions

Installing Ubuntu on partitioned drive same as making bootable usb flash drive.
Look this site: Making a bootable USB of Ubuntu
Obviously, this partition should be marked as Removable Media, and you should be able to boot from this media.

If you want install Ubuntu from CD, better way is an additional separate drive for this task.


How can I create this specific executable in Ubuntu 14.04?

Make a new directory where you want to save your script. I keep my scripts in a directory called /home/chris/scripts:

$ mkdir /home/chris/scripts

Move to the script directory

$ cd /home/chris/scripts

Create a new file named wow.sh using gedit or your favorite text editor:

$ gedit wow.sh

Add the following to your script:

#!/bin/bash

cd /..path/
__GL_THREADED_OPTIMIZATIONS=1 WINEDEBUG=-all wine wow.exe -opengl

Save and close the script.

Make the script executable:

$ chmod +x wow.sh

Ok. Now you've got a script to start WOW in WINE, now you need a desktop launcher which calls the script.

Make a new file which will become your desktop launcher. Use gedit again or your favorite text editor. We'll put this file directly on the desktop.

$ gedit /home/chris/Desktop/wow.desktop

Add this to the file:

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_CA]=gnome-panel-launcher
Exec=/home/chris/scripts/wow.sh
Name[en_CA]=World of Warcraft
Name=World of Warcraft
Icon=gnome-panel-launcher

Save and close the launcher file.

Make the launcher executable:

$ chmod +x /home/chris/Desktop/wow.desktop

Double click the launcher and have fun!


gpg: WARNING: unsafe ownership on homedir '/home/user/.gnupg'

How exactly did you try to use it with sudo?

My guess is:

sudo gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | apt-key add -

If so, gpg will run as root, and apt-key will run as your normal user.

In this particular case you should add sudo infront of apt-key:

gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -

Since you ran gpg with sudo and not using the -H flag the permissions on ~/.gnupg probably changed.

From man sudo:

  -H' The -H (HOME) option requests that the security policy set the HOME environment variable to the home directory of the target user
  (root by default) as specified by the password database. Depending on
  the policy, this may be the default behavior.

To check permissions and ownership:

ls -l ~/.gnupg

If the directory (.) or any files in the directory is owned by root, fix the permissions with:

sudo chown -R $USER:$USER ~/.gnupg
sudo find ~/.gnupg -type d -exec chmod 700 {} \;
sudo find ~/.gnupg -type f -exec chmod 600 {} \;


CUDA problems with nvidia driver version

Unfortunately with the NVIDIA repo, it installs the newest driver that is in that repo.  At the time I wrote the answer that was the newest one there, then they recently changed it.  So, to do the older driver you will have to download and install the CUDA 9.2 manually.

This site has a pretty good layout of the installation of CUDA 9.2:  https://www.pugetsystems.com/labs/hpc/How-to-install-CUDA-9-2-on-Ubuntu-18-04-1184/

You do have to follow those instructions very closely.

First thing, I recommend that you remove the NVIDIA repository first:

sudo rm /etc/apt/sources.list.d/cuda*

Then update again

sudo apt update

Make sure the graphics-driver ppa is setup

sudo add-apt-repository ppa:graphics-drivers/ppa

Then install the 396 driver

sudo apt install nvidia-driver-396

Download the CUDA run file for the install from https://developer.nvidia.com/cuda-92-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1710&target_type=runfilelocal

Then run the CUDA installer:

sudo sh cuda_9.2.148_396.37_linux.run

Step through the installation follow carefully so you don't install the wrong driver:

You are attempting to install on an unsupported configuration. Do you wish to continue?
(y)es/(n)o [ default is no ]: y

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 396.37?
(y)es/(n)o/(q)uit: n

Install the CUDA 9.2 Toolkit?
(y)es/(n)o/(q)uit: y

Enter Toolkit Location
 [ default is /usr/local/cuda-9.2 ]:

Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: y

Install the CUDA 9.2 Samples?
(y)es/(n)o/(q)uit: y

Enter CUDA Samples Location
 [ default is /home/terrance ]: /usr/local/cuda-9.2

Then add the following to the bottom of your ~/.profile file:

# set PATH for cuda 9.2 installation
if [ -d "/usr/local/cuda-9.2/bin/" ]; then
    export PATH=/usr/local/cuda-9.2/bin${PATH:+:${PATH}}
    export LD_LIBRARY_PATH=/usr/local/cuda-9.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

Reboot your system.


How to install Edubuntu 11.10 from a DVD to an exisiting Ubuntu

Boot into your Ubuntu OS normally, then insert the DVD into the drive.  Then add the DVD to your software center's "sources" list - it should be listed at the bottom and you just need to hit the checkbox to enable it:

https://help.ubuntu.com/community/Repositories/Ubuntu

The final step would be to refresh the list of available packages, and install the Edubuntu-desktop package.


Direct copy and paste:

You won't be able to open a server on port 80 without root privileges, this is a restriction on the OS level. So the only solution is to drop root privileges after you have opened the port.

Here is a possible solution to drop root privileges in Python: Dropping privileges in Python. This is a good solution in general, but you'll also have to add os.setgroups([]) to the function to ensure that the group membership of the root user is not retained.

I copied and cleaned up the code a little bit, and removed logging and the exception handlers so it is left up to you to handle OSError properly (it will be thrown when the process is not allowed to switch its effective UID or GID):

import os, pwd, grp

def drop_privileges(uid_name='nobody', gid_name='nogroup'):
    if os.getuid() != 0:
        # We're not root so, like, whatever dude
        return

    # Get the uid/gid from the name
    running_uid = pwd.getpwnam(uid_name).pw_uid
    running_gid = grp.getgrnam(gid_name).gr_gid

    # Remove group privileges
    os.setgroups([])

    # Try setting the new uid/gid
    os.setgid(running_gid)
    os.setuid(running_uid)

    # Ensure a very conservative umask
    old_umask = os.umask(077)

from here.

If you MUST regain root priviledges there's always policykit.


Translate the source address of all packets leaving a particular interface with nftables

The rule should be
  nft add rule nat post "subnet address of enp0s3" snat to 192.168.2.120

The example of subnet address of enp0s3 may be like 10.4.0.1/16


How do I control which drive Ubuntu installs to?

When you get to the "Installation type" window, choose the "Something Else" option. I don't remember exactly but I think it does let you manually make partitions for Ubuntu from whatever drive you want.


Screen goes blank after updating nvidia Geforce driver (Ubuntu 14.04, Geforce Go 7200)

Well, just in case anyone else comes across this exact problem, I am copying and pasting the "solution" that I also mentioned in the discussion above so that it's not so easy to miss.

This Sony has a hardware switch to go to "Stamina Mode". In that mode, the machine doesn't use the nvidia but instead the Intel graphics chip on the motherboard. When I reboot in that mode, everything works fine. 720p video on Youtube works fine in that mode and that's as much as I'd hope for with this machine.


You could write a ShellScript that checks if the external-hd is mounted and if so start the torrent-client something like this...

#!/bin/bash

varCheck='mount | grep "/media/external_hd"'
if [[ ${#varCheck} > 0 ]]
then
   start torrent-client
fi

and then put this in your autostart


If you can access the file system of your machine somehow (e.g. by using windows if you have a dual boot), try to modify the configuration file: /etc/rc.local

Write & save the following line:

echo "disable" > /sys/firmware/acpi/interrupts/gpe6F

I found it on bugzilla where somebody got a very similar error on startup. Perhaps you can find more in the thread.


How do I install gcc 10.2 with sudo apt-get install gcc-x g++-x?

Tested on Ubuntu 20.04:
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt install g++-10


Found the issue to be the hard drive, hard drive works fine as a file system drive but will error out and fail install before it even begins now using a 110gb drive


How do I get a TP-Link TL-WN823N V3 wireless adapter working?

If you have internet access by any other means (wired or through USB tethering), you can installed the RTL8192EU drivers for your TP-LINK TL-WN823N wireless adapter from Mange's GitHub repo. Here are the steps as described on the GitHub page:
Building and installing using DKMS
(1) Install DKMS and other required tools:
sudo apt-get install git linux-headers-generic build-essential dkms

(2) Clone this repository and change your directory to cloned path.
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver

(3) Add the driver to DKMS. This will copy the source to a system directory so that it can used to rebuild the module on kernel upgrades.
sudo dkms add .

(4) Build and install the driver.
sudo dkms install rtl8192eu/1.0

(5) Distributions based on Debian & Ubuntu have RTL8XXXU driver present & running in kernelspace. To use our RTL8192EU driver, we need to blacklist RTL8XXXU.
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf

(6) Force RTL8192EU Driver to be active from boot.
echo -e "8192eu\n\nloop" | sudo tee /etc/modules

(7) Newer versions of Ubuntu has weird plugging/replugging issue (Check #94). This includes weird idling issues, To fix this:
echo "options 8192eu rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8192eu.conf

(8) Update changes to Grub & initramfs
sudo update-grub; sudo update-initramfs -u

(9) Reboot system to load new changes from newly generated initramfs.
systemctl reboot -i

(10) After the reboot, you can check that your kernel has loaded the right module:
sudo lshw -c network

You should see the line driver=8192eu


Complete answer found on this tutorial:
https://youtu.be/cDgUwWkvuIY

Explaining how to resize partition of a virtual box

As Michael wrote- swap file size filled up 4 GB from a 10 GB


Ubuntu 18.04 Intel Wifi 9560 not working

I have the same problem, and there is a bug
kernel BUG at /build/linux-vxxS7y/linux-4.15.0/drivers/net/wireless/intel/iwlwifi/pcie/rx.c:425!

    bp@bp-ubuntu:~$ dmesg | grep iwl
    [    3.797275] iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
    [    3.822539] iwlwifi 0000:00:14.3: loaded firmware version 34.0.0 op_mode iwlmvm
    [    3.836082] iwlwifi 0000:00:14.3: Detected Intel(R) Dual Band Wireless AC 9560, REV=0x318
    [    3.842661] kernel BUG at /build/linux-vxxS7y/linux-4.15.0/drivers/net/wireless/intel/iwlwifi/pcie/rx.c:425!
    [    3.842665] Modules linked in: iwlmvm(+) coretemp(+) mac80211 kvm_intel(-) snd_hda_intel snd_hda_codec kvm snd_hda_core mxm_wmi snd_hwdep irqbypass snd_pcm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_seq_midi snd_seq_midi_event pcbc eeepc_wmi snd_rawmidi asus_wmi sparse_keymap wmi_bmof snd_seq snd_seq_device snd_timer aesni_intel snd btusb btrtl btbcm aes_x86_64 iwlwifi btintel crypto_simd glue_helper cryptd nvidia_uvm(OE) input_leds intel_cstate bluetooth soundcore intel_rapl_perf cfg80211 ecdh_generic shpchp mei_me mei wmi mac_hid acpi_pad sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid uas hid usb_storage nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) drm_kms_helper syscopyarea e1000e sysfillrect sysimgblt fb_sys_fops ptp drm pps_core i2c_i801
    [    3.842694] RIP: 0010:iwl_pcie_rxq_alloc_rbs+0x1d0/0x1f0 [iwlwifi]
    [    3.842707]  _iwl_pcie_rx_init+0x252/0x710 [iwlwifi]
    [    3.842710]  iwl_pcie_rx_init+0x2d/0x3c0 [iwlwifi]
    [    3.842715]  ? iwl_mvm_nic_config+0xeb/0x120 [iwlmvm]
    [    3.842718]  iwl_trans_pcie_start_fw+0x2a1/0x6c0 [iwlwifi]
    [    3.842723]  iwl_mvm_load_ucode_wait_alive+0xec/0x2b0 [iwlmvm]
    [    3.842728]  iwl_run_init_mvm_ucode+0x8e/0x330 [iwlmvm]
    [    3.842731]  ? iwl_run_init_mvm_ucode+0x8e/0x330 [iwlmvm]
    [    3.842734]  ? iwl_wait_init_complete+0x20/0x20 [iwlmvm]
    [    3.842738]  iwl_op_mode_mvm_start+0x649/0x920 [iwlmvm]
    [    3.842742]  ? iwl_op_mode_mvm_start+0x649/0x920 [iwlmvm]
    [    3.842745]  _iwl_op_mode_start.isra.10+0x4c/0xa0 [iwlwifi]
    [    3.842747]  iwl_opmode_register+0x75/0xe0 [iwlwifi]
    [    3.842751]  iwl_mvm_init+0x38/0x1000 [iwlmvm]
    [    3.842793] RIP: iwl_pcie_rxq_alloc_rbs+0x1d0/0x1f0 [iwlwifi] RSP: ffffae30442978a8


Ubuntu will not connect to existing ad-hoc network?

After editing my Ubuntu's interfaces file.

I believe I had set the wrong "wireless-channel" on my host machine originally.

sudo nano /etc/network/interfaces

auto wlp2s0
iface wlp2s0 inet static
    address 192.168.1.3
    netmask 255.255.255.0
    wireless-channel 7
    wireless-essid mazuNet
    wireless-mode ad-hoc

login with: ssh pi@192.168.1.1 or ssh pi@192.168.1.2 (to the other Pi)

Is there a better way to set this connection up to make switching between my ad-hoc network and regular wifi connections more quickly?

Currently I have to manually edit my interfaces file then reboot.


Is it safe to let "Sotware Updater" install all suggested updates?

The answer depends almost entirely upon which software sources you have enabled in your Software & Updates control panel.

If you stick to the official Ubuntu repositories, you usually will get safe, signed, tested updates that you can install worry-free. Perhaps once or twice a decade one of these update may cause a problem, so regular backups are still wise.

Caveat: Do NOT enable the Ubuntu -proposed repository unless you are helping to test the proposed software. Those will sometimes cause problems. That's what testing is: Discovering the problems.

If you have added a lot of non-Ubuntu sources (like third-party sources and certain PPAs), then the risk of a crash, conflict, or other problem goes up substantially.


How do I re-add Rhythmbox to the sound menu?

If it's not showing up in the sound indicator any more, the three most likely reasons are

The plug-in got disabled/removed
A problem exists in the sound menu itself
A problem exists in communication between Rhythmbox and the sound menu

Check that the plug-in is enabled under Edit->Plugins (I think the support is integrated with the Notifications plug-in, and there are settings for it to disable the tray icon/sound indicator support, or pop-up notifications). You can also log out, wait a minute (some of the services take a few seconds to exit after logging out), and log back in. This will restart all the related services and Unity, so that if some underlying service was the cause, the problem should just go away.


You will be better off picking the 64-bit version. That would prevent all the dependencies.

Also when downloading a .DEB you should let Ubuntu Software Center (USC) have it installed. All you need to do is doubleclick the file from Nautilus. If there are any dependencies USC will attempt to install them for you. "dpkg" will not.


We stopped development on all of those apps. We may restart in future, but nobody is currently working on them.


How to share files with Samba in Ubuntu 14.04?

what do you mean with other wireless network ?? other network like WAN ?? VPN??

edit de samba.conf in the follow sections

sudo nano -w /etc/samba/smb.conf

[homes]

comment = Home Directories

browseable = yes

read only = no

run this three commands in the terminal and follow the steps

sudo  smbpasswd -a yourName

sudo smbpasswd -e username
sudo /etc/init.d/samba reload


Apache fails to start, Address already in use (but not really)

Make sure you are not declaring Listen 80 twice in .conf files.

For example, you might have it both in ports.conf and inn sites-enabled/www.conf.

To find out, use: grep -ri listen /etc/apache2

Keep Listen 80 in just a single place.


Wireless is disabled by hardware switch. Wifi doesn't work! (hard blocked: yes,soft blocked :no, hp pavillion g6 2237, Ubuntu 12.04)?

Install all the necessary compilation tools at first and download the latest driver from its git repository:(EXAMPLE FOR TL-WN725N)

$$ sudo apt-get install build-essential linux-headers-generic git

$$ mkdir ~/RTL8188EU

$$ cd ~/RTL8188EU

$$ git clone git://github.com/lwfinger/rtl8188eu.git

Afterwards, the driver can be compiled and installed:

Go into the folder and execute following commands.

$$ make
$$ sudo make install

The new kernel module can be loaded via modprobe and can be installed system-wide for automatic loading:

$$ sudo depmod -a
$$ sudo update-initramfs -u
$$ sudo modprobe 8188eu

(Automatic boot:)
To enable the module at each boot add your module to /etc/modules

$$ echo 8188eu >> /etc/modules

Run command

$$ lspci -v

and search for your built-in wifi card...

03:00.0 Network controller: Intel Corporation WiFi Link 5100
    Subsystem: Intel Corporation WiFi Link 5100 AGN
    Flags: bus master, fast devsel, latency 0, IRQ 47
    Memory at d6500000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: [c8] Power Management version 3
    Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [e0] Express Endpoint, MSI 00
    Capabilities: [100] Advanced Error Reporting
    Capabilities: [140] Device Serial Number 00-24-d6-ff-ff-3e-5e-a4
    Kernel driver in use: iwlwifi

Now block that card....

$$ sudo echo "blacklist iwlwifi" >> /etc/modprobe.d/blacklist.conf

Now run

$$ lsmod | grep sony

replace sony with company name of your laptop....

Block your laptop (like for sony vaio it is "sony_laptop"....

$$ sudo echo "blacklist sony_laptop" >> /etc/modprobe.d/blacklist.conf

DONE..!!!

Now reboot...
You will be able to run your wifi adapter even if your wireless switch is turned off....!!


Accidentally chose wrong login manger during upgrade

First go in terminal and make lightdm your default display manager:

sudo dpkg-reconfigure lightdm

Use arrow keys (↑ and ↓) and Enter in the menu that appear in terminal to select lightdm as default.

Then go in tty1 by pressing Ctrl+Alt+F1 and run next two commands:

sudo service stop gdm
sudo service start lightdm


Hold shift while booting up if grub menu doesn't appear automatically, once you're in the grub menu, press E while you are selecting Ubuntu. Add nomodeset after quiet splash in the line which starts with linux. This will disable the graphic drivers which I believe is the problem here. Once you boot up, in order to permanently change your grub options, open a terminal and write:

sudo leafpad /etc/default/grub

Change leafpad for whatever text editor you use, might be gedit!

Search for the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it to: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Head to a terminal and type sudo update-grub

As your question is not a 100% clear and I don't know if you have a dedicated GPU, I believe this is a graphic driver error, so my solution relies on disabling them. However you could just enter Ubuntu using the solution given, then instead of editing grub, simply install your propietary drivers.


When will the "artfwo" PPA be updated for 12.04 Precise?

Just in case anyone else stumbles upon this problem: indicator-cpufreq is now installable from the official Ubuntu repositories (universe). Hence the PPA is no longer available for Precise.


How do I play RuneScape with minimal lagging?

You can play RuneScape locally without Wine using the RuneScape Unix Client (RSU Client). Installation instructions for all currently supported versions of Ubuntu:

sudo add-apt-repository ppa:hikariknight/unix-runescape-client
sudo apt-get update
sudo apt-get install unix-runescape-client

You can use different java versions by editing the "preferredjava" setting inside ~/.config/runescape/share/settings.conf
along with several other settings.

Your frame rate in game very much comes down to the hardware installed on your system. You can have limitations due to this. Some of the most important components on your computer for higher fps are your graphics card, total RAM and your CPU. The older or less powerful they are, the more likely you are to suffer from a poor frame rate.1 You can free up maybe half a gigabyte of RAM by installing a lightweight desktop environment that you can optionally select to login to instead of Unity.

1View and improve your frame rate in RuneScape by Mod_Rambo at Jagex


How can I make terminal windows show their names?

That is done in the system settings:

There select:

Appearance --> Behaviour --> Menus visibility --> Always displayed.


How to rename a movie file by using its internal name attribute?

You can try with mediainfo:

mediainfo f00000.avi

To rename all .avi files in the current directory, run:

for f in *.avi;do title=$(mediainfo $f|grep -i "movie name"|cut -d":" -f2);mv -v "$f" "$title";done

Install mediainfo using the command: sudo apt-get install mediainfo


Can't install extensions on site, GNOME SHELL 3.6

just a guess..
but maybe the the proxy settings were set?

I've got the same problem
i had set a proxy in the gnome-networksettings couse i need them at work
but overwrite them with the firefox-settings.

After i disabled the proxy the firefox plugin worked fine again.


You have to create a filesystem on /dev/sda3 first.
For example

mkfs.ext4 /dev/sda3

Then mount it to a mountpoint.
Only then you can configure samba to make this directory available to others


How can I repair the whole system knowing that I have Ubuntu 12 LTS upgraded from Ubuntu 11

This isn't going to be the best answer, but it is workable:

Before you log in, drop into the command line (ctrl+alt+f1) In your homedir, delete (or move out of the way so you can get them later) every one of the hidden folders (that begin with .). This will ensure that all the settings are fresh when you next log in.

If you don't want to go all guns ablazin, deleting (or moving) .compiz, .compiz-1, .config/compiz-1, and .config/dconf should make a massive difference.


I had a problem with Ubuntu not booting up, a friend of mine gave me a ubuntu boot disk repair.

Here is the web address https://help.ubuntu.com/community/Boot-Repair
Other google ubuntu boot disk repair.

Read on if you want more details, otherwise look at the web address above.

My friend googled it "ubuntu boot disk repair" it's a cd that auto runs and it loads it own GUI with it's own browser(if needed) and the boot repair program.
You can repair the grub or the MBR, the grub repaired the linux side for me and the MBR got windows loading up.

I had a few issues when I updated Ubuntu 12.04 a few times and ran the cd a further few times, on the 3rd time needing to use the boot disk I played around with some settings and now it says something about missing kernal headers, to solve this I went back to previous versions in the GRUB.


How do I get GNU Grub to stop beeping and allow me to select an option from the boot menu?

Ah, the beep sound while the GRUB menu being displayed is due to some key being pressed before hand. If you release the key, the screen will load well and you can select any entry that you wish.

I encounter this at times when I keep the down-arrow key pressed at the time of booting itself. The beep comes, I release the key, the menu appears, and the highlight goes down automatically (the effect of the down that I pressed earlier) and then everything is normal.

So in your case, I do believe that tea might have short circuited some key. Hence it is exhibiting the behavior I mentioned above. Good luck fixing it.


Restrict *.exe or any other executable to be uploaded on ftp account on vsftpd server

You might want to review the section of man vsftpd.conf, specifically the deny file section of string options which states.

deny_file

  This option can be used to set a pattern for filenames (and    directory names etc.) which should not be accessible in any way. The affected items are not hidden, but any attempt to do anything to them (download, change into directory, affect something within directory etc.) will be denied. This option is very simple, and should not be used for serious access control - the filesystem's permissions should be used in preference. However, this option may be useful in certain virtual user setups. In particular aware that if a filename is accessible by a variety of names (perhaps due to symbolic links or hard links), then care must be taken to deny access to all the names. Access will be denied to items if their name contains the string given by hide_file, or if they match the regular expression specified by hide_file. Note that vsftpd's regular expression matching code is a simple implementation which is a subset of full regular expression functionality. Because of this, you will need to carefully and exhaustively test any application of this option. And you are recommended to use filesystem permissions for any important security policies due to their greater reliability. Supported regex syntax is any number of *, ? and unnested {,} operators. Regex matching is only supported on the last component of a path, e.g. a/b/? is supported but a/?/c is not.

    Example: deny_file={*.exe,*.sh,.private}

I have not tested that this will explicitly deny uploading of .exe files, however the assumption is that people are uploading them so others can download them. When that ceases to work, perhaps the activity of uploading them will cease as well. As suggested in this comment you could also write a script to reclaim the space in the upload directory by rm /youruploaddir/*.exe where /youruploaddir/ is the directory that your users are uploading to and use cron to schedule it to run at a specific time or frequency.

Since a file extension in no way guarantees content as mentioned by @CharlesGreen in this comment you might consider a a variation on this script which I designed to find virtually all video files on my system. You can easily modify it to include .mxf (Material Exchange Format) containers. Or as an alternative simply identify the actual .exe files by utilizing grep to match "executable" in the output from file

Executable file determination Example:

file *.* | grep "executable"| cut -d':' -f1

Will print the filenames of the files in the current directory that are actually executable (such as Windows .exe files)

Note: Files are only executable on your system if you have the permissions set to allow that. See this for further detail.


Booting to Ubuntu on dual boot (with Win 7) Desktop

With windows 7 installed first grub will detect windows for you and configure itself to Boot into windows. Problems only arise with Ubuntu installed first as windows boot loader overwrites grub and cannot detect the Ubuntu install.


Mount directory from another drive to Desktop/Videos

As ravery answered you can mount another drive as ~/Videos

You can also mount the drive to an unused path in /mnt. Then bind mount directories from the second drive onto directories in ~/

# Custom bind mounts
uuid=<UUID>      /mnt/UUID          ext4 defaults 0 2
/mnt/UUID/Videos /home/$USER/Videos none bind     0 0
/mnt/UUID/Music  /home/$USER/Music  none bind     0 0


Send e-mails from a server, preventing from being blocked by anti-spam

You are always at risk of being blacklisted (it sometimes even happens to gmail, hotmail & cie). However, to mitigate the risk, add server B's IP to the SPF entry for the domain, and look into setting up DKIM to certify the origin of the emails.


Where are the display configuration files in 14.04 LTS?

To find the files where the monitors are currently configured, execute:

locate --existing monitors.xml


How to solve unmet dependencies when installing Nvidia drivers?

To solve

E: Unable to correct problems, you have held broken packages.

Try:

sudo apt-get install --fix-broken xorg-video-abi-11 xserver-xorg-core -y

This trick worked for me

Another option will be:

sudo apt-get remove --purge nvidia-* -y
sudo ubuntu-drivers autoinstall
sudo service lightdm restart

Then reboot machine


Not every feature supported in lubuntu interface

Well LXDE is very lightweight, to add start-up applications you put a .desktop file in the ~/.config/autostart folder. See this non GUI section from this answer.

Advanced users may want to put a .desktop file in ~/.config/autostart to run applications after a user login. This may have following content:

[Desktop Entry]
Type=Application
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
X-GNOME-Autostart-enabled=true

To set-up locking settings, you go to "Start" -> Preferences -> Light Locker.

And to add short cuts, you simply edit this file: /home/<user>/.config/openbox/lxde-rc.xml. I got that from this and this forum.


Connecting to IP#1 automatically redirects to IP#2

The Apache log seems to suggest that the redirect is done at application level.

Some applications have a siteurl option configured at install time, and if you visit the application from another URL, they redirect you to the siteurl.
So, have a look at your application configurations and eventually change that option to match the external IP.


Locate .srt files in different directories and change character encoding

Easy enough to accomplish without your script by using the following command line (using the application recode rather than straight iconv) which should be run from the root directory of your srt files:

find . -name '*.srt' -type f -exec bash -c 'recode -v CP1250..UTF-8 "$0"' {} \;

The command line searches recursively for all srt files and when each is found recode works on each file to change character encoding from CP1250 to UTF-8. With recode the encoding alteration does not require the clumsy filename shifting required by iconv...

How cool is the command line :)


Cannot write on ext4 partition Ubuntu 14.04

Is current user in your group "users" ? Try groups command. If its not, than use sudo adduser USER-NAME users and then reload your session.
Isn't /media/data1/test file already there (owned by someone else)? Try ll /media/data1/test.
Are those partitions mounted without any restrictions? Try mount|grep /media/data command.

Mind to share outputs of these?

P.S. In your /etc/fstab you set last parameter to 0, meaning the drives wont be checked by fsck at system start when needed, are you OK with this?


Searching for specific magic byte in an ocean of files

I'll try to give you some hints so you can solve your HW yourself.

Follow this steps:

read the manual of file by executing man file.
Then try it out by file somefile and see what happens
Try to run file on different file types
By now you should be able to understand how to find out if some file is a jpeg image or not.
now read the manual for find (or use google to find out how to use it to find all files in some directory and all subdirectories)
now find out how to use -exec option of find in order to connect it with previously used file command
Now you should be able to find out the filetypes of all files in needed directory and list them
Now read about pipes | and grep command to find out how to filter only for JPEG files.


No audio after rebooting Ubuntu 16.04 on dell vostro 5568

You should open a terminal by pressing Ctrl+Alt+T and type:

alsamixer

If you press the F6 key you should see the sound card (If action keys are enables in your BIOS/EFI firmware you might have to press Fn+F6)

you will now see 3 options:

(default)
0 HDA Intel PCH
enter device name

[Note prom editor]: unclear what you're trying to accomplish here.  Please adapt this section
if I press esc key and then look into the system information
I hold function the fn key and press f2 I can use the arrow keys to look at the /proc/asound/cards pressing return/enter I see two lines of information.

It could, if you write these two line into the text input with that device name in fn f6 select soundcard.
[End note]

Then exit alsamixer and type:

sudo apt-get update
sudo alsa force-reload


Ubuntu 16.04 radeon drivers for AMD R7/260x

I found a solution. The problem was that the old (no longer supported) fglrx drivers were not completely deleted when I upgraded from 14.04 to 16.04. I used synaptix to search for all flglrx packages and purged them. After a reboot, the radeon driver was detected and used

As a bonus, the radeon driver works better than fglrx ever did


Disclaimer: This is merely a fun and play approach and not at all a secure way to keep others from viewing or obtaining files.

A simple but of course not really secure way would be to hide and encrypt the video and write a script which decrypts, plays and then immediately removes the video file and itself. I use ccrypt and VLC here, both need to be installed on the target system.

Preparation

Copy the video over, I use .secret as the hidden filename and /target/path/ as the target path:

cp /path/to/video /target/path/.secret

Encrypt it with a password, “1234” seems to be commonly used so it must be secure:

ccrypt -eK 1234 /target/path/.secret

Save the following script as e.g. /target/path/play_video:

#!/bin/sh
f="${0%/*}/.secret"
pw="1234"
ccrypt -dK "$pw" "$f".cpt
vlc --playlist-autostart --play-and-exit -f "$f"
rm "$f" "$0"

Make it executable:

chmod +x /target/path/play_video

Usage

In /target/path/ by default you now only see the script, only if you list hidden files as well you see the video file, but it is encrypted with an unknown password and can’t be played directly. Hopefully the target user runs the script, which decrypts the file, plays it with VLC in fullscreen mode and deletes both files directly after the video ends.

If they’re smart though, they’ll have a look at the script, get the password from it and work around this easily. You could use a binary file to hide the password, but the video is still getting decrypted before playing it, leaving it accessible while the player is open.


First of all you need to download  Instant Client Downloads. Install alien package so you can install rpm packages by typing following command in terminal.

sudo apt-get install alien

Once that is done, go to the folder where the rpm files are located and execute the following:

sudo alien -i oracle-instantclient*-basic*.rpm
sudo alien -i oracle-instantclient*-sqlplus*.rpm
sudo alien -i oracle-instantclient*-devel*.rpm

You need to install libaio.so. Type following command to do it:

sudo apt-get install libaio1

Create Oracle configuration file:

sudo sensible-editor /etc/ld.so.conf.d/oracle.conf

Put this line in that file:

/usr/lib/oracle/<your version>/client/lib/

Note - for 64-bit installations, the path will be:

/usr/lib/oracle/<your version>/client64/lib/

Update the configuration by running following command:

sudo ldconfig

Try to connect using:

sqlplus username/password@//dbhost:1521/SID

or:

sqlplus testuser/password

Note that if you installed the 64-bit version, the client is called sqlplus64.


First of all, did you check the md5 of the ISO you downloaded?

Grab a checker, https://help.ubuntu.com/community/HowToMD5SUM#MD5SUM_on_Windows

compare it to the md5sum for your ISO file here http://releases.ubuntu.com/oneiric/MD5SUMS

if it matches then great.  what tool did you use to make the usb ? this one?
http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3

format the stick, make another and when you boot it, at the boot prompt, choose verify installation media and it will perform md5 checks on the files.


It seems that a fork of Parcellite is available and this fork supports does provide an indicator for Unity:

Parcellite with Ubuntu AppIndicator? ClipIt!

  Parcellite doesn't have Ubuntu indicator support but for that you can use ClipIt, a Parcellite fork that uses an Ubuntu appindicator and also comes with some other fixes and improvements. The recent changes in Parcellite 0.9.3 have also been included in ClipIt.

The link provide access to a ppa which maybe more recent than Version: 1.4.1-1.1ubuntu1 which is available in the Ubuntu Software Center.


Problem with xServer, Unity and xfce are not working. Problem with driver

It turned out to be the .XAuthority file which belonged to root (due to installation of a driver as root). I chmod'ed the file and everything was working like a breeze -)

To learn something in general, use journalctl to debug.


How to delete specific lines from a txt file

Try this. This should work.

sed -i '2d' data.txt

You have to add -i flag with sed command unless you are redirecting your output to a new file. If you don't add the -i flag, sed will print the pattern space to STDOUT and will not make any changes to the original file.

Automatic backup option

It is quite dangerous to modify a file without taking a proper backup. So sed has its native method to backup a file before editing which is -i.bak option.

So in the above example if we use the backup option, the command would be.

sed -i.bak '2d' data.txt

So it will remove the first line from the file data.txt and will also make a backup copy of the original file with .bak extension.


I just had that exact problem.  I solved it by reinstalling unity at the command line.

Hit Ctrl+Alt+F2, this will open a terminal on TTY2.

Log in with your user name and password

Then enter the command:

sudo apt-get install unity

After the install finished all was well for me


It looks like Mozilla had decided to make the button grey on Linux. You can try this addon (not tested by me):
https://addons.mozilla.org/firefox/addon/themed-button-for-linux/


I need to add a new route (terminal) and have my c++ server go through it

You need to run commands as root or with sudo.
Use ip route istead:

sudo ip route add 192.168.98.0/24 via 192.168.99.1

NOTE: The IP 192.168.99.1 needs to be direct connected to your PC, in other words you need to have and IP address from that subnetclass asignet to an local network interface.

Check your IP address via command ifconfig | grep "inet " and check if you have and IP from that subnet you wish to add

Use ip route list to list your current routes and check if your new route have been added.


I am having sometimes the same issue. It is not caused by recursion itself but by Linux going out of memory. Linux lets programs to allocate as much space as they need until there is absolutely no memory left. Because of this, your machine becomes unable to handle primitive operations.

Windows behaves in slightly another way. It leaves some free space for it's needs. Your code would get "Out of memory" error, and the system would work very slow for a little bit, but not totally freeze.

The same idea is used by fork-bomb attack, which takes all the memory in the system so quick that even killall is unable to run.

If your program takes so much memory uncontroled, it will soon die and then Linux would run OK. The only way that helped me in making it faster currently is to send Ctrl-C to the terminal where your code is launched from or trying to run killall.


I don't yet have the entire stream from my Ubuntu laptop to connect to my work PC by way of Cisco AnyConnect.  I do have the VPN working, as when I enable the VPN connection I'm told that I'm connected.  What I'm working on is getting a VNC (Remmina) to actually connect with the remote Win7 PC.

My work network has the two-password bit enabled.  I'm able to enter both passwords.  I got to there on Ubuntu through the openconnect / network-manager-openvpn / network-manager-openvpn-gnome stack, along with whatever plugins the install requires.  I haven't (yet?) installed the official Cisco software.

Once you install the software and hard reboot your PC (things didn't work well with the "Reboot" option) you can create a VPN connection.  Once you try to login you're asked for a username, password, another username and another password.  I ignore the second username and things are working as I described earlier.

I will update this comment once I get the entire end-to-end working.


Can't use a particular partition for Ubuntu installation

You probably have upgraded to a "dynamic disk", which is a Microsoft proprietary system that can not be recognized by other operating systems.  You need to convert the disk back to "basic disk".  You will likely need to delete at least one of those partitions as well.


Removing codeblocks ppa from Ubuntu 16.10

I figured it out and I used this to delete my trouble some files.

Run command: apt install gksu
Type y to install
Run command: gksudo nautilus
Navigate to the folder using the window opened by the precious command
Highlight my trouble some files mentioned in the initial question and moved to trash then emptied bin.


how to remove old kernels in grub2, including files?

sudo apt autoremove will do the trick.

It will leave the two most recent kernels, and remove the rest. It will also remove other packages that are not needed any more, that is packages that was automatically installed as dependencies to other packages that has later been uninstalled.


First of all, which version of Ubuntu are you using?

Second, if you have an AMD video card, which drivers are you using? I have many experiences of AMD GPUs overheating when used with the open source drivers or the restricted drivers provided by Ubuntu. You may want to try out the drivers from the AMD website.

Also, check this question out. It is about the HD76xx series, but may apply to others as well.

Finally, search askubuntu for "overheating", you may get many hits.

Regards,
Errikos


ubuntu 18.04 repository not updating / can't use apt-get (Could not connect to x.x.x.x:8080)

All five errors which you have got, those links have whitespaces between the link, First check all the PPA, which you have added to the system. ping them and make sure that they are working, else remove them.

Err:1 https ://download.docker .com/linux/ubuntu bionic InRelease
  Could not connect to 10. 10.8.179:8080 (10. 10.8.179). - connect (111: Connection refused)
Err:2 http ://ppa.launchpad .net/certbot/certbot/ubuntu bionic InRelease
  Could not connect to 10. 10.8.179:8080 (10. 10.8.179). - connect (111: Connection refused)
Err:3 http ://archive.ubuntu .com/ubuntu bionic InRelease
  Could not connect to 10. 10.8.179:8080 (10. 10.8.179). - connect (111: Connection refused)
Err:4 http ://archive.ubuntu .com/ubuntu bionic-security InRelease
  Unable to connect to 10. 10.8.179:8080:
Err:5 http ://archive.ubuntu .com/ubuntu bionic-updates InRelease
  Unable to connect to 10. 10.8.179:8080:


perl command: Append a line of text only at the first occurrence

You could use string concatenation with the default $_ variable:
$ perl -lpe '$_ .= "\nappend_me" if /^match$/ && ++$i == 1' text.txt
text1
match
append_me
text2
match
text3

Alternatively, use -ne and an explicit print
perl -lne 'print; print "append_me" if /^match$/ && ++$i == 1' text.txt


No boot after reseting bios to default, Ubuntu partition gone

If I understand you correctly, all you did was reset the bios settings, aka CMOS, which is on the motherboard.  Unless there's more I don't understand, that should not have deleted an "entries".

I suspect that what has actually happened is that resetting your CMOS changed the default boot sequence so that your computer is attempting to boot to some other attached drive, such as a blank SD card or USB flash drive you left plugged in.  This same difficulty happened to a friend of mine about three months ago.  We have yet to understand her USB's partition had become configured as bootable.


Latest Stable Kernel 4.4: VirtualBox 5 kernel modules ...FAILED!

Just happened to visit this thread after struggling with the same problem.

As commented by @Javier Rivera in the question, the log did say something:

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong
not supported by compiler

So the solution is simple: upgrade the GCC suite (at least to 4.9).

For my 14.04 Ubuntu box, the newest one available in official repository is just 4.8, so some hack is needed. Fortunately, this is quite a common problem and is already solved by others:

How to install the latest g++(currently 5.1) in Ubuntu(currently 14.04)?

After installing a newer GCC suite (for me, its 5.3.0), another problem arises when choosing the default compiler for the system, which is also mentioned in the linked guide of the answer to he aforementioned question.

After all of this, double check if you have the right version of gcc:

$ gcc --version
gcc (Ubuntu 5.3.0-3ubuntu1~14.04) 5.3.0 20151204
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reinstall virtualbox as usual, and this time, it shouldn't complain.


Not able to get graphs on screen with gnuplot

Jotrocken's comment was spot on -- copying from the answer he linked to:

Just add gnuplot-x11 package via the terminal (CTRL+ALT+T):

sudo apt-get install gnuplot-x11

or via the software-center:

It solved my plotting problems for GNUPlot in Octave!!!


How do you completely purge an installed aplication?

Try using the Synaptic Package Manager (install synaptic ).

Right-click on the package you want to purge and click Mark for Complete Removal.

See this answer for more information on what this does.


After upgrade from Ubuntu 16 to 18.04, systemd-udevd uses 100% CPU

I also faced the same issue after upgrade on my DELL laptop.
My workaround
Soon after booting, stopping and starting systed-udev eliminates all bind and unbind problems and response drastically improves. I used the following two commands in sequence:
sudo systemctl stop systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket
sudo systemctl start systemd-udevd systemd-udevd-kernel.socket systemd-udevd-control.socket

My understanding
Before all hardware is discovered properly, bind/unbind starts executing when no procedures are available and does not get reinitialized. After stopping and starting, it gets all the procedures in place. Probably, this is a boot sequence problem.


Will Ubuntu 16.04 support the rtl8192eu chipset out of the box?

It will not be supported out of the box, but the driver can be installed this way

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtl8192eu-dkms


How to install mysql 5.1. if I already have 5.5. installed?

It will not downgrade with 5.5 config files.

apt-get purge mysql* -y

find / |grep -i mysql

And backup and remove all folders, then install mysql 5.1.

As for upgrading to 5.5, use apt-get upgrade.

Don't forget to DUMP all your databases (mysqldump or phpmyadmin)!


Unity 2d is not included on newer versions of Ubuntu (anything after 12.04 I think).  You can install it if you wish too though.

sudo add-apt-repository ppa:unity-team/staging
sudo apt-get update
sudo apt-get install unity-2d

This adds the PPA and installs unity 2d.  After a restart or logout you can switch your user interface.  The box with your password field will have a little unity symbol on the top right which will change it.


ubuntu 12.04 system error/macchanger issue?

I think I solved this problem. I'm going to wait a few days and make sure.

My script broke network manager I think. I added the command:

restart network-manager

Now when I connect, the Mac address stays changed.

I think I prefer to use wicd instead though.

The completed script if anyone wants to use it :

sudo ifconfig wlan0 down &&
sudo macchanger -A wlan0 &&
sudo ifconfig wlan0 up &&
sudo restart network-manager


Yup. Quite simple too. IMO this is quicker than using cups' web gui.

Make cups accept connections from other computers.

sudo nano /etc/cups/cupsd.conf

And then replace Listen localhost:631 with Listen *:631. Save and exit (control+x, y, return).

Note: If this computer ever goes out into the wild, where it's not hidden behind a router, it might be worth specifying an IP address instead of wildcarding. If it sits behind a protected router all the time, you don't need to worry about it.

Note 2: If you have a firewall running on your computer (eg ufw, firestarter) be sure to allow connections on port 631 through.
Restart cups:

sudo /etc/init.d/cupsys restart

From the Windows computer, start the Add a printer wizard (in Control Panel > Printers), select network printer and when you finally get around to the part where you enter an address, stick something like this in:

http://your_ubuntu_ip:631/printers/whatever_your_printer_is_called

You then just install the Windows drivers for it and bish, bash, bong your're done.

If you don't know the name (to replace whatever_your_printer_is_called), take a look at cups http://localhost:631 and see what the name is for the printer.


When did update-apt-xapian-index last run?

The command you need is axi-cache info. You can consult its man-page or built-in help.
But the main problem that it is broken out the box on 16.04 LTS, 18.04 LTS and newer versions because of bug 1612948. Instead of desired output it returns error message:
$ axi-cache
No module named 'ConfigParser': only help functions are implemented, for the sake of help2man

Citing Brian Murray from comment on bug 1760608

Brian Murray (brian-murray) wrote on 2018-04-06:  #4
The correct solution is to modify the import in axi-info to "from ConfigParser" to "from configparser". If someone created a debdiff I'd be happy to sponsor it.

so we can use my original proposal from comment on bug 1612948
sudo sed -i 's/from ConfigParser import RawConfigParser/from configparser import RawConfigParser/' /usr/bin/axi-cache

After manual patching it will work (output from 16.04 LTS):
$ axi-cache --help
Usage: axi-cache [options] command [args]

Query the Apt Xapian index.

Commands:
...
     axi-cache info      print information about the apt-xapian-index environment
...

$ axi-cache info
Main data directory: /var/lib/apt-xapian-index
Update timestamp: /var/lib/apt-xapian-index/update-timestamp (last updated: Fri Jun 15 01:33:15 2018)
Index location: /var/lib/apt-xapian-index/index (pointing to /var/cache/apt-xapian-index/index.1)
Documentation of index contents: /var/lib/apt-xapian-index/README
Documentation of available prefixes: /var/lib/apt-xapian-index/prefixes
Documentation of available values: /var/lib/apt-xapian-index/values
Plugin directory: /usr/share/apt-xapian-index/plugins
Plugin status:
  aliases         enabled, up to date (105 days, 3:48:59 older than index)
  app-install     enabled, up to date (1008 days, 14:58:48 older than index)
  apttags         enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  cataloged_time  enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  debtags         disabled
  descriptions    enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  relations       enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  sections        enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  sizes           enabled, needs indexing (9 days, 10:54:14.379738 newer than index)
  template        enabled, up to date
  translated-desc enabled, up to date (0:00:00 older than index)
Values:
  Value         Code Provided by
  app-popcon       3 app-install
  catalogedtime    4 cataloged_time
  installedsize    1 sizes
  packagesize      2 sizes
  version          0 update-apt-xapian-index
Data sources:
  Source                                           Description                                     Used by
  /usr/share/apt-xapian-index/aliases/popular-apps Aliases expanding names of popular applications aliases
  /usr/share/app-install/desktop/                  .desktop files provided by app-install-data     app-install
  /var/cache/apt/pkgcache.bin                      APT index                                       apttags, descriptions, relations, sections, sizes
  /var/lib/apt-xapian-index/cataloged_times.p      first-seen information for every package        cataloged_time

So we need reply and/or action from Ubuntu developers to have these fixes applied.


How to access multiple Skype accounts in Ubuntu 12.04

Skype (4.1, at least) includes the --secondary command line option to open a second instance. One could create a launcher and add this to the command.

See skype --help for more options.


Add this to your repositories.

     deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu natty main #xorg-edgers PPA
    deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates natty main #xorg-edgers PPA

or in the terminal:

     sudo add-apt-repository ppa:ubuntu-x-swat/x-updates

or Open the Software Sources menu by going to Applications->Ubuntu Software Center, then selecting Edit->Software Sources. Choose the Other Software tab and click Add.

     ppa:ubuntu-x-swat/x-updates

and then

     sudo apt-get update

see if it helps.


The solution is as follows: after copying and pasting something within Emacs, just press Option+Alt+K in Emacs, then I could again copy and paste a text from Mac to Emacs by Command+C then Command+V or Ctrl+V...


You can download the for your Ubuntu http://www.skype.com/en/download-skype/skype-for-linux/

Open Terminal,

Execute:

 sudo apt-get purge skype skype-bin

Or

First:

sudo apt-get -f install

Then

sudo apt-get install skype


Wine Windows Program Loader - out of memory

You cannot "allocate more memory for a particular program", that's not how Linux works.

You can either purchase and add more RAM to the server, OR use swap. Read man mkswap and man swapon.


I've had the same problem. There were no fonts visible in sites like Facebook, Hotmail... I managed to solve the problem the following way:

Firefox → Preferences... → Content → Advanced: Uncheck the box that allows other programs to choose the fonts for the page.

It's not the best solution, but however it works... I guess it's a bug with Firefox 30.0 - I hadn't any problem with Firefox 29... (I've noticed this problem after I updated Firefox to version 30.0 and LibreOffice to version 4.2.4.2)


Cannot access thumbdrive via router when GUFW firewall is on

Until you can get samba transfers working, you can access the USB via your browser:

Open your browser, and enter the address 192.168.0.1/shares , assuming that your router addresses have not been changed from the defaults.


Ubuntu 18.04 doesn't detect the GPU and I can't see 1920x1080 as a resolution after trying to install NVidia drivers

To fix it I did this:

Use gtf to create a modeline

>>> gtf 1920 1080 60
# 1440x900 @ 59.90 Hz (GTF) hsync: 55.83 kHz; pclk: 106.29 MHz
  Modeline "1440x900_59.90"  106.29  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

Find your display name, mine was eDP-1, yours might be HDMI-1 if using a monitor

>>> xrandr --display
eDP-1 connected (normal left inverted right x axis y axis)

>>> xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

>>> xrandr --addmode eDP-1 1920x1080_60.00


How do I detect when my system wakes up from suspend via DBus or similar in a python app?

Here is some example code that answers my question:

#!/usr/bin/python
# This is some example code on howto use dbus to detect when the system returns
#+from hibernation or suspend.

import dbus      # for dbus communication (obviously)
import gobject   # main loop
from dbus.mainloop.glib import DBusGMainLoop # integration into the main loop

def handle_resume_callback():
    print "System just resumed from hibernate or suspend"

DBusGMainLoop(set_as_default=True) # integrate into main loob
bus = dbus.SystemBus()             # connect to dbus system wide
bus.add_signal_receiver(           # defince the signal to listen to
    handle_resume_callback,            # name of callback function
    'Resuming',                        # singal name
    'org.freedesktop.UPower',          # interface
    'org.freedesktop.UPower'           # bus name
)

loop = gobject.MainLoop()          # define mainloop
loop.run()                         # run main loop

See the dbus-python tutorial.


Hide System Settings Applications in Dash

Try this:

sudo -H gedit /usr/share/applications/gnome-control-center.desktop

Add this line:

NoDisplay=true

Save and exit and try now

Hide those apps

To remove all apps founded in the system settings you have to do such as above for each app. Let's start with Appearance:

sudo -H gedit /usr/share/applications/gnome-background-panel.desktop

And add the line above then try.

Do this for other apps you want to hide

Hide from Dash keeping those in System Settings

create the directory  ~/.local/share/applications if you don't have it

mkdir  ~/.local/share/applications

Copy the .desktop files of what you want to hide, Doing example here for Appearance.

cp /usr/share/applications/gnome-control-center.desktop ~/.local/share/applications/

giving permissions:

chmod +x ~/.local/share/applications/gnome-control-center.desktop

Now edit and add "NODisplay"

gedit ~/.local/share/applications/gnome-control-center.desktop

Add the line

NoDisplay=true

Save and exit then logout and login.

The icon will removed from Dash search keeping available in system settings


Which software is available to connect to and manage cell phones?

Wammu (Click To install)

It works with any phone that Gammu supports, including many models from Nokia, Siemens, and Alcatel. It has complete support (read, edit, delete, copy) for contacts, todo, and calendar. It can read, save, and send SMS. It includes an SMS composer for multi-part SMS messages, and it can display SMS messages that include pictures. Currently, only text and predefined bitmaps or sounds can be edited in the SMS composer. It can export messages to an IMAP4 server (or other email storage).

It cannot browse the files on a phone.For that you can use gMobileMedia.
gMobileMedia (Click To Install)

A short description this application let's you easily upload and download images, ringtones, photos and applications to your mobile phone, all that you need is a data cable or any other connection method supported by gammu.
This application has been targeted mainly for Nokia cell phones (I only have those to test), but theoretically it can handle all the phones that gammu has support for.  This is also because I never could found an easy to use alternative in Linux for Nokia's PC Suite.


Ubuntu 16.04 ATI Radeon HD 5450 Graphics Support

According to the official release notes of Ubuntu 16.04 (Xenial Xerus), the open source ADMGPU driver should support most AMD graphics cards, so I can safely say yes, your graphics card should be supported.

However, I do recommend that when the official release of Ubuntu 16.04 comes (April 21), be sure to install using a live disc or a bootable disk to try out Ubuntu 16.04 and see how it performs on that particular machine, before doing a full installation.


How to overcome os not being found after installation

It sounds to me like during installation, the GRUB bootloader didn't get installed to the correct drive/partition, and the BIOS is looking in the wrong spot. When you install Ubuntu, it will ask you where you want the GRUB bootloader to be installed. Take a look at the dropdown menu that's given, and make sure it's installing to your primary hard disk (for example /dev/sda or /dev/hda; it may or may not have a partition number afterwards).

Additionally, check your boot order in your BIOS settings. Not having a ThinkPad in front of me I can't be sure, but some BIOSes will give the boot order as something like "Hard drive, network, optical drive, USB device" and from within hard drive, for example, it will let you pick which partition is the one you want to boot from. Other BIOSes will present each boot option on it's own, for example if you have two USB drives plugged in, they will each be presented as a boot option and you can select which one you want to try first.

You might want to try installing a later version of Ubuntu, upgrading from 12.04 to 16.04 will be a bit tricky as the older versions have been deprecated, and you don't want to try to upgrade directly from 12.04 to 16.04. For a machine of that age, Xubuntu or Lubuntu are good choices. If you're having issues with PAE, try a non-PAE 32 bit version; unless you've got 4GB of RAM in it I would not bother with the PAE version.

Have you tried a minimal installer? Try this one for 16.04 LTS. You'll need a network connection during install; just select Lxde or Xfce for the desktop environment if you need a GUI. This might be a wise choice, since you mentioned using 12.04 due to a PAE error


HD Videos are laggy with Mobility HD 4250 in 11.10

I do the process explained in this answer, and got a little better performance.

Anyway, ATI driver still suck.


Ubuntu 18.04 boot stuck at message “Started NVIDIA Persistence Daemon” after installing nVidia 390.74

If the problem only occurs due to the persistence daemon, you can disable the startup by modifying /lib/udev/rules.d/71-nvidia.rules, similar to the first part of this answer.
If necessary, also execute

sudo systemctl disable nvidia-persistenced.service

If, in the end, you need the nvidia persistence daemon, you can try to apply the second part of the answer to see if it works for you.


Trying Ubuntu 20.04 on Windows 10 from USB

Click the "power" icon in the upper right corner and select "Reboot".
You will be asked to remove the Ubuntu Live media and press Enter.
After you do it, your computer will reboot as if you never tried Ubuntu.


Fan on full speed on Asus N552VW / Ubuntu 16.04

I had to install the proprietary Nvidia driver.  Start the "Additional Drivers" program and install it from there.  Reboot and the fan starts operating on normal speed.

The drivers I downloaded myself from Nvidia website didn't work.

I'm pretty sure @wjandrea suggested this in comments, but he says he didn't.   I'd still like to give him the credit for solving this!


How often can I type exit without logging out?

You can use the SHLVL variable to determine how far nested in you're, to a shell started by a login process:

$ echo $SHLVL
1
$ bash
$ echo $SHLVL
2
$ bash
$ echo $SHLVL
3
$ sudo su -            # Start a login shell, clears $SHLVL
# echo $SHLVL
1
# logout
$ sudo su
# echo $SHLVL
4
# bash
# echo $SHLVL
5

Since the login shell from su - clears SHLVL, it has SHLVL=1. To quit the nearest such login shell in the shell ancestry, you have to use exit $SHLVL times.

SHLVL is not supported by dash, so whenever it enters the picture, the figure will be wrong. However, dash isn't the login shell for any usable account on Ubuntu, and SHLVL works on more advanced shells like bash and zsh.

I cannot reproduce your missing sudo su:

$ pstree -ps $$
init(1)───sshd(1404)───sshd(12614)───sshd(12673)───zsh(12674)───sudo(31012)───su(31014)───bash(31016)───pstree(31084)


Update manager doesn't offer an upgrade to the new release

If you're not getting an option to upgrade then your local mirror might be out of date, you can either wait a bit for that to resolve itself, or manually switch to another mirror. You should also make sure your software properties settings are correct.

How can I get apt to use a mirror close to me, or choose a faster mirror?

After that follow the upgrade instructions:

How do I upgrade to a newer version of Ubuntu?


Fsck gets mad when the file system is mounted

Running fsck -fy on a mounted ext3/ext4 formatted drive is not recommended because logically, it will be trying to analyse for inconsistencies on effectively a moving target.  The action of modifying the filesystem means that anything you have analysed will have to be reanalysed.

There is very similar question and answer on the Unix Stackoverflow site that has more detail as to why it is a bad idea.


Different user-name shown in Terminal versus menu bar

This is because your login username is shown in the terminal, but you can have another display name (usually your real name) for gnome/Unity. If you go to settings-> user accounts, you can change the display name associated with your login.


Help, I tried to change the login screen background in 18.04 and now i cant get to the login screen to input password

Try installing ubuntu again from wherever you can install it. It will work. And be aware you will lose the applications and the files; it will be set to the things you had when you installed ubuntu. In other words everything will be set to default. EVERYTHING. And that is why it tells not to edit the files. Try following this link on another computer and see the results. If that works then there must be something not working in the original computer.


cant access phpmyadmin after wordpress installation (LAMP stack)

They are 2 different sites. I will try to explain this as best as I can.
PhpMyAdmin is held in one location and when you loaded WordPress it writes it's own location. You need to go into the apache sites and create a new site to point to the the PhpMyAdmin directory.

I totally butchered that explanation. But I am pretty sure that is what happened.

It has been awhile since I worked with WordPress. So I am trying to remember all this. After closer look at my apache config. There is a conf file in /etc/apache2/conf-enabled/phpmyadmin.conf with the directive Alias /phpmyadmin /usr/share/phpmyadmin .

This is supposed to allow any virt server dir "phpmyadmin" and direct it to the phpmyadmin directory. WordPress is probably overriding that directive.

I would create a new site in /etc/apache2/sites-enabled/ (note that you really should create it in available then link it) and then point it back to the default (/var/www/html/) and set it on a different port. And you should get it back.


With awk:

$ awk -F, '{a[$1] = a[$1]=="" ? $2 : a[$1] OFS $2} END {for (i in a) printf("%s,%s\n", i, a[i])}' file.csv
A,dog cat horse cow deer goat
B,goat deer fish
C,dog cat  goat

With GNU datamash + sed:

$ datamash -st, groupby 1 collapse 2 < file.csv | sed 's/,/ /2g'
A,dog cat horse cow deer goat
B,goat deer fish
C,dog cat  goat

Note that the output order is not guaranteed in the awk version: if you have GNU awk >= 4.0  you can control that using the PROCINFO structure.


Gimp: toolbox display & main window resize issues in 12.10

I was having the same problem with GIMP and fixed it with the following steps:

Go to Edit > Preferences
Click on the Window Management option
Click "Reset Saved Window Positions to Default Values" button
Close GIMP

When you re-open GIMP, all of the toolboxes and window sizes should now be back to their defaults.

As for your Firefox problems, I can only suggest clearing out your cache and making sure you're running the latest version.


Run in terminal

sudo tee /etc/modprobe.d/blacklist-acer-wmi.conf <<< "blacklist acer_wmi"

and reboot. That should fix the problem.


How can I install .exe files of Windows 7 or more in Ubuntu?

You can set the Windows version that Wine uses using winecfg or winetricks. After setting the WINEPREFIX, etc. (if you don't know what that is, you don't need to), run winecfg:

Select Windows 7 from the Windows Version drop-down menu and click OK. That's it.

With winetricks, run:

winetricks win7


Invalid argument argument when moving files

You get invalid argument because you used dot (.). Your command is trying to rename current directory to ../../GuardDog-CMS, but this is impossible because in Unix like systems slashes are not allowed in filenames.

Use * if you want to move everything from the current directory:

mv -v * ../../GuardDog-CMS

If you have hidden files in the current directory, use shopt -s dotglob nullglob command before to move the files.

See also: How do you move all files (including hidden) in a directory to another?


How do I covert my 2 backup mage1.img and image0.img fils into 1 .iso file to reinstall

To combine 2 or more files it is easy to use cat as this:
cat image1.img image2.img > result.img

But to make a bootable .iso image tasks is more complicated, xorriso is a nice tool, please refer to https://willhaley.com/blog/custom-debian-live-environment/
xorriso part.
In addition if you made .img file using dd you can restore back your OS using a live image running a command like this:
dd if=/path/to/image1.img of=/dev/sdxx bs=64M


How do I lock the screen before hibernating?

I suppose gnome-screensaver-command needs to know the DISPLAY variable you are using. Since (in theory) multiple users can be logged in on one computer (also graphically), it needs to know whose display(s) to lock. The first one is ":0". Try

su - myUsername -c "DISPLAY=:0 gnome-screensaver-command -l"


Nvidia GTX 1660 - which driver do I have to install

I have GTX1650 which is not the same but close enough, it has to be the same family. And I'd say it depends on the version of Kernel you use, with the default 4.15 nvidia proprietary driver 430 worked fine for me with one bug - there was a glitch when I maximized and then minimized videos in Firefox.
You can have another version of Kernel in 18.04 if you use Hardware Enablement Stack (you can read more on the official wiki) - https://wiki.ubuntu.com/Kernel/LTSEnablementStack) I tried to update to 19.10 having the newer versions of kernel and it didn't work fine with any of the available drivers - 430, 435, 440 and nouveau, it gave me glitches on login, sound from hdmi stopped working etc, so I wouldn't recommend that.
However migrating to 20.04 with kernel 5.40 and nvidia driver 440 it works better than ever, even small glitch in Firefox has disappeared. If you can consider upgrading to 20.04 I'd probably recommend that, but backup all your data in case if you find any issues to be able to revert back. You can create some USB with the default version of your system if you have Ubuntu preinstalled or simply make a Snapshot with Timeshift to re-install and return to the previous state, just back your personal data up somewhere else (Dejadup) because it's not a good idea to include home folders to a snapshot.
As for mesa drivers, the article you shared is pretty obsolete. most of the good nvidia drivers are available via the system itself and starting from 19.10 are included to the ISO to do not download them separately. Not all the version have the newest ones however, I believe 18.04 has only 435 as the hugest version but starting from 19.10 you have 440.
you can check what is available for you and also the recommended ones with:
ubuntu-drivers devices

to check if you have the propietary ones installed:
nvidia-smi

or dkms status to see the modules loaded in kernel (it will show the driver version normally).
You can search drivers to install via:
apt search nvidia-driver

or
apt-cache search nvidia-driver
and install via sudo apt install nvidia-driver-xxx replace xxx with version, of course
If you agree with the recommendation provided by ubuntu-drivers devices command you can use sudo ubuntu-drivers autoinstall, it will install recommended ones (all not only vga if you have any other difference)
If you already have any drivers installed you need to delete them first before to install the newer version, better if you have any cpu build-in graphic.
All the installation can be done via GUI as well using more drivers menu in software updater, but in my experience it doesn't always work well and shell is much more effective way to manage it.


Intel HD 3000 (Sandy Bridge) 3d games problem

This bug is your issue. Buggy intel drivers. There are some very ugly workarounds that I have tried myself that can make the artifacts go away but (in the case of minecraft, at least) do not help the screen flickering.

EDIT: Here's the workaround I crafted up. Firstly, you'll need a newer version of intel-gpu-tools to tweak some data. Go here to pick up a newer version. You may add the PPA but to avoid a lot of unnecessary updates I recommend just manually downloading the package through "View Package Details", then expand the dropdown entry for the oneiric series and download either the AMD64 or i386 package, depending on whether you have 32 or 64 bit. Install the package.

With this installed, you're going to make a crontab. This will run a command AS ROOT on boot. Run the command:

sudo crontab -e

in the terminal. Type in your password. It will ask you which editor to use. Just pick the default (nano). Scroll down to the bottom and on a new line enter the following:

@reboot intel_reg_write 0x9404 0x00001800

To save and exit, press control+x, type y, then press enter. Perform a reboot.

From now on the artifacts should no longer be there.


Where is mongo database folder on the filesystem

You should be able to find the location in the configuration file: /etc/mongod.conf

grep -i dbPath /etc/mongod.conf

According to mongodb docs:

The default path is /data/db directory

  By default, MongoDB listens for connections from clients on port
  27017, and stores data in the /data/db directory.

If dbPath is set, the mongodb will use the directory specify by dbPath

  If you want mongod to store data files at a path other than /data/db
  you can specify a dbPath. The dbPath must exist before you start
  mongod. If it does not exist, create the directory and the permissions
  so that mongod can read and write data to this path. For more
  information on permissions, see the security operations documentation.


Do UEFI dual boot OS's need to be on the same physical disk?

No, they do not. My system is a counter-example.

You can see from the gparted shots that the ESP and Windows partitions are on sda, and the Ubuntu partition is on sdb.

See also Install Ubuntu alongside Win 8.1 on separate physical drives and dual-boot?

And yes, my root partition is ludicrously big. But it does not matter.


Why is my ~/.profile being executed on opening a terminal?

Although there are a number of possible reasons why this might happen (such as sourcing the .profile from inside .bashrc), it seems in this case the reason was that the Run command as login shell box was checked under the terminal's Edit --> Preferences... General tab.

The giveaway is that echo $0 shows -bash (indicating a login shell) rather than plain bash.

Note that gnome-terminal has a similar setting, under Edit -> Profile Preferences --> Command.