I am not able to install GCC in my Ubuntu(18.04)...I already tried the command - sudo apt install gcc

As some comments have already pointed out, gcc is part of the main ubuntu repository. So technically, there should be a package gcc. You can search for all the packages that are available by running the command

apt-cache search gcc

This will show all packages that have gcc in their name (and that will likely be very many). You can narrow down the search to packages that start with gcc and then have a space (in other words, the package that really is called gcc),

apt-cache search gcc | grep "^gcc[[:space:]]"

If the former command found packages such as gcc-8 or similar, but the latter command didn't show anything, then it is likely that your package management doesn't know about gcc. Some comments have also suggested to update the package database by running

sudo apt-get update

This is generally a good idea before you install packages, because the installation will attempt to download whatever you try to install and that download may fail if (for example) the location of the package has changed. The command apt-get update makes sure everything is in the right place so that things can be found when you want to install them.

If after updating your package database (by apt-get update), you still don't find a package called gcc, but you do find one with a specific version number, the simplest way to get you a working gcc on your computer is probably to settle for a specific version, such as for example by running

sudo apt-get install gcc-7

You may have seen that some comments have pointed out that gcc would normally be part of an ubuntu installation. So the errors you are reporting might point at some more intricate problem with they way your package database is configured. If you are on a freshly installed ubuntu system, the simplest way to fix this is to simply re-install your system while you have a solid internet connection. If you are not on a freshly installed ubuntu system, things can be a bit more involved, but they are quite well documented if you search for ways to fix your /etc/apt/sources.list file.


this error

error: libcurl.so: cannot open shared object file: No such file or directory

you might want to try installing curl then try running steam again


Accessing OneDrive files on a ntfs partition from Ubuntu 14.04

So I found the craziest solution. Booted back to windows and started inspecting the files. Accidentally I had network traffic monitor opened up and each time I opened a file there was some incoming traffic happening.

So yes, you've guessed it. These inode/symlinks were not links to a file in some other location, but were actual links to Onedrive's cloud. OneDrive acted as sort of overlay and it mimicked files as if they were there, so I was able to open those files in Windows, but not in Ubuntu.

What you have to do in order to access them from other OS than Windows is: open each and every file so it is downloaded on demand. I hope MS will update OneDrive so it does that in background, because this is just silly =)


The problem I found out is generated every time dmesg.log is updated. Solution is to reset wireless connection. It is generally not only Thunderbird but sending out network connection problem.


Boot problem in UEFI multiboot system with separate drives in Ubuntu 18.04

Some info here:

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

Chroot method from live installer. You then mount correct ESP.

Can I install in UEFI mode with the alternate installer?

How can I reinstall GRUB to the EFI partition?

Change mount of ESP in fstab first, as grub-install will use default unless specified. You may have to reboot & ESP must exist or reboot will have issues.

man efibootmgr
man grub-install
sudo grub-install --bootloader-id ubuntu /dev/sda1

Check that fstab & UEFI have correct entries. UUID must be of correct ESP.

lsblk -f
cat /etc/fstab
sudo efibootmgr -v

If you have just copied files from where Ubuntu default installed to the ESP you want to use, you need to edit fstab and use efibootmgr to create new entry to boot from correct ESP. You check GUIDs (aka parttype) to know if that is correct. And then use efibootmgr to delete (-b & -B ) obsolete ubuntu boot entry with old GUID/partuuid. Efibootmgr defaults to sda1 or first drive & partition, you have to specify drive with -d and partition with -p parameters.If UEFI entry not correct you can add new entry.

lsblk -o +parttype
sudo efibootmgr -c -g -w -L "ubuntu" -l "\EFI\ubuntu\shimx64.efi" -d /dev/sda -p 1
sudo efibootmgr -v
sudo efibootmgr -b XXXX -B

This is why using Boot-Repair's advanced mode which walks you thru a simple chroot to re-install grub is easier. You still need to do the housecleaning of duplicate/old ubuntu entry in UEFI.


Is there another way for me to backup /home/user other than creating a subvolume?

It is perfectly reasonable to just snapshot the whole /home if you want /home/user to be backed up. snapshots are relatively cheep.

btrfs snapshot create /home/ /home/snapshot

In Btrfs the base unit of a snapshot is the subvolume (/mount-point/ is automatically a subvolume) and you cant snapshot anything smaller. In this case your /home is the smallest thing you can snapshot. You will likely never run into problems with snapshotting all of /home and if someday you do then you're method of creating a subvolume and copying into it will work to. there is a good chance that by then btrfs will be able to create snapshots of plain old directories anyway.


Is there a widget for Ubuntu 14.04 that monitors RAM, processor, hdd/ssd, LAN, etc?

Conky is worth looking at, it floats on your desktop, behind all the windows you have open.  Very customisable, which is great for experienced users but a little intimidating.

have a look at this guide to get started
https://www.linux.com/learn/how-install-and-configure-conky


Microphone not woking in Ubuntu 20.10 in browsers but in Audacity and Ardour

Do you have your microphone set?  Go to the settings tab from the menu in the upper right corner.  Then go to Sound, and see that you have an input microphone selected.  Next what browser do you have?  Under settings for your browser, there is often a permission setting.  In firefox it's here https://support.mozilla.org/en-US/kb/how-manage-your-camera-and-microphone-permissions
Not sure if that helps.


Mumble: Why is my forwarded port reported as closed from canyouseeme.org?

run netstat -an | grep 64738 to make sure the service is listening on 0.0.0.0 and NOT on 127.x.x.x


when trying to instal wickRme on 18.04 I get the following error

This is not an Ubuntu problem. The WikrMe download page clearly states that their package is for 16.04, not 18.04.

libicu60 is the name of the package. The names must match.

That the name also includes the version number is nice to know, but otherwise irrelevant - the package manager only knows that the names don't match.

libicu55 is included in (only) Ubuntu 16.04, which gives you three choices:

You can try installing the 16.04 package in your 18.04 system. This is expert-level stuff, and you are LIKELY to break your system quite horribly if you try. DON'T do it. If you really want to destroy your system, backup your data first.
You can seek a newer version of your deb that uses libicu60. This is the easiest solution, and most common in the Linux world, where new versions are released constantly. You should complain to the WikrMe developers that their crummy app is stale and needs to be updated for 18.04 if they want Ubuntu folks to use it. Better yet, they should snappify it so it's release-independent.
You can install 16.04 in a second partition (or more likely a VM) so you can use it with the rest of your system. It will add a bit of overhead, depending upon how you configure it.

Obviously, the BEST solution is for you to use a supported and compatible messaging application instead of WikrMe. There are many good candidates in the Ubuntu Software Center.


How do I close a new Firefox window from the Terminal?

To make a command that finds the id of the last window, created by Firefox (and to close it), you will need wmctrl to be installed:

sudo apt-get install wmctrl

The command

Then use the command:

wmctrl -ic "$(wmctrl -l | grep 'Mozilla Firefox' | tail -1 | awk '{ print $1 }')"

Explanation:

wmctrl -l

lists all windows, but an important property of the command is that it lists the windows in the order they were created.
Therefore:

wmctrl -l | grep 'Mozilla Firefox' | tail -1 | awk '{ print $1 }'

will:

list all windows:

wmctrl -l

find the ones (the lines) with 'Mozilla Firefox' in their name:

grep 'Mozilla Firefox'

find the last one (which is also the last created one):

tail -1

extract the first string in the line (which is the window -id):

awk '{ print $1 }'

The command:

wmctrl -ic

will then kill the most recent Firefox window by its id (gracefuly).

Or even more reliable:

While the command above works well in practically all cases, there is a small chance of name clashes, if e.g. another window exists with "Mozilla Firefox" in its name, but not a window from Firefox (unlikely, but still).

What should work "waterproof" is therefore to identify the windows in the window list (using wmctrl -lp) by the pid of firefox, instead of the string in the window name:

wmctrl -ic "$(wmctrl -lp | grep "$(pgrep firefox)" | tail -1 | awk '{ print $1 }')"

As you can seen, in this command,

wmctrl -l | grep 'Mozilla Firefox'

producing the lines containing 'Mozilla Firefox', is replaced by:

wmctrl -lp | grep "$(pgrep firefox)"

producing the lines containing the pid of firefox (as the output of pgrep firefox)


Solution based on the German thread about the issue

sudo apt-get install libgstreamer-plugins-base0.10-0

Application starts successfully without apparent failures.


19.04 Dell Precission and fan noise on thunderbolt

This is a known issue which happened with various dell business/workstation range. The thunderbolt chip doesn't have any cooling measure so the fan always spin up to cool it. Methods which work for now are under-volt CPU or apply thermal pad to the chip on the main-board of the laptop (or both).

You can find more information here https://www.reddit.com/r/Dell/comments/4zajkk/dell_xps_9550_thermal_padding_mod_update/ or other places using google.


Ubuntu 20.04 always forces me to create a new user at boot

While searching for why I was getting "not enough space", I stumbled on some suggestions for the 'force new user' issue:

Disable the gnome-initial-setup by commenting it out in
/etc/xdg/autostart/gnome-initial-setup-first-login.desktop.
The line to comment was:
Exec=/usr/libexec/gnome-initial-setup --existing-user

That seemed to fix the issue, but intermittently.

Remove gnome-initial-setup package entirely
 sudo apt remove gnome-initial-setup

switch from gnome login to lightdm

Finally, the one that worked:
 a) edit /etc/gdm3/custom.conf
 b) Add/modify:

     [daemon]
     InitialSetupEnable=False


Open Dialog, created with quickly does not work

I believe there is a typo in his example.  The class and the module should have the same name.  So instead of:

DialogNameDialog.NewDialogNameDialog()

it should likely be:

DialogNameDialog.DialogNameDialog()

(i.e. drop the New)

If that doesn't work, I'd like to see both files if possible.


That's probably an activated Universal Access -> Screen Reader setting.

Settings -> Universal Access -> switch off the Screen Reader option.


How can I add a package to the default installation of Ubuntu?

As far as I know, the only way to include programs in Ubuntu by default is by making your own distribution of Ubuntu. There is a tool for this called the Ubuntu Customization Kit, check it out.

https://apps.ubuntu.com/cat/applications/precise/uck/


How to setup a cloud with a bunch of computers running ubuntu server?

What you are describing (i.e. accessing the cloud infrastructure from the Internet) is commonly called a public cloud infrastructure.

A good start would be to to visit the OpenStack Project's Getting Started page.

