Proper way to install latest version of Python on Ubuntu

Warning!
Below is only to upgrade Python2 to the latest version!
The below process should not be used to install Python3 as Python3 is incompatible with Python2 and things will break (if you're not very, very careful)
Installing Dependencies:
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

Downloading Python:
cd ~/Downloads/
wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz

Extracting archive:
tar -xvf Python-2.7.12.tgz
cd Python-2.7.12

Build and install:
./configure
make
sudo checkinstall


You can try Ubuntu Tweak where you can do lot of tweaks.

Install the item from software center. Please follow this tutorial to install it from the software center.

Good luck with tweaking.


Did you update the BIOS on the motherboard since 2006.There was a nasty power usage regression in the 2.6.3x series kernels as well.


5% Xorg CPU usage after changing laptop brightness?

Solved!

$ find /sys -name "max_brightness"
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/phy0-led/max_brightness
/sys/devices/platform/dell-laptop/backlight/dell_backlight/max_brightness

$ cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
4648

$ sudo bash -c 'echo 2000 >> /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness'
# note that now it is brightness - not max_brightness

This changes brightness right away! Just as before.

However I still don't know what was wrong.

Edit

The solution might be easily scripted. The only drawback -- it requires root, and I've no idea how to propely set up PolicyKit to do without it.

Edit 2:

I'm using the following script. It has two hardcoded values: Max and BrightnessFile found on lines 17 and 18:

#!/bin/bash
# to get description use the -h flag

# exit after a single error:
set -e

# ================
## default values:

Inc=
Dec=
Set=

Get=false

Max=4648 # max_brightness
BrightnessFile=/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness

Current=`cat $BrightnessFile`

# ===========
## preambula:

PROGNAME=${0##*/}
PROGVERSION=0.01
noColors=false

usage()
{
cat << EO
usage: $PROGNAME [OPTIONS...]

Changes brightness of the laptop.

The value of the max brightness depends on the hardware, and is hardcoded. On my machine it is 4648:

  $ find /sys -name "max_brightness"
  /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
  /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/phy0-led/max_brightness
  /sys/devices/platform/dell-laptop/backlight/dell_backlight/max_brightness

  $ cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/max_brightness
  4648

Requires superuser privilages.

Examples:

  Increase brightness by 10 percents:

    $PROGNAME --inc 10

  Decrease brightness by 10 percents:

    $PROGNAME --dec 10

  Set brightness to 10 percents:

    $PROGNAME --set 10

optional arguments:

EO

cat << EO | column -s\& -t

  -i, --inc & increase brightness (in percents)
  -d, --dec & decrease brightness (in percents)
  -s, --set & set brightness (in percents)

  -g, --get & print current value (in percents)
  -G, --GUI & ask password with kdialog

  -h, --help & show this output
  -v, --version & show version information
EO
}

SHORTOPTS="hvi:d:s:g"
LONGOPTS="help,version,inc:,dec:,set:get"

ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")

eval set -- "$ARGS"

while true; do
    case $1 in

        -i|--inc)
            Inc=$2; shift;;
        -d|--dec)
            Dec=$2; shift;;
        -s|--set)
            Set=$2; shift;;

        -g|--get)
            Get=true;;

        -h|--help)
            usage; exit 0;;
        -v|--version)
            echo "$PROGVERSION"; exit 0;;
        --)
            shift; break;;
        *)
            shift; break;;
    esac
    shift
done

# =========
## program:

if $Get; then
    CurrentRelVal=`bc <<< "$Current*100/$Max"`
    echo "Current brightness: $CurrentRelVal%"
    exit 0
elif [ -n "$Inc" -a $Inc -eq $Inc 2>/dev/null ]; then
    IncAbsVal=`bc <<< "$Current+$Inc*$Max/100"`
    sudo bash -c "echo $IncAbsVal >> $BrightnessFile"
    exit
elif [ -n "$Dec" -a $Dec -eq $Dec 2>/dev/null ]; then
    DecAbsVal=`bc <<< "$Current-$Dec*$Max/100"`
    sudo bash -c "echo $DecAbsVal >> $BrightnessFile"
    exit 0
elif [ -n "$Set" -a $Set -eq $Set 2>/dev/null ]; then
    SetAbsVal=`bc <<< "$Set*$Max/100"`
    sudo bash -c "echo $SetAbsVal >> $BrightnessFile"
    exit 0
else
    usage
fi


How can you delete a folder/file/etc. on a read only DVD+R?

If it is an CD-R, you just can't.

If it's an CD-RW you need to delete the disc before adding new content. Delete a folder on CD is nothing I'm aware of it's possible at all. If you need so, you should make a backup of your CD and complete reburn it.


How to configure how much RAM usage should to start swapping on Ubuntu

The answer to your question how, is "no". Linux is extremely good at memory management. You could never hope to compete with it. And you wouldn't want to unswap just because you had free RAM. Because Linux knows what parts of the memory is most useful. In other words; you'd reduce performance drastically by manually moving unused memory from the harddisk and into RAM.


Program to press a key at timed intervals

Yes, there is an open source program to create fake keyboard and mouse inputs for GNU/Linux. It is called Xdotool .

To press a key (in this example 'a') every two seconds you can use a script like this :

#!/bin/bash

while true; do
  xdotool key a
  sleep 2
done

If you make this script executable and add it to Startup Applications it will press 'a' every two seconds.

Here is the documentation for Xdotool

And here is the specific part on keyboard commands


Bluetooth Atheros AR9462 13d3:3395 cannot detect other devices

I sent a patch upstream. In a while this device will be supported by Ubuntu kernels.

Meanwhile a workaround can be used. Install a dkms package with this patch:

wget https://launchpad.net/~hanipouspilot/+archive/ubuntu/bluetooth/+files/btusb-lp1542564-dkms_0.2_all.deb
sudo dpkg -i btusb-lp1542564-dkms_0.2_all.deb

and reboot.

If the bluetooth still does not work, it needs some firmware that is not included in Ubuntu yet. It can be installed by:

wget http://download.windowsupdate.com/d/msdownload/update/driver/drvs/2014/01/20623393_919a4673931aa789f0b1c3eeafb360b36097894a.cab
sudo cabextract 20623393_919a4673931aa789f0b1c3eeafb360b36097894a.cab -F *.dfu -d /lib/firmware/ar3k

Thanks to Jeremy31 for the link and the command.


How to extract first file from cbz files in one batch?

If you don't need to rename output files then I suggest something like this:

#!/bin/bash

for file in *.cbz
do
 cover="`zipinfo -2 "$file" | awk 'NR==2 {exit} 1'`"
 unzip -j "$file" "$cover"
done;

Save it in a file like script.sh and put it into the same directory as your comics are. Then give it execute permission:

chmod +x script.sh

And run it:

./script.sh

How does it work?

We can get a list of all files within a zip archive using zipinfo:

zipinfo -2 mycomic.cbz

it outputs something similar to:

First file within the archive.jpg
Second file within the archive.jpg
...

Then using awk 'NR==1 { print }' we can return the first file name which is: First file within the archive.jpg.

Now to extract this file I can use a unzip like:

unzip -j mycomic.cbz "First file within the archive.jpg"


Linux header files referenced by mac80211 missing

Maybe you just need to point things to the right place?

$ find /usr/src/ -iname slab.h
/usr/src/linux-headers-3.2.0-24-generic/include/linux/slab.h
/usr/src/linux-headers-3.2.0-24/include/linux/slab.h

$ dpkg -S /usr/src/linux-headers-3.2.0-24/include/linux/slab.h
linux-headers-3.2.0-24: /usr/src/linux-headers-3.2.0-24/include/linux/slab.h

So as long as you have the linux-headers-3.2.0-24 package, you should be good to go.

