You can use udev rules to match with your devices and then assign an icon.

NOTE: In this example I will change the icons for 3 devices, usb pendrive, partition with Opensuse and a partition (Raid) with Linux Mint.

For Ubuntu 12.10 and Newer.

1) I have 3 icons in my Desktop for each device (2 png and 1 svg images), copy the 3 icons to the /usr/share/pixmaps folder and give them perms.

cd ~/Desktop
sudo cp linuxmint.svg pendrive.png opensuse.png /usr/share/pixmaps/
cd /usr/share/pixmaps/
sudo chmod 644 linuxmint.svg pendrive.png opensuse.png

2) List the usb pendrive to know the "idVendor" and "idProduct", in a Terminal type:

lsusb

Write down the numbers after "ID".

In my example:

  Bus 002 Device 003: ID 0930:6545 Toshiba Corp. Kingston DataTraveler
  102 Flash Drive / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick

The "idVendor" is 0930 and the "idProduct" is 6545
I'm going to match that info with the "ATTRS{idVendor}" and "ATTRS{idProduct}" keys for my usb Pendrive.

3) Make sure your partitions are mounted, then list your partitions and find the attributes.

df -h

In my example:

  /dev/sdc3                  289G  6.3G  282G   3%
  /media/hermes/OpenSuse

  /dev/mapper/pdc_cjjfccgf3  296G   68G  213G  25%
  /media/hermes/Linux-Mint-Raid

4) List the attributes of the OpenSuse partition with "udevadm info -a -n device name"

udevadm info -a -n /dev/sdc3

You can use this info to match the partition.

In this example I'm going to match with the "KERNEL" and "SUBSYSTEM" keys for the OpenSuse.

  KERNEL=="sdc3", SUBSYSTEM=="block"

Write down this info.

5) In case of the Linux-Mint-Raid partition, I'm goin to match the rules with the "SUBSYSTEM", "ATTR{size}" and the "ID_FS_LABEL" ENV variable.

List the attributes and variables of the Linux-Mint-Raid partition with "udevadm info -a -n device name" and "udevadm info -q all -n device name".

udevadm info -a -n /dev/mapper/pdc_cjjfccgf3
udevadm info -q all -n /dev/mapper/pdc_cjjfccgf3

Creating the udev rule.

6) Go to the /etc/udev/rules.d folder and create a file with your favorite editor. eg: 99-devices-icons.rules

cd /etc/udev/rules.d/
sudo nano 99-devices-icons.rules

Write down the info to match each device and then with the ENV{UDISKS_ICON_NAME} you will assign an icon.

In my example:

  ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545",
  ENV{UDISKS_ICON_NAME}="pendrive" KERNEL=="sdc3", SUBSYSTEM=="block",
  ENV{UDISKS_ICON_NAME}="opensuse" SUBSYSTEM=="block",
  ATTR{size}=="629145600", ENV{ID_FS_LABEL}=="Linux-Mint-Raid",
  ENV{UDISKS_ICON_NAME}="linuxmint"

In nano you can save the changes with:

Ctrl +O,Enter then Ctrl +X

7) To refresh the udev rules and see the changes, type in a Terminal window:

sudo udevadm trigger

For Ubuntu 12.04.

The same but you should assign the icon with ENV{UDISKS_PRESENTATION_ICON_NAME} instead ENV{UDISKS_ICON_NAME}

  ATTRS{idVendor}=="0930", ATTRS{idProduct}=="6545",
  ENV{UDISKS_PRESENTATION_ICON_NAME}="pendrive" KERNEL=="sdc3",
  SUBSYSTEM=="block", ENV{UDISKS_PRESENTATION_ICON_NAME}="opensuse"
  SUBSYSTEM=="block", ATTR{size}=="629145600",
  ENV{ID_FS_LABEL}=="Linux-Mint-Raid",
  ENV{UDISKS_PRESENTATION_ICON_NAME}="linuxmint"

Hope this helps.


How to use wired and wireless interfaces simultaneously?

When you create a socket, you can bind() it to a specific IP address.  Whichever interface is associated with that address will be used.


I have just accidentally uninstalled synaptic manager. How do I install it again?

Try these commands in terminal,

sudo apt-get purge synaptic
sudo apt-get install synaptic

or

sudo apt-get install --reinstall synaptic

Yes,it was really important.You can easily check which packages are installed and which are not installed through synaptic.


HD Graphics 530 (i7-6700) & latest stable kernel

Nothing works... When you switch to 'Intel HD530' there is a freeze and a reboot. It is necessary to wait for a stable kernel.

Details of my configuration:

Intel 6700HQ (Intel HD530), DEXP H168
Ubuntu 15.10
Kernel 4.4.0.999 [19.01.2016]
Intel_Graphic 1.2.1
Nvidia-352 (Prime)

$ lspci | grep VGA
(00:02.0)   VGA compatible controller: Intel Corporation Device 191b (rev 0.6)


iptables or firewalld to close all ports except ssh?

For something simple like this I would use ufw. It is installed by default, but let's make sure:

~$ which ufw should return \usr\bin\ufw if ufw is installed. If ufw is not installed:
~$ sudo apt-get install ufw.

The following steps will not take affect until you enable or reload the firewall, so you will not be kicked out.

~$ sudo ufw default deny incoming
~$ sudo ufw default allow outgoing
~$ sudo ufw allow in 22/tcp

You just told the firewall to (a) not let anything in, (b) let everything out, and (c) let tcp in on port 22. To make these rules effective:

~ $ sudo ufw disable
~ $ sudo ufw enable

You will now be warned:

Command may disrupt existing ssh connections. Proceed with operation (y|n)?

If you are sure you have followed these instructions carefully, answer yes. Finally, let's display the firewall status with sudo ufw status verbose:

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW IN    Anywhere
22/tcp (v6)                ALLOW IN    Anywhere (v6)

Please read the ufw man page for additional information.


How can I 'open in terminal' when using Ubuntu subsystem on Windows 10?

This option is available within the Windows 10's extended context menu. You can achieve this menu by holding the Shift key and click with the right mouse button, somewhere in the empty space in the File explorer.

There are few other approaches, but for my this is pretty enough.


How to script two informations with one command?

Have you tried awk?

$> iwlist wlan0 scan | egrep 'Address|ESSID' | awk -F : '{ $1="";print}'
  00 24 7E 1F 7B 4D
  "YouShallNotPass!"

With -F I changed the separator to colon : and alas took other colons from address, which can be remedied with setting OFS, like below:

$ iwlist wlan0 scan | grep Add | awk -F : '{OFS=":";$1="";print substr($0, 3) }'
00:24:7E:1F:7B:4D

Looking at the results of 'iwlist ... scan' itself, they aren't always regular. I should mention two other lines you won't get this way:

Quality and Signal (no colon), use instead

iwlist wlan0 scan | grep Quality | awk '{print $3}' | awk -F = '{print $2}' for Signal
iwlist wlan0 scan | grep Quality | awk '{print $1}' | awk -F = '{print $2}' for Quality

Bit rates (well, in my case there are three lines with Bit rates, and one has no colon, just values - obviously the Awk script above misses it).

I'm not so familiar with what bit rates display exactly so not knowing your use case for this and whether this differs between many WiFi drivers/cards/others I lack info to help here.

Mind you - there are other options, but you withheld what you need and what for, so I gave you simple (if long) Awk-specific solution. Same info can be obtained via Perl regex or even Bash.


Many many folders are affected when installing software. For a complete picture see How to understand the Ubuntu file system layout? Directories you will need are /bin/, /sbin/, /usr/, /etc/, /var/ , /lib/, /home/, /opt/ (3rd party software goes to /opt/; might be empty). /boot/ might be needed too depending on what you install.

I would reconsider if I was you. Your approach is pretty Windows oriented. The directories you need are almost all of them. And there are better methods.

  Backup of your installed software after installing Ubuntu

There is a method you might like: /var/cache/apt/archives/ holds all the installer files you need if you want to restore your system. If you back that up and re-install Ubuntu you can copy them back to /var/cache/apt/archive and can use the dpkg command to restore them. That would require you to backup that directory and your /home/ (all settings are there). This might be a good option to restore a system with a re-install and after installing a manual update of those packages and a restore of your /home/.

  Full system backup

If you want to do this a full system backup is the best option. It would stop you from picking directories and the directories you do not nee is marginal at best. You can even automatic this with an rsync backup where the system only copies what got changed.  Saves a lot of disk space. Have a look at ...

Backup your home directory with rsync and skip useless folders

A full system backup is a good method in case your hardware is going to act up. Think bad sectors, crashes due to hardware failure. Upgrading to a new release that might fail. Or to copy your system over to a new harddisk, or new system. We are talking about some of the bigger problems computers can have or software can cause.

It also guarantees you backup everything. So if there is some obscure directory we know nothing about that you would have liked to see a backup of this makes sure it will be there on the backup.

  Single file backup

In case of you wanting to save yourself from yourself a full system backup is overkill. If the main concern is editing files that might go wrong and you effectively kill your system yourself the best approach is to create a backup of the file you want to edit. Let's assume you want to manually edit a file called "test". A simple...

cp file.txt file_$(date +%Y%m%d_%H%M%S).txt

will create a file with the date with seconds include.

cp test.txt test_$(date +%Y%m%d_%H%M%S).txt
~/Downloads$ ls test*
test_20141207_171058.txt
test.txt

This will be more than enough to keep your system from breaking down by your own hands. Normally you can still boot and restore your file but if needed you can also use a live dvd to just copy the file back over the original file with...

cp test_20141207_171058.txt test.txt

are restore your system to a working one.

If you keep forgetting to make backups: Gedit is capable of making automated backups (it adds "~" at the end of the file before you save the changed one).


Bash script not running at startup from rc.local

Replace

log

by an absolute path

/home/katph/log

E.G.

#!/bin/bash
echo "hi" > /home/katph/log
exit 0


Setting up an Email alert on "crontab" for SOME tasks

As noted in man 5 crontab:

The crontab file is parsed from top to bottom, so any environment
settings will affect only the cron  commands  below  them  in  the
file.

So you can simply set MAILTO= (empty) immediately before the task that you don't want alerts from, then back to MAILTO="<my_Email>" if you had later jobs that should send alerts.


How to integrate Banshee into the system tray for gnome

Yes you can! Here is a "how to" on how you install the extension:

http://www.webupd8.org/2011/10/gnome-shell-mediaplayer-extension.html

As it says at the bottom of the post you also need to install gnome-tweak-tool to be able to activate it.


Boot process stuck on Started Light Display Manager

Boot in the recovery mode (By holding shift key on BIOS prompt).
Select the option to drop into a Root Session.
Run mount -o remount,rw / to mount your drive in a RW mode.
Now, analyze your problem with lightdm. You can also try setting a different DM using dpkg-reconfigure lightdm or install the lighter xdm.