This should give you first hand information on the OpenStack projects.


Malibal Lotus P150EM-SE (Clevo P150EM / Sager NP9150) Keyboard doesn't light up after suspend

You should try this driver:
http://sourceforge.net/p/clevo-wmi/wiki/Home/

More information can be found here:
http://forum.notebookreview.com/linux-compatibility-software/708796-clevo-p150em-p170em-sager-np9150-9170-backlit-keyboard-driver-beta-testers-needed.html

Lighting up after suspend, changing colors and patterns, all works for me.


Password denied after installing from Wubi

Solution:
Old Wubi versions have bugs but i have found a solution from a forum post at ubuntuforums.org i can't find the same post but i have the links to patched files.
This files are working. I tried the wubi from this link and worked.

https://www.dropbox.com/sh/6uqomp8l1frcd1y/AAAhSCimTaYE-94egbmc1X_na?dl=0

Thanks to hakuna_matata


Maybe a combination with screen will help.
For auto reconnect you will need a key authentification too.

I created an alias:
alias sshtunnel='TERM=xterm ssh servername -a -x -t /opt/local/bin/screen -xRR -A -e^Zz -U -O -S tunnelToServer'
Screen ensures that you terminal session is alive.

Last step is creating a script which checks the host and starts the alias again:
$ while :; do while ! ping -c1 -t1 server >/dev/null; do sleep 10; done; sshtunnel; echo Connection to server dropped at $(date); sleep 10; done

That should survive all network drops. You can play around with the sleep times too.

If you call screen -ls you will find your screen session with the name "tunnelToServer".


Looks like you somehow skipped the simple/automatic setup and instead were asked (on the first screenshot) to specify your partition scheme.  This screen shows no existing partitions, which is weird since you have 2 drives, one with Windows on it in the system.  Is Ubuntu detecting the drives properly?

I don't know how to partition a dual boot.  You should google it.  But for all ubuntu I use:

On fastest drive (SSD/NVME):

25GB: Ubuntu mounted at: /
20GB: /swap
Rest of drive: /home

Or you could put either /home or /home/Documents on bigger slower drives if necessary.

To dual-boot with Windows you probably need (this is annoying):

1GB (or less): uefi

You definitely want a Windows-only partition so you don't blow away your existing OS.

All that said, you probably just want to use the simple setup instead of selecting "let me choose" or "advanced."  Simple setup (I don't know if that's the real name) probably works better in 17.10.

Might be worth using the latest and planning to upgrade to 18.04 LTS in a few months.  I don't know, 17.10 is the buggiest version of Ubuntu in about 7 years, so maybe you're better off with 16.04 after all?


DVD writer doesn't work, no USB driver available

I'd recommend borrowing a friends Pc to either burn a bootable Ubuntu DVD or Flash drive then booting from either one on your Toshiba laptop to test out and install...


The good news is that it is relatively easy to get both playback and encoding with AV1 under Ubuntu 18.04:

Playback: The repository vlc will not play AV1 files but if you install the snap version you will have that capability. Run the following from a Terminal:

sudo snap install vlc

Currently this will give you vlc 3.0.8 with AV1 playback capability.
Encoding: There is a guide on Ask Ubuntu which will outfit a recent version of FFmpeg with the ability to encode and decode AV1 files. This is my guide and I have just tested it again comprehensively just now and it works beautifully :)

This will give pretty up to date AV1 abilities on Ubuntu 18.04, I add a screenshot of vlc with AV1 playback on my own 18.04 system (the video was one I created myself from the 'Encoding' guide above in point 2):

It all works nicely on my system and should on yours as well :)


You probably will need to backup and reinstall your system.

(There should be an error that causes your boot to drop into shell. Not unless you're willing to tinker with the system, then the easiest path is probably just to reinstall your system.)

Where to start tinkering:
Type startx on the tty and see what the error says and follow troubleshooting from there.


Have you checked that its allowed?

Settings --> Advanced --> Privacy & Security --> Content Settings and check "Allow sites to run Flash" to be ON

Also, if you share more info about your current OS, browser version etc ...
you will have better chances someone to help you.

gl


HP Pavilion dv6000: Jackd problem: (Ubuntu 10.04) I can't start Rakarrak, Mixx, Internet DJ Console and etc

Although Ubuntu 10.04 is a LTS and it is still supported, I would recommend switching to a more recent version if your PC can handle it.
However, instead of using plain old Ubuntu, I'd recommend that you check out Ubuntu Studio 14.04 which should be ready to run jack, rakarrak and other music software.  Ubuntu Studio is aimed at artists and has software to fit your needs -- music, photography, video editing, graphic design, etc.
Try Ubuntu Studio 14.04 from a Live disc to see if your computer will handle it.  Keep in mind that running the Live version will be slower than the real thing once it's installed in your computer.  UbuntuStudio runs the Xfce desktop environment which uses fewer resources than Unity and is faster than Unity on older hardware.
UbuntuStudio


Why can't I extend my desktop 12.04 in KDE?

Take a look at this link and see if it solves your problem:

http://www.thegeekstuff.com/2009/08/ubuntu-tips-how-to-setup-dual-monitor/

If that does not work check this post:

http://askubuntu.com/questions/303369/13-04-dual-monitors-on-my-desktop


New window placement behavior different on 19.04

You can install the Put Windows GNOME extension, found here, and set your window placement as you desire.

Update #1:

From the user...

If I set both monitors at 1080 resolution, the problem is fixed. However, if the LEFT monitor is set to portrait mode and the RIGHT monitor is set to horizontal, the problem occurs. On the other hand, the problem is fixed in the opposite setup if the RIGHT monitor is portrait and the LEFT is horizontal.

I have (Nvidia) 418 drivers, which are the tested drivers for my 1060, I don't think it's driver issue because I've been able to reproduce the error on my laptop with a second monitor plugged in that uses Intel graphics only.


You can do a lot using .ssh/config file. It would allow you to replace this:

ssh fooey@dev.example.com -p 22000

with:

ssh dev

to do so you have to add the following lines at the end of the .ssh/config (create it if does not exist)

Host dev
    HostName dev.example.com
    Port 22000
    User fooey

Concerning the storage of your credentials, I strongly advise you to use key authentification instead of password based.
You can create them either with a GUI or with your terminal.

GUI

open Seahorse, select File > New, then Secure Shell Key and let the interface guide you

Terminal
Create you RSA key pair:

ssh-keygen -t rsa

Store the Keys and Passphrase:

Enter file in which to save the key (/home/demo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):

Copy the Public Key

ssh-copy-id fooey@dev.example.com

Sources:

http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2


Usually, 403 error caused by wrong permission. The proper permission under /var/www/ is 755 for folders and 644 for files.


Even though its late, I'm posting this for future readers. I found out there is an easy way of doing that. You can follow this blog post which is providing a step by step guide to do it: Install Apache Tomcat on Ubuntu

Step 1:
Open the Eclipse.

Step 2:
Goto Windows → Preferences in the menu bar and select the Runtime Environments under the Server.

Step 3:
Click on the 'Add' button.

Step 4:
Select your Apache Tomcat version under the 'Apache' root and click 'Next'.

Step 5:
Browse and select the Tomcat installation directory.

Step 6:
Click on the 'Finish' button

Step 7:
Click on the 'OK' button to close the Preferences dialog.


How do I go to a specific folder/drive in the shell on Ubuntu on Windows?

You can run Linux commands in one of three ways from the Windows Command Prompt, that I can think of off the top of my head:

1. GNU for Windows - a bundle of common GNU commands compiled specifically to run under Windows operating environment. Out of date, but a valid answer. May be useful to also get CoreUtils for Windows - I’m not sure how much overlap exists between these two solutions.

2. Cygwin -  a more comprehensive set of Linux command-line utilities/applications/etc., compiled to run (with a dedicated cygwin DLL) natively under Windows.

3. Bash on Windows 10 - And, if you’ve got Windows 10, you can run Ubuntu Linux natively in Windows, with almost the entirety of the distribution available, by enabling the Windows Subsystem for Linux feature.


When the bonding module (kernel driver) loads, it creates by default a first interface with name bond0. You can just ignore this interface, it  does no harm.
You can also just delete it with
ip link delete bond0

However, next time it will be back again.
Indeed, you don't want the driver to create such an interface, because you can create any number of bond interfaces dynamically. When loading the module, you can pass an argument to the driver, not to create the interface, like
rmmod bonding ; modprobe bonding max_bonds=0

What you actually want to do is write a file /etc/modprobe.d/bonding.conf with
options bonding max_bonds=0


Test this:

Open a terminal. Press Ctrl+Alt+T

Run it:

$ remmina

Press the button to create a new desktop file.

Set up remmina so you can connect to through the GUI.

Save it.

Quit.

Look in your /home/user/.remmina/ directory to a xxxxxxx.remmina file.

Edit it:

 $ nano /home/user/.remmina/xxxxxxx.remmina

Add the following line:

http_proxy=http://username:password@proxyserver.net:port/

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

From the terminal, run it:

 $ remmina -c /home/user/.remmina/xxxxxxx.remmina

That should have brought up your desktop connection.


How do I set up live audio streams to a DLNA compliant device?

Pulseaudio-DLNA
I created a little server which discovers all upnp renderers in your network and adds them as sinks to pulseaudio. So you can control every application via pavucontrol to play on your upnp devices.
That's the kind of comfort I always wanted when dealing with upnp devices under linux.
The application can be installed from source or DEB package downloadable from git, or after we had added the project's official ppa:qos/pulseaudio-dlna to our sources with:
sudo apt-get update && sudo apt-get install pulseaudio-dlna

We then run pulseaudio-dlna from the command line with following options:
pulseaudio-dlna [--host <host>] [--port <port>] [--encoder <encoder>] [--renderer-urls <urls>] [--debug]
pulseaudio-dlna [-h | --help | --version]

See also the pulseaudio-dlna "About" for more.
When there was a DLNA renderer present we can then select it from the sound menu as an output sink:


The driver for the Epson Stylus Office BX625FWD is here:

64 bits: http://download.ebz.epson.net/dsc/op/stable/debian/dists/lsb3.2/epson-inkjet-printer-stylus-office-tx610fw-series/binary-amd64/epson-inkjet-printer-stylus-office-tx610fw-series_1.0.0-1lsb3.2_amd64.deb
32 bits: http://download.ebz.epson.net/dsc/op/stable/debian/dists/lsb3.2/epson-inkjet-printer-stylus-office-tx610fw-series/binary-i386/epson-inkjet-printer-stylus-office-tx610fw-series_1.0.0-1lsb3.2_i386.deb

The new repository for Automatic Printer Driver Download Service of Epson is this:

 deb http://download.ebz.epson.net/dsc/op/stable/debian/ lsb3.2 main

Good luck.


Launching multiple scripts without waiting the end of the previous using anacron

Consider starting a shell and running those scripts in background, something like

 bash -c '/home/user/script.py & another_script.sh &'


SSH into Ubuntu server (14.04.1) Using mac terminal (os version 10.9.4)?

First try to ssh into the server with another user besides "root".  Root remote connection is disabled by default.  Or you can allow remote access with root.
You will need to edit /etc/ssh/sshd_config, and comment out the following line:

PermitRootLogin without-password

Just below it, add the following line:

PermitRootLogin yes

Then restart SSH:

service ssh restart

Another suggestion would be to ensure that the firewall was turned off on the VM before proceeding with the network adapter changes. Some O/S versions default with the firewall turned on which may block incoming SSH connection attempts. After turning off iptables or ufw depending on your O/S version or whichever service you are using. IF this doesn't resolve the issue, then try each network adapter setting within VirtualBox.

sudo ufw disable

or

sudo service iptables stop


I had two problems.

I was using the wrong MySQL root password. I found the correct root password. Duh.
Because I'm using a SSD, some services were starting up too early/quickly. MySQL and MythTV in my case. I wrote a quick fix for delaying the MySQL startup by 30 seconds. But when MySQL had a recent update, it broke my quick fix. I had disabled the standard MySQL startup, and used my own, and when the MySQL update was installed, it updated the standard MySQL startup and re-enabled it. All I had to do was to disable the standard MySQL startup again.

I disabled the standard mysql.service...

$ systemctl status mysql
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: e
   Active: active (running) since Tue 2018-12-11 00:25:52 PST; 4 days ago
 Main PID: 2053 (mysqld)
    Tasks: 38 (limit: 4915)
   Memory: 292.2M
   CGroup: /system.slice/mysql.service
           └─2053 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Dec 11 00:25:51 Satellite-E55 systemd[1]: Starting MySQL Community Server...
Dec 11 00:25:52 Satellite-E55 systemd[1]: Started MySQL Community Server.
lines 1-11/11 (END)

I wrote a new service startup...

$ more /etc/systemd/system/mysql_delay_start.service
[Unit]
Description=Delay start of MySQL / MariaDB

[Service]
Type=oneshot
ExecStart=/usr/bin/mysql_delay_start

[Install]
WantedBy=multi-user.target

Which runs this...

$ more /usr/bin/mysql_delay_start
#!/bin/sh
sleep 30s
/etc/init.d/mysql start


USB port mouse is detected but doesn't control screen pointer

I'm assuming you have a loser mouse. This is a common issue when your computer is located in a dusty environment, or near other possible sources of pollution, like spider cobwebs.

Unplug the mouse. Turn it over. Look inside the hole(using light if needed) and confirm that there is pollution inside, corrupting the input. Use air or something else to get rid of it.


Disco Dingo PyCharm 'Running virtualenv with interpreter /usr/bin/python2' while everything else runs Python 3

Install virtualenv with pip3 and it will default to using python3 as the interpreter
sudo apt install python3-pip
pip3 install virtualenv

If all you are looking to do is set your virtual environment to python3 then you would use the command
virtualenv -p /usr/bin/python3.x (name of your environment here)

For PyCcharm to use python3 you have to do it from within PyCharm itself. The remainder of my response is taken directly from https://www.cs.rit.edu/~csci141/Docs/PyCharm-Setup.html.

On the welcome screen, go to the lower right of the window and select
Configure -> Settings (or Preferences) -> Default Project -> Project
Interpreter.
In the settings window, you will now configure the default projects
you make in PyCharm to use Python 3.
When the setting dialog comes up, select the Project Interpreter to
choose the Python 3 interpreter that you just installed.
Turn off the default use of venv for projects. You should see a
settings button (e.g. gear) for adding an interpreter. Instead, choose
the system interpreter to override the venv.
Now select the OK button at the bottom and PyCharm will do the updates
back on the welcome screen.
You will now turn off the style warnings for what's known as "PEP 8",
Python's style enforcement. (We do not use standard Python style in
this course.) You do this by opening the preferences, selecting
"Inspections" under Editor -> CodeStyle, and unchecking the "PEP 8"
violation checkboxes as shown below. You can search for "pep" to find
this more quickly than scrolling.
Finally you can turn off the authorship line in the Editor's Code
Templates for Python by erasing the whole line containing the
author text in the template; you can see the line in the screen below. (You may want to visit the templates later to customize them.)
You can then use the following code to test your settings.
NOTE python3-tk must be installed sudo apt install python3-tk
 """ sample.py is a sample python3 program using turtle graphics. """

 python  import turtle    def drawSquare():
 """
 drawSquare draws a square with sides of length 100.
 """
 turtle.forward(100)
 turtle.left(90)
 turtle.forward(100)
 turtle.left(90)
 turtle.forward(100)
 turtle.left(90)
 turtle.forward(100)
 turtle.left(90)    def main():
 """
 main program draws a square and waits user to hit Enter key.
 """
 drawSquare()
 print('Close the canvas window to end the program...')
 turtle.done()    if __name__ == '__main__':
 main()