Also, if you update your question with the command you're running to compile the module you're modifying it may be helpful, because modules need to be compiled a specific way (I'm no expert, I'm hoping someone notices it and tells us how it's done).


Upgrading from Edubuntu 13.10 to 14.04 using iso

I installed Edubuntu 13.10, and then proceeded to upgrade to Edubuntu 14.04.

Boot from the USB stick, and install normal.  When I got to the Installation Type screen, I choose Upgrade Ubuntu 13.10 to Edubuntu 14.04 LTS.

It will say Upgrade Ubuntu 13.10 to Edubuntu 14.04LTS.  Once done, I had Edubuntu 14.04 installed.


Starting Tor after logging off then back on

You need to create the directory. So open a terminal and enter the following commands:

sudo mkdir /var/run/tor
sudo chown debian-tor:debian-tor /var/run/tor
sudo chmod 2750 /var/run/tor

This command creates the directory and changes the owner to debian-tor. The last line changes the permissions to the correct values.


As you have it mounted:

echo $USER
cd /mnt/sda2
sudo chown USR:USR .

... where you must replace the two USR-instances with what echo $USER prints. (Untested!)


How Assign Static IP using Netplan so isc-dhcp-server doesn't crash

For netplan, try this .yaml file...

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      addresses:
        - [192.168.10.1/24]
      gateway4:
        - 192.168.xx.xx
      nameservers:
        addresses:
          - 8.8.8.8
          - 1.1.1.1
        search: []
    enp3s0:
      dhcp4: yes

sudo netplan --debug generate

sudo netplan apply

reboot

For NetworkManager, use this .yaml file...

network:
  version: 2
  renderer: NetworkManager

sudo netplan --debug generate

sudo netplan apply

and then edit /etc/network/interfaces to something similar to this...

auto lo
iface lo inet loopback

auto enp2s0
iface enp2s0 inet static
        address 192.168.10.1
        netmask 255.255.255.0
        gateway 192.168.xx.xx
        dns-nameservers 8.8.8.8 1.1.1.1

auto enp3s0
iface enp3s0 inet dhcp

reboot

Update #1:

decided to use NetworkManager
installed ifupdown


A few steps you can take. First install a fresh copy of Ubuntu 14.04.3LTS on a disk. http://www.ubuntu.com/download/desktop boot from this disk, install on a flash drive! (recommend 32gb or above) You may need to partition the drive you can do this in the try Ubuntu link and use Gparted. Once install is complete reboot system. System comes with a update manager, run this after reboot or go into terminal and type "sudo apt-get update" then "sudo apt-get autoclean". You may also re-partition the systems hard-drive in gparted and install Ubuntu, but this must be done from flash not DVD! Hope this helps


For Google Chrome, the Download site is: http://google.com.  The download link is: https://www.google.com/chrome/browser/desktop/index.html

Download it and follow the installation steps provided by Google.

Once you download it, you can go to your Download directory and install it from the commandline.

Perform these steps:

Bring up a terminal with these keys: Alt+Ctrl+T.

At the go to the download directory with this command:

$ cd ~/Downloads

Then run this on the file:

$ sudo dpkg -i google-chrome-stable_current_amd64.deb

As per your comment for the commandline download, run this:

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

The installer automatically updates the /etc/apt/sources.list and provides the public key.

After you have installed it, you can run it by typing Chrome in the Ubuntu Dash Search Button.

Installing Chromium

Chromium is an an opens source web browser based on and similar Google Chrome.  It's in the repository.  You don't have to download anything to install it.  Just run this command from the terminal:

$ sudo apt install chromium-browser


No password prompt for full-disk LUKS encryption

I suggest you boot with a live cd, check if your nvme appears, and if it does, open your encrypted partition with
do you have a second disk on which the boot partition is ?
cryptsetup open <partition> crypt
which will give you access to the partition via /dev/mapper/crypt. (you can replace crypt by the name you want)
You can then mount the root partition (check which one it is with lsblk, but based on your logs /dev/mapper/vgkubuntu-root), and every other partition you see fit.
Then, you have two choices :

extracting your data for a reinstall
try to fix your computer

If you go for the second one, a few tips :

you can run blkid <blockdevice> to view the UUID of your partition, with block device being a partition, a LVM volume...
you can access your system via the live usb, with chroot, from which you may try reconfiguring your bootloader (read the docs on grub), initramfs (which is the initial system that boot, ask for your decryption password and then mount and launch the regular system you're using, conf files lives at /etc/initramfs-tools/, updating... But more importantly, read the logs to try to debug

Godspeed, have fun and feel free to ask for tips if you are going for the repair way !


Black screen after installing gflrx on Ubuntu 13.10

The only way to get out of there is to get out of this situation is to get to a recovery console.

Hold Shift key on boot up.

Once you are on the GRUB menu, choose a recovery mode. Then, choose a root console.

Once you manage to get to a recovery console as root:

apt-get autoremove fglrx
reboot


Grub kernel upgrade (two different systems)

With two installs you have to normally do two updates. Whichever system's grub is in MBR must be booted and sudo update-grub run to find newer kernel in second install.

But since you have two drives, put main working install's grub into the MBR of sdb. And keep test install's grub in MBR of sda. When you install grub defaults to sda. Better to use Something Else and on partitioning screen change to MBR of same drive.

You can boot into install in sdb and install grub to the SSD's MBR. Then change BIOS to boot SSD.

sudo grub-install /dev/sdb
sudo update-grub

If you can only boot from sda, then just change /dev/sda.

But if you originally installed grub to sda, it remembers that setting for reinstall on major updates. So you also need to reset that:

To see what drive grub2 uses see this line (BIOS only, not UEFI)   - grub-pc/install_devices:

sudo debconf-show grub-pc

It will show drive model & serial number
to see drive info

sudo lshw -C Disk -short

to get grub2 to remember where to reinstall on updates:

sudo dpkg-reconfigure grub-pc

Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not choose partitions

You can also avoid the double update by manually adding your own boot stanza in 40_custom and directly boot partition or link to most current kernel.

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

UEFI systems do not use grub-pc but grub-efi-amd64 if 64 bit or perhaps signed versions. So all of above is only for BIOS based systems.


How to prevent XBMC from shutting down or suspending your computer?

Remap the Power button on the home screen to quit xbmc instead of showing the shutdown menu:
You should modify the Home.xml file in your skin folder in /usr/share/xbmc. For me (Frodo RC3 with the Confluence skin) this is /usr/share/xbmc/addons/skin.confluence/720p/Home.xml.

In this file you need to replace the line (in my case line 1067, see bottom of the post on how to quickly open the file at that position)

<onclick>ActivateWindow(ShutdownMenu)</onclick>

by

<onclick>XBMC.Quit()</onclick>

Now if you click the power button in XBMC it should just exit, without showing a menu.
You need to do this again after XBMC updates since it overwrites the files in /usr/share/xbmc.

Alternatives / Notes
With the above solution you can still shutdown XBMC using a remote, or the web interface.

Instead of doing the above (simply quiting, not showing the shutdown menu) you can also edit the shutdown menu instead. The menu itself is in /usr/share/xbmc/addons/skin.confluence/720p/DialogButtonMenu.xml. The interesting menu buttons are defined from line 73 and down. The shutdown button (id=3) has the property

<visible>System.CanPowerDown</visible>

changing this to

<visible>no</visible>

should hide it from the menu. You can do the same trick for suspend, reboot, etc.

This still doesn't prevent shutting down from the webinterface I think,
If only I knew how to set System.CanPowerDown=false...
If you know it please add it in the comments.

Extra: Commands to quickly open the file at the right position (1067,33)

Vim (If you don't know it, try to learn it, it is very nice!)

sudo vim /usr/share/xbmc/addons/skin.confluence/720p/Home.xml +1067

or even better (independent of actual line number)

sudo vim /usr/share/xbmc/addons/skin.confluence/720p/Home.xml +/ShutdownMenu

Nano (terminal editor that is easy to use for beginners)

sudo nano +1067,33 /usr/share/xbmc/addons/skin.confluence/720p/Home.xml

Gedit (Simple GUI editor)

gksudo gedit /usr/share/xbmc/addons/skin.confluence/720p/Home.xml +1067


Dual-boot problem with Windows 7 and Ubuntu 14.04.1

Looks like your PC have ubuntu installed but it is not showing to you on booting.

You can try these things first.

1.When you are starting PC, press key (like esc and f12) to reach boot menu, maybe there you can see option to select i.e 1.UBUNTU 2.HDD 3.WINDOWS etc. and from there you can go into UBUNTU.

2.Check from Windows that the disk on which you just installed UBUNTU have format of ext3 or ext4 and some of it's space (may be 8GB) is filled. If yes then you have UBUNTU installed and you may try to install grub via live usb.


How do I back up my files from my admin account with logging in?

I cannot access my administrative account

It would be advisable to always include -why- you can not. You are now asking for a solution to a question you might not want or does not have you end up with a method where you can use it.

In general you can switch users on command line with

 su - {user}

(mind the -). and when asked provide the password for the admin. Thing is: if the reason you can not use the admin account because you do not know the password this will not be of any help to you.

If that is the case you should reboot the server and at the grub prompt go to a system prompt and change the admin password. See this answer from Jorge Castro for an example on how to do this.


Integrated webcam detected but not working

Restart your system and select as the kernel any other kernel version than 5.3.


Unluckily there's really no client for that in linux, while the web interface might be a solution (for others), the most simple way is:

moving the csr into a windows-based host
doing the certreq step
moving the certificate back to a linux-based host.


Is it possible to run 64-bit mongo db on my 32-bit pae enabled ubuntu?

According to the KVM FAQ while it is possible to run 32-bit guests on top of a 64-bit host, "the only unsupported combination is a 64-bit guest on a 32-bit host".  So virtualisation will probably not help you in this case.

The PAE extensions really only help if you are running many processes, each of which need less than 4GB of address space.  While the extension allows the operating system to manage more memory, it is still limited by the 32-bit address space.

If you have a single memory hungry process you really need a larger address space, which you get through a 64-bit kernel.


Why are you creating an object file? If you want to create an executable, you shouldn't use the -c option.

Additionally, where did you get the vam.exe from? With the command you issued, you will get an output file called vam without the .exe part. You aren't working on Windows, are you?

To get an executable and run it, you should do

gcc virtualAddressManager.c -o vam
chmod +x vam
./vam


First remove skype using ubuntu software center.
Install Gdebi Package Installer using ubuntu software center.
Download latest skype for ubuntu from its official website.
Install the downloaded skype file using Gdebi package installer.


After enabled mod_rewrite by this command:

sudo a2enmod rewrite

Make file for your httpd configuration in /etc/apache2/sites-available/ so in my Ubuntu the file that I make is /etc/apache2/sites-available/code-machine.conf:

DocumentRoot /var/www
<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Edit:
And as reminded by Chris Gregory and firepol, you can register the new configuration file code-machine.conf:

sudo a2ensite code-machine.conf

Then restart your apache:

sudo service apache2 restart


Error while dumping ethernet network card BIOS's ROM - RTL8111/8168b

The sysfs rom file allows you to read the PCI ROM contents, but apparently the device does not expose that information. It is not available or not implemented by the device.

About why ethtool -e eth0 fails, the current r8169 driver (up to and including 3.19-rc3) does not implement a method to read from the EEPROM. If your Realtek network device has an Atmel 93C46 or 93C56 EEPROM, then you can add this r8169 functionality with this patch (for Linux 3.11) (same patch, rebased for 3.17, works for 3.19 too).

For those whose device is "bricked" (symptoms: garbage MAC address such as bb:6f:ff:ff:ff:ff, vendor/device ID reported as 10ec:8129), you could try to follow the instructions in that message. I have tried it in the past and from time to time I have to repeat it when the power is fully removed from the machine. Unfortunately, the instructions are not 100% reliable and every time I have to try much more tricks in order to get it to work. As of this writing, this RTL8169sb/8110sb is still defunct since yesterday.


How to delete/remove manually apt added repositories?

Simply remove the created .list file:

sudo rm /etc/apt/sources.list.d/vertex-theme.list
sudo rm /etc/apt/sources.list.d/vertex-theme.list.save

After that run and update and maybe even a dist upgrade:

sudo apt update
sudo apt dist-upgrade

Since you already removed the key you have nothing more to do.


Best practices to virtualize Ubuntu servers?

My personal preference is to run everything virtualized, leaving Dom0s almost exclusively for virtualization. You can even run virtualize your firewall (Zentyal I guess). setting network bridging appropriately.

I believe the hardware you have will suffice.

You can use Zentyal (or a second Zentyal) for the Samba PDC... and you can even have some directory replication options.


Or the problem is that Asterisk is installed as root (using sudo - which is the right way) so you also need elevated rights when editing the configuration file.

Did you check if the master config file exists (using something like /etc/asterisk/asterisk.conf) ?


Sketchy UI used in Ubuntu documentation?

Feel your question's title is misleading. You are asking about the tool used to build GUI wireframes. So you can get your answer in any of the links here.

My personal favorite is Pencil.


Why do Ubuntu releases use names and not just numbers?

I guess reading this will answer your question

MarkShuttleworth said the following with regard to where the naming scheme originally came from:
So, what's with the "Funky Fairy" naming system? Many sensible people have wondered why we chose this naming scheme. It came about as a joke on a ferry between Circular Quay and somewhere else, in Sydney, Australia:

lifeless: how long before we make a first release?
sabdfl: it would need to be punchy. six months max.
lifeless: six months! thats not a lot of time for polish.
sabdfl: so we'll have to nickname it the warty warthog release.

And voila, the name stuck. The first mailing list for the Ubuntu team was called "warthogs", and we used to hang out on #warthogs on irc.freenode.net. For subsequent releases we wanted to stick with the "hog" names, so we had Hoary Hedgehog, and Grumpy Groundhog. But "Grumpy" just didn't sound right, for a release that was looking really good, and had fantastic community participation. So we looked around and came up with "Breezy Badger". We will still use "Grumpy Groundhog", but those plans are still a surprise to be announced... For those of you who think the chosen names could be improved, you might be relieved to know that the "Breezy Badger" was originally going to be the "Bendy Badger" (I still think that rocked). There were others... For all of our sanity we are going to try to keep these names alphabetical after Breezy. We might skip a few letters, and we'll have to wrap eventually. But the naming convention is here for a while longer, at least. The possibilities are endless. Gregarious Gnu? Antsy Aardvark? Phlegmatic Pheasant? You send 'em, we'll consider 'em.
lifeless is Robert Collins. sabdfl is Mark Shuttleworth.

Source:
https://wiki.ubuntu.com/DevelopmentCodeNames


How to update "/usr/arm-linux-gnueabi/include/" libraries on ubuntu 12.04 LTS?

Install i2c_tools and libi2c-dev packages


Run:

sudo apt-get install -f
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade

Good luck.


Your problem is using sudo in your script. Cron can never enter your sudo password.


Blank Desktop after Login on Ubuntu 14.04

I managed to solve this problem eventually.

so the weird part was that as soon as i deleted a few files which were a bit large enough to free off some space, the space magically got occupied again after about 30 seconds.

We finally found a large file of about 70G which were the CUPS logs. So somehow my system was acting as a print server and the CUPS daemon running in the background was eating up my space. once we disabled the CUPS daemon and prevented it from restarting on boot the problem was solved  and i had my desktop back.

Hope this helped.


What keyboard shortcut changes the `xfce4-terminal` terminal text size?

Instead of relying on Python and missing modules, as in Noah K. Tilton's github solution, I drafted up a bash script that's a step closer to being more portable (at least, for installations using the most generic, default paths).

You may need to tweak the script to setup your xfce configuration path, your favourite font, etc.

Just 2 files, dropped into my home's ~/bin folder, "zoomin" and "zoomout". I didn't go further than making short commands that I can type quickly, so I don't have a clue how I'd be able to configure these scripts to respond ONLY when I'm inside of xfce4-terminal -- meaning that I gave up thinking about how to get the keybindings made for Ctrl+- and Ctrl++ because I currently only know about global keyboard bindings and didn't want to override those Keypress Combos since other applications will need them (ex: web browser, text editor).

I also thought about having "zoommin" and "zoommax", to jump to my smallest and biggest fonts when needed, typically when I need to see tons of text VS when I need to show a colleague something on my screen.  I'll leave those two scripts up to your imagination on how to create :P

~/bin/zoomin

#!/bin/bash
SIZE=`grep 'FontName' ~/.config/xfce4/terminal/terminalrc | cut -d' ' -f 2`
NEWSIZE=$((SIZE + 2))
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g'
sed -i "$REGEXPR" ~/.config/xfce4/terminal/terminalrc

~/bin/zoomout

#!/bin/bash
SIZE=`grep 'FontName' ~/.config/xfce4/terminal/terminalrc | cut -d' ' -f 2`
NEWSIZE=$((SIZE - 2))
REGEXPR='s/FontName.*/FontName=Monospace '$NEWSIZE'/g'
sed -i "$REGEXPR" ~/.config/xfce4/terminal/terminalrc


mkdir says that file exists when it doesn't

By default, file management tools, such as ls, dir, or even the graphical file manager, don't show hidden files or directories (those where the name begins with a dot, e.g. .ipython). This is why mkdir is telling you that it already exists, even though you cannot see it by using ls or the file manager.

To see hidden files, you can use ls -a (From the ls manpage : "-a, --all do not ignore entries starting with ."), or, in the graphical file manager (nautilus), press Ctrl + H to show hidden files and directories.


ubuntu-mate No luck disabling option-alt LEFT RIGHT mouse clicks

System -> Preferences -> Look and Feel -> Windows -> Behavior -> Movement Key

Change from Alt to Super.

BR
GAS


Terminal shows root@homeserver when logging in with user

The id command says you are root, but the who command says you're logged in as user homeserver. It sounds like both users, homeserver and root, has uid 0.

getent passwd homeserver


Windows 7 will not boot after installing ubuntu 12.04 LTS

Turn off UEFI mode in bios.And then try boot-repair.


Ubuntu freezing after coming back from sleep

I have the same problem but, here, I have accidentally found a work-around: I leave an 18.04 bootable USB stick mounted, and as long as it is left there, resumption is faultless. Should I dare to remove it, the problem appears again.
I know it sounds crazy but I can assure you it works, although I cannot offer an explanation as to the why.


How to use terminal ssh login almost automatically

Shouldn't be too hard with a couple of read prompts:

#! /bin/bash
read -p 'Username: ' user
read -p 'IP: ' ip

ssh "$user"@"$ip"


Cannot open the update manager or software centre in ubuntu 12.04

The issue is due to the malformed source list of the CDEmu PPA. Run the following command to rename the source list of teh PPA and then open software center or update manager:

sudo mv /etc/apt/sources.list.d/cdemu-ppa-precise.list /etc/apt/sources.list.d/cdemu-ppa-precise.list.bak

Also seems that CDEmu has dropped the support for Ubuntu 12.04, so you can remove the source list of CDEmu if you want.


An application is listening on ports 139 and 445, but those ports are closed. Can an application listen on closed ports?

If you don't have a direct internet connection but are using a router that gives you a private IP address ShieldsUp doesn't actually scan your computer but your router. It's unlikely that your router is listening on those ports unless it is forwarding them.

If you have a direct internet connection but a package filter on your computer (iptables) or somewhere between your computer and ShieldsUp filters packages for port 139 and 445 ShieldsUp will report this ports as closed even if smbd is listening on them.


When will Ubuntu GNOME 16.04 be released?

21st April 2016 will be release date of Ubuntu 16.04 LTS (Xenial Xerus).It was to be expected for Ubuntu GNOME 16.04 LTS to ship with GNOME 3.20.


Have you tried via apt? When I search for netcdf with:

apt search netcdf

I get  an entry called: netcdf-bin/xenial 1:4.4.0-2 amd64


segmentation fault when using su or sudo

Use aptdcon, which communicates with apt-daemon via dbus so it doesn't need su or sudo, to reinstall the damaged packages. Probably your best chance is to reinstall ALL the packages.

First, make sure there is no broken install pending a fix:

aptdcon --fix-install

Also make sure there is free space available on your disk:

df -h

Then, get your currently installed package list:

echo \"$(dpkg --get-selections | grep install | cut -f 1)\"

Save that for later, on a text editor of something. Then, call aptdcon like this, using the full package list:

aptdcon --reinstall "package1 package2 package3..."

I'm telling you this way because aptdcon won't be able to reinstall some packages for various reasons, so you will have to strip them out if aptdcon cries about that, and try again, probably more than once.


upgrade Ubuntu 16.04 without losing data

As @Mark Kirby says, this is a probable duplicate of "Can I smoothly upgrade from one LTS to next LTS release?". The basic answer, is yes you can upgrade smoothly from one LTS (long term service) release (say 14.04 LTS) to another (say 16.04) without installing intermediates.

You can do this for Desktop LTS releases with the commands:

sudo do-release-upgrade

or

sudo update-manager -d

... and for the Server LTS releases with the commands:

sudo apt-get install update-manager-core
sudo do-release-upgrade

HOWEVER, I would say that I've watched plenty of "tested" software that's relatively widely used break, malfunction, or otherwise work improperly, so I would suggest a basic backup of your home directory to an appropriate form of external storage, i.e.

mkdir /mnt/<external storage>/May_30_2016_Backup_Ubuntu_16_04_Upgrade
cp -rf ${HOME}/* May_30_2016*/ &

This is generally a good practice, as even if everything works perfectly, maybe your hard drive dies tomorrow (also has happened to me).  Now you'll be thankful you have that backup, even if you didn't seemingly need it.


Can not install libpng12.so.0 on Ubuntu 19.04 for Packet Tracert 7

I finally got what was causing the error, and fixed it.

You can download the new packages here:

  https://www.dropbox.com/s/79x3imq73tcqyw4/libpng12-0_1.2.54-1ubuntu1b_amd64.deb?dl=0
  https://www.dropbox.com/s/yhk1p83b2e7rvt4/libpng12-0_1.2.54-1ubuntu1b_i386.deb?dl=0

So, basically the problem comes from the architecture of the packet and the architecture of Ubuntu's /lib and /usr/lib folders.
On the previous releases /lib and /usr/lib were 2 distinct folders, but on Ubuntu 19.04 /lib is a symlink to /usr/lib.

Now, take libpng12-0_1.2.54-1ubuntu1_amd64.deb as an example.
This is the deb architecture (I'll show only the binaries):

  /lib/x86_64-linux-gnu/libpng12.so.0 (symlink)
  /lib/x86_64-linux-gnu/libpng12.so.0.54.0
  /usr/lib/x86_64-linux-gnu/libpng12.so.0 (symlink)

This creates a conflict when unpacking in Ubuntu 19.04 because it tries to write two times libpng12.so.0 at the same place, which is impossible with apt.

What I did is simply a repacking of the files with this architecture:

  /usr/lib/x86_64-linux-gnu/libpng12.so.0 (symlink)
  /usr/lib/x86_64-linux-gnu/libpng12.so.0.54.0

If you don't trust my packages (and I would understand), you can simply compare the checksums of the files with those from the original packet.


How to encrypt a (USB) Thumb / Flash Drive in Ubuntu 14.4

There are several options, encrypt just some files with eCryptfs or EncFS, or a whole partition or drive with dm-crypt/LUKS (very similar to TrueCrypt, in fact cryptsetup can open (most?) TrueCrypt devices).

See archlinux's informative wiki about disk encryption.

LUKS encrypts entire partitions/drives, and should be installed by default on recent Ubuntu's.

If your USB drive is for example partitioned as /dev/sdn1, to encrypt it you would run :

sudo cryptsetup luksFormat /dev/sdn1

then decrypt it:

sudo cryptsetup luksOpen /dev/sdn1 crypt1

format it with (for example ext):
    sudo mke2fs /dev/mapper/crypt1

then just mount & use it. When done unmount & sudo cryptsetup luksClose crypt1


"fortune -o" (offensive fortunes) no fortunes found

Based on the results of apt-cache search --names-only fortunes, it looks like the package you need (at least for offensiveness in the English language) is fortunes-off

fortunes-off - Data files containing offensive fortune cookies

To install it run:

sudo apt install fortunes-off


Can you access an usb flash drive from terminal?

Is this drive setup to automount in fstab? If so just try

 mount -a

If not, or if that dont help, Its probably corrupted. Is there info on it you need?

If not, launch GParted as root

sudo apt-get install gparted

Press Alt+F2 and type

 gksudo gparted

then it will ask for your password and then it should run as root.

Does the drive show here and give any info? If there nothing on it, just repartition and format

Edit: If you do need to salvage info, I found a post where someone had similar issue and recovered files  with PhotoRec

Once recovery done then do the gparted steps.

Disclaimer: I have not ever used PhotoRec


Well, I have an HD3650, and got into similar problems. Open drivers worked slow (although they were usable), the proprietary were good at games, but desktop was useless - even moving windows was very laggy.

Then I noticed ATI had JUST released new version of the proprietary drivers, which are said to have much better support for the latest X and Unity. However, ATI released them too late, and they failed to get into Ubuntu repositories.

What I recommend you is to get the newest one from the ATI's site

This will, however, require manual installation. No worries though, although this is not a .deb package, installation is quite straightforward, just run the downloaded driver file, and it will install for you.

Oh, and be sure to uninstall the driver (fglrx) Ubuntu has installed to you, before you install the one from ATI site.

In my case this provided incredible improvement of overall performance, and my desktop is now working smooth as it have never before (and the games work perfect too)! :) I hope it will help you too!


Installing Server with existing data on drives

If you have to ask yourself the question: "Should I back up?" then the answer is a very probable:Yes! So, head over here: What's a good back-up strategy for 1 desktop PC? and read it. (You're user type 4)

If you're unsure about yourself, you're likely to make mistakes, so a backup is needed even more!  Borrow a drive from someone, bribe someone to give you a drive or buy one if needed...  Heck, throw a party and have everyone bring their backup drive and distribute all your files among everyone!

If I was wrong about the back-up, come back here and down-vote my answer.  Don't be the next one in my long list of people I've told to back-up before continuing and then reading a comment a bit later: "You've just made me lose all my |@*$# data!" because they listened to someone else...


What I can see is that you don't have any default gateway.

Add one related to your virtualbox:

sudo ip route add default via 10.0.2.2

then try the ping, dig, nslookup, etc:

$ ping -c 4 8.8.8.8

$ nslookup askubuntu.com

Also make sure that your VirtualBox configuration is correct.


System lag after Ubuntu update - how to troubleshoot & revert back?

Don't assume that an upgrade is responsible. Maybe it is, maybe it's not. Maybe you picked up a crypto-miner or other malware instead. 'Maybe' lots of possibilities.

Here's one first-pass approach to rule out many of those possibilities:

Look at top to see what the big resource-consuming processes are.
Look at free to see if you are swapping.
Look at df -h and df -i to see if your storage is full.
Check /var/log/apt/history.log to see what was recently upgraded. Look for frequently-used applications and new kernels.
If the logfile shows that a new kernel was installed, try rebooting into the previous (older) kernel to see if performance suddenly resumes.
Review /var/log/syslog for unusual activity, warnings, and errors.

If NONE of these provides any clue, then it's time to rule out hardware: MEMTEST, SMART Test, and the like.

My 18.10 is as fast as ever, so it's not a universal problem.


You should be able to simply rsync the /var/spool/imap from the old HDD to the new server. For that you don't need to chroot in the old HDD.

Mount your old drive in readonly mode (for safety) and use something like this (assuming you've mounted your old HDD under /mnt/old-hdd):

rsync -anv /mnt/old-hdd/var/spool/imap/ /var/spool/imap/

If you are satisfied with what rsync would do, you can re-run it without the "-n". FYI, "-n" is the "dry-run" mode of rsync.

Good luck


Installing ubuntu-desktop on ubuntu server doesn't work?

Press Ctrl+Alt+F2 to access the normal console again, log in, and investigate - run ps auxfw to see what processes are running, read the log files in /var/log, etc.


No luck installing Mono 3 on Ubuntu 12.04

The Mono Project provides instructions to install recent versions of Mono provided by Xamarin:

  Debian, Ubuntu, and derivatives

  Add the Mono Project GPG signing key and the package repository to your system (if you don’t use sudo, be sure to switch to root):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update

  Run a package upgrade to upgrade existing packages to the latest available. Then install Mono as described in the Usage section.

  Note: While the APT package is built against Debian Wheezy, it is compatible with a number of Debian derivatives (including Ubuntu) which means you can use the same repository across all these distributions.

  mod_mono (Ubuntu 13.10 and later, Debian 8.0 and later)

  To enable mod_mono installation on Ubuntu 13.10 and later, and Debian 8.0 and later (and their derivatives), you will need to add a second repository to your system, in addition to the generic Debian/Ubuntu repository above (if you don’t use sudo, be sure to switch to root):

echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

  […]

  Older Ubuntu releases (Ubuntu 12.10 and 12.04)

  To enable installation on older Ubuntu releases such as Ubuntu 12.04 and Ubuntu 12.10 (and their derivatives), you will need to add a second repository to your system, in addition to the generic Debian/Ubuntu repository (if you don’t use sudo, be sure to switch to root):

echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

  […]

  Usage

  The package mono-devel should be installed to compile code.

  The package mono-complete should be installed to install everything – this should cover most cases of “assembly not found” errors.

  The package referenceassemblies-pcl should be installed for PCL compilation support – this will resolve most cases of “Framework not installed: .NETPortable” errors during software compilation.

  The package ca-certificates-mono should be installed to get SSL certificates for HTTPS connections. Install this package if you run into trouble making HTTPS connections.

  […]

  Notes

  After the installation completed successfully, it’s a good idea to run through the basic hello world examples on this page to verify Mono is working correctly.

  Mono on Linux before 3.12 by default didn’t trust any SSL certificates so you got errors when accessing HTTPS resources. This is not required anymore as 3.12 and later include a new tool that runs on package installation and syncs Mono’s certificate store with the system certificate store (on older versions you had to import Mozilla’s list of trusted certificates by running mozroots --import --sync). Some systems are configured in a way so that the necessary package isn’t pulled in when Mono is installed, in those cases make sure the ca-certificates-mono package is installed.


Default plasma wallpaper

The default plasma wallpaper is set in the default desktop theme: /usr/share/kde4/apps/desktoptheme/default/

There is the metadata.desktop. It has wallpaper section. With the Kubuntu 14.04 / KDE 4.13:

[Wallpaper]
defaultWallpaperTheme=Elarun
defaultFileSuffix=.png
defaultWidth=2560
defaultHeight=1600

The 'Elarun' is described in the /usr/share/wallpapers/Elarun/

More of the KDE plasma theme details:  https://techbase.kde.org/Development/Tutorials/Plasma4/ThemeDetails


Monitor resolution 1366 x 768, with bad EDID detected

Well, this will teach me to actually spend appropriate money on monitors...

This "Elcheapo" Great Wall monitor (obviously made in China) just "says" that it can do 1366x768... What it actually does is simply accept higher resolutions, and downscale everything to 1280x768.

I noticed in one of the info screens of the monitor setup menus (the ones you get by pressing the buttons on the edge of the monitor itself) that, no matter which modeline I set, it always reported the resolution as 1280x768, though I didn't get that resolution offered by the System->Preferences->Monitors application.

So I used cvt to generate a modeline for that resolution:

$ cvt 1280 768
# 1280x768 59.87 Hz (CVT) hsync: 47.78 kHz; pclk: 79.50 MHz
Modeline "1280x768_60.00"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
$ xrandr --newmode "1280x768_60.00"   79.50  1280 1344 1472 1664  768 771 781 798 -hsync +vsync
$ xrandr --addmode VGA1 "1280x768_60.00"

Then I finally could choose 1280x768 resolution in the System->Preferences->Monitors application.

And lo and behold! Fantastically clear, crisp text!!! I've lost 86 horizontal pixels over what was advertised, but it's well worth it.

Someday I might try this screen with Windows, but with no computer running that at home, it will be a while... But I doubt Windows can make pixel columns magically appear in an LCD screen! :)


First thing to do is Backup your Linux files, if you have any.  After that is done, boot with the Ubuntu live CD, and delete every Linux partition. Boot, swap, and any other partitions that you may have created.

The Linux partitions don’t have a file system associated with them, and can be identifyed by size or partition number.  Once you do that, GRUB is gone, and you need to restore the MBR(Master Boot Record).

You would now need to boot Boot from Windows CD/DVD and choose “Startup Repair” when it shows up.

If the Startup Repair option does not resolve the issue, choose Command Prompt and run the following two commands:

bootrec /fixmbr

bootrec /fixboot

Remove the CD, restart your system, and you should be able to boot into your Windows installation.
To re-claim the space that was used by Ubuntu, again use the Ubuntu live CD, run GParted, and re-size you partition with the empty space that was occupied by Ubuntu.

You said that you have the Windows CD, but just in case you don't have your Windows 7 CD, or you can't find it, you can download a Windows 7 Recovery Disc, you can download it.  Click the desired architecture:

32-bit (x86)

64-bit (x64)


How to determine whether a command is running or not from bash

use pgrep

if ! pgrep -f "php $filename"; then echo "command not running"; fi

However, "I want to re-run a file php every time it ends", so why don't you just do this:

while true; do
    php "$filename"
done

Then you don't have to search for it, when it ends it will just run again.


Maintainer of curseradio don't offer the deb packages themselves. Intead they offer Python scripts. However, you can install using Alin Andrei's PPA. APT will use this PPA to fetch curseradio and its dependencies. To install, run:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt install curseradio


Command to send SMS from terminal Using Kannel + SMPP

you can call kannel direct in the command line with a wget (or curl) like:

curl "http://localhost:13013/cgi-bin/sendsms?user=xxxxxx&pass=yyyyy&to=56976808016&text=test_TLV&meta-data=%3Fsmpp%3FMAS_APP_ID%3D6%26MAS_SVC_ID%3D189%26MAS_CONT_ID%3D1%26MAS_CONT_DESC%3DTrivia&dlr-mask=31"


If I install any desktop environment (like XFCE) alongside Unity can it affect Unity?

I have them both installed right now.  I just logged out and back in on both DEs.  I have KDE, XFCE, Gnome fallback, and Unity installed for testing purposes.  Aside from occasional cluttered menus and file associations, it works fine for me.


Do you know a clever way to minimize USB latency (USB sound)?

Use a real time or low latency kernel, you can install the later one in ubuntu with the following command:

 sudo apt-get install linux-image-lowlatency

Then make sure to select the lowlatency kernel in the grub menu when turning on your computer.

I would also say avoid virtual machines if you can as they'll definetly introduce latency,

Sam


16.04 wifi gets disconnected every 30minutes

Try turning off Bluetooth if you can, stupid as it sounds -> it might do the trick.


I deleted ubuntu and now I can't boot into windows!

you have to do a startup repairing for windows.

you can boot your system using a windows DVD and do a startup repair.see here and here


Recording stereo mix from YouTube to Renoise

After a bit more searching online I found the steps in this YouTube video got it working for me:
Jack and PulseAudio Together as Friends - Linux

Basically edit /etc/pulse/default.pa to add the following under ### Load audio drivers statically

load-module module-jack-sink
load-module module-jack-source

then kill pulseaudio. After that I could connect PulseAudio Jack Sink in QJackCtl.


They are plenty distributions adapted for old computers. If you want to stay within the Ubuntu realm, I recommend Lubuntu, which I really like. The main difference being that you would replace Unity by LXDE (as well as standard applications by lightweight ones, but you can always re-install the ones you really want since it is still ubuntu), which requires much less memory.
Check http://lubuntu.net/
Have fun,


How can I create a Wifi Hotspot like in Connectify?

Go to System Settings, under Hardware chose Network and on the left side chose Wireless you will see the Use as Hotspot on the bottom of the window.


Ubuntu 14 Upstart, Script Never Runs -- No Log File

Try this upstart script:

===

start on runlevel [2345]

exec start-stop-daemon --start --exec /usr/bin/forever -- start --spinSleepTime 10000 /home/nodeapps/node_app.js

exec start-stop-daemon --start --exec /usr/bin/forever -- start --spinSleepTime 10000  /home/nodeapps/node_metrix.js

===

Basically forever is not a keyword for an upstart script and upstart doesn't know what to do with it.

exec however is a keyword and it tells upstart which program to start.

UPDATE: Answers

...do you think I could get away with just using /usr/bin/forever ....? Most likely not. The upstart scripts are not a sequence of commands like bash scripts (or .bat / .cmd files in Windows). They are configuration files (like .ini files in Windows) and one of the configuration options happens to point to an actual executable.

...does this explain the fact that theres no logfile being created? Since forever has never been started it didn't have a chance to leave a log file behind. I am reasonably sure you could find something in the upstart log files though.


Bash tries to run python on unknown command and fails in Py_Initialize

Removing the export PYTHONPATH from my .bashrc has fixed the problem.  I now get the normal processing if I type in an incorrect command name.  I will have to do some more research to be sure that my python 2.7 code is picking up the correct modules without that extra environment setting.


The PPA ppa:pmcenery/ppa "PPA for Paul McEnery" doesn't contain any packages for Precise so you can't use it.

Remove it from your software sources. See How to remove a repository? if you don't know how to do this.


You can use tee:

$ echo "something" | sudo tee -a /etc/profile

If you omit the -a (append) the file will be overwritten.


It seems here that the error comes from compiz with wrong settings, so I advise you to uninstall and reinstall compiz:

sudo apt-get purge compiz*
sudo apt-get install compiz* --fix-missing


Trying to add Rx460 graphics driver to Ubuntu 17.10

Here is a video that shows you how to install the drivers.

Here is a link to the page. Scroll down and choose your distribution.

In short:

Download the driver
Extract the archive
Run the installer

I hope this helps.


Why is DASH DISPLAYED permanently using screen space in the new V12

I think you are asking about the Launcher - the bar on the left hand side.  The default is 'Always show'.  You can change to 'Hide' in system settings->appearance->behaviour.


Nautilus in Ubuntu 14.04 don't ask "Do you want to empty the trash" when I unmount an usb stick

Ofcouse It's a normal not bug.
But I think that system could prompt "Safly Eject blah blah"message to the user in this case.


WiFi too slow compared to cable internet. Ubuntu 14.04 Intel Wireless card

So far we have established that you have a Intel Corporation Dual Band Wireless-AC 7265 chip and you are using the iwlwifi driver. The wireless hardware is working at 12Mb/S,  but for some reason NetworkManager thinks it is only capable of 1Mb/S.

I have found reports AC 7265 speed  problem reports that state that there is a problem with the firmware and that bluetooth and wi-fi both work well as long as they are not switched on at the same time. If you don't need a bluetooth mouse changing to a wired mouse may well be the simplest solution.

Updating to the latest version of the firmware apparently solves this. You can download the latest firmware from  Intel's Linux driver support page. Make sure you install the firmware for the correct chip and kernel version. You are currently on 3.19.0

You then need to rebuild your kernel to tell it to load the updated firmware file. Instructions for doing so are here. Loading external firmware tutorial

You could also install the driver from a later kernel version or simply try upgrading to Ubuntu 16.04 LTS although Wi-Fi problems seem quite common on the current release.


Does Ubuntu Desktop 32Bit Support more than 4GB Memory with default installation?

Ubuntu 10.04 and newer should support PAE out of the box, and most processors produced in the last twelve years do too, so in theory it should work fine.
If you're trying to install Karmic or older, you may need to enable PAE yourself, as per this wiki article.

It may also be necessary to switch certain options in your BIOS, such as "Software Memory Hole".

The information in this wiki article may be of use to you as well:

  A 32-bit computer has a word size of
  32 bits, this limits the memory
  theoretically to 4GB. This barrier has
  been extended through the use of
  'Physical Address Extension' (or PAE)
  which increases the limit to 64GB
  although the memory access above 4GB
  will be slightly slower.


I added "options iwlwifi 11n_disable=8" to a new file /etc/modprobe.d/iwlsettings.conf
(or you can add it to the end of /etc/modprobe.d/iwlwifi.conf if you wish.)

This turns on TX aggregation (which basically sends several packets in one transmission instead of sending the packets one at a time..) This is off by default on some cards due to instabilities with iwlwifi and TX aggregation several years back (which are fixed now.)  Despite name "11n_disable", setting 1, 2, and 4 disable various 802.11n features, but 8 enables one.  If found a nice speedup on my 6200 turning this on, but some say (until they turn this on) performance is so low they even have problems connecting as you are seeing (it shouldn't be that slow, but I assume it's hitting some firmware bug?)

Second thing, if you can pop open your machine to get to wifi card, check the connections.  I had freezes on my 6200 the first few days I had it with no solution, and finally popped the case open only to find the card was not quite fully seated!  The little wifi antenna connectors being loose could cause problems too.


TensorFlow broken data stream reading image file

Try to import PIL before tensorflow. In your case, just put "import tensorflow as tf" after all other imports.


How to properly paste new contents in Nautilus when in detail view?

It is an issue in the nautilus version that comes with Ubuntu 18.10 and earlier (3.28 and earlier) that, in list view, there may be no "empty" space, allowing to trigger the right-click menu associated with no selection, i.e., the right-click menu you get right-clicking on a blanc space.

There will be improvements in the forthcoming Ubuntu, which will use nautilus 3.32, The "breadcrumb" navigation bar has been reworked in that version, making it more powerful. You will be able to obtain the context menu for the folder right-clicking the folder in the navigation bar.

In the mean time, you will need to do it another way.

Solely with the mouse, there is not much more possible than a multi-step process. Click the parent folder on the navigation bar. This shows the parent folder with your working folder highlighted, which you can right-click for "Paste into folder".
Work with two windows or tabs, one opened in source and another in destination, and drag files from source to destination.
Use the shortcut key Ctrl+v to paste. In general, you can reveal the "empty spot" right-click menu, offering the "Paste" option, with Ctrl+F10.


How to : Change Gnome Desktop icons to Ubuntu default icons

As has been pointed out by muru this can be achieved by using the gnome-tweak-tool:

sudo apt-get install gnome-tweak-tool

and then selecting the preferred icon theme:


Building on Martin Owens answer, this is the quick solution:

wget http://www.matijs.net/software/msgconv/msgconvert.pl
sudo apt-get install libemail-outlook-message-perl libemail-localdelivery-perl libemail-sender-perl
perl msgconvert.pl YourMessage.msg


I think you need to generate the fa_IR locale:

sudo locale-gen fa_IR


I don't have much experience with DBus or udev, but pyudev looks very promising.


How do address these WARNING's when I open firefox from the terminal?

Your question is closely related to Why are there so many console messages from GTK+ applications?.

For the specific GLib error with Firefox please see https://bugzilla.mozilla.org/show_bug.cgi?id=833117.

To know how to disable these errors look at Disable css warnings and this answer: https://askubuntu.com/a/198385/248158 which suggests "redirecting stderr to /dev/null".


English language with Norwegian locale+keyboard?

In case someone else have this problem - try this command in the terminal:

sudo dpkg-reconfigure keyboard-configuration


ubuntu 18.04 install not recognize partition

Sorry, I should have done this a while ago. Unfortunately I do not recall the exact question/answer I got my answer from but, in general, they were correct in saying the GPT was not correct coming from the manufacturer. Just used gparted to fix it. Then the install went smoothly and am happily dual-booting Ubuntu 18.04 and Windows 10, albeit I may forget I have Windows on it. :}


As for the CPU, your decision is right. Core i5 is a 64 bit capable processor, which is the amd64 version (please note that the amd is nothing to do with your CPU).


I am getting 'wired network unmanaged' problem while connecting to internet

You would have to use the elevated command feature to edit systemwide files.  Try sudo as a prefex to your command (superuser do/run command as root).

Try:

$ sudo /etc/NetworkManager/NetworkManager.conf

By the way, the dollar sign ("$") is an important part of this answer.  It's showing that you're tying the command at the normal user's prompt.  There would be a pound sign ("#") if you were typing the command at the superuser's prompt.


sudo apt-get update error: Wrong sources.list entry or malformed file

This is because most of your PPA are outdated or doesn't exist anymore.

Look at your /etc/sources.list (or the files in /etc/sources.list.d) and remove or fix those lines that cause the error.

Also have a look at this answer by fossfreedom for a good and detailed explanation and it will help you.


Why do I have a different wallpaper in Activities Overview of Gnome Shell, and how do I remove it?

One possibility is that you've previously set a wallpaper using Ubuntu Tweak, with its Tweaks > Desktop > Love Wallpapers HD option. If that's the case, the Activities Overview wallpaper is located in .config/ubuntu-tweak and will be called lovewallpaper.jpg... You can safely remove this file.


As others already wrote Ubuntu doesn't set the MANPATH by default. You can edit your .profile and add the MANPATH as you like. But where does Ubuntu get the information about your manpath?

This information is set in /etc/manpath.config. The package man-db uses this information to configure the paths for man. The environment variable MANPATH has precedence over the file manpath.config. The file has the following (and probably more) entries:

MANDATORY_MANPATH /usr/share/man
MANPATH_MAP /usr/bin /usr/man
DEFINE troff groff -mandoc

The  first line tells a software which automatically generates the MANPATH what directories it should contain. Typically /usr/man, /usr/share/man and other are set up here.

Next is a mapping from the users PATH to the correct MANPATH. If a user has /usr/bin in his PATH, the MANPATH should contain /usr/man in my above example.

The DEFINE value has some default set of arguments and programs for pager utilities.


Accidentally deleted the Downloads folder

Create the Downloads folder again. Then open the file ~/.config/user-dirs.dirs in your editor and make sure that the line for the Downloads folder is there, and that it reads
XDG_DOWNLOAD_DIR="$HOME/Downloads"

Save the file, log out and log back in: now, the Downloads folder should be there again and have its "special status" back.
Some specifics in case it is needed: .config is a hidden folder in your home folder. Activate "Show hidden files" to see hidden files and folders. You can simply press Ctrl+h to toggle between seeing and hiding "hidden files and folders".


Simply paste the following lines in your ~/.bashrc file and open a new terminal (or restart your shell):

pyrun()
{
    cd ~/test/
    . bin/activate
    cd project
    python manage.py runserver 4321
}


For the random site issue, it's going to be in your home area, under ~/.local/share/applications.

You will probably find some strangley named ones in there - for example chrome-gbchcmhmhahfdphkhkmpfmihenigjmpp-Default.desktop. I'd suggest not removing them - they're for your extensions.

However, if you see one with the name of the site that lauches, do delete it.


There is no 32-bit Ubuntu 18.4.4 ISO available.

But You can download one of the previous versions of Ubuntu and try to upgrade after installing it to the 18.4.4 version.

http://old-releases.ubuntu.com/releases/

Ubuntu 17.04 has 32-bit ISO version available:

http://old-releases.ubuntu.com/releases/17.04/

WARNING:
Make sure to backup ALL of Your data first!


ambiance and radiance colours themes on 12.10 / 13.04

Well you can edit the CSS files of GTK to change the selection color:

Make a text file called something like colour.sh and paste the blow lines into the file.

oldcolor=f07746
newcolor=f0cb46
old_progress_bar_color=db6a3c
new_progress_bar_color=dbb93b
sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-2.0/gtkrc
sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
sed -i "s|$oldcolor|$newcolor|g" /usr/share/themes/Ambiance/gtk-3.0/settings.ini
sed -i "s|$old_progress_bar_color|$new_progress_bar_color|g" /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css

Make this script executable, enter in a terminal chmod +x colour.sh
Now type sudo ./colour.sh in the terminal to run the script and put your password when prompted.
Logout and login back, and the selection color is changed to light yellow (from the default orange).

Above script changes the selection and progress bar colors to yellow, as seen in the image below.

This works everywhere except nautilus filecopy progressbar. Ambiance uses a png image file to paint progress bar of filecopy dialog (the file is this: /usr/share/themes/Ambiance/gtk-3.0/assets/progressbar-vertical-fill.png and /usr/share/themes/Ambiance/gtk-3.0/assets/progressbar-horizontal-fill.png). Now you need to do some image magic via gimp to convert these images' color from orange to yellow via color transformation (this is "Colorize" in gimp). A detailed tutorial for the same can be found here.

Window border buttons, check boxes, radio buttons and everything else is all rendered from png files, which are located in /usr/share/themes/Ambiance/gtk-3.0/assets, /usr/share/themes/Ambiance/gtk-3.0/assets and /usr/share/themes/Ambiance/metacity-1. These images need to be converted from orange to yellow. There should be a way to automate this color conversions via scripting. The superuser link on how to change colors in image should help with all this.

NOTE: You can find a full list of hex codes (f07746 is orange and f0cb46 is yellow) here.

You can also find the analogous colors to a given color at this link. Just replace the color hex code in the link with your color, and you can get matching shades and hues of other colors.


The command

df -h

should do the trick. It lets you see all the mounted devices.

Note: You cannot mount the SD card reader by itself. You can only mount the SD card inside the SD card reader.


Ubuntu does not use letters (c: or d:) to identify hard drives or partitions.

The first drive is /dev/sda
The second drive is /dev/sdb

Partitions are then numbered, so first partition on the first hard drive is /dev/sda1

As long as you understand partitioning and the target of your installation, your data on the d: drive / partition should be find, BUT ...

Overwriting your data is a mouse click away on the installer and if you do not understand Linux partitioning you can easily loose data.

I suggest you first back up your data off the hard drive, then read the partitioning and installation documentation.

How to partition my hard drive for Ubuntu use?

https://help.ubuntu.com/lts/installation-guide/


How do I configure two network adapters in Ubuntu Server?

Had a similar issue with 2/two networking devices on Ubuntu 12.04 and apt-get wouldn't resolve any remote host address however, I was able to accept incoming connections. After tons of searching and coming across this post, I had tried the above once before and didn't seem to work.

Not sure if I had made another change since the first time trying to add the gateway option however, after trying to add the gateway option again I was unable to connect to my Webmin interface, which is assigned/bound to (one ip / one interface), however was able to get apt-get update to resolve domains again and ping remote hosts.

To get Webmin accessible again I removed the gateway option from the network card used for the Webmin interface in the /etc/network/interfaces file.

Not sure if I have some other misconfiguration somewhere else that could be causing that to happen, but for now it works and if I find a better solution I will re-post.

My interfaces file :

  # The loopback network interface
  auto lo eth1 etho
  iface lol inet loopback

  # The Primary network interface
  iface eth1 inet static
           address 192.168.0.3
           netmask 255.255.255.0
           network 192.168.0.0
           gateway 192.168.0.1
           dns-nameservers xx.xx.xx.xx xx.xx.xx.xx

  iface eth0 inet static
           address 192.168.0.4
           netmask 255.255.255.0
           broadcast 255.255.255.255
           network 192.168.0.0

eth1 is for Apache server and is on-board 10/1000 Mb/s
eth0 is an add-in card 10/100 Mb/s for local ssh, webmin, etc...

They appear in that order as well.

Thanks!


/etc/init is for system jobs - those services which are started independent of any user being logged in. These are typically system services. By default, commands are run as root unless setuid is used.

~/.config/upstart is for session jobs - these are run for a user logged into the GUI.

What does your Upstart job do?

Is it performing some function for some logged in user, specific to them? Use ~/.config/upstart.
Does it not need a user logged in do its work, or need to run when the system starts? Use /etc/init.


Either Use A Live Ubuntu USB or boot into ubuntu and run command
Open a terminal, and add the Boot Repair PPA

  $ sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

Install Boot Repair

  $ sudo apt-get install -y boot-repair && boot-repair

Update the GRUB 2 configuration file

  $  sudo update-grub

Reinstall GRUB 2 to the drive's MBR or equivalent

Install to the drive, not to the partition. Example: sda, not sda1

  $ sudo grub-install /dev/sdX

Inspect the GRUB 2 configuration file. The default is /boot/grub/grub.cfg

for more information visit how to update GRUB2


Root is the first user created in almost every distribution. So please do not try to create a root user.

To run applications as root including shell(which means basically means becoming root) in Ubuntu all one needs is to run sudo. Sudo is very useful.

sudo application_name options

This is the way to use sudo. to solve the ICE issue. You need to change the ownership of the file to the user running the shell.
Type this command.

 sudo chown marek:marek /home/marek/.ICEauthority

I assume marek is the username as it is in the directory /home/marek. Login as the first user created while setting up Ubuntu and then run the sudo chown command as above.

Corrections: the marek does not need to be the first user. Though the password would be the password of the one is in.
Corrections: Added changes for users who are not in sudoers list.


Ubuntu slow to boot after resizing partitions

Fixed it, for those of you with similar issues:
Check in /etc/initramfs-tools/conf.d/resume if there is UUID in it like RESUME=some-uuid remove uuid and replace with none to be RESUME=none. After that run sudo update-initramfs -u and it should be good to go.

Found the solution here.


keep memory usage low Ubuntu 16.04 Server guest VM

There is no need to drop caches; Linux will cache data as much as it is allowed to, when memory pressure gets too high it will start to discard pages that are no longer useful and write back dirty pages to free up spare memory.  The Linux philosophy is to keep data cached just in case it needs to be accessed again later, and if memory is required it will discard this data for the memory your processes require


how to update to latest ntp patch 4.2.8p12 on ubuntu 18.04

I don't have the information if Ubuntu / Canonical 18.04 will be updated to 4.2.8p12 ntp.  That would have to be filed with them.

However, you can install it by first downloading the newest version from http://support.ntp.org/bin/view/Main/SoftwareDownloads

Might need to install the build-essential as well for making the files.

sudo apt install build-essential

Then go to your Downloads folder and extract the file:

cd ~/Downloads
tar zxvf ntp-4.2.8p12.tar.gz

Go to the newly created folder:

cd ntp-4.2.8p12/

Now run the configure, make and sudo make install

./configure
make
sudo make install

The new version should now be installed.  Reboot the system for the changes to take effect.  After it is rebooted you can check for the newest version.

$ ntpd --version
ntpd 4.2.8p12@1.3728 Tue Mar  5 03:47:55 UTC 2019 (1)

Hope this helps!


Ubuntu 14.04 `open with` missing on folders

This option was removed, evidently 12.04 was the last version to have this option. There is a bug still open here:

https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1026254


seems you have the wrong command, the correct one is in the  VirtualBox Documentation

sudo usermod -a -G vboxusers username

(Where username is the user you want to add)

There you go, after you do that all you need to do is open Vbox and select Devices > USB > "Whatever usb device you want to add"


How can i make a partition sharable to windows in the given options

If the drive is working in Ubuntu then copy the data to some other drive then use gparted to format the drive as ntfs(the file system that works with windows and also with Ubuntu).
Maybe you've made the new drive as ext4 so thats why it's not getting detected in windows. Changing it to ntfs may resolve the issue.
Make sure your data is backed up to another drive.


I did some research.
It looks that for some reason, not quite clear to me, only the 32 bit packages of libfuse2 and fuse were installed on my computer. After installing the 64 bit packages the kdenlive appimage runs flawless.


Minimum Requirements of ubuntu 18.04 LTS

I don't believe you will be able to run Desktop version of Ubuntu as those are minimum specs:

2 GHz dual core processor
2 GiB RAM (system memory)
25 GB of hard-drive space (or USB stick, memory card or external drive but see LiveCD for an alternative approach)

However you may be able to run server version (no GUI)

300 MHz x86 processor
256 MiB of system memory (RAM)
1.5 GB of disk space


Connecting to Windows7 share gives mount error

In your Windows computer set the following registry key to ’1′:

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

and set the following registry key to ’3′:

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

No ``, just the values.

Reboot!


Apache 2.4 install on 12.04 ends up with non-standard configuarion

You could try symlinking /usr/local/conf/apache2/conf to point at /etc/apache2. You might need a symlink from httpd.conf to apache2.conf too.


Experiencing problems with installing device drivers on Ubuntu VM.

This is a problem caused by VirtualBox, not by Ubuntu. Your best shot might be to try the VirtualBox Guest Additions.

Installing the VirtualBox Guest Additions (Oracle)


How do I programatically edit label widget in the runtime

Looks like a typo:

def update_Label(self,url):
    self.title.set_text(newlabel)

to

def update_Label(self,url):
    self.title.set_text(url)


do I need to partition my whole harddisk to install ubuntu for the first time?

The installer provides alternative ways to install Ubuntu. It can resize an existing Windows partition and install it along it allowing you to dual-boot. Or it can use the whole disk in which case it will use one partition for system and data. Or you can specify partitions manually.

If you want to divide your "system" and "data" on Ubuntu on separate partitions similar to the C: and D: paradigm on Windows, you can do that by making two partitions. Both need to be Ext4. The "system" one needs to be larger than 10GB, 20GB is probably enough for absolutely anything whereas 15GB should be a good average. The rest of the space goes for the "data" partition. Once you have the two partitions, use manual partitioning and tell the Ubuntu installer to use the "system" one at the "/" mount point and the "data" one at the "/home" mount point.

Note that once you to tell the Ubuntu installer to use manual partitioning you have to also specify a Swap partition. That can be any partition with larger size than your physical RAM and type swap. Some people recommend double the RAM but that could be an overkill nowadays. Once you have a swap partition you have to tell the Ubuntu installer to "Use it as Swap".

That's all. :)


I want to uninstall Wine from Ubuntu. How can I do that?

The command you cite, sudo apt-get autoremove, will not remove Wine -- it will only remove packages that are "no longer needed" -- for instance, dependencies for packages that are no longer installed.  To remove Wine, you'll need the correct command to remove the Wine packages.


Time Machine like folder backups for Ubuntu

the website of timeshift suggests back-in-time to solve your problem. You can find the project at http://backintime.le-web.org/


Disable Facebook plug-in on default Firefox

You can do so by entering about:config in the address bar of Firefox and hitting enter. You'll get a warning, but just okay that.
Then, enter social in the search bar of the page that is now open. You'll then see just a few lines like this (I've inserted spaces to make things non-clickable):