awk will run the commands (except BEGIN/END blocks, etc.) on every line. So... exit after processing the first line:

awk '{print $1; exit}' /some/file

Or qualify to include only the first line:

awk 'FNR == 1 {print $1}' /some/file #still runs the test on all lines


Nodes can't connect to server after bootstrap

The nodes are trying to contact 192.168.0.101 which they think is the maas server.  However your question said that it's not on that address.  Is your DEFAULT_MAAS_URL configured properly in /etc/maas/maas_local_settings.py ?

Also if using .local as a domain it requires mDNS (i.e. Avahi) to work across the LAN, so I wonder if your broadcast traffic is working as it should be?


Copy files from internal hard drive to external hard drive using command line in ubuntu 14.04

One possibility would be for you to drop to the command prompt by pressing:

Ctrl+Alt+F1 (or any function key from F1 through F6).

This would bring you to a login prompt where you'd need to enter your username (press enter), then your password (press enter).

From there you'll need to connect and then mount your external hard drive to your machine following these instructions. Once you've mounted the drive, you can use the cp command to copy your files from their source to the external hard drive destination. For example:

    cp -av /home/ubuntu/Documents /media/External_Drive_Name/backup_folder/


Key '@' (Keycode 49) and key '<' (keycode 94) are inverted on macbookPro keyboard

I accidentally stumbled upon this patch, which led me to the solution:

Open /etc/default/keyboard for editing and set:

XKBOPTIONS="apple:badmap"

At next reboot those keys will be switched.


I had this exact same card for a while.. There are no Linux drivers.. I solved the issue by installing the "gnome-session-fallback" package which replaces Unity with GNOME, much less system resources needed.


printer problem ubuntu 20.04 localhost not available, remove ippusbxd?

ippusbxd essentially auto-configures a USB connected printer when it is plugged in. You will lose that functionality if it is removed from the system. That's all.
OTOH, ippusbxd is decidedly sub-optimal. Even its author would support your removing it from your system. It has been replaced by ipp-usb in later editions of Ubuntu. There is a 20.04 Debian package here should you wish to have a better experience of auto-setup on USB.
Otherwise, stick with the vendor drivers.


can a ftp domain be changed from using ip to domain name like domain.com?

To use domain.com instead of the IP, the FTP client resolves the name to an IP address.

Simple case

If "I" means "me alone", edit the hosts file (/etc/hosts on Unix, c:\Windows\system32\drivers\etc\hosts on Windows) on the PC you use for the FTP client and add the IP address to which you add the name(s) you want.

Otherwise

If "I" means "any random user",  you use DNS name resolution. "domain.com" must be known everywhere and point to your address. So you have to register the name (if available) at a registrar (this entails a price, around $15/year for common names and TLDs) and then associate this name with your IP(*). After a few hours, all the internet will relate "domain.com" to your IP address.

(*) assuming the IP is public, not in the range 10.*.*.* or 192.168.*.*


How to get root using Windows installer for 10.04 LTS desktop?

Use sudo passwd root command.

It is not password. It is passwd

But enabling root account is not a recommendation on Ubuntu.

Then If you want to log on as root, use

su root


Elo Touch USB touchscreen not working on Ubuntu 18.04

I have had some experience working with Elo touchscreens on an Ubuntu (Mate) 18.04 system.  Touch input wasn't working with the screen when I connected it, but after some testing, I found that if I remove/reinstall the hid_multitouch module it starts to work:

modprobe -r hid_multitouch; sleep 1; modprobe hid_multitouch

I have been looking to see if there's a better way to handle this, or if this should be considered a bug.  As a bug, I have no idea which system it would be filed with (kernel, Xorg, etc).  My expectation is that when the touchscreen is connected that the touch works without needing to perform any additional hacks, but for now that seems to work OK for me.


Short answer: You can't.

At no point is unencrypted data transmitted on your network interfaces.

What you are asking is exactly what VPNs are designed to protect you from.


How to change default boot disk and skip the Grub screen?

The problem is that GRUB depends on some configuration files that are stored in the Ubuntu partition, and since your Ubuntu is in the external drive, it works only when you have that one plugged in.
There are multiple solutions to this problem:
Personally, I recommend solution number 1. Some other people may differ.

Insert a Windows CD and boot into a Recovery Console and run fixmbr, this will restore windows boot-loader on your internal HDD.
In order to boot Ubuntu from your external drive, you select the external drive in the BIOS boot order (or boot menu) as boot option (assuming that the external drive has grub installed, which it should, if it doesn't, you may need to reinstall GRUB on your external drive (not on your internal one) or just reinstall Ubuntu into your USB HDD again, and make sure to select the external drive the device to install grub to).

Make a new partition on your internal drive, and make it the /boot partition, which will contain all the configuration files needed for GRUB to boot.
This partition will mainly have all files contained in your /boot folder under your Ubuntu partition. You may also need to reinstall GRUB in order to tell GRUB to find the GRUB files in the new partition. You may also need to mount this new partition to /boot in Ubuntu.

Install Ubuntu alongside Windows in your main HDD, this will reinstall GRUB and everything will work, but you wont have Ubuntu in your external drive.

If you have any other Linux partition inside your internal drive, you may reinstall GRUB and make this other Linux partition the one containing the GRUB files.


It looks like you've installed 64 bit guest additions in a 32 bit guest. You need to install the 32 bit version instead.

Also, just run the game on the Win7 host system instead of running it under wine on an OS it wasn't built for, in a VM, on top of the OS it was built for.


What is x-nautilus-desktop:/// and why do I have it?

Right click on x-nautilus-desktop:///, then click remove.

You added unintentionally the Desktop to your Bookmarks.

No one has access to your Desktop.

It happens to me after pressing the shortcut Ctrl+Super+D to get to the Desktop and subsequently  pressing without intention the combination Ctrl+D which adds the actual path to the Bookmarks in Nautilus.


SD card showing up in `dmesg` but not elsewhere

The problem seems to be related to a misbehaving auto suspend function of the ums_realtek driver.

From the output of dmesg of the question one can see that the device gets detached again 4 seconds after the SD card is assigned a device name.

[  210.871920] sd 3:0:0:0: [sdc] Attached SCSI removable disk
[  214.498456] usb 1-6: USB disconnect, device number 5

A simple fix during runtime is to disable the auto suspend function of the ums_realtek driver. Not sure if both are needed or if just one does the trick. Maybe @MaciekS can do further testing on this.

echo 0 | sudo tee /sys/module/ums_realtek/parameters/ss_en
echo 0 | sudo tee /sys/module/ums_realtek/parameters/auto_delink_en

To make these settings reboot resistant, one has to create a file.

# sudo su
# cat > /etc/modprobe.d/ums_realtek.conf << 'UMS'
options ums_realtek ss_en=0
options ums_realtek auto_delink_en=0
UMS

Since I do not have a Realtek based SD card reader nor a Ubuntu 19.04 I cannot further debug this.
It also might be that a user space program or daemon like power saving things is triggering this and the problem is solved by removing the possibility to suspend USB devices.


How can I avoid entering password every time after wakeup from suspending in Ubuntu 18.04?

For the CLI way, launch Terminal and run

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false


A udev rule for automatically executing rsync scrips is not working

When you try to match a device in this case a block device, then you should try to match the device as uniquely and late as possible (in your example ENV{ID_SERIAL_SHORT} is part of multiple events, this will make your script run several times).
udevadm will allow you to monitor udev events:
udevadm monitor --environment --udev

Or kernel uevents:
udevadm monitor

You can also trigger these events by writing  to the uevent file in the /sys tree:
echo add > /sys/block/sdc/sdc1/uevent

prints either events or uevents, depending on which udevadm monitor is active.
How to trigger a specific partition using UUID.
ACTION=="add", \
ENV{ID_FS_UUID}=="9AE4-6A76", \
TAG+="systemd", \
ENV{SYSTEMD_WANTS}+="gopro-backup@%E{ID_FS_UUID}.service"

Don't forget to reload your udev.rule.
/etc/systemd/system/gopro-backup@.service:
[Unit]
Description=Backup action for GoPro

[Service]
Type=oneshot
ExecStart=/opt/bin/gopro_backup.sh %i

You do not need to start or enable this .service.

An example how you can control your backup with a fstab entry (use: lsblk /dev/sda -o +UUID to list part uuid's):
UUID=<uuid> /media/GoPro vfat defaults,noauto 0 0

(if you comment this entry the backup want run).
/opt/bin/gopro_backup.sh (very simple):
#!/bin/bash

[[ -n $1 ]] && uuid=$1 || exit 1

if ! findmnt -f --fstab UUID=$uuid &>/dev/null
then
   systemd-cat -t GoPro -p 4 <<< \
   "Warning: Device entry is missing, check your fstab."
   exit 1
fi

[[ -b /dev/disk/by-uuid/$uuid ]] || exit 1

# Retry 5 times.
while :; do
   if (($((++b)) > 5)); then
      exit 1
   elif findmnt -f UUID=$uuid &>/dev/null; then
      break
   else
      mount UUID=$uuid || sleep 5
   fi
done

source=$(findmnt UUID=$uuid -nfo TARGET)

mkdir -p /opt/backup/GoPro/video
rsync -a --delete --ignore-existing "$source/" /opt/backup/GoPro/video

# Success ?
if (($?)); then
   systemd-cat -t GoPro -p 3 <<< \
   "Error: Backup: Failed."
else
   systemd-cat -t GoPro -p 6 <<< \
   "Info: Backup: successful."
fi


bamfdaemon causing performance issues in Ubuntu 14.04

From What does bamfdaemon do?

  When you launch/execute/open a desktop program/application:  Unity will either pop up a new icon on the launcher(dock) and/or add an arrow to an existing icon. Each icon is not an executable; it is a .desktop file. bamfdaemon helps this by determining whether an arrow needs to be added to an existing icon, or a new icon be popped up, along with other behaviors dependent on application identity.

And also, it does many other helping tasks in regards to help GUI to provide nice user experience. So killing this will not work, as first of all it is a daemon process, by nature it will be re-spawned by system. Also it can cause severe issue with your GUI as it could mess that up!

Solution to this is not simple as re-installation or removal of component.
I suggest two methods here...

Increase Unity Performance or DuckDuckGo.
Change Desktop Interface OR Try any of these Linux Desktop Environments

NOTE: Before you try any of above link...

If you have lesser amount RAM, (I'm not sure how much amount of RAM sufficient to run Unity smoothly!), then better go for second option, choose any light-weight desktop interface.
If less RAM is not the case and system has graphics card, then I guess changing driver in Xorg configuration can do some improvement in performance. (This suggestion is after reading Graphical issues and performance In ubuntu 14.04 LTS server with GUI answer to this)

Not sure much about this NOTE in your case! But could be helpful to others, may be!)


Does strength of LUKS encryption key directly depend on password?

#1 is correct
The encryption key is always generated randomly and will have the same length no matter the password. An attacker would always attack the password, as it is far weaker than the encryption key.
The encryption key will be encrypted separately using the password, so changing the password to a stronger one will improve security.


Extend a partition with nonadjacent space available

Your disk appears to be partitioned using GPT and boots using EFI, so logical/extended partitions do not apply to you.  The only thing you need to do is boot from the livecd or usb, and move sda4 to the left, then move sda5 to the left, then grow sda5 to the right.  This should be quite easy using gparted from a livecd/usb.  The risk is in moving those two partitions to the left.  A power failure or crash while moving those partitions will destroy the data in them.  Hence, have a backup.


Problem with internet connection Alfa AWUS036H on Ubuntu 12.04

I had the same issue with a Zyxel Adapter. After a few days trying to solve the issue without success, I bought a new adapter compatible "out-of-the-box".

If you are persevering enough, you will probably find a solution from someone in this community with your current adapter.

But if you're looking for a quick solution, check at this link :https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported which adapter is compatible (you can find some under 20$) and you will have quickly a working solution !


How Improve pixel/resolution line using Gimp?

We can't magically add more information to an image than there is. The source image is too tiny to allow much further scaling without making the inherent artifacts too obvious:

Source image linearly scaled to 500%

However there is a somewhat better scale filter in the G'Mic plugin (install gimp-gmic ) then G'Mic > Repair > Upscale (diffusion):

G'Mic upscale (diffusion) 500%

But still there are many unwanted artifacts and heavy aliasing which we will be unable to remove.

Much better results for such easy icons can be achieved by tracing the image automatically or even better manually to a vector graphic using Inkscape , which can then be scaled without loss:

500% scale for a) source image b) bitmap automatically traced c) manually traced/reconstructed image


