Can Clonezilla copy my primary image partition ( bootable system) to another partition in the same physical disk

I'd say this depends on the bootloader type.

MBR and volume bootloaders

It's a no for BIOS/MBR, because you would have to re-install the bootloader and configure the clone to boot from the partitions volume bootloader instead of the MBR (target for grub-install would be the partition e.g. sda2 instead of sda). Attempting to do this GRUB2 will complain with the following message:

Attempting to install GRUB to a partition disk or to a partition.  This is a BAD idea.
Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.
However, blocklists are UNRELIABLE and their use is discouraged.

http://wiki.gentoo.org/wiki/GRUB2#Attempting_to_install_GRUB_to_a_disk_or_a_partition

So chaining bootloaders on one drive is possible but unsafe since GRUB2. Leaving only the option of one installation managing the bootloader and it's configuration (like os-prober generated entries).

UEFI bootloader stubs, just copy files

For UEFI/GPT it's easier. You wouldn't even need to create a raw disk image. You could just copy/rsync contents from one partition to the other when using live media. Then copy contents of your ESP (e.g. \EFI\ubuntu to \EFI\ubuntu2) and modify the configuration file for GRUBs EFI stub. Mine lookes like this:

$ cat /boot/efi/EFI/ubuntu/grub.cfg
search.fs_uuid e6822878-8045-43a6-ae17-6a45686afe4f root hd0,gpt2
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

You would just need to change the UUID of the filesystem e6822878-8045-43a6-ae17-6a45686afe4f and partition hd0,gpt2 (e.g. hd0,gpt3). Also don't forget to register the new EFI bootloader in UEFI NVRAM with efibootmanager. I also recommend installing a default UEFI bootloader like gummiboot.

My experience

UEFI is really a leap forward. No more raw images (which take longer) or fiddling with dd. Just copy files and register stubs in NVRAM. But as always, if you buy crappy hardware, it might get complicated, like your UEFI implementation has trouble booting anything else than Windows.


Broken sound with ALC269 on Ubuntu 16.04 (Dell Inspiron Mini 10)

Close any open audio programs.
Stop the daemon from respawning:

sudo nano /etc/pulse/client.conf

Uncomment the line that reads:

; autospawn = yes

to say:

autospawn = no

Then press CTRL+X to save these changes.

Stop the existing PulseAudio daemon from running:

pulseaudio --kill

Now try playing an audio file from a media player of your choice. This will play directly to the hardware, but will mean only one program can play sound at a time.

To revert: Comment the line again (with a ;), and type pulseaudio into the terminal to start the daemon again.

Source: https://ubuntu-mate.community/t/choppy-sound-dell-mini-10/2401/3

UPDATE: If you want to keep pulseaudio active, edit /etc/pulse/default.pa, find the following line:

load-module module-udev-detect

and append "tsched=0" to the end:

load-module module-udev-detect tsched=0

restart pulse (or just reboot your system), and the crackling should be gone.

Source: https://askubuntu.com/a/201747/52568


Why am I suddenly not able to connect to my PC with VNC any more (no connection or grey display)?

My problem was a full disk which prevented the openbox-session from running.
First I tried to run sudo update-alternatives --config x-session-manager to check if another one of the sessions might open up and I was confused because the * pointed to gnome while I was running openbox normally.
When I tried to start /usr/bin/startlxde manually from command line the return indicated that my disk is full:
mkdtemp: private socket dir: No space left on device

A faulty mount was the reason.
I also explained this in a thread and will link it here because it is very relevant but there is not much on google (the forum is for RaspberryPi but this happened on an Ubuntu OS to me): https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=194764&p=1755103#p1755103


How to bring up last terminal window with a shortcut key?

I have a terminal pinned to my Unity launcher sidebar on position 10. This way I can press Super+0 to "click" the launcher icon which brings the latest terminal window to the top.

If having it in the launcher is ok for you (one of the first 10 positions, otherwise it won't get a shortcut!), this will work.


After installing Ubuntu 20.04 on Dell XPS 7390, integrated camera is not working

Not supported according to this https://wiki.ubuntu.com/Dell/XPS/XPS-13-7390-2-in-1

So I doubt that this guide below will work but worth a try:
https://linuxconfig.org/how-to-test-webcam-on-ubuntu-20-04-focal-fossa

Another option is to try installing Windows drivers using Wine and/or ndiswrapper.
https://itstillworks.com/convert-windows-drivers-linux-9821.html

Intel develops Clear Linux I wonder if it works under their OS? Create a Live-USB drive and test it out.
https://clearlinux.org/downloads

Any of those help?


My browser close it's window when I click antoher tab

It sounds like you may need to repair the installation.
Open the terminal by hitting "Ctrl+Alt+T"
Type the command sudo dpkg --configure -a
Enter your password if prompted
This will start unpacking and configuring installs that were not finished.
If this does not work, then you can try:
sudo apt-get -f install
This will attempt to re-install packages that need to be installed.


type ls -l /var

Tell me if their are symbolic links set up on the directory "run" and the directory "lock"
There needs to be symbolic links from /run to /var/run and /run/lock to /var/run/lock
If there is not type the following commands:

sudo ln -s /run /var/run
sudo ln -s /run/lock /var/lock


There are three families of text web browsers.

lynx is the classic text mode web browser. It's slightly older than the web. Its interface is nothing to write home about. It has the advantage of being available on many exotic platforms.

links is a more recent implementation of the same concept. There's an alternate development tree, elinks, for which there is an experimental patch for Javascript support, but this is not enabled in the Ubuntu package.

w3m has an interface with a  different (and I think much more nicer) feel. It's better than the others (though links has been improving lately) at rendering web sites with complex formatting, not necessarily the way the designer intended it, but in a readable way. It can display images. There's an Emacs interface, w3m-el.

My recommendation is to use w3m now but keep an eye on (e)links's evolutions.


How do I access "System Settings" in Ubuntu 15.04?

System Settings if present by default as a shortcut in Ubuntu taskbar :

If you don't have this shortcut you can open it by doing :

Command line way :

Open a terminal (Ctrl+Alt+T) and type :

unity-control-center

Graphical way :

Open Unity dash (click on the Ubuntu logo on the taskbar or use the  key of your keyboard) and search for "System Settings" :


Configure Ubuntu Server 17.04 as WebServer with Static IP address

Solution: Static IP Address:

Check your Firewall Status with sudo ufw status and you should get something like this list:

To                         Action      From
--                         ------      ----
38/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
80                         ALLOW       Anywhere
38/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)

On how to add, remove and edit ufw Ports follow these link or this link
Setup Port Forwarding on your Router, example:

Static IP Address [x.x.x.x] -TO-> Server Local IP Address [192.168.1.101]

If you don't know your assigned IP is just place this in terminal: ifconfig -a