You can first run the code by right-clicking in the code window and
selecting Run sample. If everything is correct, you should see a
separate Python turtle drawing window come up, and the console should
open in the bottom pane of PyCharm.


Why do I have excessive hard disk activity after using Kubuntu 14.10 for about 10 minutes?

I had the same problem for a while and fixed it as follows:

I run the command sudo iotop in the terminal. The output of his command showed that most of the "mysterious" I/O was being performed by the processes updatedb/mlocate and updatedb/locate.

As I understand it, the function of these cron-launched process is to maintain up-to-date an internal linux db, by means of which the system makes the location of files much more efficient.

My solution was to deactivate the execution of this processes by means of the commands

sudo chmod -x /etc/cron.daily/mlocate
sudo chmod -x /etc/cron.daily/locate

However, to avoid the degradation of the db for file-location, I periodically execute locate and mlocate at a suitable moment. The following commands make these processes executable again:

sudo chmod +x /etc/cron.daily/mlocate
sudo chmod +x /etc/cron.daily/locate


bulk/batch convert mp3 files to ogg via command line?

Searching for packages matching ogg, I found dir2ogg which seems to be exactly what you want. Just

sudo apt-get install dir2ogg
dir2ogg -r /path/to/mp3s/

And it recursively finds and converts all mp3 files under /path/to/mp3s/ to ogg (assuming I read the manual correctly).


Dual-monitor configuration with one in landscape mode and the other in portrait mode?

EDIT the post above:

I managed to solve the problem, but not for 3D because compiz crashes.
here is the new xorg.conf:

    # nvidia-settings: X configuration file generated by nvidia-settings
    # nvidia-settings:  version 295.33  (buildd@zirconium)  Fri Mar 30 13:43:34 UTC 2012

    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
        Option         "Xinerama" "1"
    EndSection

    Section "Files"
    EndSection
  Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection

    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection

    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor1"
        VendorName     "Unknown"
        ModelName      "DELL P2311H"
        HorizSync       30.0 - 83.0
        VertRefresh     56.0 - 76.0
        Option         "DPMS"
    EndSection

    Section "Monitor"
        # HorizSync source: edid, VertRefresh source: edid
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "DELL P2311H"
        HorizSync       30.0 - 83.0
        VertRefresh     56.0 - 76.0
        Option         "DPMS"
    EndSection

    Section "Device"
        Identifier     "Device1"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 8500 GT"
        BusID          "PCI:1:0:0"
        Screen          1
    EndSection

    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
        BoardName      "GeForce 8500 GT"
        BusID          "PCI:1:0:0"
        Screen          0
    EndSection

    Section "Screen"
        Identifier     "Screen1"
        Device         "Device1"
        Monitor        "Monitor1"
        DefaultDepth    24
        Option         "TwinView" "0"
        Option         "metamodes" "DFP: nvidia-auto-select +0+0"
        Option     "Rotate" "left"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection

    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "TwinView" "0"
        Option         "TwinViewXineramaInfoOrder" "CRT-1"
        Option         "metamodes" "CRT: nvidia-auto-select +0+0"
        Option     "Rotate" "left"
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection

    Section "Extensions"
        Option         "Composite" "Disable"
    EndSection

I generated it using nvidia settings, not with twin view but with seperated X screens, screen 1 is absolute and screen 2 is Right Of. I checked Xinerama enabled.
Then I edited the xorg.conf file so that to add option for rotation of both screens (look at the file).
It worked!


Is it possible to ping your own domain name?

Of course you can.
The ping will go out to nearest router and come back.


I found an answer; first a couple of key points:

OS disks on Azure VMs are automatically re-partitioned when they are resized
Other disks including the default /data disk that comes with a DSVM are not automatically re-partioned, so once you've resized a data disk, you have to re-partition it to use the space you created.
A warning that your home directory is probably on /data; therefore by un-mounting the disk in the first step of the instructions, you can lock yourself out of SSH (as I did) if you have disabled password access and your private SSH key is in the ~/.ssh/ directory, as it probably is.  If that happens, you can get back in through the Azure portal (find your VM, look near the bottom of the sidebar under Support and Troubleshooting —> Reset Password, then check “Configuration Only”, then "Update".)

The rest of the process is explained quite well in these Azure docs.  They expect you to know is that the disk itself is probably called something like /dev/sba and any partitions on it will have the same name with a number added (for example /dev/sba1, /dev/sba2), and so on.  Warning: these names are assigned asynchronously, and they can change if you restart your VM.
For people in a hurry, the procedure to resize the existing partition is:
#Find the name of your disk:
df -Th

#Unmount the disk (in this example it's "sdc1")
sudo umount /dev/sdc1

#Call the interactive 'parted' command
sudo parted /dev/sdc
   #1. Type "print" and note the size of the disk
   #2. Type "resizepart"
   #      A. Type the partition number
   #      B. Type the size from the "print" command to make a full-size partition
   #3. Type "quit" to exit

#Clean up any errors and check the consistency
sudo e2fsck -f /dev/sdc1

#Resize the file system, finally
sudo resize2fs /dev/sdc1