How to watch videos in UK from somewhere else?

You will have to use a VPN service which provides UK based IP-addresses. There are some free VPN providers (like vpnbook or VPNreactor and google for others), but you are better off with a pay-for service as those are more reliable and aren't that expensive at all, just google for some.


flash player plugin 11.2.202.442 over 11.2.202.440 update

You can download and update it from Adobe website :

http://get.adobe.com/flashplayer/

or download flash player 11.2.202.442  debian package :

http://www.ubuntuupdates.org/package/canonical_partner/trusty/partner/base/adobe-flashplugin


I had the same issue.  Here's how I solved it:
Enable Remote Desktop Sharing
To begin, we first need to make sure that remote desktop sharing is installed on the target Ubuntu system. Run:
sudo apt update && sudo apt install -y vino

Then use the activities menu to search for "Sharing" in system settings.
Alternatively, you can execute the command gnome-control-center sharing to bring up remote desktop sharing settings window.
Click on "Screen Sharing" to begin the remote desktop configuration.
Make sure that all switches are set to "ON". In case you have multiple networks, select which network will be used for remote desktop sharing. Set a password if necessary.
The "Allow connections to control the screen" option gives a remote user the ability to actively interact with a remote desktop. If this option is NOT ticked, the remote desktop session will be set as read-only.
Once the Ubuntu's remote desktop feature is enabled you can optionally confirm that your system is now listening on port 5900.
Open a terminal and enter:
ss -lnt

The output should be similar to:
State    Recv-Q   Send-Q     Local Address:Port     Peer Address:Port  Process
LISTEN   0        4096       127.0.0.53%lo:53            0.0.0.0:*
LISTEN   0        128              0.0.0.0:22            0.0.0.0:*
LISTEN   0        5              127.0.0.1:631           0.0.0.0:*
LISTEN   0        80                     *:3306                *:*
LISTEN   0        511                    *:80                  *:*
LISTEN   0        128                 [::]:22               [::]:*
LISTEN   0        5                  [::1]:631              [::]:*

In case you have the UFW firewall enabled, open port 5900 for incoming connections by runnung:
sudo ufw allow from any to any port 5900 proto tcp

You should see:
Rule added
Rule added (v6)


How to call ksh script within bash script?

This is wrong:

bash setup.sh -silent -options options.txt

By using "bash" to start the script you skip the she-bang.

I would assume you need to do this:

./setup.sh -silent -options options.txt

(with the executable bit set) or

ksh setup.sh -silent -options options.txt

===

This is bad behaviour:

 PATH="/app/soft/Installations/QueryReportingAnalysis_Linux/"

I would use a specific variable name for this that is not the same as an environment variable. Doing it like that will come back to bite you.


The proposed repository you should only use if you are able to solve problems. The latest scilab version in the offical Ubuntu repositories is 5.5.1

Open the file sources.list:

sudo nano /etc/apt/sources.list

and comment out the line that contains proposed with a #, eg:

# deb http://archive.ubuntu.com/ubuntu vivid-proposed multiverse restricted universe main

Then run this commands:

sudo apt-get update
sudo apt-get install scilab


This action will also remove the following packages [all my apps]

Despite the problem no longer being reproducible, I'd suggest that this is the kind of message you'd get if you were trying to install a package with a massive incompatibility -- for instance, if the version of Wine you were attempting to install needed to uninstall KDE Desktop, you'd get a warning that it was going to uninstall everything that depended on KDE Desktop -- which might be a list of a hundred or more packages, and due to cascading dependencies, might well include packages you wouldn't think of as being part of the desktop environment.

This kind of massive uninstall can happen when you try to install a package that depends on a newer or older version of some libraries, for instance -- especially if the dependency is written to a single, specific version on one side or the other.  That, in turn, can happen if you try to make too many installations (especially major ones) without at least logging out and back into Ubuntu (restarting the hardware usually isn't required).


How i can change my splash screen with zsh terminal?

The KDE splash screen configuration is stored in:-
/usr/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/lockscreen/LockScreen.qml

My suggestion is your custom image directory create a symlink to a real image file then all you have to do is change the symlink to a different file.
Example assuming you configure KDE to use ~/images/kde_splash.png
e.g.
ln -sf ~/images/batman_logo.png ~/images/kde_splash.png

or
ln -sf ~/images/superman_logo.png ~/images/kde_splash.png

Which means whenever KDE reads ~/images/kde_splash.png it will reference the file you have chosen.


How to install Mesa 20.1-devel Git on Ubuntu 20.04

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade


Lost transparency of the Default panel and a few questions about KDE

I'm using kubuntu 16.04, had to install from scratch as i bought a new ssd drive, 16.04 for me has been very stable, looks good, feels stable, no crashes, despite running QT Creator, Firefox with hundreds of tabs, text editor, zim, krusader. ktorrent, virtual machines, kmail, telegram in 8GB ram. I highly recommend kubuntu 16.04 as very stable & highly configurable, whatever you don't like change it.


Can I add a user group to another group in Ubuntu?

You have to add each user to the group CanView. You can't add a group to the group CanView.

But you could use ACL.


You need a bit more info about your system. Check this link to find out your system details: http://www.wikihow.com/Find-out-Your-System-Information

Then go to this page to check out ubuntu minimum system requirements (look at ubuntu desktop): https://help.ubuntu.com/community/Installation/SystemRequirements

Most probably you have the needed requirements to run ubuntu 14.04.


sudo service lightdm restart

If that doesn't work, then do

sudo apt-get install --reinstall ubuntu-desktop

on tty1, and then do step 1.


touchpad problems in newly installed ubuntu 20.10

To remove the red circle forming around the cursor when tapped, do the following:
Settings -> Universal Access -> Click Assist (disable it to remove the red circle)


How do I programmatically disable "Connectivity Checking"?

There is a flag in the file /var/lib/NetworkManager/NetworkManager-intern.conf that is set to false if you disable the setting in the UI:

[connectivity]
.set.enabled=false

You can use the tool crudini to set the flag using the command line or a script:

sudo crudini --set /var/lib/NetworkManager/NetworkManager-intern.conf "connectivity" ".set.enabled" "false"

For some reason the ui doesn't get updated until a reboot (didn't test logoff/login).
Maybe there is some other command line tool that does the change and ensures that the UI gets updated as well.

btw: I used the following command to get the files that changed recently (only checked /var and ~ so far):

sudo find /var -newermt "-1 minute" -ls

There aren't any changes to gsettings. I monitored the settings using this command:

dconf watch /


if i can mount an iso will it also install?

AcetoneISO's features are pretty clearly outlined at SourceForge, and it doesn't look like it will be able to help you in this case.

Once an OS shuts down, all mounted media should be unmounted. It isn't really possible to simply mount the image and then magically be able to install Ubuntu, you need to copy the image and install the boot loader to a USB disk or DVD or follow one of the options here.


Solution for outdated Ubuntu Version 12.04

but what version should we be considering

Always the latest LTS a couple of months after that LTS got released. Let other people iron out bugs for you before you upgrade a production server.

  and what challenges might we face going from 12.04 to newer supported version(s)?

The Ubuntu server versions do not tend to need more power the newer the version. Specs have been fairly the same so not a lot going to be a problem there.

Always check your video card and NIC chipset against the drivers supplied. Old graphics card support gets dropped every new LTS in case you have one. NIC chipsets do not get dropped that often but you never know.

There is 1 very big change: systemd got introduced and it is a beast: it completely changed the boot process and how services are taken care off. And that can be the biggest challenge if you use custom upstart files for services. You will need to re-code those.

All other changes are minor (as in regular updates and improvements).

And always make sure you have backups that are correct and you know how to restore.

As a precaution: use a new machine to create the new OS and then use a backup to restore your personal files. Often a lot easier to manage and it removes the downtime of the upgrade of the old machine.


Unable to install net-tools in ubuntu 20.04

First run:
sudo apt update

then fix your broken packages:
sudo apt -f install

if you need to, you can configure all the packages manually using the following command but this probably won't be necessary:
sudo dpkg --configure -a

or configure an individual package (like in this example):
sudo dpkg --configure ni-kal


Alt+F2 then "poweroff" not working in Unity (Ubuntu 12.04)

It doesn't work because 'sudo' reads input from the Terminal. Alt+F2 doesn't provide a terminal.

To get poweroff (and other admin tools) to work in Alt+F2, use this:

First, open a terminal (Ctrl+Alt+T) and run this command:

sudo apt-get install gksu

(It may be already installed in older versions of Ubuntu)
You can then use 'gksu' instead of 'sudo' in the Alt+F2 launcher.


Official ubuntu 16.04 vagrant cloud image boots very slowly

I had the same problem - also using the official Xenial cloud image - and I fixed it by adding this to my Vagrantfile:

config.vm.provider "virtualbox" do |vb|
    vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ] # THIS LINE
end

As a result, the ubuntu-xenial-16.04-cloudimg-console.log file is not created on boot anymore, and the boot time is much shorter.


Run a script every time a shell is spawned

...why? Probably there is a better solution, so if you state why probably we can suggests some more sound solutions. Remember that the shell is used not only by users, but also by a lot system processes.