social.activation.whitelist;h t t p s ://ww w.facebook.com
social.active;true
social.enabled;true
social.manifest.facebook;{"origin":"h t t p s ://www.fac ebook.com","name":"Facebook Messenger","workerURL":"h  t t p s://www.facebook.com/desktop/fbdesktop2/socialfox/fbworker.js.php","iconURL":"d a t a :image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAAX0lEQVQ4jWP4 %2F%2F8%2FAyUYTFhHzjgDxP9JxGeQDSBVMxgTbUBCxer%2Fr999%2BQ8DJBuArJksA9A10s8AXIB oA0B%2BR%2FY%2FjD%2BEwoBoA1yT5v3PbdmCE8MAshhID%2FUMoDgzUYIBj0Cgi7ar4coAAAAAS UVORK5CYII%3D","sidebarURL":"https://www.facebook.com/desktop/fbdesktop2/?socialfox=true"}
social.sidebar.open;true
social.sidebar.unload_timeout_ms;10000
social.toast-notifications.enabled;true

What you then need to do is to highlight, one at a time, the lines with social.active;true and  social.enabled;true and hit enter each time. Hitting enter will toggle between true and false. You can do so for whichever additional lines you wish.

(Note the long line of code. That one draws the Facebook icon because it's a data URL.)

I must stress that my code above is slightly different than what you may see because I'm using Firefox 17 (beta) and not Firefox 17 (stable) and in my version Facebook is off by default.

After you've done your changes, close the about:config tab (or window) and things should be fine after you restart the browser.

Oh, and while I was writing this answer you provided an image. Now, I'm not using Unity, which has a few "social" activities of its own but still what I've suggested may help!


Is it possible to have multi-thread cURL with Flashgot in Ubuntu?

The latest version of uGet has cURL multi-connections built in without the need of a plugin.

http://uGetdm.com/

I know you are already aware of uGet as you stated in your question but not sure if you're aware of the latest version new cURL features.


How to mount a partition for all users automatically using gui

Linux works with permissions. Permissions for a user, for a group and for others.
If you want a mount accessible for more users than your admin user put them all in the same group and mount the partition with read and write permissions for that group.
The options you need behind "noauto" are
noauto,rw,gid=xxx

where xxx is the id of the group.
Create a group (one time)...
groupadd {group}

Add users to a group (once per user) ...
usermod -a -G {group} {user}

Show id of a group (one time) ...
id -g {group}

and use that id to replace the "xxx" in the mount command.


I wouldn't think that it does particularly need JACK (LMMS can work fine with just ALSA until you add MIDI input) but using audio programs without it can be a real pain in the arse. Having your audio come through the painful latencies that Pulseaudio gives it can delay your sound for as much as three seconds. And there are programs that do that because they use the regular ALSA/PA soundserver! It can be a pain to maintain and manage but once there is better integration with PA/ALSA then it will hopefully become way easier to work with.


Ubuntu desktop installs itself a bit different than Ubuntu server.
Ubuntu server actually builds an OS from scratch with debians from a local or web repositories, and has many many install menus and parameters to configure. That is why you usually want to use a preseed file.

Official Ubuntu desktop uses a squashfs - an existing OS that was compressed and can be used for an easy clone install. Many preseed commands you know for Ubuntu servers are not used in the process.

If you would like to completely obsolete an installation part like this and not use OEM, you are going to need a custom made squash with your own parameters and components. Something that is not always easy to be done, but achievable.


Wake On Lan (WOL) for Realtek RTL8101E/RTL8102E

To start a machine via WOL the network interfaces need to be left active after shutdown.

Type

root@host:~# cat /etc/init.d/halt | grep ^NETDOWN
NETDOWN=yes

to control if they are left on.
To leave the network interfaces on set the NETDOWN variable in your /etc/init.d/halt script to:

NETDOWN=no


Ubuntu 16.04 Can't connect with FTP, only SFTP

ftp uses more than one port - control and data port...
Control port - 21
Data port - 20
Open port 20, as you have done 21.


ESP8266 warning: espcomm_sync failed error: espcomm_open failed UBUNTU 18.04

Please check that you are member of dialout group.
If not please add yourself to this group by running sudo usermod -a -G dialout $USER, log-out and log-in again.

For more predictable results you may try to run esptool.py directly to check that your board is alive:

sudo apt-get install python3-pip
sudo pip3 install esptool

esptool.py --port /dev/ttyUSB0 chip_id

You will get output which is similar to shown below:

ESP8266 example

$ esptool.py --port /dev/ttyUSB0 chip_id
esptool.py v2.3.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Chip ID: 0x01234567
Hard resetting via RTS pin...

ESP32 example

$ esptool.py --port /dev/ttyUSB0 chip_id
esptool.py v2.3.1
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision (unknown 0xa))
Features: WiFi, BT, Dual Core, VRef calibration in efuse
Uploading stub...
Running stub...
Stub running...
Chip ID: 0x01234567890a
Hard resetting via RTS pin...