enp6s7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.38  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 2a02:121f:fdb:0:211:43ff:fee0:b54  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::211:43ff:fee0:b54  prefixlen 64  scopeid 0x20<link>
        ether 00:11:43:e0:0b:54  txqueuelen 1000  (Ethernet)
        RX packets 84296  bytes 38047233 (38.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 37523  bytes 4411985 (4.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 997  bytes 93756 (93.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 997  bytes 93756 (93.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Configure ports on SSH with : sudo nano /etc/ssh/sshd_config

on line 13 Uncomment Port deleting # (we opening port 38 here)

Port 38
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

Save with ctrl+x save with y
connect noe remotely from your client with:
ssh://your_username_here@your_static_ip_here:your_port_number_here


Open the software store, search for notepad-plus-plus and open the according page.

Click the Permissions-button and enable Print documents

Alternatively, for the folks who like the command-line:

snap connect notepad-plus-plus:cups-control


Run the following command.

sh /path/to/file.sh

If you need administrative privileges to run the command, add sudo.

sudo sh /path/to/file.sh


One way to solve this is by resetting everything to its original value.

From Ubuntuhandbook:

You can reset compiz with the following command:

dconf reset -f /org/compiz/

Then, reset Unity, using:

setsid unity


How to boot ubuntu 14.04 on an Dell inspiron 15?

I try to change some boot option but it was not working

It's important that you provide a full description of problems; "it was not working" provides no diagnostic details. For instance, did you see any error messages when you tried to boot? Did you see an Ubuntu logo but the system then hung? Did the computer spontaneously reboot? There are many ways for a computer to fail to boot, and a full description of the symptoms can help more experienced users figure out what's wrong. (I see you posted a brief description of a message buried at the end of your question. I'll address that later....)

  1- Do I have to do something after I download ubuntu 14.04 and I put it on a usb key, and before I reboot my computer? For example: to install something on the usb key?

There's no need to install anything extra; however, there are half a dozen or more programs you might use to transfer the .iso file to a USB flash drive, and they all do things a bit differently, particularly when it comes to EFI-mode booting. Broadly speaking, Rufus has the best reputation for creating EFI-compatible media, whereas Pen Drive Linux (aka YUMI and one or two other names) was worthless for this task, the last time I checked. See here for more on those and a few other tools.

  2- What is the best BIOS setting to boot with ubuntu: UEFI or Legacy?

If you want to dual-boot, it's almost always best to install Ubuntu in the same mode as whatever OS is already installed. For computers that came with Windows 8 or later, that's almost certainly EFI mode. If you installed (or re-installed) Windows yourself, all bets are off. Most systems that shipped with Windows 7 and earlier boot in BIOS mode, but some, particularly from late in the Windows 7 lifetime, boot in EFI mode. If you're unsure of the current boot mode, check the partition table type, as described here. Windows supports GPT only for EFI-mode boots. Although Windows can boot from MBR in EFI mode, that partition table type usually denotes a BIOS-mode installation.

If you want to install Ubuntu as the only OS, either boot mode will work; however, on a modern computer EFI mode offers some modest advantages like reduced boot time (usually) and access to EFI runtime variables (which enable more sophisticated communications between the OS and firmware). Note that enabling BIOS/CSM/legacy support in the firmware complicates the boot path, so you should disable that feature if you intend to use EFI-mode booting.

  3- Do I have to disabled the secure boot?

In theory, no. In practice, usually not; but some rare computers have EFI bugs that don't work with Ubuntu's Secure Boot support. If you have a problem, do not jump to the conclusion that it's caused by Secure Boot; based on what I've seen online, 9 times out of 10 that conclusion is wrong. The single most common problem, in my experience, is a mis-prepared USB flash drive.

  4- If I do all this setting and it's still not working, do you recommand an other version of ubuntu or an other way to install it? I also try to do it with a dvd and it wasn't working. The screen flash and an error message send that there was no device to read.

Seeing the exact error message would be helpful. It could be that your computer is new enough that Ubuntu lacks drivers for its hard disk. In this case, a more up-to-date Ubuntu (such as 15.10, or even a 16.04 beta, rather than 14.04) may work; or switching to another distribution entirely might help. (I'm not sure what kernel the latest Fedora, OpenSUSE, Mageia, Arch, etc. use.)

Depending on the exact phrasing of the message, it could also mean that the initial RAM disk (initrd) file was damaged, which could indicate a failing USB flash drive or a bad download.

Yet another possibility is a hardware problem such as a failing hard disk or loose cable.


How can I install the Safari web browser?

For the latest HTML 5 features, you'll want to use Safari 5, not Safari 4.

Your go-to resource for running applications in Wine is the Wine Application Database (AppDB), which incorporates invaluable test results from outside of the Ubuntu community and should have the most up-to-date information on compatibility.

The most recent test results report success running Safari 5 in Wine 1.3.2, which is available in the WineHQ Repository. Right now there are not any special installation instructions posted. Typically this means you don't have to do any special setup, but you should be open to the possibility that the users posting results for Safari 5 have wrongly assumed that you know to refer back to some part of the Safari 4 installation instructions. If things aren't working as well as reported, try applying the installation instructions for Safari 4.


I want to use internet on my android device while connected to my laptop's hotspot

Let the mobile device be the hotspot.  You should be able to access the laptop that way.  It would likely require changing the configuration of you app though.
It would also give the laptop access to your mobile network.


Why do I have drastic loss of battery life on upgrade from 15.10 to 16.04?

Ok, so after nearly 12 months, I have solved it.  The problem was the NFC radio on the dell xps was permanently enabled.  In vanilla Ubuntu there does not seem to be a driver, but there is one in Ubuntu Gnome.

Running

rfkill block nfc

reduced the power consumption by around 8 watts on standby.


HP DeskJet 1000 J110 printer won't print

Try this:

Connect your printer to your computer and go to System > Administration > Printing

Remove the printer and install the hp software:

sudo apt-get install hplip-gui -y

Configure your printer

sudo hp-setup


bash, ps -o pcpu,args divided by another char

I have simplified your command by incorporating the "sort" operation into ps. To split the output into two parts ($a and $b), I used the read built-in. To print these two variables, I used the printf built-in:
read a b <<<"$(ps -axo pcpu,args --no-headers --sort=pcpu | tail -1 )"
printf "%.f;%s\n" "$a" "$b"


Creating a user without its account being disabled

Since you can create a user then your script works, now use the chpasswd tool to create a password for your users as without this, they won't be able to sign in after creation.

echo username:username | chpasswd

Source:

https://stackoverflow.com/questions/2150882/how-to-automatically-add-user-account-and-password-with-a-bash-script


Reliable driver for GeForce 6200 ubuntu 16.04

The GeForce 6200TC PCI card seems to be 10-12 years old. There might be problems to find a good proprietary driver for it in the newest Ubuntu versions. Try the free driver nouveau as described in the comment by Gustaf. If it will make Ubuntu too slow, I suggest that you try a flavour of Ubuntu with a lighter desktop environment, for example Lubuntu, Ubuntu MATE or Xubuntu. See this link and links from it,

Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, ...) before installing it


LPRng is in Ubuntu Repositories

You can install it with;

sudo apt-get install lprng lprng-doc


Can I use GRUB only when I want to use ubuntu

Yes you can.  When you want to boot to Windows, make the change in your computer's BIOS for Windows to be the primary Boot option.

When you want to boot to Ubuntu or have the choice of Windows or Ubuntu, then make Ubuntu your primary boot option in you BIOS.

Using Ubuntu to presented with the Choice is most likely the best way to go.

Also, there are many ways you can customize the way Grub Looks and how it behaves.  But the first thing you see is a black screen with a choice of which OS you want to go into.

Update:

After the comments below, I find that Windows Boot Manager can boot Linux.  Ubuntu will have to be on a separate drive for this to work, but you can take a look at this answer:
Is it possible to boot Ubuntu using the Windows bootloader?

After installing Ubuntu on a different drive, use EasyBCD to add the functionally of as they say on their site Dual-boot awith anything you want.


glassfish updatetool error loading libpangoxft-1.0.so.0

I had to install the following 32-bit packages to get it working:

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libjpeg62:i386 libpangoxft-1.0-0:i386 libpangox-1.0-0:i386 libsm6:i386 libidn11:i386

There might be others that were already installed on the system, but it should be pretty clear from the error message which need to be installed (remember to qualify the package with ':i386').


Gnome's installed user ubuntu without me knowing its password

You could do it by recovery-mode.

Boot your computer to recovery-mode, start a root session and type:

mount -o remount,rw /
passwd ubuntu

It will ask you to type and repeat the password you prefer.

If vagrant is admin user, you will not need to enter recovery mode. Just type in a terminal session:

sudo passwd ubuntu


How to disable release upgrade notification at terminal/TTY login (not the GUI pop-up)?

That output is part of the MOTD. To disable it, remove the execute permissions for /etc/update-motd.d/90-updates-available.

sudo chmod -x /etc/update-motd.d/90-updates-available

The output maybe cached for a while, it may take a few login attempts for the message to clear out.


How to add path of a program to $PATH environment variable?

Firstly, check your original path:

echo $PATH

It should show something like this:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

Now add your program to that path, ensuring your using the entire path all the way from / to your program.

export PATH=$PATH:/path/to/my/program

This sets your PATH variable to the existing PATH plus what you add to the end. Check that it has been added (Caveat: it presist only in the current session of the terminal):

echo $PATH


Where to place temporary cvs bulkload file for mysql

You should be able to use
LOAD DATA LOCAL INFILE "/downloads/text.csv" INTO TABLE mytable;

(?)
Otherwise use /var/lib/mysql-files/ or you could disable this setting (see the configuration file you use to start mysql). This will disable it ...
[mysqld]
secure-file-priv = ""


Terminal

At first you have to update the virus definitions with:

sudo freshclam

Then you can scan for viruses.

clamscan OPTIONS File/Folder

If necessary start with root permissions: sudo clamscan.

Examples:

To check all files on the computer, displaying the name of each file:

clamscan -r /

To check all files on the computer, but only display infected files and ring a bell when found:

clamscan -r --bell -i /

To scan all files on the computer but only display infected files when found and have this run in the background:

clamscan -r -i / &

Note - Display background process's status by running the jobs command.
To check files in the all users home directories:

clamscan -r /home

To check files in the USER home directory and move infected files to another folder:

clamscan -r --move=/home/USER/VIRUS /home/USER

To check files in the USER home directory and remove infected files (WARNING: Files are gone.):

clamscan -r --remove /home/USER

To see more options:

clamscan --help

See:

Latest documentation: PDF | HTML
ClamAV official Wiki
Ubuntu Wiki

Graphical User Interface: ClamTK

ClamTk is a frontend for ClamAV. You can install it via Terminal with:

sudo apt-get install clamtk

You can get the latest version from Bitbucket as Debian package.

There is also a PPA (Outdated):

sudo apt-add-repository ppa:landronimirc/clamtk
sudo apt-get update && sudo apt-get install clamtk

Scan Menu: Here you can choose a file, folder or a device for scanning

View Menu:

Quarantine Menu:

Advanced Menu:

Help Menu: Here you can check for updates.

See:

ClamTk@Sourceforge
ClamTk Help
ClamTk FAQ


No wi-fi adapter found in Ubuntu 18.04, it was working properly before but stopped working yesterday, Intel Wireless 8260 adapter

In the end, it was a hardware issue.
I sent the laptop to the shop for a checkup and internal cleanup and they found that the wifi adapter connector was slightly off. Windows was still able to establish the connection, but Ubuntu wasn't. This also explains why sometimes the adapter was detected, but unclaimed, and why sometimes it wasn't detected at all.
So, for everyone experiencing similar problems, a wifi adapter working in Windows but not in Ubuntu may still be a hardware issue.


Potential and possible damage of executed Windows Applications through Wine environment in Linux?

This is doesn't address the full scope but could be helpful to have in mind.

Anti-virus software are useful to analyze files. For instance, under GNU/Linux you can use it previous execution of the executable file.

For this task there are several websites that analyze local and online files and one of the most popular desktop software is ClamAV.


Only until you close the windows where pkexec su is. Once that's closed, nothing you type could let in a virus.


ERROR 1698 (28000): Access denied for user 'root'@'localhost'

According to this answer from SO, it could be because your root user is using the auth_socket plugin used by default in MySQL/MariaDB on Ubuntu.

$ sudo mysql -u root

MariaDB [mysql]> USE mysql;
MariaDB [mysql]> SELECT User, Host, plugin FROM mysql.user;

+------------------+-----------------------+
| User             | plugin                |
+------------------+-----------------------+
| root             | auth_socket           |
+------------------+-----------------------+

Changing this to mysql_native_password will allow you to connect without requiring sudo:

$ sudo mysql -u root

MariaDB [mysql]> USE mysql;
MariaDB [mysql]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';
MariaDB [mysql]> FLUSH PRIVILEGES;
MariaDB [mysql]> exit;

$ service mysql restart


I finally installed okular, though I do not have kde, so it came with lots of dependencies along.

The sounds do work, but transduration times are not respected by okular. This behavior is a bug in version 20.2 of okular. It has been fixed in version 20.3.

For those having the 20.2 and who cannot install a newer version (like those who use Ubuntu 14.04), there's a kind of workaround: in okular settings, presentation tab, check the "Advance every:" option and set a value that is greater than any of the transdurations of the document, otherwise okular will advance sooner even if this option remains unchecked. (This is the bug).

Well, then you can then start the presentation.


Lubuntu not booting for install on Toshiba Satellite 2410

I'm not sure if this answer is outdated but anyhow. I have an old Toshiba Satellite U200 PT300E and searching the web I found this link http://www.everydaylinuxuser.com/2014/06/how-to-create-lubuntu-live-cd-or-usb.html. I followed the step by step procedure described on it and I was able to burn a DVD and even could test Lubuntu 17.04 in my old Toshiba. I hope this helps other users.


network manager: how to stop nm updating /etc/resolv.conf

One way to stop Network Manager from adding dns-servers to /etc/resolv.conf file is to do this:

First open the nm conf file /etc/NetworkManager/NetworkManager.conf:

sudo vim /etc/NetworkManager/NetworkManager.conf

And add this to the [main] section:

dns=none

Save and exit.


best way to dual boot Ubuntu with windows 10?

You're over thinking the issue. Grub resides in MBR of /dev/sda (the first hard drive). My laptop has an SSD (240GB) /dev/sda, a HDD (500GB) /dev/sdb and a mSata SSD (120GB) /dev/sdc. A Nautilus snapshot is provided for you to see:

When grub boot loader starts up you are given a menu to pick one of your various OS's to run and the right drive is automatically selected.

In the examples above two of the three drives have both Windows and Linux installed on separate partitions within the drives.

Oh yeah Windows 7 is broken on two of the drives...haha


Error while configuring python in apache2

I think the folder is /var/www and NOT /www/var.

Did you add:

#!/usr/bin/env python

As the first line in your python script?
If not it won't be recognized as a python script.

Also try to disable the plugin and tell me if it outputs the contents of the file when you go to localhost/test.py.

I hope this helped you,
Daniel


On trying to install nvidia drivers: E: Unable to correct problems, you have held broken packages

Remove the cuda repos repository. Most likely it breaks dependencies.

The nvidia-driver-440 package from that repo requires wrong dependencies.


Hibernation to a swap file 12.04, fragfile output

You can not hibernate one OS and reboot into the other if they both are trying to access the same partition or they will corrupt it.  Neither one knows that the other still has that partition open and possibly in the middle of making changes to it.  When you want to switch between OSes you MUST shut down and reboot, not hibernate.


How do I change the language from Español (España) to Español (Latinoamérica) in Ubuntu 17.04?

Choosing the language is about determining which translations should be used for displaying menus and messages, and there is only one set of Spanish translations available in Ubuntu. It wouldn't make much sense to show 20 or so Spanish options, since they all would result in the same behavior.


You need to have Vim with the clipboard and xtermclipboard features compiled in. In Ubuntu, these are only available with the vim GUI packages (vim-gnome, vim-gtk, vim-athena, etc.).

Once you install one of these, you can copy to (and paste from) the clipboard registers (* and +). From this very informative post on Vi and Vim:

  For X11-based systems (ie. Linux and most other UNIX-like
  systems) there are 2 clipboards, which are independent of each other:

  PRIMARY - This is copy-on-select, and can be pasted with the middle mouse   button.
  CLIPBOARD - This is copied with (usually) ^C, and pasted with ^V (It's   like MS Windows).

  Vim has 2 special registers corresponding to these clipboards:

  * uses PRIMARY; mnemonic: star is select (for copy-on-select)
  + uses CLIPBOARD; mnemonic: CTRL + C (for the common keybind)

To copy to a register, you precede the copy command (y) with " and the name of the register (*, for example). "*y, then middle-click to paste, or "+y and ShiftInsert to paste.


VirtualBox 4.3.16 issue with Unity Launcher

Disabling mini-toolbar in VMs settings is a temporary work-around. In the VirtualBox manager go to Settings->General->Advanced tab -> Mini ToolBar [] Show in Fullscreen/Seamless and make sure it is unchecked


can't log into ubuntu after rsync restore of home folder

There is one file in particular to look at: ~/.Xauthority in her home directory.

Note that its a hidden file.

Log in to your account, go to her home directory and mv .Xauthority .old_Xauthority.

Log out and have her log in.

man xauth to learn more.


Stopping screen from going black after lock on Ubuntu 14.04

The answer actually comes from another question: How to control LightDM power saving preferences?

[...]I've added a script to handle turning off the X dpms timeouts when the user logs in. Here are the three files that I've created. First, the config file:

/etc/lightdm/lightdm.conf.d/50-dpms.conf

[SeatDefaults]
display-setup-script=/etc/lightdm/dpms-enable
session-setup-script=/etc/lightdm/dpms-disable

Make sure the above is owned by root. Easiest is to create it with sudoedit.

Next are the two scripts. These need to be owned by root and made executable (chmod +x).

/etc/lightdm/dpms-enable

#!/bin/sh

(
    # This delay is required. Might be because the X server isn't
    # started yet.
    sleep 10

    # Set up a 5 minute timeout before powering off the display.
    xset dpms 0 0 300
) &

/etc/lightdm/dpms-disable

#!/bin/sh

(
    # This delay is required. Might be because the X server isn't
    # started yet.
    sleep 10

    # Turn off X's handling of dpms timeout. Otherwise
    # gnome-settings-daemon and gnome-screensaver will fight over it.
    xset dpms 0 0 0
) &

Given the above, I get monitor power-down at the login screen, and the dpms timeouts are set to zero for a user session, so the screensaver works properly.

In theory, just set all the values for xset dpms to zero and you should be golden :)


Wireless not working on Toshiba Satellite C55-A5281

If this is your device, it is covered by the very new driver rtl8188ee:

Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:8179]

Verify your device with the terminal command:

lspci -nn

If so, you can compile this driver in 13.04. Please get a temporary wired ethernet connection and do:

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

I suggest you download this to your desktop: http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.11-rc3/backports-3.11-rc3-1.tar.bz2 Right-click it and select 'Extract Here.' Now open a terminal and do:

cd ~/Desktop/backports-3.11-rc3-1/
make defconfig-rtlwifi
make
sudo make install
sudo modprobe rtl8188ee

Your wireless should now be working. You will have compiled the driver for your currently running kernel only. When Update Manager installs a later linux-image, after reboot, re-compile:

cd ~/Desktop/backports-3.11-rc3-1/
make clean
make defconfig-rtlwifi
make
sudo make install
sudo modprobe rtl8188ee

If the message logs say you need firmware:

dmesg | grep rtl

Download and install it with:

wget http://mirror.pnl.gov/ubuntu//pool/main/l/linux-firmware/linux-firmware_1.106_all.deb
sudo dpkg -i linux*.deb
sudo modprobe -r rtl8188ee && sudo modprobe rtl8188ee


How can I configure BOINC to start at startup?

I was wondering the same thing, but then yesterday used System Monitor, and there is a Process running (Einstein@Home IIRC, grinding away at some data), so the BOINC Manager doesn't have to be obviously running for BOINC to be happening.

Check that, you might be just fine!


When connected through netExtender, work network can't be accessed with names

This is an issue of the DNS server of the network you are connecting to. Does the network you connect to provide a DNS service? Have you asked the network admin? He/she should be able to tell you how to set up your DNS settings to be able to do this.

If you can talk to the admin, well and good. If not, you can set this up for your machine by adding aliases to your /etc/hosts file. Open the file as root and add a line for each of the hosts you want to reach by name:

123.456.7.8  machine1
432.123.45.8 machine42
11.22.33.4   randomsillyname

Save the file and you will be able to connect to IP 11.22.33.4 using the name randomsillyname.


I have read several articles on it.  While it is a risk, I would say that if you're careful the risk is minimal.

This is an excerpt from "Linux desktop Trojan 'Hand of Thief' steals in" (from ZDnet.com)

  Fortunately, as Limor Kessem, one of RSA's top cyber Intelligence experts, wrote after a conversation with the Trojan's "sales agent," Hand of Thief has no good ways of infecting Linux users. Instead, the cracker "suggested using email and social engineering as the infection vector."

I myself cannot put it better than the author of the article: Steven J. Vaughan-Nichols

  Practically speaking that means you shouldn't be clicking on any strange URLs sent to you over social media or by e-mail. But, you already knew that? Right? Right!?

So as I stated earlier, if you are careful you should be safe.  To sum it up, don't open any file sent from someone you don't know and be very careful in clicking links sent to you by people you do(both of which you should already be doing anyway).

The article I referred and linked to is the best of several I read on "Hand of Thief" trojan and I would refer you to it if you would like any further information.

I would also refer you to the article sited by Mitch in his comment to your question.  It also states the lack of distribution that this malware has, albeit in a slightly different way and a bit more vaguely.

  Without the ability to spread the malware as widely as on the Windows platform, the price tag seems hefty, and raises the question – will the Linux Trojan have the same value as its Windows counterparts?

I will repeat the link so that my sources are cited but the credit for this one still goes to Mitch.  Thieves Reaching for Linux—”Hand of Thief” Trojan Targets Linux

Edit on 9-10-13  A new article was written about "HoT", while I don't want to necro-bump this question, just to make my answer more complete I will quote it here[my emphasis added] :

  Once installed, HoT would seek to grab information from Web forms and send the results to a botnet server. As malware, however, HoT fails in the most fundamental way possible: It requires a deliberate effort by the user to install it.

it went on to say:

  In fact, even if you do take the time and effort to infect a Linux PC with HoT, the program still doesn't work worth a damn. RSA found that HoT often crashed with Firefox on Fedora, grabbed useless data with Chrome on Fedora, and was blocked from running at all on Ubuntu Linux.

To sum up the article, the HoT malware was mostly hype and as far as security experts(RSA) are concerned it is a complete failure.

The article makes interesting reading and as it says; The only people that were hurt by it were the crooks dumb enough to pay $2000 for it.

The article I sited was on zdnet.com:

Linux “HoT” bank Trojan: Failed malware


I actually have no idea how to solve this. What I did instead was set up vdirsyncer and khal which do actually work.

In 18.04 LTS this is resolved. Calendar has a "Synchronize" option in the hamburger menu.


How to verify the SSL fingerprint by command line? (wget, curl, ...)

Source

Install required software:

apt-get install ca-certificates curl

Download the public SSL certificate:

openssl s_client -connect torproject.org:443 -CAfile /usr/share/ca-certificates/mozilla/DigiCert_Assured_ID_Root_CA.crt >./x.cert </dev/null

Or better:

echo -n | openssl s_client -connect torproject.org:443 -CAfile /usr/share/ca-certificates/mozilla/DigiCert_Assured_ID_Root_CA.crt | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ./torproject.pem

Get SHA-1 fingerprint:

openssl x509 -noout -in torproject.pem -fingerprint -sha1

Get SHA-256 fingerprint:

openssl x509 -noout -in torproject.pem -fingerprint -sha256

Manually compare SHA-1 and SHA-256 fingerprints with torproject.org FAQ: SSL.

.

Optionally render the ca-certificates useless for testing purposes.
Using curl here, but wget has a bug Bug and uses the ca-files anyway.

sudo mv /usr/share/ca-certificates /usr/share/ca-certificates_

Download with curl and the pinned certificate:

curl --cacert ./torproject.pem https://check.torproject.org/ > check.html


Function volume keys get stuck; volume raises to max/min rapidly

Open terminal and type:

sudo nano 85-keyboard-configuration.rules

Make changes to make your file look like this:

  # Set up a single virtual console.
  SUBSYSTEM=="tty", KERNEL=="tty[1-6]", RUN+="console-setup-tty /dev/%k",
  ATTR{[dmi/id]product_name}=="SATELLITE L750*"

  # Framebuffer console created.  Set up the font on all virtual consoles
  # again.  This races with Plymouth if fbcon is built into the kernel; but
  # the worst case should simply be that fonts don't get set up properly.
  SUBSYSTEM=="graphics", KERNEL=="fbcon", RUN+="console-setup-tty fbcon"

To save your modifications:

Press CTRL+X and Y and press enter


You can try Pygame.

Pygame is a set of Python modules designed for writing games. Pygame adds functionality on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system.Pygame

For more information, installation instructions, and to download, visit their website.

Also take a look at The Linux Game Studio.


Installed Ubuntu 18.10 without configuring UEFI on Windows 10, now can not boot into Windows

if you run gparted, does it still show the ntfs partition?  If it is still entact, you may not have lost anything and can possibly use a second hard drive to install and recover your files.  If that works, it may simply be a BIOS setting to boot to UEFI verses legacy.  I had this happen when creating a dual boot, but the problem was that the USB was not compatible with the partition that windows was in, so it created Ubuntu as a legacy partition


SSL Error 61 in Citrix Receiver in Ubuntu 12.04

Just go ahead and copy certificates from Mozilla's folder into the Citrix certs folders
sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts

This should do the work for you!
Source


Let's do it!

1) Install xdotool

sudo aptitude install xdotool

2) Install Compiz

sudo aptitude install compizconfig-settings-manager

3) Open Compiz

ccsm

4) Go to Commands then to "Commands" tab and add this to "Command line 0"
sleep 0.1 && xdotool click --clearmodifiers 3