Anyway, bash (the default shell) when starts it will (but see later) execute a series of system-wide scripts. The shell can start as interactive or non-interactive, and as login or non-login shell (see man bash and search for "INVOCATION" for details).

Basically, when a user starts a shell in a terminal in a graphic session, bash is invoked as interactive, non-login shell and will execute /etc/bash.bashrc:

  When  an  interactive  shell that is not a login shell is started,
  bash
         reads and executes commands from  /etc/bash.bashrc  and  ~/.bashrc,  if
         these  files  exist.  This may be inhibited by using the --norc option.
         The --rcfile file option will force bash to read and  execute  commands
         from file instead of /etc/bash.bashrc and ~/.bashrc.

So you can add commands there. Be careful though, errors here can make your system very hard to recover.

executive summary (tested)

Edit /etc/bash.bashrc and, AFTER the line that says

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

add for example:

echo "Hello $USER, you started a new shell"

and from a terminal:

[romano:~] % bash
Hello romano, you started a new shell
romano@RRyS:~$

If you want to run a script here, be careful and double check, like

if [ -x /full/path/to/script ]; then
     /full/path/to/script  # double check here
fi

double check that /full/path/to/script does not call bash in interactive mode, or you'll have a nice endless loop here.

caveat:

This is not at all enforced:
other shells (zsh, tcsh, dash) will behave differently and will use different files. And obviously any user can call the shell with

bash --norc --noprofile

and have the script files skipped.

There is even an example in the 14.04 /etc/bash.bashrc (probably a remnant from when Ubuntu switched to sudo...) to hint the user to use sudo instead of logging in as root:

# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
    case " $(groups) " in *\ admin\ *)
    if [ -x /usr/bin/sudo ]; then
        cat <<-EOF
        To run a command as administrator (user "root"), use "sudo <command>".
        See "man sudo_root" for details.

        EOF
    fi
    esac
fi

...but this is code archeology ;-).


Why merging images is more slow (consumes more cpu) to view than inserting them into a pdf file?

Probably it is because in PDF files, only the contents of the current page are in memory (maybe the last or next page depending on zoom factor). In image viewers, because they assume image files are small, they load all the file into memory, so when a really big image is chosen, maybe that image is fully loaded into memory, thus causing slow processing.


Simply type the below command, it worked for my ubuntu 11.10

cd /var/cache/apt/archives/
sudo dpkg -i --force-overwrite prozilla_2.0.4-build2~tahutek~oneiric_amd64.deb
sudo apt-get -f install


Does Ubuntu One client window need to be open for sync'ing to occur?

No, it does not require the client window to be open. Ubuntu One has a sync daemon (a process that runs in the background), and you can close the client window and it will still sync files automatically.

The only place where this is not true is on iOS, which limits the background activity of apps.

On Windows there was a bug before 2.0.3 that meant that syncdaemon didn't start automatically, but 2.0.3 was released on December 19 so everybody should have it by now.


Cannot ssh with publickey into Ubuntu 13.04 cloud instance

This line looks suspect:

echo id_rsa.pub >> authorized_keys

You might mean something like:

cat id_rsa.pub >> authorized_keys

You might also want to edit authorized_keys and remove the line that says id_rsa.pub


How can I install Epson A3 printer and scanner drivers?

I assume that you are installing a .deb file.

If you are getting dependency issues, it means that the driver your installing requires packages that are not yet installed on your machine.

So open a terminal and run:

sudo dpkg -i <the location of the .deb package>

This should say that there was a problem with dependencies, so now it had informed your system about them. Next run:

sudo apt-get install -f

Which will download and install missing dependencies on your system that it finds. So after running the command, if all the required dependencies were found, just run the first command a second time.

sudo dpkg -i <the location of the .deb package>

This time it should run without any error if all the dependencies were already installed.

If this still didn't work, please edit your question and add the output of the each of the commands so we can help you further.


Install clang-5 from llvm.org repositores

First, we should add the llvm.org repositories to our sources lists, the line that we should add is:

deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main

Open nano and add the above line to this file:

sudo nano /etc/apt/sources.list.d/llvm.list

Add the repository key, it will make apt able to verify the downloaded packages.

 wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -

After that, update your lists:

sudo apt-get update

Then install clang-5:

sudo apt-get install clang-5.0 lldb-5.0 lld-5.0

It should work.

If you want to get a list of all available packages from this newly added repository:

grep -i package: /var/lib/apt/lists/apt.llvm* | cut -f3 -d: | sort | uniq

It will give you a list like:

clang-5.0
clang-5.0-doc
clang-5.0-examples
libclang-common-5.0-dev
...

You can then install whatever of them you want.

It may help your compile problem

The header file that has been mentioned does not exist in your error: stdarg.h is a part of libstdc++-5-dev package.

I've got this package on my machine, so if I run:

aptitude why libstdc++-5-dev

I will get:

i   build-essential Depends g++ (>= 4:5.2)
i A g++             Depends g++-5 (>= 5.3.1-3~)
i A g++-5           Depends libstdc++-5-dev (= 5.4.0-6ubuntu1~16.04.4)

So it seems that installing the build-essential package should solve this error of yours, cause I'm not sure what you've done.


Make a KVM VM but skip Ubuntu installation process

If you already have an installed VM you can simply copy the installed VM This would allow you to go through the installation process only once although you may have to do some editing...

First copy the VM's disks from /var/lib/libvirt/images on src host to the same dir on destination host.

Next, run virsh dumpxml VMNAME > domxml.xml on the source host and copy this xml to the dest. host

Then, on the destination host run virsh define domxml.xml

and start the VM.

Addendum: If the VM has snapshots that you want to preserve, you should dump the snapshot xml-files on the source with virsh snapshot-dumpxml $dom $name > file.xml for each snapshot in the snapshot list of the VM virsh snapshot-list --name $dom.

Then on the destination use virsh snapshot-create --redefine $dom file.xml to finish migrating the snapshots.

If you also care about which snapshot is the current one, then additionally do on the source:
virsh snapshot-current --name $dom
and on the destination:
virsh snapshot-current $dom $name

Note:
    If the disk location differs, you need to edit the xml's devices/disk node to point to the image on the destination host
    If the VM is attached to custom defined networks, you'll need to either edit them out of the xml on the destination host or redefine them as well (virsh net-dumpxml > netxml.xml and the virsh net-define netxml.xml && virsh net-start NETNAME & virsh net-autostart NETNAME)

Sources:
This answer shamelessly modeled on answers found on

https://serverfault.com/questions/434064/correct-way-to-move-kvm-vm


How can I copy files to my ipod using Rhythmbox?

I'm using Ubuntu 16.04 and Rhythmbox 3.3 and an old IPod nano
In my case I just copy from existing playlist in Rhythmbox and paste in IPod device it have it's own icon in Rhythmbox so the process is as follows:

Create new playlist if not have any with desired files
Select all the files that need to be transferred to the IPod
Copy files
Select IPod name in Rhythmbox
Paste the files.


Four primary partitions are the maximum:

The total data storage space of a PC HDD can contain at most four primary partitions, or alternatively three primary partitions and an extended partition.
An HDD may contain only one extended partition, but that extended partition can be subdivided into multiple logical partitions.

Therefore you will have to delete a partition to create a new partition or you can increase the size of a partition.

The easiest way is, in my opinion with a Live System and Gparted: How to resize partitions?


How to ensure nvidia_current module loads during boot

Since the ppa:ubuntu-x-swat/x-updates PPA currently doesn't have any packages for Quantal, I'd suggest removing it.

sudo apt-get install ppa-purge

sudo ppa-purge ppa:ubuntu-x-swat/x-updates

Then install the recommended or experimental Nvidia driver. You can make sure the module loads by adding it to /etc/modules.


Mounting the windows drives and external usb drives

The procedure is that you first unmount any disks that may still be mounted:

sudo umount /mnt/...

(that is not a typo, the command is umount)

Then the directory /mnt/... is empty and can be removed:

sudo rmdir /mnt/...

Then you can make a new mount point elsewhere:

sudo mkdir /mnt/newmountpoint

and mount the disk there:

sudo mount -t auto /dev/[devicename] /mnt/newmountpoint

If that works, you can edit /etc/fstab so the disk will be mounted at the next reboot.


Update errors: 404, "E: Unable to parse package file "

Is this an updated install ?

Verify that your sources.list contains one uncommented http or ftp source for each branch you need, and delete the downloaded lists (in /var/lib/apt/lists/partial/) to start fresh.

W:GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5A9A06AEF9CB8DB0

This means you have a custom PPA loaded which is not valid for this version - I suspect you upgraded from an earlier version.


How can I open a file when I do not know what command opens it?

If you want to use the default program for opening a file you can use

gnome-open YourFile

or (as Florian Diesch mentioned in a comment) you can use the following command which also works on every XDG-compliant desktop environment (including KDE, LXDE, and XFCE):

xdg-open YourFile

You have to use a command to open a file. In your case you could use

eog MyFile.jpg

No need to mess with permissions. Eog is the eye of gnome. Type man eog for more information. It can open the following image files: ani, bmp, gif, ico, jpeg, pcx, png, pnm, ras, svg, tga, tiff, wbmp, xbm, and xpm.

For other file types you need other commands. For example:

A pdf file called YourMajesty.pdf can be opened with evince YourMajesty.pdf.
A text file named MyFile.txt can be opened using gedit MyFile.txt and that also holds for many other files containing text (but not having a .txt extension).

If you add a  & at the end of your command (for instance, eog MyPhoto.jpg &) you can still continue using the same terminal for other commands.


Symfony2 - Apache vhost for app_dev different port

If you don't want to use

http://my_application.my_domain.net/index_dev.php

That does pretty much the same job, here the solution:

After having allowed your external IP to my_application/web/app_dev.php