If it does not help - check your wiring, board temperature, cable and so on.


Checkbox saves its reports to the Documents folder of the current user (/home/user/Documents) in both HTML and XLSX format.

In my test, the resulting reports were named submission_2017-06-28T15:29:16.974627.html and submission_2017-06-28T15:29:17.118216.xlsx, both saved in /home/richbl/Documents.


Ubuntu 15.04 Login fails and returns to login

There were a lot of questions on askubuntu about constantly returning to the login screen.

I've upgraded machines with AMD and nVidia cards from 14.04 to 15.04 (through 14.10) and on both I had this issue. (proprietary drivers)

Both resolved.

For nVidia

When in login screen, launched the terminal: Ctrl+Alt+F1

found the drivers:

dpkg -l | grep nvidia

reinstalled them with apt-get remove <package name> and apt-get install <package name>

For AMD

In login screen launched the terminal: Ctrl+Alt+F1

found the drivers:

dpkg -l | grep amd

and just removed them with apt-get remove <package name>

MESA opensource drivers were installed, so it worked.


how to run command in an already opened terminal through a shell script

I'd suggested the following as a way to keep the shell open:

gnome-terminal -x sudo -u userA bash -c 'PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PATH; \
  cd /home/userA/scripts; \
  source varset.sh; \
  bash'