#Remount the disk
sudo mount /dev/sdc1 /data #or whatever you want to call it

#Check to make sure it worked
df -h

It looks (and is) a bit scary, but it only takes a couple of minutes.  I'd recommend backing up your disk first.


Where are the Unity Launcher .desktop files?

Globally in

/usr/share/applications

Locally in

~/.local/share/applications

If you want to add a custom launcher, create it in ~/.local/share/applications, make it executable, drag and drop it on the launcher*, and finally pin it (right-click on the launcher item → Keep In Launcher).

* Opening it using Nautilus doesn't seem to do the trick.


Software Center not opening -- Keyerror: 'countrycode'

What I did is to change region.get_region_cached() (sudo vi /usr/share/software-center/softwarecenter/region.py) as follows:

def get_region_cached():
    global my_region
    if my_region is None:
        rd = RegionDiscover()
        my_region = rd.get_region()
    my_region.setdefault('countrycode','BG')
    return my_region

my change is the line:

my_region.setdefault('countrycode','BG')

where "BG" is the region code for my country.

I know that this doesn't resolve the problem, but at least I can use software center now.


Open the terminal and type:

sudo alsa force-reload
sudo reboot

If the input sound still doesn't work, run the following commands:

sudo apt remove alsa-base pulseaudio
sudo apt purge alsa-base pulseaudio
sudo apt install alsa-base pulseaudio
sudo alsa force-reload
sudo reboot

If the input sound still doesn't work, go to your home directory and then go to the hidden config directory. Rename the directory named pulse here:

mv ~/.config/pulse ~/.config/pulse.bak
sudo reboot


What is the difference between a "/" (root) and a /home partition at installation?

Root (/) is the root of the entire filesystem to which other directories can be mounted in various branches of the filesystem.  One of these branches is /home/, and in this directory, individual users have a "home directory" using their username.  In your home directory are all your personal directories such as music, documents, etc.

In theory, you can keep your home directory, but a lot of preferences, etc, are stored there, and will remain even if not used.  When you install a new version, you would specify your /home partition to be mounted in the new installation and it will use it just as if it were not separate.


I think it's likely you have either a failing hard drive, a corrupted filesystem, or both.

Backup before anything bad happens

I'd start by making backups of everything you really need. Start by just plugging in a USB drive and copying over any very important files you have that you can't afford to miss. Just drag your files onto a USB drive in Files.

Then, try copying your entire home directory to a safe place. Drop to a root shell and make a tarball.

$ sudo su -
# cd /home
# tar -cvpfz home-directory.tar.gz <your username>
# cp home-directory.tar.gz <somewhere safe, on another drive>

If you can, verify you can open that tarball on another machine and that it has all your files.

Test and repair your disk

From there, you can follow the official Ubuntu instructions on checking your disc for problems.


Intermittently cannot connect to Beats Bluetooth headset from CLI

It seems that there are bluetooth dongles which forge the Broadcom identifier even though they don't 100% follow the Bluetooth spec. Apparently my device, which cost $2 on ebay including shipping, is one of those.

According to the bug linked, the Ubuntu devs know about this and are even including workarounds for these devices. However, the real solution is to buy a higher-quality bluetooth dongle which follows the spec and does not forge its identity.


Configuration of mail server to relay emails

No. As default postfix is not configure as an open relay, it will only accept local mail.

And you don't want to configure it as an Open Relay. In a couple of days some spammer is going to find it and start using it. As a result:

Your computer is going to be bogged down sending thousands of emails.
Your server is going to be blocked by most other mail servers in the world in a couple of days. Including all the major ones (gmail, yahoo, hotmail, mines ;)).

So you will be unable to send mails and the internet will a little worse for the rest of us.

If you want to be able to send mail from some IPs without authentication you need to set (or add) this options in /etc/postfix/main.cf

mynetworks = 127.0.0.0/8, 192.168.1.0/24
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

Of course the IP that defines mynetwork should be changed to one that fits you.


Why screen resolution remains 640x480 when I close a game?

Fullscreen handling in Linux is rather broken and lots of games are causing such troubles. Easiest workaround is probably to use xrandr to bring things back into the proper resolution (put that in a script and make it an icon in the top/left corner of your screen for easy restore):

For a single monitor setup that would be simply something like:

xrandr --output DFP2 --mode "1680x1050"

For a multimonitor setup it would look like:

xrandr \
 --output DFP2 \
   --mode "800x600" \
   --panning "800x600+1280+0/0x0+0+0" \
 --output CRT1 \
   --mode "1280x1024" \
   --panning "1280x1024+0+0/0x0+0+0"

Running xrandr without any option give you a list of supported modes and available displays.

Note there is also a bug in xrandr itself, sometimes the monitor size will adjust, but the mouse movement will still be locked to the old resolution, to fix that just run xrandr a second time.

Alternatively you can also set wine to emulate a virtual desktop, this will prevent games from going fullscreen and force them to be confined to the Wine virtual desktop window. The setting available in winecfg and then Graphics->Emulate a virtual desktop.


Installing GNOME 1 or 2.6 or any early 2004 versions of GNOME on ubuntu 12.04

Is not possible. GNOME has dependencies all over the system with DBUS, libraries, etc. etc.... so it's not worth the work. You can however run an old system in a Virtual Machine with the warning that if something goes wrong there, you have no official support nor here (in Ask Ubuntu). Just go to http://old-releases.ubuntu.com download an ISO and fire up a virtual machine.


No there's no facility for this that I know of. The closest you could come would be to see how recently files were accessed, but that access could be by any means not just a user running the program. Give this command a try at a shell prompt:

ls -ltu /bin | less

On my system it shows which utilities I've used most recently (but it also shows which ones were used most recently in cron jobs and scripts). You could do something similar with the files for a particular application, but it wouldn't be very meaningful.


Look at Webmin Screenshots of Webmin
Modules
Usermin
Cloudmin
Debian package suitable for Debian, Ubuntu or other derived Linux
http://prdownloads.sourceforge.net/webadmin/webmin_1.580_all.deb 14.8 MB
This is as complete as you can get


How can I save my "customized active input method" after OS reboot in ibus?

Am using Ubuntu 12.04 with ibus 1.4.1. Once I setup the input methods, they stay across reboots and are working fine.

Is the ibus-daemon running after your reboots?

$ ibus-daemon
current session already has an ibus-daemon

Did you make sure you are in an editable environment (somewhere you can type) when checking if the input methods are available?

Update:
The keyboard (ibus tray) icon does not appear in my menu bar any more.  But was still able to use the shortcut key to switch among the input methods (default Alt-Shift_L) and disable (Ctrl-space).


Why do files created by Mousepad or Leafpad not have extensions by default?

With LibreOffice Writer you are creating an Open Document (word document) file, so by default it suggests odt extension because it knows what the file is supposed to be.

With leafpad, ,mousepad, gedit, and any other text editors the options are endlessness.

The file can be a simple text file or anything else. it can be a PHP, Perl or Python script, it can be an HTML or XML markup language, JSON file, config file or anything else that you can think of.

So it doesn't use any extension by default. That is up to you to choose the one which best suits you.


How to run a function for every specific received packet?

Since you are using linux it's very easy, in linux a packet is represented by structure sk_buff. You can use netfilter framework with pre-routing hook,to mangle packet  by using it's protocol and destnation port number.
 See the netfilter framework documentation .


Install Windows 10 after Ubuntu with BIOS trouble

First Things First

The BIOS cannot be deleted, otherwise GRUB2 would not load.

Second, My Suggestion is to use GParted on a Live USB version of Ubuntu, and delete EVERY partition possible. After that you will need a Recovery Media for Windows, and a Product Key. If you do not have Recovery Media, you can download it from the Microsoft Website, and you will need to have an extra computer and a USB. If you do not have a Product Key, you will need to find it on the bottom of your laptop or on the back of your monitor / computer case.

In the case that there is an error code, you will need to use google to find the solution.


Why do i get this error message while trying to run sudo apt-get update

Ubuntu 14.04 is already end of life ...

Please also note that both Python2 and 3 are installed on at least 16.04 and onward;

$ python --version
Python 2.7.12

$ python3 --version
Python 3.5.2

Also notable is that important parts of Ubuntu support software depends on at least Python 2.x - therefore, for a beginner, an upgrade of python2 is likely to be a horrendous task.

Some software are better left to be upgraded at/in/with OS upgrades only.


When i open ubuntu software center , it automatically closes within seconds. why?

Looks like Software Center failed to Load a shared library libwedkitgtk-3.0.so.0

reinstall it by opening up a terminal and running the following command.

sudo apt-get install --reinstall libwebkitgtk-3.0-0

and try to start Software Center again.


Cannot start Android emulator from Eclipse on Ubuntu

This sounds like a problem with either your graphics card or driver. To install drivers it is either in the options Menu (in the newer versions since 12.04 IIRC). On the older ones you run jockey-gtk from the command prompt. Hope this helps.


How to list residual config files for removed packages?

To see what will be removed you'll have to check the corresponding postrm script, as in /var/lib/dpkg/info/packagename.postrm
From man dpkg (shortened):

Note: some configuration files might be unknown to dpkg because they are created and handled separately through the configuration scripts. In that case the package's postrm script has to take care of their removal. This only applies to files in system directories.
Purging of a package consists of:

Removing the package.

Running postrm script.


Keep having "530 Login incorrect" for virtual users

I think you're missing the -p option when invoking htpasswd
this should work:
htpasswd -c -p -b /etc/vsftpd.passwd <virtual user> $(openssl passwd -1 -noverify <password>)

see here for reference: vsftpd will not accept passwords encrypted with MD5


Use these to remove the old midori package and install the new package from the midori ppa:

sudo apt-get remove --purge midori
sudo add-apt-repository ppa:midori/ppa
sudo apt-get update
sudo apt-get install midori

You can  also use the updated webkit package from the unstable webkit ppa.


Ubuntu 20.04 - need Python 2 - native Python 2 install vs other options?

Can anybody that has installed Python 2 in Ubuntu 20.04 clarify if this caused problems? Are there any common applications that won't work after installing Python 2? Any other "gotchas" I should know about or look out for pertaining to this?

You can do this, but there may be issues with Python 2 in the near future - pay attention to my later sections of this post!
Installing python2 by default SHOULD make python be equivalent to Python 2 - if it doesn't then...

If I continue with the instructions above (update-alternatives to make python default to Python 2) will that potentially cause problems? Any "gotchas" pertaining to this additional step in particular?