// ...
if (isset($_SERVER['HTTP_CLIENT_IP'])
    || isset($_SERVER['HTTP_X_FORWARDED_FOR'])
    || !in_array(@$_SERVER['REMOTE_ADDR'], array(
        'xxx.xxx.xxx.xxx', // <- your IP
        // ...
    ))
) {
// ...

Configured /etc/apache2/ports.conf to tell Apache to listen in the additional port

#...
NameVirtualHost *:80
Listen 80
NameVirtualHost *:8081
Listen 8081
#...

Simply duplicate the applications vhost (if you are using one)

$ sudo cp /etc/apache2/sites-available/my_application \
          /etc/apache2/sites-available/my_application_dev

and change the file pointed by the url rewriter

<VirtualHost *:8081>
    ServerName my_application.my_domain.net

    DocumentRoot "/var/www/my_application/web"
    <Directory "/var/www/my_application/web/">
        #...
        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^(.*)$ /app_dev.php [QSA,L]
        </IfModule>
    </Directory>
</VirtualHost>

Finally activate the new vhost

$ sudo a2ensite my_application_dev
$ sudo service apache2 restart


This is not really Ubuntu-related since it's a Qt programming question, but still...
In this case, use QIcon::fromTheme(). That uses the desktop's theme path which is what a user also sees in the desktop's menus.
There is an overloaded version where you can supply a fallback icon in case the desktop theme cannot provide the icon.
For my own icons in my QDirStat, I use compiled-in icons using the Qt resource system so I don't have to rely on my luck whether or not any icon is available; and also to make sure they all have a consistent look and feel in case some icons are in the theme, and some are not.
But in your case, you want to display the icons of other applications, so the theme icons are the first place to load them from. Notice that you may have several icon themes installed which all overlap to some extent, so letting the desktop decide which theme to use is the way to go; otherwise you will very likely pick an icon from a wrong icon theme.


How can I change the shutdown launcher to suspend instead?

By default you are selecting shutdown as the action so it it not likely that this can be changed.

If you intend to suspend your system you can simply select suspend from the menu option.


How do I get an HP StorageWorks MSA1500 working?

A quick search shows that this is a Fibre Channel connected array
that can support SAS or SATA disks. You'll need something like a
Qlogic or Emulex HBA to connect to it. The connector should look
like a fiber optic cable. In re-reading your question, this is
not an array for home use, it's quite sophisticated. It doesn't
support iSCSI so it must be directly attached to a host and shared
to your network through other means.

The array itself is well documented, there's no shortage of docs
on the HP site surrounding the MSA 1500, like this one MSA 1000/1500 CLI Guide.

Even without multipath, you should be able to see the LUNs attached to your system
to begin with. A tool like lsscsi is a nice way to aggregate the listing of all SCSI based storage on your system. You should see several LUNs with a make of HP.
If you don't, that means the array hasn't even provisioned a single LUN yet. It's up to you to setup the SAN, provide network connectivity, log into, and provision the storage. After that, a LIP event lip event example must be issued on your side to force a rescan on the fabric, or you could just reboot.

If you don't have multiple routes to the SAN than you can use it as is. If so, it get's a little more complicated. Considering your level of expertise, I would leave
multipath alone, which means only one port should be attached from the host to the SAN.

Overall, it sounds to me like you need to commit to understanding this array and
how to administer it. This is no plug and play affair. There's copious documentation on this equipment to assist you in this exercise. Good luck!


What are you using to configure the fans? I've had good results with by installing i8kutils and lm-sensors, then adding the following configuration file to /etc/i8kmon.conf:

# Run as daemon, override with --daemon option
set config(daemon)      0

# Automatic fan control, override with --auto option
set config(auto)        1

# Report status on stdout, override with --verbose option
set config(verbose) 1

# Status check timeout (seconds), override with --timeout option
set config(timeout) 20

# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
set config(0)   {{-1 0}  -1  40  -1  40}
set config(1)   {{-1 1}  30  60  30  60}
set config(2)   {{-1 2}  53  128  53  128}

# For computer with 2 fans, use a variant of this instead:
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
# set config(0) {{-1 0}  -1  52  -1  65}
# set config(1) {{-1 1}  41  66  55  75}
# set config(2) {{-1 1}  55  80  65  85}
# set config(3) {{-1 2}  70 128  75 128}

# end of file

Then you can run /usr/bin/i8kmon -d -a to start controlling the fans based on the temperature. It'll stop running on reboot, so I'd suggest adding it to your startup programs.

This has worked for me, but it's possible that you're also experiencing a hardware problem ie. a failing fan so YMMV.


Troubles installing Cisco Packet Tracer 7.1 on Ubuntu 17.10

Please try:

sudo apt update
sudo apt install libqt5webkit5 libqt5multimedia5 libqt5printsupport5 libqt5script5 libqt5scripttools5

And try again.


Terminal method

First you need to tell the indicator to use a custom format. To do so, run this from a gnome-terminal:

gsettings set com.canonical.indicator.datetime time-format "'custom'"

Then you need to tell the indicator which format to use. This has to be done in a format understood by the strftime function. You can look it up here.

For example, if you want the date/time to look like this: Fri, 20. May 08:25, the format string for it would be %a, %d. %h  %H:%M. Now let's set it:

gsettings set com.canonical.indicator.datetime custom-time-format "'%a, %d. %h  %H:%M'"

GUI method

You can also set those keys using a GUI called dconf-editor. It's part of the package dconf-tools, which you'd need to install first by running sudo apt-get install dconf-tools. Then open dconf-editor, navigate to com.canonical.indicator.datetime, and set the two keys.


This error means that the dynloader tried to find PyExc_TypeError call entries and couldn't find any.

This error often happens if you use different libraries which are not binary compatible.

You are not saying where you virtualenv have. Have you downloaded binaries, or is it the dist package? So try to get the right version.


Using update-alternatives to assign 'Python' to Python version 3.6

python 3.6.x doesn't come packaged in Ubuntu Xenial release by default (I'm assuming you have Ubuntu 16.04 installed on your machine because you have tagged 16.04 in the question). In Ubuntu 16.04 by default one gets python2.7.12 and python3.5.2

    $ python --version
    Python 2.7.12
    $ python3 --version
    Python 3.5.2

Ubuntu 16.04 provides these two by default and are stable.
Even the guide that you have mentioned uses Python3.5.2 and not Python3.6.x

Anyhow if you insist on using 3.6.x, there are three ways to go about it:

You can install Ubuntu 17.10, which by default provides python 3.6.x
(I don't recommend this as 17.10 is not LTS)

Or

install it from alternative ppas. See here

Or

You can also compile it from source: visit python3 sources and download source tarball of whichever python3 version you prefer. Once downloaded you can follow:
(I'm assuming python3.6.4 here)

    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev  libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
    cd /usr/src
    sudo wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
    sudo tar xzf Python-3.6.4.tgz
    cd Python-3.6.4
    sudo ./configure --enable-optimizations
    sudo make altinstall

And then use update-alternatives as mentioned in the aforementioned guide (the one you posted in the question); you can also modify the python3 alias to point to Python3.6.x (whichever version you've installed) although I deplore it immensely.

Frankly speaking, I don't see an explicit need to use python 3.6.x for Django (I'm a Django dev myself). Python 3.5.2 should suffice.

Happy coding!


The list on the logon screen is populated from the desktop files in the folder /usr/share/xsessions

The format of these files are similar - here is the Unity-2D desktop file

[Desktop Entry]
Name=Ubuntu Classic (No effects)
Comment=This session logs you into GNOME with the traditional panel without any
graphical effect.
Exec=gnome-session --session=2d-gnome
TryExec=gnome-session
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gnome-session-2.0

All the files are root:root owned.

Creating or deleting desktop files in this folder creates or removes an entry in the drop-down list respectively.

source


Do file-extensions have any purpose (for the operating system)?

There is no 100% black or white answer here.

Usually Linux does not rely on file names (and file extensions i.e. the part of the file name after the normally last period) and instead determines the file type by examining the first few bytes of its content and comparing that to a list of known magic numbers.

For example all Bitmap image files (usually with name extension .bmp) must start with the letters BM in their first two bytes. Scripts in most scripting languages like Bash, Python, Perl, AWK, etc. (basically everything that treats lines starting with # as comment) may contain a shebang like #!/bin/bash as first line. This special comment tells the system with which application to open the file.

So normally the operating system relies on the file content and not its name to determine the file type, but stating that file extensions are never needed on Linux is only half of the truth.

Applications may of course implement their file checks however they want, which includes verifying the file name and extension. An example is the Eye of Gnome (eog, standard picture viewer) which determines the image format by the file extension and throws an error if it does not match the content. Whether this is a bug or a feature can be discussed...

However, even some parts of the operating system rely on file name extensions, e.g. when parsing your software sources files in /etc/apt/sources.list.d/ - only files with the *.list extension get parsed all others are ignored. It's maybe not mainly used to determine the file type here but rather to enable/disable parsing of some files, but it's still a file extension that affects how the system treats a file.

And of course the human user profits most from file extensions as that makes the type of a file obvious and also allows multiple files with the same base name and different extensions like site.html, site.php, site.js, site.css etc. The disadvantage is of course that file extension and the actual file type/content do not necessarily have to match.

Additionally it's needed for cross-platform interoperability, as e.g. Windows will not know what to do with a readme file, but only a readme.txt.


About your question, here is how I fixed the problem, I extended the answer because in the comments some users ask for that:

First, your error is a problem caused by a previous installation (for another package or update), the tor package doesn't depend on that library, I have Xubuntu 17.10 a FRESH INSTALL, and here is the output of installing tor:

As you see, there is no requirement for libevent*, but you have to fix that error before installing tor, I suggest you to try executing the following commands:

sudo apt install libevent-dev
sudo apt install libevent1-dev
sudo apt install libevent-2.1-6

Here there is a screenshot of the output of every command (Installing the dependencies in this way produces NO ERRORS):

sudo apt install libevent-dev # This library is required for the libevent-2.1.6, Xubuntu 17.10 already comes with this version of libevent.

sudo apt install libevent1-dev # This library is required for the libevent-1.4-2, but Xubuntu 17.10 already comes with libevent-2.1.6 so that is the cause of the conflict. I suggest you to install it, just if you really need it, otherwise, use the latest version.

And the last command will be sudo apt install libevent-2.1-6, this is just to prove that Xubuntu 17.10 comes with this library:

These commands will install dependencies one by one in a separate way, avoiding the conflict, because if you use sudo apt install libevent*, that command is the cause of the error message, see the image below. You're trying to install two versions of the same library at the same time.

After executing those commands, I didn't get any errors and the dependencies are now correctly installed.

Finally, if you want, you can execute sudo apt autoremove, to delete the unnecesary packages.

Hope it helps, good luck!


Ubuntu failing to install linux-image-5.4.0-52-generic during install of Ubuntu 20.04.1 LTS

As mentioned by user535733 and Nmath 100MB was not large enough for the /boot parition.


Bleachbit on ubuntu 18.04 delete rotated logs-what does this do?

Log rotation shoves the latest logs off the stage into an (optionally compressed) compressed archive file as discussed in man logrotate, with default settings specifying how many old logs are kept, and how often rotation happens, in /etc/logrotate.conf.  Files in /etc/logrotate.d/ hold non-default settings for specific apps and files.


How to change the username and password for nagios site access on config files

I found the answer

sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

Enter a strong password when prompted.

Note the -c replaces all existing passwords. To simply update an existing one (without affecting others):

sudo htpasswd /etc/nagios3/htpasswd.users nagiosadmin


Automount when clicking on disks in GUI file manager suddenly stopped working in Ubuntu. ("Unable to mount...Not authorized to perform operation.")

Solved. For my particular case the problem was Chrome Remote Desktop. Uninstalling it solved it.

sudo apt autoremove chrome-remote-desktop

Source for the uninstall command was JVApen here.

I've had many problems with Chrome Remote Desktop on Ubuntu, so I'm not really sure what to do about it. For now I suppose I'll leave it uninstalled and try using NoMachine instead, although that requires messing with your router settings and opening up port-forwarding from the outside internet to your internal local area network, which Chrome Remote Desktop seems to avoid by (I'm guessing) instead using a reverse tunnel through an outgoing connection from your house out to a Google server. In other words, the Google approach is probably safer, and is certainly much more convenient, if only it worked. [UPDATE: I'm sticking with NoMachine. Here's some configuration settings I wrote down that you may find useful.]

Note that I originally installed Chrome Remote Desktop using these instructions here:

https://medium.com/@vsimon/how-to-install-chrome-remote-desktop-on-ubuntu-18-04-52d99980d83e and here:
https://superuser.com/questions/778028/configuring-chrome-remote-desktop-with-ubuntu-gnome-14-04/850359#850359.

I then had this problem here:

Can't connect to Chrome Remote Desktop on Ubuntu 18.

I've also had problems with Chrome Remote Desktop taking over audio, and making my audio not play back, and other things like that. Google's support for it on Linux is somewhat poor, and I'm continually fighting with it it turns out.

Related:

Mount Flashdrive: Not Authorized to perform operation
https://medium.com/@vsimon/how-to-install-chrome-remote-desktop-on-ubuntu-18-04-52d99980d83e
https://superuser.com/questions/778028/configuring-chrome-remote-desktop-with-ubuntu-gnome-14-04/850359#850359
"Some required components are missing"--cannot connect from Linux to Windows w/Chrome Remote Desktop


List all kernel settings to get details about installed devices

You can quickly list all flags that were used during kernel compilation using:

cat /boot/config-`uname -r`

On a 14.04 system, the Intel 7260 firmware is provided by the linux-firmware package, you can check its filelist.


According to the connect manpage:

ENVIRONMENT
   SOCKS5_USER,  SOCKS5_PASSWORD,  HTTP_PROXY_USER,   HTTP_PROXY_PASSWORD,
   CONNECT_PASSWORD, LOGNAME, USER

So it looks like you could export your proxy password in the HTTP_PROXY_PASSWORD variable.

Something like:

export HTTP_PROXY_PASSWORD=mypassword

in ~/.profile.


Automatically turn on VPN on computer unlock Ubuntu 18.04

If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.

Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.

It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.


Two things to check here:(this is from the Installing Ubuntu on Nexus Guide)

Firstly have you enabled your nexus into developer mode and enabled USB debugging.

After enabling Developer Mode, the Developer options item is exposed in the Settings page.

Navigate to Settings → Developer options
Enable USB Debugging. When a device is connected, you will be prompted in Android to authorize it.

Physically connect your enabled device to your Ubuntu Desktop over USB.
On Android, accept the prompt to Allow USB debugging for the specified computer.
To verify the connection, use adb to display currently connected devices:

Then in the terminal:

$ adb devices

This should show your device

Secondly you need to remember to restart your device into the bootloader mode again in the terminal:

adb reboot bootloader

Then rerun the ubuntu-device-flash --  command that you did earlier

I really recommend re reading the wiki guide though to ensure that you are following the right methodology

I would also recommend that you read the new guide and tool developed by Marius Quabeck which is much much easier:

http://news.softpedia.com/news/new-tool-lets-you-easily-install-ubuntu-touch-os-on-your-devices-with-dual-boot-509386.shtml


Automatically signing new kernel modules

Newer versions of Ubuntu (18.04+) have solved this for me by signing modules automatically, but for anyone still in need of a solution, check out this blog post (thanks to Panther for finding it).


Installed Ubuntu 13.04 but automatically loads Windows, doesn't let me choose

Try downloading the wubi installer file into windows.
Don't run the installer. However,You should get two options now during the boot.
Tell me if this works.
P.S.  This is only a temporary fix.
Good luck


Ubuntu print output of "find" and "exec" to file

A -exec command must be terminated with a \; or +. The \; will cause find to run the command once for each file, and the + will make it try and run the command on many files at once, making it more efficient. Since your grep is using -H (print filenames), the + is the better choice. So add + at the end of your find command:

find . -type f -exec grep -n -H -A 2 -T "eventManager->dispatch(" {} + |
     tee ~/MAGE2EVENTS.txt


How to book and use Internet Packs for a Ncell SIM card, using Ubuntu?

After much experimenting, the following is my best solution so far.

Solution: Use atinout to book via USSD menu

USSD is used by mobile network operators for responsive service menus – see Wikipedia on USSD. Booking via Ncell's *17123# USSD menu via the computer that has the SIM is the most comfortable option.

Since dedicated USSD client software did not work for me (see below), I use raw AT commands. For that, I will first install atinout, a small command line utility for using AT commands:

sudo apt-get install ruby-ronn;
git clone git://git.code.sf.net/p/atinout/code atinout;
cd atinout;
make;
checkinstall make install;

Then, I can use it with AT USSD commands to, for example, book a Daily Internet Pack 40 MB. Here's a full transcript. After the modem confirms your command with OK, wait a few seconds and press Enter to display the USSD answer (which should have arrived by then). Then press Ctrl+C to terminate atinout (^C in the transcript), and restart it again.

$ sudo stop modemmanager
stop: Unknown instance:

$ atinout - /dev/ttyUSB1 -
AT+CUSD=1,"*17123#",15
OK
+CUSD: 1,"1.) 1 day Pack
3.) Facebook Pack
4.) 7 Day Pack
6.)  30 Day Pack
8.) Unlimited Pack
Note:
Back:* Top:#",15
^C

$ atinout - /dev/ttyUSB1 -
AT+CUSD=1,"1",15
OK
+CUSD: 1,"1.Light 6 MB Rs 6
2.Light 12 MB Rs 9
3.Medium 18 MB Rs 12
4.Heavy 40 MB Rs 20
5.Deactivate
Note:
Back:* Top:#",15
^C

$ atinout - /dev/ttyUSB1 -
AT+CUSD=1,"4",15
OK
+CUSD: 1,"1.One time Activations
2.Auto Renewal Activations
Note:
Back:* Top:#",15
^C

$ atinout - /dev/ttyUSB1 -
AT+CUSD=1,"1",15
OK
+CUSD: 0,"Dear Customer, your 40 MB pack with 24 hours validity
is currently processing and will be activated within 10 min. ",15
^C