However, the last bash won't be affected by the assignment of $PACKAGE_PATH or from source varset.sh if they aren't exported.

So:

gnome-terminal -x sudo -u userA bash -c 'export PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PATH; \
  cd /home/userA/scripts; \
  source varset.sh; \
  bash'

with varset.sh exported should do the trick.


Upgrade 18.04 to 20.04 hangs after "Adding boot menu entry for EFI firmware configuration"

I don't know the exact details to answer: "What could be the problem?", but I did get around this problem (i.e. I did manage to upgrade to 20.04, while using lvm2 after receiving the "leaked on vgs invocation" error/warning messages).
I believe it's because you are using logical volumes, and possibly (as I was) using an lvm snapshot during the upgrade. After my upgrade stopped at this point I waited ages before realizing dpkg wasn't going to do anything else.
I wouldn't recommend this unless you are desperate to upgrade - it could go horribly wrong... I made sure I had a recent 'dd' full disk backup, then killed all dpkg processes (that had been doing nothing for a hour or so), there were two of them showing with ps aux: the one I expected and also a memtest86+ one. Then I followed some web instructions (am I allowed to reference them here?):
sudo apt update --fix-missing
sudo apt install -f
sudo dpkg --configure -a

I made a point of looking for any errors on the terminal near where the "initramfs" statements are printed.
sudo dpkg --configure -a didn't find any problems, and so didn't try to fix any, so I rebooted, and 20.04 was running fine. I've since deleted the snapshot (i.e. kept the upgrade to 20.04, and not reverted to the earlier ubuntu release)