5) Assign Super + Button1 at "Button Bindings" tab

And you're done.


Unable to reinstall unity-desktop. currently having GNOME

you can reset the unity

$ unity-reset
$ setsid unity

if the above didnot work
try:
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity


How can I get Apache to use PHP 7.0 (not 7.1)?

I'll split my answer into two parts. The first part describes how your problem occurred, the second part is the actual answer to your issue.

Description

Disclaimer: Most of my description is basically speculation, as I cannot really know what you did. But it's the most likely scenario, as I cannot think of another way that would end up giving you the issue you described.

From the problem you describe, it seems you have installed a third party PPA which installed PHP 7.1 on your system. The most likely PPA is Ondrej's PPA.

When you first installed PHP, you installed in the following method:

sudo apt install php

The php package is only a meta package and does not contain the binaries needed. It depends on the latest version of the available PHP package (by default 7.0). So when you install it, the php7.0 package is installed along with php7.0's dependencies (and libapache2-mod-php7.0
 if you have apache2) and all those dependencies are marked in the package manager as "automatically installed".

$ apt show php
Package: php
Version: 1:7.0+35ubuntu6
Priority: optional
Section: php
Source: php-defaults (35ubuntu6)
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Debian PHP Maintainers
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 11.3 kB
Depends: php7.0
Supported: 5y
Download-Size: 2,832 B
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
Description: server-side, HTML-embedded scripting language (default)
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Debian's default
 PHP version (currently 7.0).