You can combine the above into one script (assuming for now you don't have to retry any command; the AT is just to display the USSD answer):

sudo stop modemmanager && \
atinout - /dev/ttyUSB1 - < <(echo "AT+CUSD=1,\"*17123#\",15") && sleep 4 && \
atinout - /dev/ttyUSB1 - < <(echo "AT") && \
atinout - /dev/ttyUSB1 - < <(echo "AT+CUSD=1,\"1\",15") && sleep 4 && \
atinout - /dev/ttyUSB1 - < <(echo "AT") && \
atinout - /dev/ttyUSB1 - < <(echo "AT+CUSD=1,\"4\",15") && sleep 4 && \
atinout - /dev/ttyUSB1 - < <(echo "AT") && \
atinout - /dev/ttyUSB1 - < <(echo "AT+CUSD=1,\"1\",15") && sleep 4 && \
atinout - /dev/ttyUSB1 - < <(echo "AT");

(Note, this script uses a technique to avoid pipe characters.)

Troubleshooting

Multiple AT+CUSD commands in a row. For some reason, with my 3G modem (Gobi 2000), in 90% of cases, only one AT+CUSD can be executed successfully, then atinout has to be restarted. To prevent difficulties, in the process above we restart atinout simply every time in the transcript above. This does not end the USSD session (an "open" USSD menu).

If the modem does not answer with OK. When going along the above transcript, take care that every command is confirmed with "OK" by the modem. If not, restart atinout and try again. If that does not help, start the whole process again. And if that does not help, your modem might be in a strange state. Reset it, or just let the computer go through a suspend / resume cycle.

Using AT commands in general. For more details about communicating with a modem using AT commands under Linux, see this answer.

When booking a Daily Internet Pack fails. The Ncell Ecare website would fail without an error message and show the list of services again, instead of a success message of a form to enter a SMS confirmation code. This condition happens if you still have an active monthly (or also weekly?) Internet pack. Even if no data balance is left of it. You can check that and if necessary cancel the pack here. However for me, even after cancelling the pack, a data balance query by SMS would return "Dear Customer, You have […] MB data left in your Monthly account which will expire […]." and it was still impossible to book a Daily Internet Pack. I would have to wait until the expiration date. Maybe try putting the SIM into a phone and book the first Daily Internet Pack via USSD code (dial *17123# and follow the on-screen menu.)

Future Improvements

Automation. With the above solution, we have to navigate the menu manually, and try again if something goes wrong. Could be better.

Automatic re-booking. Ideally, this solution would include automatic (re-)booking when the data balance runs low. This can be detected by the Ncell warning SMS and / or traffic monitoring. This would not book a new pack automatically when it expires naturally, but then notify the user with a status icon that she's browsing with the expensive rate.

Be notified when the data balance runs out. If so, we would not require transferring limited amounts to the SIM card, but could transfer a large amount and would be warned (for example by a big red icon in the task bar) when running into the expensive rate. There are at least two ways for this:

Getting the Ncell notification SMS during an active data connection. Ncell sends it when the data balance runs low. See the point above on wvdial etc. how this could work. It does not work with NetworkManager and gammu out of the box, since it grabs both modem control channels.

Limiting data traffic. NTM would be a candidate tool for this, but it currently does not have a feature to set one-time pack data limits with exact start time.

Alternative USSD client software (not working for me)

There are dedicated USSD clients under Ubuntu Linux, but they did not work for me for various reasons (my 3G modem hardware: Gobi 2000). However, with some debugging, you might get them to work. The usage of some is treated in more detail in this question and this question.

The list, with the most promising candidates first:

mmcli. ModemManager and its command line client mmcli seem to be great software and the best bet for this task. See this answer on StackOverflow for how to use mmcli to navigate USSD menus. However, after solving a problem with always-on PIN2 lock on Ncell SIM cards (solution similar to this), mmcli would still refuse sending USSD commands via the Gobi 2000 3G modem, due to a bug (because the modem uses USSD with other clients software successfully):

$ sudo apt-get install libqmi-utils
$ sudo qmicli -d /dev/cdc-wdm0 --dms-uim-verify-pin=PIN2,0000
$ sudo qmicli -d /dev/cdc-wdm0 --dms-uim-get-pin-status
$ mmcli -m 0 -e  # Index as found via mmcli -L
$ mmcli -m 0 --3gpp-ussd-initiate="*100#"
error: Modem has nn USSD capabilities.

gsm-ussd. gsm-ussd is a command line utility exclusively for sending USSD codes, and it can operate USSD menus (see how in this answer). For Ncell though, I was able to send USSD codes and get answers, but not to operate USSD menus. There would be various inconsistent error messages, and I did not investigate if the problem is my hardware, gsm-ussd or Ncell's implementation of USSD.
gammu. gammu is a Linux command line utility that can send USSD codes, but according to this question, it cannot use USSD menus yet. python-gammu contains a script service_numbers.py that is meant to enable this. It did not work for me though.
ofono. ofono has a similar purpose and interface as ModemManager [source], just that it is made for Ubuntu Touch (which can run on mobile phones). Its main interface is DBus, but you can use its test case command line tools to send USSD commands and operate USSD menus (examples, more examples). However, it seems to need a rild (Radio Interface Layer Daemon) implementation to function, and that would only be available on actual mobile phones. When starting, ofonod would complain about not being able to connect to rild, and I could not find a rild to install on a normal Ubuntu Linux installation.
ussdq. ussdq is another small utility for Linux that includes a feature to operate USSD menus. However, it no longer in active development sincee 2013, and compiling it is a bit of an effort (it uses the Gambas2 framework, but recent Ubuntu Linux versions only include packages for Gambas3).


DNS server can't find PTR record: NXDOMAIN

You are overdoing it.

In your /etc/bind/named.conf.local file, you have already declared the snippet for reverse zone 190.168.192.in-addr.arpa i.e. 192.168.190:

zone "190.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.192";
};

Now in /etc/bind/db.192 file, you just need to refer to the last octet of the IP address, not the whole address; in fact, even more than one octet would be incorrect.

Presumably you are planning to assign 176 as the  last octet i.e. the PTR RR, so just add:

176     IN      PTR     example.com.


How do I install ubuntu server from a usb stick?

First you need to download the Server ISO that you require.  Go Here to get either the 32bit or 64bit 12.04 LTS or the 64bit 13.04 version.  Once you get that done, I recommend that you download Yumi to create you bootable USB stick.  Once created, make sure that you switch you BIOS to boot fro the USB stick, and just follow the steps.

Note: With Yumi you can also add other distros to either install or try, as well as other utilities.


I had a folder I used often to store a bunch of documents. I decided to move it, and then add the new location to my shortcuts list in the file browser. Now both folders show up and the broken link appears first.

The problem was in the bookmarks section of the file browser.

Go to Bookmarks ▸ Edit bookmarks in the file browser menu
Find the older link that you want to get rid of and remove it.

Unfortunately it didn't show up in the sidebar in the file browser after it became a dead link, so I figured it was a problem with some other indexing software in use.


When I completely remove ClamAV, ClamD stays behind

clamav frontend and clamd install separately from each other as binary packages for some odd reason.

sudo apt remove clamav-daemon clamdscan python{,3}-pyclamd should work to remove the remnants of ClamD from the system.


How to speed up Ubuntu 14.04 in VirtualBox 4.3.10

If your Ubuntu uses Unity, then it is natural Ubuntu runs very slow in Virtualbox. Ubuntu and Unity is very heavy, especially on low RAM. So the solution is vary, one of them is changing your Unity into another lightweigth user interface such as XFCE, LXDE, or even Openbox.

How To Install XFCE

How can I install XFCE along side unity?

How To Install LXDE

How do I install LXDE / Lubuntu?

How To Install Openbox

http://linuxg.net/how-to-install-openbox-on-ubuntu-13-10-13-04-12-10-12-04-and-linux-mint-15-14-13/

The Google keyword for these is how to install  ubuntu.


How do I install Ubuntu on "free space"?

All operating systems need to be installed on a disk partition so that the disk can keep track of where things are. Hence, in order to install Ubuntu, you need to create a new disk partition, which you can do with the [+] button in the lower-left corner.

When you create this disk partition, you should ensure that it's marked to be mounted at root, and that it has a file system. Take a look at the details of this dialog:

You can see that a file system (Ext4, journaling file system) has been chosen for the partition, and also that the partition has been chosen for mounting at / (that is, the file system root).

(You don't have to have a single disk partition mounted at the filesystem root (/), although this set-up works completely fine for most users. An example of an alternative set-up would be one disk partition mounted at / and a second partition mounted at /home. This allows for all system data (applications, system software and configuration files) to be stored on a separate partition to user data, which can be useful -- for example, if storage space on a fast storage device is limited, it might be possible to run a fast system by placing system data on the fast storage device, and using a larger but slower storage device for user data (which is accessed far less often).)

If you plan to dual boot Ubuntu with Windows, you should be fine: when you install Ubuntu, it will install the GRUB bootloader automatically. GRUB should detect any and all other operating systems on your computer, including Windows. If it doesn't, you can fix it.


How do I set-up user quotas limits on the file system?

How to configure a quota for the root partition affecting a single user:

Open a terminal. CtrlAltT.

Run it:

sudo -i
nano /etc/fstab

In the open file, you must add to the assembly line of partition, root in this case, the parameters usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0.

Example:

Change

# / was on /dev/sda1 during installation
UUID=c676ae51-cb6f-4c0e-b4a9-76850aafa1d6 /               ext4    errors=remount-ro 0       1

To

# / was on /dev/sda1 during installation
UUID=c676ae51-cb6f-4c0e-b4a9-76850aafa1d6 /               ext4    errors=remount-ro,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0  0    1

Ctrl + O, save file. Ctrl + X, close nano.

This activates quotas by user and/or group ID using the “vfsv0″ quota format, using 32 bit for UIDs/GIDs, 64 bit for space usage, and 32 bit for inode usage in this case.

Continue running:

mount -o remount /
apt-get update
apt-get install quota quotatool
quotacheck -vagum

To set a quota, you must use the setquota command:

setquota [ -rm ] [ -u | -g ] [ -F quotaformat ] name block-softlimit block-hardlimit inode-softlimit inode-hardlimit -a | filesystem

Example setting a quota for a specific user:

sudo -i
setquota -u -F vfsv0 UseR 2097152 2097152 1000000 1000000 /

Affect the root file system /.

Limit disk usage for the user UseR to 2 GB.

Limit the number of inodes for the user UseR to 1000000.

Not distinguish between hard and soft limits.

Use the vfsv0 quota format.


Partition sizing - Ubuntu 20.04 64GiB USB stick (Full Install)?

Partition sizing - Ubuntu 20.04 USB Full Install
Charles Green's recommendation, Easy Full Install USB that Boots both BIOS and UEFI, is a good starting point. It is quick, easy and easily modified.
After flashing the USB you can use GParted from a Live Ubuntu USB to stretch the root partition to about 40GB and fill the remaining space with NTFS or FAT32 data partition. A swapfile is built in.
In answer to your question about installing to the installer Live USB see: Can Ubuntu be installed to the pendrive it was booted from? . The same principle using toram can be used to create the above USB.
If you prefer creating your full install USB from scratch see: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step


How do I install the Lubuntu Software Center?

11.10

You can install lubuntu-software-center  via the following:

First, add the PPA. The exact instructions are here, the PPA you need to add is this:

ppa:lubuntu-desktop/ppa

If you have add-apt-repository programe, just run:

sudo add-apt-repository ppa:lubuntu-desktop/ppa

Then, you need to update your package list:

sudo apt-get update

Then, you'll need to install the lubuntu software center:

sudo apt-get install lubuntu-software-center

12.04

Lubuntu software center is in the main repositories and is part of the default Lubuntu applications. If in case you want to install it for Ubuntu or other flavours, you can use the following command:

sudo apt-get install lubuntu-software-center


ladspa-foo-plugins – where are the plugins located?

The package ladspa-foo-plugins  contains documentation files only which will be installed to /usr/share/doc/ladspa-foo-plugins/.

The actual plugins need to be downloaded, compiled, and installed from source. This can e.g. be done from here:

foo-plugins source

Or from the following ppa:

ppa:kxstudio-team/ppa

As this is not what we expect from a package this should be reported as bug.


Please help with kodi and disabled monitor

I made my self a little script to switch screens (I've two identical LCD in splitscreen vs one Beamer so I changed the script to match your case)

#!/bin/bash

if [[ $(xrandr | grep "DFP3 connected") ]]; then
    xrandr --output DFP2 --mode 1920x1080 --output DFP3 --off
else
    xrandr --output DFP3 --mode 1440x900 --output DFP2 --off
fi

Just save this as /usr/local/bin/switch-tv make it executable and run switch-tv from Terminal to switch between monitor and TV


Reconfiguring the music lens for Audacious

Select your default application as audacious.
The music lens by default searches banshee music database and opens files using default music player.

To change default application, search for system info in dash, go to default applications tab and select your desired application. An alternate way of doing this would be to right click the file, select properties, select 'Open with' tab, and choose default application.


sshd_config failure, is there a fallback?

There is no fallback. If you screw up sshd settings and close your only connection that did this change after sshd restart (basically turning off the old config and letting the new fail), there is no way to connect again using ssh since it is in failed state.

The only way is to use local access or console (some VPS provide remote console).


How do I set File Manager default view in 16.04

Move the cursor to the top edge of your screen to enable the menu and click on Edit > Preferences to open the Files Preferences dialog:

Set List View as the new default for new folders:


I've understand sometime that ubuntu 12.04 can't connect to any ad-hoc network. Then I upgraded to 12.10 beta and the problem was solved!


Is there a comprehensive list of the Ubuntu web services for developers?

There is a few couple of Ubuntu services (or subdomains).  Not all of them is strictly developer-related:

Ubuntu Pastebin - http://pastebin.ubuntu.com/

Official Ubuntu Pastebin

Ubuntu Wiki - https://wiki.ubuntu.com/

This may be obvious...

Ubuntu Official Documentation - http://help.ubuntu.com/

This may be more obvious...

Ubuntu Brainstorm - http://brainstorm.ubuntu.com/ shutdown

Submit your Idea for Ubuntu here

Ubuntu Forums - http://forums.ubuntu.com/

This leads to the Official Ubuntu Forums.

Planet Ubuntu - http://planet.ubuntu.com/

A blog for Ubuntu developers written by Ubuntu developers.

Ubuntu App Developers - http://developer.ubuntu.com/

A site for Developers that develop apps for Ubuntu.

Ubuntu Mailing List - https://lists.ubuntu.com/

You can subscribe stuff about Ubuntu here.

Ubuntu Fridge - http://fridge.ubuntu.com/

An Information Hub for the Ubuntu Community.

Ubuntu Error Reports - https://errors.ubuntu.com/

Error reports about Ubuntu goes here.

Ubuntu Harvest - http://harvest.ubuntu.com/shutdown

Harvest makes it easy to find low-hanging opportunities in Ubuntu. It aggregates the mass of todo lists we use every day so it's simple to find and coordinate work.

Ubuntu Single Sign On - http://login.ubuntu.com/

Manage your Ubuntu SSO account here.

Ubuntu Status - http://status.ubuntu.com/

This page shows the progress towards completing all of the Topics for the current cycle.

Ubuntu Apps Directory - https://apps.ubuntu.com

All apps in the Ubuntu Software Center

Ubuntu Developer Summit - http://uds.ubuntu.com/

UDS Official Website

Ubuntu CD Images - http://cdimage.ubuntu.com

All Ubuntu ISO's - From Warty to Quantal

Ubuntu Packages - http://packages.ubuntu.com

Information about Ubuntu's Packages.


Wacom Bamboo PAD stylus gets 'stuck' on clicking/dragging

it's such an old post. I'm also having the same problem with Wacom Bamboo CTH-301 on Ubuntu 18.04 LTS. Has anybody found the solution?

I've tried reading all the parameters to try to wonder if it's a miss-configuration ( xsetwacom --list devices ; xsetwacom --get 'Wacom USB Bamboo PAD Pen stylus' all ) but I can't find it.

Any idea?
Thanks and best regards,


Change a column name according to the file name

I am assuming that you are using Ubuntu GNOME. Open the folder location, select all those 52 files, right click and select rename.
Select the option of Find and replace text, and in the Existing Text type .genefamilies.tsv and in the Replace With type _Abundance-RPKs, and then click rename button.

You can also preview before renaming the files


Solved by going to advanced option and booting with 3.X kernel (upstart).

It has been practically impossible to decrypt my home directory from another partition (that's what I tried first) and fixing the boot to the old partition is a clever way around that.

Lesson learned: don't use os-uninstaller to clean up the various Windows partitions before you know what you are doing.


Can't access host serial port on VirtualBox Winxp

You may suffer from a bug in earlier versions of virtual box:

https://www.virtualbox.org/ticket/7411

This issue was fixed from Virtual Box release 4.1.0.

You may succed by simply upgrading to the most recent version (at present 4.1.8).


How do you select the fastest mirror from the command line?

You don't have to do any searching anymore - as ajmitch has explained, you can use deb mirror to have the best mirror picked for you automatically.

  apt-get now supports a 'mirror' method that will automatically select a good mirror based on your location. Putting:

deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse

  on the top in your /etc/apt/sources.list file should be all that is needed to make it automatically pick a mirror for you based on your geographical location.

  Lucid (10.04), Maverick (10.10), Natty (11.04), and Oneiric (11.10) users can replace precise with the appropriate name.


Ubuntu 13.04: Ethernet works at office but not at home. DHCP issue maybe?

Try looking in /etc/network/interfaces. If your set up for dhcp then you should see something like this

auto eth0
iface eth0 inet dhcp

But if for some reason your set to a static IP then you'll see something more like this

auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1

If you're set up for static then edit the file to change back to dhcp using sudo nano /etc/network/interfaces


Using the acpi-cpufreq CPU scaling driver with the performance governor, as you are, should provide the fastest CPU frequency ramp up possible under load. Note that modern processors can still scale down CPU frequency as a function of deep idle states, even with the performance governor. To demonstrate what your processor will actually ramp up to, put a full 100% load on one CPU. For example:

$ taskset -c 2 yes > /dev/null


How to install arm-none-eabi-gdb, gdb, openocd, gcc for STM32 toolchain?

Worked for me on Ubuntu 16.04:

sudo apt install gdb-arm-none-eabi


Uploaded package not showing in my Launchpad PPA

For future reference, here's the explanation:

The package was getting rejected because Launchpad builder could not parse non-latin name in 'Maintainer' field in debian/control file. This is considered a bug and was reported here: https://bugs.launchpad.net/launchpad/+bug/1910403
Because of the same bug, notification emails were not getting sent, and so I could not know what the reason was.

To clarify this, I was assisted by good people at https://answers.launchpad.net/launchpad/+question/694768. @ArchismanPanigrahi many thanks for suggesting to ask there.


Is there a basic guide to creating themes in Burg?

Here's the wiki. It might be a good place to poke around.

http://code.google.com/p/burg/wiki/ThemeCustomization


My best guess would be that this is caused by the discrepancy in VRAM.

The first GPU (Radeon HD 6450/7450/8450 / R5 230 OEM) has 1GB of VRAM, while the second GPU (Radeon HD 3450) has only 512MB.

When you put together multiple GPUs, the VRAM doesn't add up, it is the same as the GPU with the lowest RAM. Essentially, you're just boosting your processing power - VRAM bandwidth is the same as the VRAM on the lowest GPU.

In your case, since the second GPU has only 512MB (AFAIK), your 1st GPU is still running at its normal speed, but it has lost 768MB of memory bandwidth to work with and thus the second GPU is bottlenecking your system.

My best guess as to why the second (Radeon HD 3450) doesn't lag is that it was made to run with 512MB of RAM, whereas the first GPU was made to run with 1GB of RAM.


SD card reader (Realtek 522a) not working in Dell i7559 in Ubuntu 15.10

Find your current kernel version and follow the steps of any answer to What's a simple way to recompile the kernel?. Let's go with the accepted answer for the sake of simplicity.
Apply the patch mentioned in the bug report. Inside the root directory of the kernel source:

wget -O rts522a-20150628.patch http://lkml.org/lkml/diff/2015/6/28/134/1
patch -p1 < rts522a-20150628.patch

Rebuild and install the kernel starting with the command make-kpgk (or make or other steps depending on the chosen build recipe).
Reboot and cross your fingers.


How do I make ssd the bootable drive ubuntu?

This is a late reply, but I just wondered if you've tried updating the BIOS for your specific laptop, maybe that way it will recognize your new SSDas a bootable option?
Not at all a tech-savvy guy, just thinking out a not so farfetched solution.
I leave you the URL for hp BIOS update
https://support.hp.com/us-en/document/c00042629
Let us know if it worked or if you worked it out other way.


Webcamera and microphone not working after upgrade from 10.04, microsoft VX-1000

Are you now using Ubuntu 12.04?
Then you should use:

LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

as the libv4l folder's location is changed in 12.04 w.r.t. previous ubuntu distributions.
I'm currently searching for a microphone solution as well.


how to use specific library when building application from source?

Tested on my machine, install libjpeg62-dev, that's all:

sudo apt-get install libjpeg62-dev

dpkg -l | grep 'libjpeg.*-dev'
ii  libjpeg62-dev:amd64  1:6b2-2  amd64  Development files for the IJG JPEG library (version 6.2)

ldconfig -p | grep libjpeg
    libjpeg.so.62 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.62
    libjpeg.so.8 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so.8
    libjpeg.so.8 (libc6) => /usr/lib/i386-linux-gnu/libjpeg.so.8
    libjpeg.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libjpeg.so


Unity launcher hides too fast in autohide mode

For the times when the pointer is over the Launcher, that's been changed in the latest versions of Unity, available only in the development release, until 12.10 comes out.

unity (6.4.0-0ubuntu1) quantal-proposed

- Launcher - Launcher should never autohide when the cursor is positioned
  over the Launcher (e.g. When a spread ends) (LP: #745707)

Thu, 30 Aug 2012

That was this bug report.

There's an ongoing bug to keep it from disappearing when you're dragging icons to it.

Maybe these will be interesting, or helpful when the upgrades arrive for you.


Well first of all, if you change to RAID 0, you would need to create the array again, which means you would lose all your data. I think it's important to be aware of the risks involved with RAID 0 though. There is an increased risk of array, or drive failure resulting in complete and total data loss on the RAID 0 array.

If you are determined to use RAID 0, creating the array depends on what kind of RAID controller you are using, along with the type of server you are using. Assuming the RAID controller is built into the motherboard, it should be possible to enter a RAID configuration menu in the initial stages of the computer booting. Which key you need to press depends on the controller type.
What type of RAID controller does your system use?
To see if you have a Hardware RAID, run:

lspci | grep -i raid

Software RAID:

cat /proc/mdstat

Also, who is the vendor for your server?


You don't need to install extensions from extensions.gnome.org as they are also available in Ubuntu Software app.

Run Ubuntu Software, click add-ons, click extensions tab. Here you are able to install extensions.


man update-ca-certificates:

update-ca-certificates  is  a  program  that  updates   the   directory
/etc/ssl/certs to hold SSL certificates and generates certificates.crt,
a concatenated single-file list of certificates.
It reads the file /etc/ca-certificates.conf. Each line gives a pathname
of  a  CA  certificate  under /usr/share/ca-certificates that should be
trusted.  Lines that begin with "#" are comment lines and thus ignored.
Lines  that  begin with "!" are deselected, causing the deactivation of
the CA certificate in question.
Furthermore   all   certificates   found   below   /usr/local/share/ca-
certificates are also included as implicitly trusted.
From the above, I would infer that the preferred way to get local certificate files into the trusted store is to put them into /usr/local/share/ca-certificates, and then run update-ca-certificates. You do not need to touch /etc/ssl/certs directly.

Naming the certificates with .crt extensions seemed to be required as well.


How do I get an Epson al-c 1700 printer working?

If Lorezo's solution did not work, these are Linux drivers for Epson printers in the AcuLaser line. I was not able to find a C1700 anywhere though. I have used drivers from here for my Epson printer and they work well.


Install Updated Kernel

Per this link, you can manually update to kernel 4.18. If your device is reported to work with this kernel, theoretically it should work out of the box:

Download the kernel here:

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.18/

  Depends on your OS type, download and install the packages in turns:

linux-headers-4.18.0-xxxxxx_all.deb
linux-headers-4.18.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
linux-modules-4.18.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
linux-image-xxx-4.18.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb

  Select generic for common system, and lowlatency for a low latency
  system (e.g. for recording audio), amd64 for 64bit system, i386 for
  32bit system, or armhf, arm64, etc for other OS types.

Download required files into a folder, say ~/kernel, then:

cd ~/kernel
sudo dpkg -i *.deb
sudo reboot

Once you have rebooted, verify your kernel with:

uname -a

If for some reason you want to get rid of this kernel

Reboot, go to advanced boot options and select a different kernel and boot. To remove 4.18 run this command:

sudo dpkg --purge linux-image-4.18.0-041800-generic linux-image-unsigned-4.18.0-041800-generic

( you will have to change the package name according to the kernel you installed )

Confirm Sound Card Works

Reboot and see that your audio card is recognized using alsamixer:

`alsamixer -c1`

You may need to change the number next to the flag -c depending on the sound card you want to choose and edit its settings.

You can adjust levels here. According to answer found by OP, the HP/Speaker output needs to be muted for other outputs to work.


have you tried installing bumblebee? https://wiki.ubuntu.com/Bumblebee
after installation you can run a program with a discreet graphics card with "primusrun" at the beginning of the command, but just with usual stuff without the command the whole laptop will just run on the intel graphics. (this worked with my msi gs60) have a look here for running steam games and more info https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437