Can't access my user account Ubuntu 12.04

Faced the same situation when I was using 11.10. Here is how I solved it:

At log in screen, press Ctrl + Alt + F1
login with your username/password
ls -Shla | grep “Xauthority”
sudo mv .Xauthority Xauthority.old
sudo shutdown -r now

Source.


I recommend the following:

Back up all your important user data. The following steps pose a small risk of data loss.
In GParted, expand the extended partition to cover the available free space.
Shrink /dev/sda2 by a tiny amount (1MiB should be sufficient).
Move /dev/sda5 to the start of the freshly-expanded extended partition.
Type sudo fdisk -l /dev/sda and check the type codes (under the Id column) of all your partitions.
Run my FixParts program and use it to convert /dev/sda3 to logical form. If necessary, adjust the type codes of your partitions to match what fdisk showed. /dev/sda1 and /dev/sda2 will probably have to be changed from 0x07 to 0x0c.
Re-launch GParted and, if necessary, shrink the extended partition so that the free space at the end of the disk lies outside of the extended partition.
Create a new primary partition for Windows at the end of the disk.

Alternatively, if the laptop is new enough (less than about 2 years old, give or take a bit), it probably has an EFI/UEFI firmware. If so, you could use gdisk to convert the disk from MBR to GPT format, install an EFI boot loader for Linux, and install Windows in EFI mode. This has the advantage that GPT supports up to 128 partitions by default, with no distinction between primary, extended, and logical partitions, so the partitioning task becomes easier; but EFI-mode booting is newer and still has glitches on some systems, so there's a greater risk of problems.