I bolded the parts of the command's result, which explains what I just mentioned.

Ondrej's PHP PPA offers multiple PHP versions that can be installed alongside each other. So when you added it your system, apt found a newer version of PHP so it replaced php7.0* with php7.1 along with any related packages that were automatically installed.

Answer

There are two methods to fix your issues.

Completely remove the 3rd party PPA, and revert back to the default PHP packages

sudo apt install ppa-purge
sudo ppa-purge ppa:ondrej/php

Ondrej's PPA offers multiple versions of PHP, so you can install more than one version along side each other. But you would enable only the php7.0 Apache module.

sudo apt install php7.0 libapache2-mod-php7.0
sudo a2dismod php7.1
sudo a2enmod php7.0
sudo apache2ctl restart

Installing them in the previous manner would set the php7.0 package as "manually installed" in apt, so they won't get removed automatically without you removing them yourself.
Don't forget to make sure to install any PHP modules you need for php7.0 as well (Like sudo apt install php7.0-mysql)

* php7.0 may have been kept in your system installed if you had manually installed a module specifically for php7.0 (for example php7.0-mysql).


How to Upgrade Ubuntu 12.04 to 12.10 final not Beta without a cd

you can upgrade to 12.10 by changing a setting in the update-manager.

To do this:
open update-manager
click 'settings'
under updates tab change 'For long-term support versions' to 'For any new version'

This article goes into more depth and has pictures


System proxy configuration does not work

Open /etc/apt/apt.conf, or create it if it doesn't exist. Add the following code:

Acquire::http::proxy "http://username:password@proxyserver:port/";
Acquire::https::proxy "https://username:password@proxyserver:port/";
Acquire::ftp::proxy "ftp://username:password@proxyserver:port/";

To do this automatically on network startup, create a file called "zproxy" (or something along those lines) containing the following contents:

#!/bin/bash

if [ "`sudo iwlist eth1 scanning | grep mySSID`" ]
then
    echo 'Acquire::http::proxy "http://username:password@proxyserver:port/";' > /etc/apt/apt.conf
    echo 'Acquire::https::proxy "https://username:password@proxyserver:port/";' >> /etc/apt/apt.conf
    echo 'Acquire::ftp::proxy "ftp://username:password@proxyserver:port/";' >> /etc/apt/apt.conf
else
    echo '' > /etc/apt/apt.conf
fi

Replace mySSID with the SSID of your school's network, and "username:password@proxyserver:port" with the correct proxy settings. Put the file in /etc/network/if-up.d/ and mark it executable using

  ~$: sudo chmod +x /etc/network/if-up.d/zproxy

The bash script will run every time you connect to the network, and either append your proxy settings to /etc/apt/apt.conf or clear the file entirely.


Theoretically, if you had set the SYSNAME variable (relinux 0.3) or Name of the OS (relinux 0.4), it should have worked, but due to a bug either in relinux or ubiquity (not sure which to blame, the issue is kind of complex), it doesn't work.

There are 2 ways of fixing/getting around the issue:

Using the latest git version of relinux, as this issue is fixed there (Instructions here: https://github.com/MiJyn/relinux/wiki/Installing , follow "Downloading via git", "Installing", then "Running")
Edit /etc/lsb-release yourself

If you want to do the second method, open /etc/lsb-release in a text editor as root (see: How do I get permissions to edit system configuration files?). You should see something similar to this:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04"

First, backup the file (save it as /etc/lsb-release.bak, or save it in your home folder, if you don't want it to appear on the ISO), then edit it to what you want. Here's a reference of the variables:

DISTRIB_ID: Name of the distro
DISTRIB_RELEASE: Current version of the distro installed
DISTRIB_CODENAME: Codename of the version (if you don't have one, just use the version itself, it should work fine)
DISTRIB_DESCRIPTION: As it says, just a description of the OS. Ubuntu seems to like to use the "NAME VERSION" format, but you can really do whatever you want here.

Notice that you will need to surround it in double quotes (") if you use more than one word (like you can see in DISTRIB_DESCRIPTION)

Once you're done, save it (as /etc/lsb-release), and close. Now you have to tell relinux to not edit /etc/lsb-release. In relinux 0.4, make sure Generate LSB Files is not checked, and in relinux 0.3, make sure GENERATELSBRELEASE is set to N (i.e. GENERATELSBRELEASE="N").

Once that is done, run relinux, and it should work!


It may be a matter of language. Folders like ~/Documents/, ~/Downloads/, ~/Desktop/, ~/Music/, ~/Pictures/ and ~/Videos/ get their names translated into the system language. For example, if your system language is set to French, the folder will be called  ~/Documents/, ~/Téléchargements/, ~/Bureau/, ~/Musique/, ~/Images/ and ~/Vidéos/. So you can check if these folders get their translated names into your system language.

Another idea :

Unlike Windows, Linux is case sensitive with files and folder names. So if your username is "Arun" and not "arun", the /home/arun/Videos folder will not exist because of Linux case sensitivity (unlike the /home/Arun/Videos folder).


Correct your /etc/hosts like this:

127.0.0.1 localhost
127.0.1.1 webserverL

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Ubuntu GNOME and high resolution screen: icons in QT apps are too small. How to solve?

The answer depends on which version of qt you are using, qt4 or qt5. The following will tell you which version of qt you are using.

ldd $(which $NAME) | grep qt -i

For qt5 you can use an environment variable QT_SCALE_FACTOR, for qt4 you can change font sizes using qtconfig-qt4, but it would appear that icon sizes don't scale.  You might, however, be able to use a different icon set, or if you are very energetic scale up another icon set yourself.

See https://wiki.archlinux.org/index.php/HiDPI for more details and details for other toolkits.


Your printer is supported with HPLIP version, shipped with Ubuntu 18.04.1 LTS. You do not need to install latest binary HPLIP and/or proprietary/binary plugin.

So you need to connect printer to the same network and/or USB then simply install HPLIP with

sudo apt-get install hplip-gui

then launch the HP setup

hp-setup

and follow wizard on screen.


How to remove global menu from Chromium, Firefox?

This is now hidden in the Firefox Settings. Hhere is the fix:

Type about:config in the Firefox search bar to enter settings
Search for "menu" and find ui.use_unity_menubar
Set this item to "false"

Voila! You get your attached menu back!


That spec. is fine to run 32-bit Ubuntu.

I would recommend: 12.04.2 LTS

Download Ubuntu Desktop

You should 'try' first, with a USB or DVD start disk.

To be certain of full support, you also need to identify the graphics chip/card, and any other (unusual) devices or applications ..


Based on experience with driver versions labeled "testing", "edge" and similar, and also using the NVIDIA-provided binaries...

Unless you have a VERY SPECIFIC reason to have the very latest...
(often providing new features, or obscure patches and the like that might not even be relevant for your hardware)

The least troublesome choice is:

Ubuntu System Settings> Software and updates> Additional drivers.
(*) Using NVIDIA binary driver ...

e.g. the top two choices here:


I'd like to extract all rows and then write data to text file, which is D= 30 and E=25 and B>=152 and B<=241.

This should be straightforward in Awk

awk '$4==30 && $5==25 && $2>151 && $2<242' file > newfile

The default input and output field separators are whitespace.


Your home network most likely only has one single (public) IP address that can be reached from the outside. This is the address assigned to your router. If you configure port forwarding, the following happens:
You configured port 22 to be forwarded to your pi. Now, if anyone contacts your router on it's ip and port 22, the router will forward those packets to your raspberry pi. For the outside person, it looks just as if your raspberry pi was behind the public ip, and not your router. Of course, you can not ssh to your server now, since your server can not listen on port 22 of the public ip adress! You would have to configure the servers ssh server to listen on some other port instead, and forward that port to the server!


How can I install Photoshop CS6 on Ubuntu 16.04?

Try and create a virtual windows machine with virtualbox. You can download virtualbox with apt-get.

For the virtual machine image go to https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/mac/ and download a free virtual machine. It's basically a fully functional copy of Windows that developers can use, but it works exactly like a normal Windows copy.

After you downloaded everything and installed VirtualBox just double click of the Windows virtual machine package and it should start up automatically.


VMware Workstation cannot create ~/.vmware directory

You should never run as root unless you are explicitly trying to modify your system.  VMWare Workstation does not need root access to simply run a guest machine.  Likely your permission were changed to root owning your ~/.vmware folder during install.  You just need to change the ownership back to your user.

sudo chown -R $USER:$USER ~/.vmware

This will set the owner back to you and your group.


What you seems you want is a "union" mount, which can't be done in Ubuntu (at least not with default tools; follow the above link you are adventurous). In general there is still no official union-mount solution in Linux (2014-04-22); there are out-of-tree filesystems like AUFS and work-more-or-less-in-progress on UnionMount.  Valerie Aurora has a (slightly outdate) page about it.

What you can easily do is mounting the disk at, for example, /mnt/disk1 and then symlink the directories where you want them:

ln -s /mnt/disk1/home /home
ln -s /mnt/disk1/shared /shared

(again, you should not have an existing /home or /shared folder, confusion and/or errors would appear otherwise).

Another way to do these kind of things is a "bind mount". It's very similar to symlinking directories, but can cross "chroot" boundaries. You can find more info in this page and in this other one.

Update: the overlayfs file-system has been promoted to standard kernel for version 3.18. So now there is an official union-type solution for linux; userspace utility to simplify its use will surely follow.
For now, documentation is in the kernel tree at Documentation/filesystems/overlayfs.txt.


Why does Firefox repeatedly open new tabs when I open a .php file?

To parse a php file, you need a server set up (apache for example) and you need firefox to query for this file with the server. So install apache (or a server of your preference), set the DocumentRoot.
Now you can try typing the URL of the file relative to DocumentRoot in the addressbar of firefox, like so: localhost/index.php. This will open the file normally.
Explanation:
What's happening is, firefox doesn't process a php file by itself, it doesn't know how. So when you open it, it treats it as a file to be downloaded and opened, so it downloads and tries to open it. Now since the default software to open a php file is firefox itself, a new tab is opened, and the whole process repeats indefinitely.
When you type the address of the file in addressbar, firefox actually makes a request to Apache (or whichever server) for the file, and the server will do the task of parsing php and converting it into HTML.


Yes, if there is no make uninstall, make install can help finding installed files.

Running make install again and capturing the output gives you the list of installed files, as part of the log output, where you could use it 'manually' or extract it.
If you no longer have the build directory, it should also work when you start over from downloading the source again, ideally the same version.

To capture normal and error output, and see it while running, use:

sudo make install 2>&1 | tee makeinstall.log

I see no reason the same should not work with checkinstall.


If you are trying to reformat the USB use Gparted.

If you are trying to create a bootable USB (look here).


sshfs mounts with user privileges but for umount I need root. why? how?

Open a terminal window, and type

fusermount -u /path/to/mount


I say the recommended size still makes sense, though I tend to use bigger partition sizes because we have so much space available nowadays, even on SSD. Currently, I have a 45 GiB root on one machine, and 60 GiB on another machine.

Even though I use bigger partitions, in practical use, with a comfortable selection of software, I use much less than 25 GiB: about 6 GiB for the software, and a couple of GiB in /var. The rest is in separate partitions (/home and data).

So 25 GiB is not an incorrect advice. I would only worry about modern games (which tend to use GiB like it's free). And now that I've read your question, Matlab too.


Bluetooth: Error in firmware loading in ubuntu 14.04

Edit your /etc/rc.local file and enter sleep 20 above the modprobe ath3k line and reboot


It is started in /etc/X11/Xsession.d/90x11-common_ssh-agent.

The files in /etc/X11/Xsession.d/ are run from /etc/X11/Xsession by display managers (like lightdm or gdm) after a user logs in and by xinit.


openvpn via command line: permission denied to update resolv.conf

Regardless of whether or not this is what you really want or need to do, this bit here:

up /etc/resolv.conf
down /etc/resolv.conf

is not how this functionality works. Rather, the openvpn-systemd-resolved package dynamically updates the file /etc/resolv.conf, by specifying an executable script after the up and down in your openvpn client conf (as per the linked (and incomplete!) "tutorial"). But also, note there are different versions of this functionality; later versions use dbus, which I'm referencing; the previous version just used scripts & temp files. So that's why there's some inconsistency across articles/docs/tutorials.

So, assuming this package is installed (either via apt-get or apt):

sudo apt-get install openvpn-systemd-resolved

and verifying the service is running (if not: enable it and start it manually):

sudo service systemd-resolved status

then, there should be a script installed as /etc/openvpn/update-resolv-conf (or possibly in /etc/openvpn/scripts/ in other distributions) that modifies the /etc/resolv.conf for you.

So your openvpn client conf (which on non-windows clients should by convention have a ".conf" suffix, and they'll automatically be read if in /etc/openvpn; but on windows they typically use .ovpn for proper file association w/ openvpn) -- the openvpn client conf would contain, for example,

script-security 2
setenv PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
down-pre

Then you'll noticed that it's the /etc/openvpn/update-systemd-resolved script that needs to be executable (it is by default), and /etc/resolv.conf will  be a simple text file that is then updated with correct domain, nameserver, search entries (it's not an executable script).

The last element to tie tis together is to modify /etc/nsswitch.conf  to contain something like the following (replacing the existing hosts: entry):

# Use systemd-resolved first, then fall back to /etc/resolv.conf
hosts: files resolve dns myhostname

See the linked update-systemd-resolved github page for details and options.


Hyper-V Ubuntu Connects to Network but not Internet

It looks like one of guest machine is getting assigned an ip address from DHCP server whilst its not the case for the second. Have you tried adding a Legacy Network adapter from Add Hardware Pane in Settings of Hyper V manager.

Try using a legacy network adapter to connect to your created external virtual switch.

If that doesn't work perhaps setting up static ip addresses to your virtual machines  might fix the problem.


How can I tether my android phone with pdanet to my laptop via usb?

Install easytether from Android Market. It has Ubuntu 10.04+ package you can install and it works fine.

It also comes with detailed instructions what to do to make your tethering work. It does not require rooted phone.


Tata Docomo Photon 3g not working on 12.04 LTS

Use sakis3g script

Sakis3G is a tweaked shell script which is supposed to work out-of-the-box for establishing a 3G connection with any combination of modem or operator.

It automatically setups your USB or Bluetooth™ modem, and may even detect operator settings.

It may work for you.

For details on sakis3g installation please refer to official Github page
of sakis3g

For details on how to use sakis3g refer the official page

see this post for additional reference.


How can I remove / change the "Open With" list?

Enter the contextual menu of the file and go to the Properties of it. Then, go to Open with tab, right click on the application you want to remove and click on Forget association.


Installer in WINE can't find `C:\users\myusername\Temp\_is6da.tmp`

There is a missing DLL d3d10_1.dll. You can see the error message if you start wine via terminal:

err:module:import_dll Library d3d10_1.dll (which is needed by L"C:\\users\\aboettger\\Temp\\_isf61a.tmp") not found

Therefore search and download the DLL and place the file in ~/.wine/drive_c/windows/system32

cp d3d10_1.dll ~/.wine/drive_c/windows/system32

and install via Wine configuration, start Configure Wine.

or use the Windows cmd ;) via

cd ~/Downloads
wine cmd

and

copy d3d10_1.dll C:\windows\system32
regsvr32 C:\windows\system32\d3d10_1.dll


How can I determine if just the .private folder is encrypted or the whole home directory?

From the terminal type:

cat /home/.ecryptfs/$USER/.ecryptfs/Private.mnt

If the file exists and contains your home directory path, your home directory is encrypted.

Another way to check is looking at your home dir mount point:

From the terminal type:

df $HOME

An encrypted home will be mounted at  the ".Private" filesystem, otherwise it will be mounted at some regular partition device (/dev/*) .

Filesystem           1K-blocks      Used Available Use% Mounted on
/home/username/.Private
                     315482376 101351268 198105472  34% /home/username

Regular device mount (no encryption):

df /home/schroot
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7            315482376 101351332 198105408  34% /home


YouTube pausing script works from command line, but not from shortcut

I don't think the problem has something to do with whether the script is run via keyboard shortcut or directly in a terminal. It's rather an error in your if branch and the script will alternately work and fail.

In the if branch you wrote

kill -SIGSTOP < /tmp/TimChromepid.PSD

which means: pipe the content of file /tmp/TimChromepid.PSD into kill's stdin. But kill doesn't read anything from stdin, it just accepts the PID as a command line parameter, which wasn't given. That's why it told you about its usage.

To fix it, simply do as you did in the else branch, i.e. either replace kill -SIGSTOP < /tmp/TimChromepid.PSD with kill -SIGSTOP $(< /tmp/TimChromepid.PSD) or use $NMR:

#!/bin/sh
if [ -f /tmp/TimChromepid.RUN ]; then
    mv /tmp/TimChromepid.RUN /tmp/TimChromepid.PSD
    NMR=$(< /tmp/TimChromepid.PSD)
    kill -SIGSTOP $NMR
else
    NMR=$(< /tmp/TimChromepid.PSD)
    mv /tmp/TimChromepid.PSD /tmp/TimChromepid.RUN
    kill -SIGCONT $NMR
fi


Make sure that your router doesn't have an SSH server running and forward the port 22 to your SSH server.

To make sure that your router isn't running SSH, get the local IP of your router using netstat -nr. Here is what I get:

netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

Find the gateway, for me it is 192.168.1.1. Next, try connecting to it through ssh:

ssh 192.168.1.1

If it asks for username&password, then it has an SSH server. You should be able to disable it from the router's web panel (accessible with the IP we have aquired).

Then, you'll need to forward the port 22 to your SSH server with your router's web panel (accessible with the IP we have aquired).


How to integrate the default g++ compiler with vscode?

The steps would:

Make sure g++ is installed on your system.
Install g++ vscode plugin.

Open VS Code.
Click the Extensions View icon on the Sidebar.
Search for c++.
Click Install, then click Reload., OR

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install ms-vscode.cpptools

With that vscode should be able to compile and run your c++ code.

Image:

More information:

https://code.visualstudio.com/docs/languages/cpp


Well so I found the issue; although still don't know if it is hardware or software.

The issue was in fact with the Video Card.  I swapped the card with another computer and for 2 days now I've had 0 issues.

What concerns me is that this card is working fine in Windows 7, and that the freeze was so hard.  Everything was shutdown, including networking.  Heck I couldn't do magic sysrq!!!!!

So I have no idea how a module, any module, could cause such a crash within an OS.


While finding how to use iPhone 3G as a Wi-Fi source under 12.04 64-bit, I found that the latest version of libimobiledevice gives support for several of Apple devices.

Now I can edit my songs for my iPod, shuffle 4G via Rhythmbox, and also I can tether Wi-Fi via my iPhone 3GS 32GB under iOS 5.1.1.

As an advice, visit the project website and read some documentation and give it a try.

I warn you, this is not the same as iTunes, remember this is open source and one of the main aims of Apple it's totally the opposite. You are going to be able to manage your music, podcasts, videos, etc. but advance settings like playlist editing, advance sync and settings maybe will be unavailable for now.

Good luck.


How to remove "Apps Available for Download" from the applications lens?

This is possible in Unity version 5.0, which will be part of Ubuntu 12.04.

To get rid of the "Apps Available for Download" section:

launch dconf-editor (which is part of the dconf-tools  package)
navigate to /desktop/unity/lenses/applications
uncheck the display-available-apps box

(There's also a display-recent-apps option available to disable the corresponding section.)

And yeah, I'm the author of that patch :-)

Related:

How to remove "frequently used programs" from menu dash?


Crontab command not register the top command result into the output file

You have added this to root's crontab (you ran sudo crontab -e), so why are you running top with sudo? Everything in that crontab will be run as root. More importantly, you should never run a command with sudo unless that command needs to be run as root. The top command never needs root access, every user sees the same output, so the sudo there is pointless. The cd is also pointless, there's no need to move into the /home/malus directory. So change your script to:

echo "______________________________________________________________________" >> /home/malus/top.txt
date >> /home/malus/top.txt
top n 1 o %MEM u mysql | grep mysql >> /home/malus/top.txt

That said, I don't see any other problem in your file. The top command is in /usr/bin and /usr/bin is in cron's PATH, so you don't need a full path for it. What is happening is probably that the command has no output.

For example, if I run your top on a system where the mysql user is running something, I get:

$ top n 1 o %MEM u mysql | grep mysql
 2379 mysql     20   0 28.915g 5.612g  13516 S   0.0  4.3   2038:41 mysqld

However, if the mysql user isn't running anything, there is no output since the grep mysql won't match:

$ top n 1 o %MEM u mysql | grep mysql
$

So, if the date is being correctly added to /home/malus/top.txt, then the lack of output from top just means the mysql user wasn't running anything when the crontab was run.

The only other explanation is that you have your top and/or grep commands in a non-standard location. If so, run type top and type grep to see where they are:

$ which top grep
/usr/bin/top
/bin/grep

And then use those paths:

echo "______________________________________________________________________" >> /home/malus/top.txt
date >> /home/malus/top.txt
/usr/bin/top n 1 o %MEM u mysql | /bin/grep mysql >> /home/malus/top.txt

But that's really unlikely unless you have moved these and they aren't in /usr/bin or /bin.

Finally, to debug it further, change the crontab so that it also keeps the error output:

00 * * * * /home/malus/top.sh 2>>/home/malus/top.err
15 * * * * /home/malus/top.sh 2>>/home/malus/top.err
30 * * * * /home/malus/top.sh 2>>/home/malus/top.err
45 * * * * /home/malus/top.sh 2>>/home/malus/top.err

Then see if anything is written to /home/malus/top.err.

The error you had, TERM environment variable not set. is because the environment variable $TERM isn't set in the cron's shell session, and top need that to know what kind of output to produce:

$ unset TERM
$ top
TERM environment variable not set.

A simple workaround, therefore, is to set it in your script:

echo "______________________________________________________________________" >> /home/malus/top.txt
date >> /home/malus/top.txt
TERM=xterm top n 1 o %MEM u mysql | grep mysql >> /home/malus/top.txt


Assuming your list is in a file called file with nothing else in it (as appears to be the case), you could use:

sed 's/.*/The mac address & is not found - but.../' file

s/old/new replace old with new
.* match any number of any characters on each line
& print what was matched earlier here

If you see the output you want, repeat the command (hit the up arrow to see and edit the previous command) adding redirection (>) to a new file at the end like this:

sed 's/.*/The mac address & is not found - but.../' file > newfile


Renaming multiple files by adding a string to the beginning

rename 's/^/1_/' * for renaming all files in the current directory

or

rename 's/^/1_/' DATASET* for renaming all files in the current directory starting with DATASET in their name

Explanation: the expression s/^/1_/ says: "replace the beginning of the filename (that means this symbol -> ^)' with 1_".


Why does removing Firefox install another browser?

If uninstalling firefox installs epiphany, then that's because some other package depends on "a web browser", which packages do by depending on the virtual package www-browser.  If the google-chrome package doesn't have a Provides: www-browser line, and you have no other browser installed, APT thinks it needs to install a package that does provide a www-browser and then Epiphany is the first choice on a GNOME system.

I downloaded one of the Google Chrome .deb files and I can confirm that they don't provide www-browser.  If you want to get this fixed you need to file a bug report with Google and tell them to fix their .deb packages.


When writing a bash script, how do I get the absolute path of the location of the current file?

You can get the full path like:

realpath "$0"

And as pointed out by Serg you can use dirname to strip the filename like this

dirname "$(realpath $0)"

or even better to prevent awkward quoting and word-splitting with difficult filenames:

temp=$( realpath "$0"  ) && dirname "$temp"

Much better than my earlier idea which was to parse it (I knew there would be a better way!)

realpath "$0" | sed 's|\(.*\)/.*|\1|'

Notes

realpath returns the actual path of a file
$0 is this file (the script)
s|old|new| replace old with new
\(.*\)/ save any characters before / for later
\1 the saved part


Display / find started applications in Unityu Ubuntu 12.04

If you mean like a task manager, then take a look at this

Or This


I cannot use my guest session on Ubuntu 15.04

Most likely the lightdm-guest-session file in

/etc/apparmor.d

has been corrupted or been deleted. There should be a file present named lightdm-guest-session without extension and with the following inside:

# vim:syntax=apparmor
# Profile for restricting lightdm guest session

#include <tunables/global>

/usr/lib/lightdm/lightdm-guest-session {
# Most applications are confined via the main abstraction
#include <abstractions/lightdm>

# chromium-browser needs special confinement due to its sandboxing
#include <abstractions/lightdm_chromium-browser>  }

The lines with #include are not comments but needed!


UEFI problem when installing Ubuntu 15.04

It sounds like you've got a BIOS/CSM/legacy-mode installation of Windows, but the Ubuntu installer is booting in EFI/UEFI mode. Proceeding with an EFI-mode installation of Ubuntu would likely reach a certain point but then fail. Repairing it at that point would be possible, but only if you know more than you clearly do.

The simplest solution is probably to force your Ubuntu installation medium to boot in BIOS/CSM/legacy mode. This can usually be done by using the firmware's built-in boot manager, which is usually accessed by hitting Esc or some function key at boot time. In the boot manager, there are likely to be two entries for your boot medium, one of which includes the string "UEFI" and the other of which doesn't. Select the boot option that lacks the "UEFI" string. Alternatively, it may be possible to create an Ubuntu installation USB that lacks the EFI boot loader file, although the details of how to do this vary from one method of writing the USB drive to another.

Stepping back further, IMHO a better way to solve the problem is to re-install everything (both Windows and Ubuntu), but this time in EFI mode. Most modern computers are based on EFI firmware and provide a BIOS compatibility layer (aka a CSM or legacy support) to support older BIOS-mode boot loaders. This feature can usually be disabled in the firmware setup utility, which is desirable because it greatly simplifies the boot process. I describe this issue in more detail on this page, if you're interested in looking into it. Although the emphasis of that page is on the perils of installing Linux in BIOS mode when the computer already has an EFI-mode Windows installation, the principles are the same in your case, just with reversed boot modes for the two OSes. OTOH, disabling the CSM to simplify the boot process means that you'll have to either re-install Windows or jump through hoops to convert it to boot in EFI mode. If you try this and re-install Windows, your best bet is to completely erase the partition table on the disk before you begin the re-installation.


I think you must have a separate boot partition. At a command promot, type

df -h

What is listed ?


downloading trial version to a usb stick

Downloading the Ubuntu installation program to your laptop, and burning it to USB should not in anyway affect the operation of your laptop.

You'll want to follow the instructions at Ubuntu's download page for creating a bootable USB, and after having created it remove it form your laptop and then use it to boot your desktop computer.  Given that you had a problem with the Ubuntu 15 upgrade, you may want to use the Ubuntu 14 download, but my suspicion would be that something added like a video driver is what 'broke' your computer.

More complete instructions:

Download two programs:

Download Ubuntu 14.04.4
Download UUI
Install UUI on your laptop
Use UUI on your laptop to create a bootable USB stick using the downloaded Ubuntu 14.04.4 installation program
Boot the USB in your desktop computer, and choose 'try Ubuntu'
Using the file manager in the Ubuntu booted from USB, navigate to your hard disk...


18.04 MSI GS65 wifi hardware switch disabled after suspend

I downgraded to Ubuntu 16.04, however had the same problem. I found the solution. Essentially enabling the airplane mode key on my system.

credit to Gibbsoft
Wifi Hard Blocked After Suspend in Ubuntu on GS65

$sudo nano /etc/default/grub
add to the bottom of the file and save

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi='Windows 2009' quiet splash"
$sudo update-grub
reboot

now i press fn + f10 (airplane mode key) to enable wifi after suspend


Startup script with sudo in Ubuntu 16.10

For command-line applications that do not require GUI, it is sufficient to place the call to them into /etc/rc.local , which already runs as root, thus does not need sudo. Below is example of my own /etc/rc.local which I use for starting two monitoring scripts.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/home/xieerqi/bin/batmon.sh &
/home/xieerqi/bin/sh/temperature.sh  &
 exit 0

For GUI applications, you would need to take a different approach. You would need to open Startup Applications app, and add the following command:

bash -c "sleep 10;gksu /usr/bin/my_vpn_program"

What this does is gives GUI sufficient time to start, 10 seconds, then will bring up password dialog and if you enter password properly, will launch your command. Effectively this is a mini bash script. You can use pkexec instead, and some might even say pkexec is recommended instead of gksu.

Alternatively, if you don't want to enter password every time, you can allow your user run this particular command with root privileges without authentication. For that you need to edit /etc/sudoers file. WARNING: it is recommended that you use sudo visudo to edit the file from terminal. Below is example of how I use the same setting with pm-suspend command:

# Allow using pm-suspend for my user without password
my_username_here ALL = NOPASSWD: /usr/sbin/pm-suspend

This line should be appended to the end of /etc/sudoers file and saved. Note, that you still need to append sudo or gksu to the beginning of each command that you set up. Thus, you would need to use the same bash command I showed previously.


This does seem to affect Steam on both Windows and Linux, the best way I've found to stop it from happening is to pause the download when the problem starts, then wait 10-15 seconds, then unpause the download and repeat when it happens again.


Did you try to define a toolbar in the mainview and simply use that id everytime?

Like this:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"
    applicationName: "toolbartest"
    id: root

   // S4 resolution 1920x1080
    width: units.gu(54)
    height: units.gu(96)

    ToolbarActions{
        id: centralBar
        Action {
            text: "print"
            onTriggered: print("action triggered")
        }
        Action {
            text: "next"
            onTriggered: {
                if (tabs.selectedTabIndex < 2){
                    tabs.selectedTabIndex += 1
                } else {
                    tabs.selectedTabIndex = 0
                }
            }
        }
    }

    Tabs {
        id: tabs
        Tab {
            title: i18n.tr("Tab1")
            page: Page {
                Label {
                    id: label1
                    anchors.centerIn: parent
                    text: "A centered label"
                }
                tools: centralBar
            }
        }
        Tab {
            title: i18n.tr("Tab2")
            page: Page {
                Label {
                    id: label2
                    anchors.centerIn: parent
                    text: "A centered label2"
                }
                tools: centralBar
            }
        }

        Tab {
            title: i18n.tr("Tab3")
            page: Page {
                Label {
                    id: label3
                    anchors.centerIn: parent
                    text: "A centered label3"
                }
                tools: centralBar
            }
        }
    }
}


It is normal behavior for passwd to not show your password or even placeholders for characters (as is done in many apps including web browsers) because if someone knew the number of characters in your password it would be significantly faster to brute force.
So just type away then press enter.


How to change mouse scroll speed while using libinput?

This has been answered on Unix  & Linux by meuh

In short,

  there is no current api for changing the scroll speed for libinput devices

so other methods must be used to solve this issue.


Do I need bind9 for dns router computer?

No, you don't need bind9. You need a DNS server. You may use a public DNS server, like 1.1.1.1, for every client, or you may set up a DNS server, like bind, locally.

That said - for simple networks it's probably better to use dnsmasq. dnsmasq will automagically handle setting reverse records, forward records and so on, so that you can go by name internally in your network.

This is certainly possible with bind and dhcpd as well, but bind is more complex. It's also more powerful. If you have a single subnet, this extra complexity is usually not worth it.

If you don't need local name resolution, you can just set the dns-server in the dhcpd.conf to for instance 1.1.1.1, and it should work.


How do I get a Broadcom BCM430N wireless card working?

You can find  b43-fwcutter and firmware-b43-lpphy-installer in Ubuntu Software Centre.

Just search for b43 to find them, and click install.

I would recommend having a look at this page to make sure you are installing the correct package for your device.


Contrail as an install option in Landscape Openstack Auto Pilot

I wish I had better news, but the answer to both questions is "no"


Xmodmap problem blocks connection via x2go

Thank you very much this brought me on the right track. I have moved away from xmodmap und use now keboardmaping.

cp keypad kpdl /usr/share/X11/xkb/symbols/


From man useradd :

-p, --password PASSWORD
           The encrypted password, as returned by crypt(3). The default is to disable the password.

As you can see the PASSWORD with -p option is the encrypted password returned by the crypt(3) library function.

If you use -p password1, the system will consider this plain text password1 as the encrypted shadow password entry in /etc/shadow.

The solution is to use the encrypted password here with -p which is unsafe, you should set the password interactively.

For example create the suer first :

sudo useradd -m -s /bin/bash guest_user

Now set the password :

sudo passwd guest_user

Or better use adduser instead :

sudo adduser --gecos '' guest_user


How to create a permanent shortcut to files on windows partition?

You can automount the Windows partition to a specified mount point by editing /etc/fstab. This mount point has to be created before editing /etc/fstab. Create it using

sudo mkdir <mount_point>

<mount_point> is usually a directory inside /media. I use /media/Data as my <mount_point>. You may want to use /media/OS (instead of Data and OS you can use any name you wish).

Then, you need to get your partition's UUID and type. To do that, run

sudo blkid

After determining which is your desired partition, edit /etc/fstab:

sudo nano /etc/fstab

At the end of the file add the following (since you are using Windows, I suppose that your partition's type is "ntfs"):

UUID=<your_partition's_UUID> <mount_point> ntfs-3g  defaults,nls=utf8,fmask=117,dmask=007,uid=1000,windows_names 0 0

<your_partition's_UUID> is the UUID you got from blkid.
<mount_point> is the mount point you created before, e.g. /media/OS.
ntfs-3g is your partition's file system type (I supposed ntfs; if it is of another type it must be specified accordingly)
the rest of the options set the permissions on the partition. The ones I used above give you permission to read and write to your partition and also remove the executable permission from all files of it.

Save your changes using Ctrl+O, close nano using Ctrl+X and restart your computer for the changes to take effect.

The above settings work really well for me. However, if you need something different or you need more details about fstab, check this fstab wiki.

After this procedure, your shortcuts may not work at first. After recreating them they should work properly.


This might not be the answer that you want to hear, but installing a graphical interface, even if its stripped down,  just to be able to use back-in-time , isn't a very linux server way of doing things.

Usually with a server you wish to use the minimal amount of packages. To keep the server secure un-bloated and easy to maintain / restore

I also question the need of a snapshot like backup. If you are running a mine craft server.
Do you require versions of your backups? Usually this would be something one would want for documents  / files / source code where versions matter. With a minecraft server. Wouldnt you just want the latest stuff so you can restore it?

Anyway, a non graphical versioning snapshot / backup software. would be rsnapshot.
you can find it here( rsnapshot homepage) .


Is it ok to enable proposed updates during Ubuntu's development cycle?

"There is very little benefit to users in using -proposed during the development cycle and such use is strongly discouraged."1

After a new stable release of Ubuntu, testers are encouraged to use the -proposed repository to test Stable Release Updates to help the Release Team decide whether the update should be released to all users. However, during the development cycle, -proposed works differently and the Ubuntu Developers do not recommend enabling -proposed.

During Ubuntu's development cycle, all package updates are first uploaded to the proposed repository. Once the package completes a few basic checks, it is uploaded to the regular repository.

The basic checks include

Completion of the build on all supported architectures
Completion of any library transitions (libfoo2 > libfoo3)
Successful passing of any other automated testing

For many packages, this process can be completed in an hour or two.

If a user has enabled -proposed, they could experience issues with broken packages that have failed some of those basic checks. Generally, it is unnecessary to file a bug about the issue as Ubuntu Developers regularly track which packages fail one of those basic checks.

To summarize, enabling proposed during the development cycle means you have a greater risk of running buggy software and are not really improving the quality of Ubuntu much.

Source:

Ubuntu Wiki: ProposedMigration
Original ubuntu-devel mailing list post by Colin Watson


How to troubleshoot and collect bug information for Bluetooth mouse lag on high CPU load?

At the moment, I've changed cpu mode:
powersave -> ondemend (mouse working ok) -> powersave (mouse still working well)
so I'm a bit confused...


Ubuntu 16.04 LTS install freezes on Dell 7559 Laptop

Unable to comment due to lack of rep, so posting as an answer.

Refer to these answers,

My computer boots to a black screen, what options do I have to fix it?
Ubuntu install from USB stuck on splash screen

Does it help?


Installed Ubuntu with WUBI, how can I completely remove Windows Vista?

You can't delete Vista right now because you installed it using wubi.

If you want to keep only Ubuntu, you will have to reinstall Ubuntu.

First make a bootable disk or USB.
Then boot from that. And select erase Vista when choosing installation option.


permission issues with `apt-get download` "couldn't drop privileges" and "permission denied for user '_apt'

Just run the command without the sudo part:

apt-get download snap


How to conveniently install cx_Freeze for Python 3?

Download the cx-freeze-python3_4.3-0ubuntu0px0pre2_amd64.deb from Launchpad.net.

Install that .deb file with the command:

sudo dpkg -i [.deb file name]


Ubuntu 12.04 installing programs problem

Go to "Ubuntu Software Center", and search for Adobe Flash.

Then click to install Adobe Flash Plugin 10


What is the most simple example to check if X11 forwarding is working?

Instead of the ssh command you issued, try:

$ ssh -v -Y user@cluster

Add another argument -v enable the debugging mode for ssh command. Search for a line containing Requesting X11 forwarding, like in:

$ ssh -v -Y user@cluster
[...]
debug1: Requesting X11 forwarding with authentication spoofing.
[...]

After logging in, you can try the following commands for opening a X window: xterm, xclock, xcalc, xedit, etc These were already mentioned in comments.

You asked for a dialog box with a custom text, so you should try xmessage:

$ xmessage -center hello!


syntax error: unexpected end of file .bash_profile

There needs to be a semicolon or line break before the fi:
if [ -f ~/.bashrc ]; then   . ~/.bashrc; fi


How do I correctly align partions on a hdd with sector size of 4096 bytes?

I own the TP X121e (AMD E 350), too and ran into the same results that you reported.
I found a workaround. It requires a fresh install, although there might be alternatives that don't require this -- well, I haven't tried anything, but at least the following works:

A useful prerequisite was the article http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ and especially the first comment posted by JLockard on 19 November 2010.

My TP X121e has a 320GB Seagate Harddrive that uses a physical sector size of 4096byte and a logical sector size of 512byte and that's where the misalignment comes from (see mentioned article).

I haven't found any way to correctly align partitions to the 4096byte scheme neither with disk utility nor with gparted (there's an "align to MiB" option in gparted but that resulted in misaligned partitions, too).

So I reverted to the command line and used parted (that's the solution the commenter JLockard mentions, see above). And that's what I did:

I booted from my ubuntu-live-usb-flashdrive and used gparted to set up a gpt partition table (that should be possible from command line with parted, too, but I didn't want to dive any deeper in the man pages).
Then I switched to command line and set up the partitions with parted: parted -a optimal /dev/sda
The -a optimal option stands for optimal alignment and that's the thing we need. The command starts an interactive mode where you can just type in the following commands:u MiBUnits to align to should be Mebibytespshowed me that the harddrive is 305245MiBs largemkpart primary 1 20 Later on, that will be my efi boot partition (an efi partition is required to boot into ubuntu at all, as you correctly pointed out) later on (roughly 20MB, as the automatic ubuntu installation suggested in my earlier installation attempts).mkpart primary 20 25020That will be a 25000MiB / partition.mkpart logical 25020 297245 will be my 272225MiB /home partition. The rest of available space will be my swap partition (roughly 8GB -> 8GB RAM):mkpart logical 297245 100%Before proceeding, one can check if alignment is correct with align-check optimal N where N is the partition number.
Then I started the Ubuntu installer again and chose the "something different"/manual install option. Now I assigned the filesystems and mount points to the previously created partitions (1=efi-boot, 2=ext4 /, 3=ext4 /home, 4=swap). Disc utility shows a 1MB free space before the first partition and a ~375KB free space behind swap. That's due to the optimal alignment.
Installation went on... and: Nicely --or better: optimally-- aligned partitions! I don't know if that really made any difference but at least my system "feels" a little snappier.

Any suggestions for improvement appreciated.

My suggestion for Ubuntu: The disc utility of the installer should get a gui option that sets the optimal alignment for 4096byte-drives. That would be the easiest solution.


Is there a way I can get the time since my comptuer last booted?

Go to the terminal and run the 'uptime' command.


Is the mouse moving when you press one of the numbers 14789632 ?

If so, check this setting: System Settings >> Universal Access >> Pointing and Clicking tab >> Mouse Keys.

If it says On, click it to change it to Off.


Is there any game analogous to counter strike?

These are a few:

Urban Terror
America's Army
True Combat Elite


Can't get online after installing Lubuntu 15.04

To connect to PPPoE/DSL using NetworkManager on 15.04 requires installing the pppoe package, which was not installed by default on my Lubuntu 15.04.

sudo apt-get install pppoe

I've reported this bug: https://bugs.launchpad.net/ubuntu/+bug/1455219


How can I read the Haswell Uncore frequency from Ubuntu 14.04?

As explained by John McCalpin at https://software.intel.com/en-us/node/543513, I did following to get the current uncore frequency:

sudo modprobe msr
sudo wrmsr 0x391 0x20000000
sudo wrmsr 0x394 0x400000
sudo rdmsr 0x395 -d;sleep 1;sudo rdmsr 0x395 -d

First command loads the msr module. Second command set the bit 29 in  MSR_UNC_PERF_GLOBAL_CTRL which enables all uncore counters. Third command sets bit 22 in MSR_UNC_PERF_FIXED_CTRL which enables fixed uncore counter. The output of the last command, gives me the uncore clock ticks in one second.


trying to overwrite shared '/usr/share/doc/libfuse2/Makefile.gz', which is different from other instances of package libfuse2:i386

1- run apt-get autoremove as instructed in your command output

2- follow steps in https://help.ubuntu.com/community/SaucyUpgrades

3- you might want to download 13.10 ISO; burn it to a DVD, when inserted; your system will add it an update source and process the upgrade from it (I think it would be better to disconnect from Internet so that you force the update manager NOT TO go online for any repository check.


Do I need a driver for it?

No. You need a driver for the HDMI port. That is not one where you can switch drivers (same as with USB and VGA).

Settings on the TV to consider:

Resolution of the TV is 1366x768. That is about only 51% of the 1920x1080 resolution.
Formats supported: 480i, 480p, 720p, 1080i, 1080p_60, 1080p_24, 1080p_30. The numbers behind the 1080 are the frames per second. 1080i or 1080p_60 is going to be the best quality.


Incorrect screen resolution on login on a MacBook Pro 7.1

Had a similar problem, ubuntu would set the right resolution from xorg.conf, but after login the resolution would change.

If you go to Monitors in System Settings, select the resolution that you would like, and after click on "Make Default".


In order to obtain webapp integration, you should insure that you have the proper repositories (universe) enabled and install the unity-webapp-$appName for the package you want to have integrated in the menu. Then visit the site in browser and you will be offered the opportunity to install the webapp from there. There are several in the repositories available to choose from. Do hope that helps.

Have a nice day.


Does Ubuntu have a "device manager" equivalent? And what is an easy way to access USB drives?

When I googled "Linux device manager equivalent" one of the recommendations is hardinfo which I already had installed but which you can install with:

sudo apt install hardinfo

Then typing hardinfo in the terminal or calling from Dash (Alt+F2) the gui appears like this:

The comments above suggest using lspci and lsusb which are what I use most often but your question asks for a Windows "device manager" equivalent.


Linux software RAID doesn't care about this flag, as far as I know. It identifies the volumes by scanning them for the appropriate metadata on specific locations (superblocks).

You can check this yourself manually by this command:

mdadm --examine /dev/sda1                              # part of an array
/dev/sda1:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : a20e36c2:a217b925:f3fd9ffa:59263103  # Array identifier
[...]

mdadm --examine /dev/sdc2                              # not part of an array
mdadm: No md superblock detected on /dev/sdc2.

With mdadm it's also possible to create an array on a volume without any form of partitioning, so, that also indicates me it will just work without.

  Does mdadm auto-add the raid flag once you add the drives to the array and begin building?

It doesn't touch partitions or partition tables. It's not the responsibility of this layer in the Linux device mapper.

  Is there any benefit to using the raid flag since it appears mdadm seems to work with or without it?

It's just nice for your own convenience in system administration! I fail to find any other benefit.


No sound, very small icon. HP Spectre x360

Someone over on HP's support forums found a solution for the lack of sound. You should make sure you back up your computer first, as it does involve modifying GRUB's configuration. The steps are:

Edit grub config by doing:
'sudo vim /etc/default/grub'
Edit the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash'"
To:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor acpi_osi='!Windows 2013' acpi_osi='!Windows 2012'"
Then run:
'sudo update-grub'
Reboot TWO times.

You may need to alter volume or mute settings afterwards.


You can only create four primary partitions on a hard disk. In your case, you already have 3 primary partitions. So, you will need to create logical partitions from now onwards. Just to clarify, you can create 3 primary partitions, plus as many logical partitions as you want.

Ubuntu requires minimum two partitions to work. These are "/" and "swap".

When installing Ubuntu, you will have to create two logical partitions. The Ubuntu installer will give you the option to do so.

So, make some free space by moving as many items as possible away from E to some other place. Then, go to Control Panel. Click on "View by Category" in the top right. Then go to Systems and Security > Administrative Tools > Computer Management > Storage > Disk Management. Right click on E and then "Shrink Volume". This will create some free space for Ubuntu.


Sublime Text 2 command Ctrl+Shift+/ is override in ubuntu

I think the correct code for the numpad / is keypad_divide. You should be able to use it by changing the user keybindings as follow:

[
    { "keys": ["ctrl+keypad_divide"], "command": "toggle_comment", "args": { "block": false } },
    { "keys": ["ctrl+shift+keypad_divide"], "command": "toggle_comment", "args": { "block": true } }
]

Also, you seem to have an ISO keyboard, if you want to use the 7/ key for comments you have to change your keybindings like so:

[
    { "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
    { "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
]


Try this

echo on | sudo tee /sys/class/net/eth0/device/power/control

This should definitely solve the whole problem...after its done, exit sudo and pull out, then plug in the ethernet cable again


Have you tried sudo apt-get update? Do that first before proceeding with sudo apt-get install gdebi. You might find How do I resolve unmet dependencies after adding a PPA? helpful.


Possible duplicate New computer hangs on shutdown/reboot, how to troubleshoot?

You didn't give much information to help the community solve the problem. Do you get the Ubuntu logo, or is there an error message?

A temporary fix could be sudo shutdown -h now from the terminal.


Why is Unity Dash showing the Desktop under "Downloads"?

You can try checking in ~/.config/user-dirs.dirs directory and see if XDG_DOWNLOAD_DIR is correctly set there.


Can you make nautilus ask for verification before deleting a file?

The file isn't lost. It's moved to the Trash by default. You can restore it by looking in the Trash folder, selecting it, and choosing to restore the file.


Removing Kubuntu from External Drive and Reformating

Gparted

In most cases it would work to use the graphical program gparted. It is available in Ubuntu live (booted from USB or DVD), and it can be installed in installed systems,

sudo apt install gparted

Start gparted

Prepare by unmounting and swapping off all partitions on the drive and (you see lock symbols at mounted partitions and swapped on swap partitions).
The next step would be to select the dropdown menu

Device - Create partition table

to create a new partition table (GPT is the new partition table and MSDOS is the old partition table).
Now you can use the graphical interface or the dropdown menus to create partitions.

Wipe the first mibibyte

If gparted does not work, you can wipe the first mibibyte to remove data, that might cause confusion. You can use mkusb for this purpose.

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/wipe

and after that gparted should work.

Check the S.M.A.R.T. status

If there are still problems we can suspect that the drive is physically damaged, and you should check the S.M.A.R.T. status with Disks alias gnome-disks. See this link,

FSCK reports that filesystem still has errors - what should I do now?

Select file system

Depending on where and how you want the drive to work, you should select different file systems. If you want it to work easily 'everywhere' you can have a FAT32 file system, but then the maximum file size is 4 GB. If you want to manage bigger files, you should select another file system, for example NTFS or exFAT or UDF.

See the following link with detailed descriptions of how to select and create these alternative file systems.

How do I copy a file larger than 4GB to a USB flash drive?


Can't see text in text boxes using Gnomish Dark theme

Open a terminal with ctrl+alt+t, and then enter the following commands:

mkdir -p ~/.mozilla/firefox/USERNAME/chrome/

This will create a the folder(s) that Firefox will look for your .css file in. Then, move to that folder (still in terminal) with

cd ~/.mozilla/firefox/USERNAME/chrome

and then create your .css file with

gedit userContent.css  which will create a file called userContent.css in the folder you are in and open it for you to start editing.

NOTE: Replace USERNAME with your username.