There's already packages for this - python-is-python2 is the one you'll want.  Install that once you install Python 2.  That'll handle the linking for python to python2.7.

Has anybody tried a Python 2 virtual environment configuration (without a Python 2 native install) in Ubuntu? Is it really as easy as this page https://computingforgeeks.com/how-to-install-python2-with-virtualenv-on-ubuntu/ makes it sound? Will virtual environments work for supporting significant applications that call other scripts, use python (expecting it to be Python 2), span/fork other processes, etc?

I don't use plain virtualenv to get Python installs that differ from the system Python.  I use PyEnv for this, because it makes individual userspace installations of Python.  You will need the build dependencies for the python and python2.7 installed - sudo apt build-dep python python2.7 should do it.

If the native Python 2 install on Ubuntu 20.04 and/or the virtual environment options are problematic, are there any other good options I haven't covered here?

Neither the native install nor the PyEnv approach will break anything.  But there's quite a few things you need to be aware of.
Essentially... Python 2 Is Dead - both Upstream and in PyPA PIP (the pip install ... program)
(NOTE: Some distributions may provide limited support for Python 2, but everything that is still reliant on Python 2 and NOT being migrated to Python 3 should be frowned upon)
Python PIP is not going to be supporting Python 2 as of four days ago with the 21.0 release of the underlying pip module.  If you follow the PyEnv or individual separate Python 2 installation separate from System Python and python-pip's install, you will not be able to get Python modules for Python 2 anymore.
Given that you're handling a legacy Python 2 program, I would strongly recommend you work on rewriting the program for Python 3.  You are going to run into a TON of issues going forward if you have to maintain this legacy program beyond a year or two since the EOL date of 2020 - support for Python 2 is phased out upstream, and with PIP no longer supporting Python 2 you're going to start running into a ton of problems going forward keeping Python 2 applications around.
For most programs it's not supremely hard to port Python 2 programs to Python 3.  If your dependent libraries (and NOT the underlying Python 2 code itself) are only Python 2 then you're going to run into long term support problems - and you REALLY should be looking to replace / upgrade the process.


I think I messed up moving my home directory to another drive

To elaborate on my comment above, it seems to me that you have set up the entire installation on a single drive, but then subsequently wanted to have your /home directory located on a separate partition. This is a good practice to have.
Assuming you are booting into a new install, and not booting from a live .iso file either from a USB or a hard drive image (I can't tell from the description above), you are now faced with the task of moving your /home from the single / partition to a separate home partition. To confirm this, when you boot up your machine, you should be presented with a GRUB menu, and then once that loads, it should boot up Ubuntu. When you are installing, you should have a completely different set of steps. If these steps are being represented to you, then the GRUB set up is not recognising the install, or your boot media is still loaded, or your CMOS is not booting in the right order.
But I am assuming you have successfully installed Ubuntu to a single partition, and want to move your /home directory.
The partitions you have available are not necessarily all enabled. Linux uses /etc/fstab to list the partitions, and their mountpoints. Here, you can add the partition holding your new /home directory.
What you need to do is identify the UUID of the partition for the new /home partition. You can get this by running gparted, or you can get it from the command line using blkid.
Once you identify the UUID of the new partition, you need to add a line to the /etc/fstab file, such as follows:
UUID=a75c927c-YOUR-UUID-b561-3e7dc406d0c8  /home  ext4 defaults,auto  0  2

Which assumes your /home partition is identified by the UUID given, and is formatted as ext4.
Once the /etc/fstab file is updated, you will need to reboot your system, and the new partition will be mounted overtop of the original /home directory. You will not be able to access the information in that old /home when the new partition is mounted.
gparted will let you move and resize partitions, generate new UUIDs, create labels, and format partitions. There are many other commands which do the same thing, but it is pretty user friendly if you are just beginning.
I hope this helps a bit.


No such file or directory simply means there is no such file named jdk-6u32-linux-x64.bin in your current working directory.

BTW, Oracle Java (JDK) 6 / 7 / 8 / 9 is available to install from WebUpd8-team's PPA

Open a terminal and enter:

sudo add-apt-repository ppa:webupd8team/java

To pull down the latest list of packages from the PPA you just added:

sudo apt-get update

To install JDK 6

sudo apt-get install oracle-java6-installer

But this requires a working internet connection.


Adding pidgin and gm-notify to 'Startup Applications' solved the problem for both applications. Pidgin started minimized, I was wrong to assume it wouldn't.


Ubuntu 20.04 stuck at "/dev/nvme0n1p5 clean. xxx/xxx files. xxx/xxx blocks" during boot

My solution is as follows (not sure what made it work exactly):
connect laptop to internet with lan cable
boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose enable Networking
choose Root access
Repeatedly try
sudo apt-get update
sudo apt-get upgrade
sudo apt-get update --fix-missing


automount usb drive when connected to /mnt/ssd/ instead of /media/user/uuid

You can try this:

1) Open the disks tool

2) Then click on the disk you want to change the mount options

3) Then click on the little settings icon

4) Then click on edit mount option

5) Disable User Session Defaults

6) Then tick on Mount at system startup

7) Then choose the location where you want to mount your SSD

8) To show your SSD with the name rather than UUID select LABEL=XXXXX (Click on the drop-down list of ** Identify As** option)this will display your SSD with name


You simply do:

cd .fold

And to change the properties:

chmod -R 777 .fold
chown -R user:group .fold

Note when in the folder ( after doing cd .fold) you use the command like so to change the properties of the contents of .fold:

chmod -R 777 ./*
chown -R user:group ./*

And to affect the .fold (parent folder, rather than its content) alone use:

chmod 777 .
chown user:group .


how do I make custom icons for folders appear on the desktop

Yes, you can tweak your folders. I had to read twice to understand it.
First go to your desktop, right mouseclick. Select "New Folder" and create it.
Then right click on your folder icon, select "Properties" from the context menu.
You will get a dialog.
Click on the icon:

Select the icon you like.
Now my desktop folder looks like this (note that it is also seen in Nautilus/Files)


I don't think Nethogs monitors udp traffic.(although it appears that this is a requested enhancement


I had the same problem and resolved it by also installing ibus-m17n from the package manager.  I know this post is a little old but hope this helps someone.

I'm using Linux Mint 14.


Ubuntu server 16 - keyboard and mouse not working

This post isn't terribly clear about what works specifically, but the title matches my issue exactly so perhaps this will help someone.

I had apt upgraded, and while the box booted to the lightdm login screen, keyboard and mouse were non-responsive (laptop internal, also I tried plugging in usb).  After a time the cursor in the password field stopped blinking as well.

It appears some X packages had been incorrectly deleted when i ran an apt autoremove (necessary due to a full /boot drive).

re-installing apt install xserver-xorg-input-all fixed the issue for me.

(to install this, boot into recovery mode, enable networking, and drop into the root shell.  When completed, reboot.)


How can I copy my ubuntu from HDD to external usb Hard drive

You can use the dd command

sudo dd if=/dev/sdx of=/dev/usbx bs=1m

For more information you can read the following forum: http://ubuntuforums.org/showthread.php?t=1561005


It is impossible to change the hard disk's sector size.  It is a characteristic of the hard disk itself.

What you are probably witnessing is a hard disk whose sector size is 4096 internally, but which presents itself to your computer as having a sector size of 512, for compatibility with legacy mainboards and operating systems who may not yet support 4096 byte sector sizes natively.  The disk translates the requests for the logical 512 byte sectors into requests for the actual 4096 byte sectors internally, and the computer does not have to know this is happening.  Appropriate buffering ensures there are no slow-downs.

This does not represent a problem and shouldn't cause any performance issue assuming that your filesystem's cluster size is still 4096, or a multiple thereof, and your partitions start on a sector boundary, which they will if they use the modern convention of starting on a multiple of 1MiB.

To check filesystem cluster size you can use stat -f . (include the dot).  This should list the block size of your current filesystem which will most likely be 4096.  Note that if you have multiple partitions this can differ between them.

To check the partition boundaries, use sudo fdisk -l. At the top it'll list the logical sector size which in your case is likely 512 bytes.  Make sure all the partitions start on a multiple of 8 such sectors (they will most likely be a multiple of 2048, which is itself a multiple of 8).

Note that all modern versions of Ubuntu will enforce the above for all new installations.

On some drives there is a procedure, using manufacturer-supplied software tools, for upgrading the drive itself from 512 byte logical sectors (512e mode) to 4096 byte logical sectors (4k native mode).  What this will do is remove the translation layer in the drive which translates between emulated 512 byte sectors on the host side and the actual 4096 byte sectors on the drive.  The physical sector size will stay at 4096 bytes.  This procedure is usually accompanied by a low level fast format of the drive.  The performance benefit is likely to be negligible assuming you were using a 4096 byte (or multiple) cluster size and partition alignment anyway as discussed.


Unable to create a user with password via ssh

This is a classic quoting issue.

Problem: Without any quoting or double quoting the command substitution ($()) and variable expansion (the $s in the hashed password returned by openssl are being treated as variable indicator) are being done in the local environment, not on the remote shell.

Solution: use single quotes around the useradd command used with ssh on the local shell to prevent the command substitution and variable expansion on local environment, let the expansions take place on the remote non-login, non-interactive shell:

ssh root@123.45.6.7 'useradd -p "$(openssl passwd -1 1234)" newuser'

Note the quotings.

Security issues:

SSH root login should be disabled, if you must have it enabled only key-based authentication should be allowed
MD5 is already broken, and without a salt you are subjected to simple Rainbow table attack (does not even need brute forcing/dictionary attack); openssl passwd does generate a random salt though. Anyway, you should really consider using SHA-2 with salt-ing
Passwords passed as arguments to commands might be visible to other processes in the (remote) system; this depends on how your procfs is mounted (look at hidepid), and if the command is rewriting itself (it this case presumably it does not)


Can you create a presentation outline in LibreOffice Writer?

There's an "Outline" tab in LibreOffice Impress that might be useful:

I don't think it's possible to create the Impress outline directly from Writer, but copy/pasting works.

Please note LibreOffice might crash as soon as you switch to outline (or any other tab). It's a bug, but one that can be solved.


Get error when installing Comodo Antivirus

Try to install the .deb file via gdebi inorder to overcome dependency errors.

sudo apt-get install gdebi
sudo gdebi /path/cav-linux_1.1.268025-1_amd64.deb


Help Installing Gimp 2.7.5 on Ubuntu 11.10

In the meantime(I assume Gimp 2.6 is now uninstallable, I've also had this problem), you can try and use GIMP 2.74. There's not much difference from 2.75. It still has the Single-window mode and Text input improvements.


How can I edit a picture into an existing PDF file?

My recommendation is Xournal and its actively developed fork, Xournal++. Here are the instructions.
Install (for Xournal):
sudo apt-get install xournal

For Xournal++ you can use either the stable PPA,
sudo add-apt-repository ppa:apandada1/xournalpp-stable
sudo apt update
sudo apt install xournalpp

or the flatpak,
flatpak install flathub com.github.xournalpp.xournalpp

Run xournal or xournal++, click File>Annotate PDF, choose your PDF file.
Now, go to where you need to add your signature and click Tools>Image (or the "Image" toolbar icon), then click where you want to add the image. An image selection dialog appears, select your image.
Xournal's insert image is a great addition but not polished. As soon as you add the image make sure to resize it and move it to where you want. For resize there's no ability to ensure the proportions stay the same. Just eye it. Once you are done, it is in its own layer, which you cannot change. If you don't like how it ends up delete that layer and start again.
One handy thing is that you can use ctrl-c as soon as you resize it and then ctrl-v the next time you need to insert your image. Assuming you want the same size image this will save you some time.
When you are done choose File->Export to PDF to get it back into the PDF format I assume you'll want for sending your signed doc.
Note: A downside to Xournal is the finished document looks like the fonts are converted to an image. Fonts are no longer as crisp. Still it looks better than if you printed and rescanned and is much faster. [Note: in my most recent experience it seems this problem has been solved. Maybe I just got lucky with the particular fonts used. Please leave a comment abt your experience and I'll update accordingly.] This issue seems to be fixed in Xournal++ version 1.0.20.


While accessing SSH/SHELL The security settings have blocked a self-signed application from running in mozilla/ubuntu 14.04?

Maybe you should install the certificate of your server locally first? if you are using a self signed you have to configure SSH to accept it

Visit https://www.digitalocean.com/community/tutorials/how-to-create-an-ssh-ca-to-validate-hosts-and-clients-with-ubuntu

this was suposed to be a comment but i dont have enough rep for it.


Is it possible to convert one unity theme into a cinnamon theme?

No. At least not without manually creating a Cinnamon theme that looks like the Unity theme.

Cinnamon is a fork of Gnome Shell while Unity is a desktop shell that Canonical built on top of Metacity or compatible window managers (e. g. Compiz). The two are not compatible in any way.

I'm not aware of any automated conversion method.


I have found a solution for this problem.

Appearantly, ALSA did not like the USB sound device that I was using. It is one of the cheap $2 ones that look like a USB stick w/headphone jack. Either way, I attached an old SB Live! PCI card I had laying around, booted up the machine and alsamixer worked with no problem. I can switch between the 2 devices and the USB headphone thingy works just fine now.

So anyone that may read this with a similar problem: the device was the problem.


Ubuntu 12.04 is still stable, and will be fully supported and updated until April 2017


Apparmor not starting with kernel LSM error

The only thing I can think of is to get a Launchpad account if you do not already have one, then go to the bug report. Mark yourself as affected by that bug and post another comment there with your specs.

Alternatively, you could try filing your case as a new bug, but it may end up being marked as a duplicate in that case.


Unless it's hardcoded into the latest ntp (check the README), there's no special UID for ntp. On MY Ubuntu 14.04.03 (YMMV):

$ grep ntp /etc/passwd /etc/group
/etc/passwd:ntp:x:117:129::/home/ntp:/bin/false
/etc/group:ntp:x:129:

Stock ntp runs as UID=117, GID=129 here.

UIDs less than 1000 (see man login.defs) are slightly more privileged than not (see man useradd). And, of course, there's root (UID=0).


Help installing Dual-Boot Ubuntu *.*.* with pre-installed Windows 8 with windows boot manager. HP Pavilion TouchSmart Sleekbook 15

The Windows boot manager can not boot Linux by itself. In fact, I know of no way to chainload from the menu of the Windows boot manager to a Linux EFI-mode boot loader. First, though, you should be aware of the distinction between two types of software:

Boot managers are programs that give the user a choice of what OS to boot, typically through a menu.
Boot loaders are programs that load an OS kernel, and often related files, into memory and transfer control to the kernel.

In the Linux world, most BIOS boot managers are also boot loaders. GRUB, for instance, provides both types of functionality. Thus, Linux users tend not to distinguish between these two types of programs. In the EFI world, though, some products fall neatly into one category but not the other. The EFI stub loader, SYSLINUX, and ELILO are all boot loaders but not boot managers (except to the extent that the latter two can give you a menu of options of Linux kernels to boot; but they can't boot anything else). rEFIt, rEFInd, and gummiboot are all boot managers but not boot loaders. GRUB can handle both tasks.

This distinction can get a bit blurry because of the EFI stub loader, which is an EFI boot loader that can be built into a Linux kernel, meaning that the kernel becomes its own boot loader. The result is that boot manager configuration starts to look a lot like boot loader configuration.

In any event, a boot loader is mandatory for loading an OS. My knowledge of the Windows boot manager is a bit scant, but I don't know of a way to configure it to present a menu for chainloading to another OS (at least on EFI systems), so as far as I know, it's more of a boot loader than a boot manager, hence its lack of utility for your purpose.

On an EFI system, GRUB does not replace any Windows boot loader; it installs itself in addition to the Windows boot loader. Thus, the risks of using GRUB are pretty limited, provided you're careful not to totally erase the EFI System Partition (ESP). In a worst-case scenario, you can delete the GRUB files and the computer will begin booting straight to Windows. For added safety, back up the ESP before you begin installing Linux; that way, if you accidentally wipe it out, you can restore its files to get back to your starting point. A file-level backup (using tar, zip, cp, or the like) is fine for this, since EFI doesn't rely on hidden boot code stuffed away in boot sectors.

As I've indicated, there are several alternatives to GRUB if you don't like it. My Managing EFI Boot Loaders for Linux page describes the boot loaders and boot managers you might want to consider. Personally, I like the combination of rEFInd with the EFI stub loader; but as I maintain rEFInd, I'm not exactly unbiased.


Adjust timeout settings on ubuntu backup (dejadup)

Currently it is not possible to directly configure custom duplicity arguments in deja-dup. There is a feature request reported though which discusses this issue.

As a workaround what you can do is to change the default global duplicity values in the following file

sudo vim /usr/share/pyshared/duplicity/globals.py

The two options you probably want to increase to overcome your timeout issue are the following

# network timeout value
timeout = 30

# number of retries on network operations
num_retries = 5

Please note though that those values will be overwritten whenever there is a new version of duplicity installed.


I am having trouble updating in ubuntu 12.10 64-bit?

You've made an upgrade from 12.04, Canonical Precise PPA was left behind.
In terminal type ls /var/lib/apt/lists/archive.canonical.com_ubuntu_dists*.
The result should be something like this:

  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-amd64_Packages
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_Release
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_Release.gpg

...plus they Quantal counterparts

  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_quantal_partner_binary-amd64_Packages
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_quantal_partner_binary-i386_Packages
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_quantal_Release
  /var/lib/apt/lists/archive.canonical.com_ubuntu_dists_quantal_Release.gpg

...if so, just delete the precise versions.


How to install a skin Cinnamon in Ubuntu 15.10

Run the following commands in a terminal to install cinnamon:

sudo apt-get update
sudo apt-get install cinnamon-desktop-environment

If the package is not available, you need to enable the universe repository.


You may experiment with the convert input.pdf -resample 85% output.pdf command example.

Reference: http://www.imagemagick.org/script/convert.php#usage

Depending on the quality of the original, the results may not be very good.


I have the Menu key very close to the Ctrl and left-arrow keys.

xmodmap -e 'keycode 135 = 0x0000'

To get a first impression what keycodes are mapped to which keys, just type:

xmodmap -pke

which gives you a list of all mappings. For example, the line

keycode  57 = n N

means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.

Some references to get around with things.

xev will let you identify the keycode for your key of interest.
Look at its man page, This is a good quick reference too,
Mediakeys with .Xmodmap HOWTO
ArchWiki has a good description for xmodmap


Yes it is possible to make it (or any) application not show in your apps menu.

make a local copy of the emacs25-term.desktop file

cp /usr/share/applications/emacs25-term.desktop ~/.local/share/applications/

open the copy in a text editor of your choice and add the line

NotShowIn=GNOME;

log out and back in to your desktop session


No sound after select "Dummy output" in configurations->audio

Go back into your sound preferences and select your audio card instead of the dummy driver.


Why do some packages conflict with themselves?

Oneiric supports Multi-Arch, that is, allowing you to install packages of different architectures simultaneously (currently i386 and amd64 a.k.a. 32-bit and 64-bit). Some packages cannot be installed simultaneously (like libc6:i386 and libc6:amd64). aptitude cannot handle these cases and therefore thinks that it may be a good idea to remove those packages. It's recommended to use apt-get now.

If you use apt-cache show libc-bin, you can see the line mentioning this conflict:

  Multi-Arch: foreign

A description of this field can be found at http://wiki.debian.org/Multiarch/Implementation#Multi-Arch:_foreign_support_packages


Ubuntu 20.04 does not boot up on laptop when running on battery

Edit your /etc/default/grub as such
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash iommu=soft”

don't forget to...
sudo update-grub

then reboot.


How do I show missing icons in the system tray?

The answer depends on the system you have. Having similar problem in Ubuntu 12.04 Unity I found:

Terminal command gsettings get com.canonical.Unity.Panel systray-whitelist shows the list of applications allowed to use systray.
gsettings set com.canonical.Unity.Panel systray-whitelist <whitelist> changes the list to wanted whitelist (the syntax is obvious by the result of the previous one; you may check the result with it)
Application Alltray changes the effect of close of the window to close to systray.

Be cautious! For me, it worked fine for Skype, but using the 3rd option resulted in a stupid behaviour in case of Firefox (open from systray opens the application, but menu only with hidden window and some features aren't working - I still fight against it).


How to embed on-screen keyboard into gnome-screensaver 3.x unlock screen?

Gnome.org gives details of how to enable the embedded keyboard for a locked screen including the gsettings values

Any tablet-type screen keyboard must compy with the XEmbed specification.

Fortunately the standard onboard keyboard is XEmbed compliant - you need to pass the --xid parameter (type onboard --help for parameters you can pass to onboard)

Thus

gsettings set org.gnome.desktop.screensaver embedded-keyboard-enabled true
gsettings set org.gnome.desktop.screensaver embedded-keyboard-command "onboard --xid"


Is there a command to display a Calendar in the terminal?

cal calendar command for terminal

You can use the cal command to display a calendar in Julian or Gregorian format. The format depends on your locale settings but can be toggled with parameters.

As the screen below shows the default calendar is the current month. You can use the parameter -A 2 to display the next two months or 2018 to display all months in that year:


There is a program unicode_start that puts the console in Unicode mode.
In addition, the console can support a codepage of 256 (or 512) characters only at any given time, so you need to make sure that you have loaded a console font with the appropriate characters.

The Linux kernel maintainers do not accept patches for better Unicode support on the console because the console is to be used as an emergency interface. What needs to be done is write a terminal emulator for the Linux framebuffer that undertakes the support for Unicode. Something like a 'getty' replacement. This aspect of open-source development did not receive yet much attention.

Another deficiency with the existing Unicode of the Linux console is that you cannot use dead keys.


aftr installing ubuntu windows installation is gone

Download and burn to CD/DVD a software called -- Boot-Repair-Disk --  from SOURCEFORGE.net. After burning, insert disk into CD/DVD drive and reboot system into CD/DVD drive, click on -- recommended repair -- and let the software do its MAGIC, and then reboot system. This solves the majority of bootsector/grub/and MBR problems.  I personaly dual boot windows/ubuntu and I also use a lot of other linux flavors and sometimes GRUB gets messed up, and this has always solved my problem. Anyone using linux or dual booting linux with windows should have this simple tool it works GREAT :-)


How do i fix dependency issue with apport and apt-get (ubuntu 16.04 upgraded from 14.04)

I've solved the same problem just by using python 2.7 instead of python 3.4:

 sudo rm python
 sudo ln -s python2.7 python
 sudo apt-get update
 sudo apt-get upgrade
 sudo rm python
 sudo ln -s python3.4 python


What are you asking is not always so simple.
Here you can find a guide from title CompilingEasyHowTo: after you download the source code of the program or package wanted you can modify and recompile it.

It's needed to keep present what is a
 Linux_distribution (excerpt from wikipedia):

  A Linux distribution (often called distro for short) is an operating system made as a collection of software based around the Linux kernel and often around a package management system.
     ...
  Most distributions come ready to use and pre-compiled for a specific instruction set, while others are distributed in source code form and compiled locally during installation.

So after that you downloaded the source code you can read and modify it before you compile it again. But it is not a trivial task, especially on a running system.

You can start to refer to other posts, e.g. here, to obtain some informations about the source code, how to obtain and so on.

There are may other posts that can help you on the compiling step, to locate the source of the kernel, and more generically about How to install application from source.

Many programs do not need do be compiled again to choose their settings. Some other yes.
Sometimes you need to install a specific program and you need to search for it.

A way to modify the actions related to the mouse gestures is to install a program that will do it for you. The hard way is to compile a kernel module or to modify X system.

A suggestion: go easy at the beginning and increase the difficulties with time and experience.


As a workaround for Emacs in Virtual Box you can operate the control key functions by pressing

CapsLock+Control then release CapsLock while holding Control and press the corresponding funktion key (e.g. N).

To make use of the right shift key (however that key is also not fully operational in Virtual Box) you can define another Host key from the Virtual Box Manager settings in File -> Preferences -> Input.


How to make lockout screen script for ubuntu

Use dbus for that.

The script you looking for is simply

#!/bin/bash
 DISPLAY=:0
 qdbus com.canonical.Unity /com/canonical/Unity/Session com.canonical.Unity.Session.Lock

Save that , make it executable, and run a cron job that calls this script at the times you want


Can't resize Xubuntu partition using Virtual Box / Gparted

Here is a procedure that should do it for you. https://www.linuxbabe.com/virtualbox/how-to-increase-virtualbox-disk-size-for-dynamically-allocated-disks


Fn keys stopped working - how can I tell if it's a hardware issue?

I have a T440s and may be its the same thing: the keyboad top row has two modes, the direct key and the "Fn" + key.

You can switch between the two modes by pressing Fn + FnLk (Esc key on my french keyboard). On my Fn key, a light indicates the mode: when the light is on, I have the F1, F2... in direct mode and I must press Fn to access the special functions like sound, brightness. When the light is off, the special keys are in direct mode and F1, F2, ... in indirect mode (ie I must press Fn to have them).

Hope this helps you.

Giles


External monitor set as primary even when disconnected from laptop

We use a lot of Lenovo's in our business but most have a Nvidia display card as opposed to an Intel like the X200. We use a secondary external monitor as the primary monitor and in the beginning experienced the same problem as you are currently experiencing.

The way we resolved the problems was a two step process, firstly in the BIOS under Display, Graphic Device we changed 'Integrated' to 'Discrete'. Then secondly, and unfortunately this is where the solution veers off your path, is that we downloaded & installed the latest drivers from the Nvidia website, this provided an additional Nvidia configuration utility like the one you would find in Windows and the management of primary & secondary monitors was easily achieved.

That's about all I have for you unfortunately, there are a few additional settings under the Display heading in the BIOS that may also help.

Best of luck.

milo


Stop automatically changing workspaces when switching to an opened application

Install CompizConfig Settings Manager

sudo apt-get install compizconfig-settings-manager

I'm not sure if there is otherway, but this works for me. In Ubuntu 14.04.

Launch ccsm → Desktop Wall → Viewport Switching → Uncheck Auto Switch Vp and Window (Check&Uncheck if was Unchecked already)

Well, Auto Switch Vp and Window is not available in Ubuntu 12.04. Then disable Desktop Wall plugin. Tested on a VirtualBox.

Launch ccsm → Uncheck Desktop Wall


The files you need to edit live in /etc/update-motd.d.

See the update-motd man page for details about how it works.

My version of Ubuntu doesn't show the disk usage, so I'm not sure which script exactly you need to edit.


Is it possible to see Persian words by W3M?

As it is shown in image which is described in question, w3m can show Farsi words, but I had to enable XTerm to show them. I found a way to do that here.

Installing FriBiDi package which is a BiDi algorithm implementation for Hebrew and/or Arabic languages. This package contains the header files and static libraries for the FriBidi C library.

sudo apt-get install libfribidi0 libfribidi-dev
Download & install bicon package:
https://launchpad.net/~behnam/+archive/ppa/+build/574785/+files/bicon_0.2.0-1ubuntu0~ppa4_i386.deb for 32 bit
https://launchpad.net/~behnam/+archive/ppa/+build/574789/+files/bicon_0.2.0-1ubuntu0~ppa4_amd64.deb for amd-64 bit
running this code in that, in each session:

/usr/bin/bicon.bin
Add the following line to the end of /usr/share/applications/gnome-terminal.desktop file (For automatically running bicon by running XTerm from Applications):

Terminal=true
Exec=/usr/bin/bicon.bin

Also I use DejaVu Sans Mono as font which can show Farsi letters:

xterm -fa 'DejaVu Sans Mono' -fs 20


How to change my notification tooltip theme?

Just remove xfce4-notifyd  package and reinstall notify-osd if is not installed. Restart your desktop session.

sudo apt-get remove xfce4-notifyd && sudo apt-get install notify-osd


Screen rotation shortcuts in login without editing files


Look here but according to the link you put, all FTDI devices are supported in Ubuntu 11.10 and forward, and for custom VCPs check here.


1GBit = 1000MBit = 1000 (MBit / 8Bit) * Byte = 125MByte

Any reasonably 3,5" 7200RPM HDD should be able to handle that.
At least when performing sequential writes. The performance will be worse with random writes.

I don't think this is an issue though. If you're writing a lot of small files over the network, performance is typically bottle-necked by the network transfer protocol. From my own experience I can tell, that SMB performs terribly when it comes to a large number of files.

Using SSDs in a pure storage setting (e.g a NAS) is a waste of money.

However, in addition to much faster read/write rates, their strength is access time. In a server setting with many concurrent read/write request, like a web- or mail-server, an SSD can make quite the difference.

Since you already own the HDD, you might want to try and make do with it first. If the performance is not satisfying you can still buy a suitable SSD and replace the hard-drive.


How to synchronize a Palm PDA with Evolution 2.32.2

I believe the PDA sync support was moved out of Evolution 2.32 into the gnome-pilot package.

If you install this package it should enable your PDA to connect and provides expense, memo, time, and email sync functionality.


Ubuntu and Windows have different file system. The partition type are different and they have different partition table strategies.

May be you can search some of the applications which can allow you to use EXT type extensions in Windows OS.


How do you tell apt to use files in /etc/apt/sources.list.d

The names of files in /etc/sources.list.d must end in .list, if they are to be included as software sources.

As the man page of sources.list says:

  DESCRIPTION

   The package resource list is used to locate archives of the package
   distribution system in use on the system. At this time, this manual
   page documents only the packaging system used by the Debian GNU/Linux
   system. This control file is /etc/apt/sources.list.

   The source list is designed to support any number of active sources and
   a variety of source media. The file lists one source per line, with the
   most preferred source listed first. The format of each line is: type
   uri args The first item, type determines the format for args.  uri is a
   Universal Resource Identifier (URI), which is a superset of the more
   specific and well-known Universal Resource Locator, or URL. The rest of
   the line can be marked as a comment by using a #.

  SOURCES.LIST.D

   The /etc/apt/sources.list.d directory provides a way to add
   sources.list entries in separate files. The format is the same as for
   the regular sources.list file. File names need to end with .list and
   may only contain letters (a-z and A-Z), digits (0-9), underscore (_),
   hyphen (-) and period (.) characters. Otherwise APT will print a notice
   that it has ignored a file if the file doesn't match a pattern in the
   Dir::Ignore-Files-Silently configuration list - in this case it will be
   silently ignored.

Taking an example from this page, suppose you wanted to install chef (from opscode), what you'd do is:

Create and open a file named opscode.list:

    sudo vim /etc/apt/sources.list.d/opscode.list

Add the required line and save the file:

    deb http://apt.opscode.com/ oneiric main

The above steps can be combined to make a single command:

sudo /bin/sh -c 'echo "deb http://apt.opscode.com/ onereic main" > /etc/apt/sources.list.d/opscode.list'

Note: The command contains onereic because the codename of the Ubuntu you're using is Onereic. Had you been using Precise (12.04), you'd have writter precise.


Given than you installed the drivers using the additional drivers tab, you should have already installed Nvidia Settings. Look in there for the PRIME Profiles menu and use it to switch between the two cards as shown in the image:

Alternatively, you can open your terminal and write the command

prime-select query

to check which of the cards is your system using, and the commands

sudo prime-select nvidia

or

sudo prime-select intel

to change between the two cards and then restart the session.


cannot click with the cursor on ubuntu 20.04 LTS

From a question that I asked there was an answer that said:

I faced the same problem on Pop_!OS, no need to reboot actually;
The easier way is to just restart GNOME by one of two ways:

pressing Alt + F2, type r then Enter, or
in terminal, killall -3 gnome-shell

This should just restart Gnome Shell. You will not lose your open windows, but you should be reminded to save all your work >regularly!
Related bug: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1824874

Solution
The answer works in this question too.
Open terminal by pressing Ctrl + Alt + T.


Physically check ram without rebooting the server?

Sounds like your concerned with uptime. What I have done in the past is to make a VM that mirrors the system in question that is run on separate physical host. Then do what necessary diagnostics are necessary and then restore the physical system once it has been resolved. Just an idea to your situation if you have another system you could use.


Installing sqldeveloper – dependency problems: sqldeveloper depends on libc6-amd64 (>= 2.2.5)

I suspect you have used alien, e.g.

sudo alien --script sqldeveloper-4.1.1.19.59-1.noarch.rpm

to create a deb package. Unfortunately, the created package can not be installed in your system because the package libc6-amd64 isn't available for Trusty in the needed version.

Repair your installation via

sudo apt-get purge sqldeveloper
sudo apt-get install -f

The interesting thing though is, in my case, that the generated DEB package has no dependence on libc6-amd64. But in your case... ok

Therefore start the command below. Copy and paste the whole block into a terminal and press Enter

mkdir deb$$; \
cp sqldeveloper_4.1.1.19.59-2_all.deb deb$$; \
cd deb$$; dpkg-deb -x sqldeveloper_4.1.1.19.59-2_all.deb deb; \
cd deb; \
dpkg-deb -e ../sqldeveloper_4.1.1.19.59-2_all.deb

Now start

cat DEBIAN/control

and you should see something like this

Package: sqldeveloper
Version: 4.1.1.19.59-2
Architecture: all
Maintainer: root <root@sturm>
Installed-Size: 393753
Depends: libc6 (>= 2.2.5), libc6-i386 (>= 2.1.3)
Section: alien
Priority: extra
Description: Oracle SQL Developer
 Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug P$
 .
 (Converted from a rpm package by alien version 8.93.)

but not in your case. o_O

Therefore start the commands below to correct this and re-build the package

sed -i 's/libc6-amd64/libc6/' DEBIAN/control
cd ..
sudo dpkg-deb -b deb

Finally install with

sudo dpkg -i deb.deb

and that's all ;)

Make the first start please from the terminal, in my case had to be answered there a question.

sqldeveloper

You will see

 Oracle SQL Developer
 Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.

Type the full pathname of a JDK installation (or Ctrl-C to quit), the path will be stored in /home/aboettger/.sqldeveloper/4.1.0/product.conf

And I have used

/usr/lib/jvm/java-8-oracle


unable to login after removing guest account

ctrl+alt+F1

$ sudo service lightdm restart

ctrl+alt+F7 or F8
if the lightdm still doesn't show up re install it

$ sudo apt-get autoremove lightdm
$ sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm

ok ==> chose lightdm
the

$ sudo apt-get update && sudo shutdown -r


Try to change your SATA controller type from IDE to AHCI through BIOS settings.

Else, you can try to disconnect all unnecessary USB devices when booting from USB and during the installation.


dpkg -L shows almost no files in apt libboost-all-dev package

As you can see from the list of libboost-all-dev package it contains only two files. It is normal.

But it has very long list of dependencies.

About your libboost_random libraries. You can find them in libboost-random1.58-dev and libboost-random1.62-dev, libboost-random1.65-dev packages.

But the most safe way will be install them as dependency of libboost-random-dev as dependency of libboost-all-dev:

sudo apt-get install libboost-all-dev

So Boost packaging looks very complicated ...


Wow, it worked for me - https://github.com/Microsoft/WSL/issues/2874

Just log out and log in again to MS Store account!


Why do some programs (eg Blender, Steam) only have an "install from website" option

You need to activate the universe repository for being able to install blender and Steam so make sure the following lines in your /etc/apt/sources.list contain the word universe (i.e. un-comment those):

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb-src http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb-src http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe
deb-src http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe
deb-src http://archive.ubuntu.com/ubuntu bionic-security main restricted universe

Alternatively you can do the following lines (which are the less error prone) to activate the universe repository:

sudo add-apt-repository universe
sudo apt-get update
sudo apt install blender steam

Alternative you can do for blender add this repository which contains always the very latest version of it:

sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update
sudo apt install blender


Openvpn quit unexpected after upgrade ubuntu 14.04 to ubuntu 16.04

It is a known problem in the systemd .service file of the OpenVPN.

More exactly, systemd limits the processes of the openvpn in 10 with the LimitNProc=10 setting in /lib/systemd/system/openvpn@.service file. Remove this line, and it will work.

Some sources state on the internet, that growing this value to 100 will be enough. On my experiments, it didn't work - note also, already 10 should be enough, because OpenVPN practically never forks so many processes. It is probably some systemd bug.

Note also, it is better practice to create a copy of the /lib/systemd/system/openvpn@.service to /etc/systemd/system/openvpn@.service and to modify that config file. On this way, it will override the original settings.

After modifying systemd service files, a systemctl daemon-reload should be given to re-load them (without reboot).


Open Wine Configure or winecfg from command-line.
Select Libraries tab: Enter name of DLL or select it from dropbox

Click Add, it should be (native first then built-in) → Apply

Notes:

You may create new profile for MathCad from Applications tab if you don't want global settings.
DLL override modes: It's possible to force only native or builtin DLL. But I recommend using these to cover both cases:
builtin, native wine will try its builtin DLL then Microsoft native DLL
native, builtin wine will try Microsoft native DLL then its own builtin DLL

See Chapter 4. Configuring Wine
Sometimes, it is needed to figure out which libs are loaded, this may help WINEDEBUG=+loaddll wine yourprogram.exe.

See General help on running applications under Wine


Screen turns on and off when using Unity dash or browsers

Install AMD drivers by running in terminal

sudo apt-get install fglrx-updates

and reboot.

You can switch to the Intel adapter by

sudo aticonfig --px-igpu

and restart the session or reboot.


Bash script delete file inside another folder if present in both with extension *.c

Compare files in two directories and remove one if it exists in both places.

$ comm -z -12 \
  <(find folder1/ -type f -name '*.c' -printf %P\\0 | sort -z) \
  <(find folder2/ -type f -name '*.c' -printf %P\\0 | sort -z) | xargs -0 -I {} rm -i folder2/{}


Press ctrl+alt+t for opening a terminal.

You can try the folowing commands for restarting (or start) compiz or unity in terminal.

compiz
unity

If this not work try to restore you setting using:

ccsm

go to preferences, select unity and press restore default.


Either Log Out or Restart the computer (I recommend a Restart if you are the only user on the machine), and then during the log-in screen, right next to "Log In" button, you will find a small gear icon which will let you change your Window Manager. Keep in mind that this Gear icon will not be visible when you try to access it from the lock screen.

For those of you that are not taken to a login screen, you may have to Disable Automatic Login, it is enabled by default. You can do this by going into:
              Settings -> Details -> Users -> Turn Off Automatic Login


Ok, I was able to get some of the drives to show up. It seems to freeze when writing to any drive. I'm not sure I have the correct drivers. Anyone know of the correct one?


OpenVPN working when started from CLI, but not when started using init.d script on boot

Solved it.

At the time openvpn was running during boot, the system was not able to access the secret key which was in a subdirectory of my home. I am not experienced enough to explain this in detail. Obviously by the time the boot had finished the key was available and the running the init.d script at that time worked correctly. I solved it by moving they key.txt file to /etc/openvpn. May not be the most secure solution, but I am not concerned with security in this instance.

Lessons learned:

1) Even though it appeared that the openvpn service was running looking at the status output above

ps aux | grep openvpn

showed that it wasn't.

2) (This one is a big one for me.) Check the logfiles. It had to be enabled in the config file, but as soon as I read the log file message it was clear what the problem was. I wasted a lot of time trying to guess other solutions.


It is impossible to hide the process unless one starts messing around in the kernel to limit this.

One technique is to change the process name using:

prctl(PR_SET_NAME, (unsigned long) "NewName", 0, 0, 0);

..and if possible to fork() and let the parent process die.  If you were to do that periodically it makes it harder to track down the process.


unmet dependencies when trying install wine1.7

I actually had the same error as you did you try installing with aptitude. (i.e. sudo aptitude install wine1.7) I found I was missing the libgphoto2-port10 dependence and with a quick google search was able to get that installed going.


I googled your webcam model and chip, there are a few solutions, but i cant say they WILL work, but they are worth the try.
Solution 1
The first one, and the more reliable one, is to add and install the packages available in the following ppa. They will install a firmware loader so other apps can recognize your webcam. (remember to reboot after install)
Solution 2
Download the following file
Uncompress it and execute:
cd r5u870
make
sudo make install
sudo modprobe r5u870
in that order
Solution 3/4
This is only to be done if you have a great experience building kernel modules. It can be found here
Another user who managed to build his own kernel module, instructions here

I hope one of the solutions i mentioned above solve your problem. I recommend you starting with the first one.


Bluetooth activation problem on acer 5742G

I found the solution here:

  There are two files in /lib/firmware/ folder. One is ath3k-1.fw and the other is ath3k-2.fw. Rename the first into something else and the second ath3k-1.fw. That fixed the bluetooth issue for me. So for example:

  ath3k-1.fw -> ath3k-1b.fw
  ath3k-2.fw -> ath3k-1.fw


Multiple IPs on different subnets on one interface

You can not configure eth on that way.
Create aliases

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

auto eth0:1
iface eth0:1 inet static
address 192.168.10.11
netmask 255.255.255.0
broadcast 192.168.10.255


How to add static route with preferred source via Netplan in 18.04?

For information about configuring source-based policy routing in netplan, see: https://netplan.io/examples#source-routing