Unfortunately, it's impossible to know which approach is better without trying them both on your specific hardware. (Assuming of course that your firmware is EFI-based; if it's an older BIOS-only firmware, the second option isn't really available to you.)


Is it possible to use libertine on an Aquaris E4.5 yet?

Official answer: yes.  Practical answer: not until OTA-12.


According to the launchpad bug  this issue is actually harmless. But if you really want to fix this you have to update your apt version.


installation on RAID set "seeking device"

Found a workaround, ext3 instead of ext4.. It wasnt the seeking device error, but it hangs on boot on something with ext4-fs remounted. Ex3 fixed the issue... If someone can explain how/why, would it be nice.


Looking at the source code of wm_event_types.h I see definitions for seven mouse buttons. I expect blender would need to be adjusted to respond properly to more buttons.

I would suggest reporting it as a bug at developer.blender.org either as a specific mouse model not supported or limited mouse button support.


Is my hardware capable of running ubuntu 12.10?

No , ubuntu 12.10 can not run at this configuration , you can use ubuntu 10.10 is light and easy for use. Also graphics same as XP so you can take experience of LINUX.

The minimum memory requirement for Ubuntu 12.10 is 768 MB of memory and 5 GB of disk space for Ubuntu Desktop


Prevent gedit from graying out when not in focus, in 18.04

This effect is governed by the theme you use. The default Ubuntu 18.04 theme, Ambiance, indeed greys the background and slightly greys the text of windows that are not in focus.

The easiest solution is to go out and find a theme that does not apply such effect. More difficult would be to edit your theme. However, this would involve editing the code of the style sheet.


How do I get three monitors working on an Nvidia GTX 590?

I did the following:

sudo nvidia-xconfig --no-sli --no-twinview --separate-x-screens --xinerama

And that did the trick for me. You have to disable sli to get Xinerama to work and tvinview only worked with 2 monitors anyways. So this is the best I have got out of it so far. Just had to re-arrange the monitors with the Nvidia X Server Setting -utility. Hope this helps!


systemd: How to start service B after service A runs to completion?

I've come upon an answer to my own question.

I read in the systemd.service man page about the "Type=" clause, and I see that when I add "Type=oneshot" to the [Service] section of my *.service files, systemd does what I wanted.

I expect I could use other Type= settings and get results to my liking, and I also expect that I probably don't actually need to make second.service oneshot to get what I want; first.service is the one I need to see finish.  But I have a path to success now.

So, for the record, here are the working *.service files and the journalctl output to prove it.

Onward!

====

First.service:

[Unit]
Description=First of two services

[Service]
ExecStart=/home/steve/play/systemd/oneAfterTheOther/first.sh
Type=oneshot

[Install]
WantedBy=multi-user.target

Second.service:

[Unit]
Description=Second of two services
After=first.service

[Service]
ExecStart=/home/steve/play/systemd/oneAfterTheOther/second.sh
Type=oneshot

[Install]
WantedBy=multi-user.target

Journalctl output:

$ journalctl -u first -u second
-- Logs begin at Wed 2018-09-05 11:46:04 CDT, end at Wed 2018-09-05 11:51:54 CDT
Sep 05 11:46:21 sk-xenial-vm systemd[1]: Starting First of two services...
Sep 05 11:46:22 sk-xenial-vm first.sh[868]: sleep for 10 seconds
Sep 05 11:46:32 sk-xenial-vm first.sh[868]: ...and we're out
Sep 05 11:46:32 sk-xenial-vm systemd[1]: Started First of two services.
Sep 05 11:46:32 sk-xenial-vm systemd[1]: Starting Second of two services...
Sep 05 11:46:32 sk-xenial-vm second.sh[1104]: sleep for 2 seconds
Sep 05 11:46:34 sk-xenial-vm second.sh[1104]: ...and we're out
Sep 05 11:46:34 sk-xenial-vm systemd[1]: Started Second of two services.


Hot to get the message ID when sending email via command line?

The mail header MESSAGE-ID is a unique identifier. It's assigned by the mail server that sends the mail out in a specific format. Typically it's some date and time information, along with the server hostname.

Your best bet would probably be to look into how the mail server software in question builds their MESSAGE-IDs and infer the ID of your test message from that information.

As far as the command pipeline that sends the mail out is concerned (echo ... | mail ...): At that point there's no way to get the MESSAGE-ID, because it doesn't exist yet. It will only be generated later by the mail server software that mail hands the mail over to.


Convert .mp4 to .ogg keeping only the audio, with Ubuntu 14.04 and avconv

@Nicolas Raoul you made a little mistake, it's not -nv it's -vn try:

avconv -i file.mp4 -vn file.ogg

it will work.


Ubuntu 20.04 Grub colour is black and white

grub-customizer is a tool that allows you to easy customize your Grub menu. You should give it a shot ! :)

sudo apt update
sudo apt install grub-customizer


Should I install a .deb file of a package version that's not in apt source?

A .deb file from an external software source that is manually installed won't be automatically updated like it would be if it was installed from the default Ubuntu repositories or from a PPA.
When a .deb file is installed its missing dependencies are also installed along with it. There may be package management issues caused by conflicting dependencies of a manually installed .deb package with other packages that are installed from the default Ubuntu repositories.
Is there any reason to trust the source of the .deb file that you installed manually as much as you trust the packages from the default Ubuntu repositories? This factor by itself would be sufficient reason for some people to install the .deb file in a virtual machine if that's possible to do in order to minimize the possible adverse and/or irreversible consequences of installing an untrusted package.
There may be safer alternatives to installing a relatively untrusted .deb file.

Unlike apt packages, snap packages are usually updated to the latest version. A snap package is a good alternative to a relatively untrusted manually installed .deb file if it is available in the default Ubuntu repositories.
Another alternative to installing a relatively untrusted .deb file with root permissions is to track down the source code of the package and compile it as a normal user in your own home directory. This is a complicated option, the advantage of which is when it's done properly it's safer than installing a relatively untrusted package with root permissions.
The results of rmadison bluez show the following bluez versions. The bluez package contains tools and system daemons for using bluetooth devices, but it does not contain the required drivers for all bluetooth devices. When bluetooth is malfunctioning, it's usually because of a driver issue, not because of bluez.

 bluez | 4.98-2ubuntu7     | precise         | source, amd64, armel, armhf, i386, powerpc
 bluez | 4.98-2ubuntu7.2   | precise-updates | source, amd64, armel, armhf, i386, powerpc
 bluez | 4.101-0ubuntu13   | trusty          | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 bluez | 4.101-0ubuntu13.3 | trusty-security | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 bluez | 4.101-0ubuntu13.3 | trusty-updates  | source, amd64, arm64, armhf, i386, powerpc, ppc64el
 bluez | 5.37-0ubuntu5     | xenial          | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 bluez | 5.37-0ubuntu5.1   | xenial-security | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 bluez | 5.37-0ubuntu5.1   | xenial-updates  | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 bluez | 5.48-0ubuntu3     | bionic          | source, amd64, arm64, armhf, i386, ppc64el, s390x
 bluez | 5.48-0ubuntu3.1   | bionic-updates  | source, amd64, arm64, armhf, i386, ppc64el, s390x
 bluez | 5.50-0ubuntu1     | cosmic          | source, amd64, arm64, armhf, i386, ppc64el, s390x
 bluez | 5.50-0ubuntu1     | disco           | source, amd64, arm64, armhf, i386, ppc64el, s390x


Post installation of PowerShell - PWSH command not found

Try adding ~/.dotnet/tools to your $PATH


What is the "Virtual Machine Host" option during the installation of Ubuntu 16.04?

IIRC, that specific menu is based on tasksel, and that option is for installing the KVM Virtual Environment

To be able to use KVM, you will need a CPU that supports either

Intel VT-x

or

AMD-V

You can use the egrep -c '(vmx|svm)' /proc/cpuinfo command to find out if your CPU supports this option, and you will need to make sure it is enabled in the BIOS.


I helped someone with this a few weeks back but I'd already forgotten what I did, so I googled it again and found this:

http://ubuntuforums.org/showthread.php?t=2083626&p=12351981#post12351981


Replace the shortcut command

Assuming it works the same on Gnome as it does on Unity:

Choose: System Settings > "Keyboard" > "Shortcuts" > "System". Click on the right side, to set a new keyboard shortcut and press Backspace. The key will show "Disabled".
Now move to "Custom Shortcuts" (in the left pane). Click the "+" and add the command:

dm-tool lock

and set the shortcut Ctrl+Alt+L.

Now you replaced the command, called by the shortcut.


How can I install Linux Kernel 3.0 in 11.04?

I would like to echo @CYREX comment - you are already beyond the standard Natty configuration with the unstable Gnome 3 PPA.  Adding v3 of the Kernel might make your system unusable.

To try a newer kernel download the following .deb files from the v3.0-oneiric mainline tree.

headers_i386.deb or headers.amd64.deb depending if you are using 32bit or 64bit
headers_all.deb
image_i386.deb or image_amd64.deb depending if you are using 32bit or 64bit

Install via

cd ~/Downloads
sudo dpkg -i *.deb
sudo update-grub

Note the following from the kernel wiki -

  Each mainline build is named by the base upstream version suffixed with an Ubuntu release name. This tells us the upstream version which was built, and additionally which configuration was used to build it. This tells us which release is most compatible with the kernel as built. This does not prevent the kernel being used on other releases, though it is most likely to work correctly on the release it is build for, or earlier ones. The further away from your base kernel release you are the more likely that there will be an incompatible userspace interaction which will prevent them working for you


Remote GUI, Windows client, Ubuntu 16.04 server

Command line is sufficient

I understand the idea of a command line interface may be a bit uncomfortable at first, but really it is a reasonable choice. You use the command line interface as on a Desktop so you should already be a little familiar with bash / zsh / shell of choice.

Advantage - fast and secure (via ssh).

IMO desktop environments do not really help on servers as everything server side is command line.

Start/stop services, edit config files, install/update packages, moving data files, firewall and network tools, and user management such tasks are not enhanced by running a graphical terminal.

Installing a desktop environment adds hundreds of packages the vast majority are unused and thus takes up disk space, complicated upgrades, and adds potential security holes (more applications == more potential security holes).

To manage servers use ssh + screen or an alternate to screen - Is there any user friendly alternative to screen?

This allows you to attach and reattach to your server.

Be sure to secure ssh with a least keys http://bodhizazen.com/Tutorials/SSH_security

nano / vim / emacs are all great tools for editing. You can use vim + ssh edit files remotely https://unix.stackexchange.com/questions/202918/how-do-i-remotely-edit-files-via-ssh

Or you can mount your file system over sshfs https://help.ubuntu.com/community/SSHFS

Graphical tools - WEB solutions are better than a desktop

If you feel you NEED  a graphical interface use one of the many web based interfaces. These tools are faster than VNC, more secure than VNC, graphical interfaces, and server task specific.

You can secure them via https or ssh (depending on tool).

You can connect to them from any OS via a browser.

Webmin http://www.webmin.com/

Cockpit http://cockpit-project.org/

And if needed there are several specialized web interfaces such as

phpmyadmin - manages databases https://www.phpmyadmin.net/

Vitrualization also has several options.

Virt manager - supports KVM, Xen, and LXC with both spice and VNC viewer built in.
If you use KVM you can use Virt Manager over ssh - https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/chap-Virtualization_Administration_Guide-Remote_management_of_virtualized_guests.html

There are many alternates including oVirt - https://ovirt.org/

There a wide range of alternate tools you can find many web interfaces if you google search. https://www.tecmint.com/web-control-panels-to-manage-linux-servers/

Paid solutions such as cpanel are very popular.
Cpanel https://cpanel.com/ https://cpanel.com/


System audio problems while Android emulator is running

I did what was written on this link and it solved the problem for me.

In /etc/pulse/default.pa change load-module module-udev-detect
to load-module module-udev-detect tsched=0

and in /etc/pulse/daemon.conf change ; default-sample-rate = 44100 to default-sample-rate = 48000

Finally restart pulseaudio with pulseaudio -k (or your simply restart computer)