Where did you install the boot loader: on the Windows or Linux disk? Choose the Linux disk.

https://www.reddit.com/r/linuxquestions/comments/95kcyw/dualboot_windows_10_and_linux_on_two_hard_drives/

I had another more explanatory source, but having trouble finding it again. Will edit when I do so.

Edit:
This is the answer which made me install the boot loader on my Linux disk:
https://forums.linuxmint.com/viewtopic.php?p=1172896#p1172896.

Similar: https://askubuntu.com/a/749354/903128.


I have broken the fstab file and now I can't start Ubuntu, how can I fix it?

I am assuming you only edited the fstab file and did a reboot. If this is true then:

Start your PC with the LiveCD / LiveUSB. Wait until you get into the Live Desktop.
Proceed to go to your hard drive and look for the /etc folder.
Paste inside the /etc the backed up fstab file (Before any editing was done).
After that reboot.


Search all folders for file for "lost, mis-filed " JPG

You can look at the command find, it can search for files and directories on a number of criterias. Something like:

find /home \( -name "*.JPG" -or -name "*.jpg" \) -type f -print

will look through all of /home and sub-directories for files with extension JPG or jpg. Note that Linux filename are case-sentisive, so you might have to look for other combinations too.

Take a look at
man find in a terminal or google for it, find is a swish army knife of possibilities.


I'm stuck between 11.10 and 12.04 with only a read-only system

boot into the recovery shell again and mount -o remount,rw / that will remount the filesystem read/write.
Then you can try to repair your system.


Dedicated swap on PCI SSD is mostly ignored by Linux

Most likely your problem stems from a misunderstanding on how to read RAM usage in Linux. You have still 29GB available, your "free -h" says so. There is no reason for your machine to use swap.

Keep in mind "cache/buffers" are not considered "used". The machine is just using RAM to speed up the machine, but that RAM is considered available.

Perhaps you need to read up on RAM linuxatemyram.com usage in Linux.

Swappiness is just a suggestion. If there is no reason to put programs in swap, the kernel won't.


The issue for me when I reset BIOS was UEFI Secure Boot was enabled. Disabling this allowed nvidia proprietary drivers to work.


Perhaps screen is being created by a user other than root and is thus not in the /var/run/screen/S-root directory, and is instead in the /var/run/screen/S-username directory.

You can try to add the screen to your root crontab instead of a user's crontab. Example:

sudo crontab -u root -e


I installed Ubuntu along with my windows10 and WANT TO REMOVE UBUNTU

you could download windows on USB drive and use it as installation source.  you need to choose repair option(this step will remove the ubuntu mbr).
once it's done you need to get back the disk space used by Ubuntu
you need to to go to disc manager and erase disc space allocated for Ubuntu and format it as ntfs.


Returning to Command Line Interface in ubuntu server

You can change your tty and there are several ways to do that, e.g:

sudo chvt 2

Will put you in tty2.

or Ctrl+Alt+F2.

use ps $(pgrep  X) command to see in which tty your X session is running, and use another.

You can also kill the X session which is not a good idea, or change the target to multiuser.target.

Alternatively you might want to stop xfce4-session:

sudo pkill -15 xfce4-session


From my experience this usually happens when the mouse button contacts are worn off... although it usually happens with the left button first.

I would test the mouse on another machine or plug another mouse into this machine and see if the problem goes away in either case. This will help you to exclude (or confirm) hardware malfunction.


How to disable MySQL server from constantly running in the background?

Does this imply that once I install mysql-server it will always be running in the background

Yes.

  unless I explicitly kill the process upon each reboot?

No, never ever ever kill mysql. Killing it can damage your database.

sudo service mysql stop will stop the current session
sudo systemctl disable mysql to prevent it starting on boot. That is done once and makes it disabled each boot. sudo service mysql start will start mysql when disabled.


Let me tell you that I don't trust HP and I think of Windows 8 is difficult and unnecessary. Do you need anything from Microsoft? So we are slaves of these companies: the latter & Apple.
I cannot supply any solution with W8 but a good idea could be to burn an image on a dvd. So did I on my computer Dell W7. Therefore both two operating systems run well.


If you have Ubuntu on a separate partition you should be able to re-install at any time without upsetting windows at all. So definitely a good idea to partition the drive out properly.

Split your linux partition into three with root or '/' with about 20 to 50 gb, a swap space with about 5 to 10 and the rest as /home, for your own programmes and data. This will make Ubuntu more stable all round.

13.10 is a development release - it's about doing development for the next stable release, which will be 14.04, so it isn't a good idea to depend on 13.10 long-term.

Your best bet is to install 13.10 and upgrade to 14.04 next April. Then you can either stick with that for the next five years or carry on upgrading every six months to make sure you have the most modern linux kernel and features installed.

If you have your linux partition nicely set up you have a better chance of trouble free upgrades in the future too!


Non-Dell Battery Not Detected on Dell Inspiron 1545

I would assume that this is a hardware issue with either the battery not reporting it's status at all or with the laptop not being able / refusing to communicate with a non-OEM part.


How can I dual boot Chromium OS alongside Ubuntu?

Now you can possibly Dual Boot Chrome OS on Windows or with any Linux Distribution.

Not some replica or some Tweaked Linux distribution which looks Chrome But Real Chrome OS

Check this Tutorial : Dual Boot Chrome OS . This tutorial consists of all the files to download and Installation Procedure required to Dual boot, They also included Video Tutorial for that.


How to make OpenCL work on 14.10 + Nvidia 331.89 drivers?

I too was confounded by this perplexing problem until I found a series of forum posts bout Virtual Lighttable in which the participants do some debugging. It turns out that the NVIDIA drivers need a custom modprobe rule that is not installed by default with either nvidia-331 or the the opencl drivers. These rules are provided in the nvidia-modprobe package.

Here is a list of all of the packages you will need to get OpenCL working on Ubuntu 14.10 with NVIDIA drivers:

sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-opencl-dev nvidia-modprobe

EDIT: In case anyone encounters a similar problem on Ubuntu 15.04 and the NVIDIA 346.59 drivers, the command to fix the issue is nearly identical:

sudo apt-get install nvidia-346 nvidia-346-uvm nvidia-opencl-dev nvidia-modprobe


1)Install kde desktop as a session; in synaptic kde-standard :

2)Then in Konsole; kde terminal:

sudo add-apt-repository ppa:ferramroberto/natty
sudo apt-get update
sudo apt-get dist-upgrade

Source
Note:This will not install ktorrent yet.
3)Go back to Ubuntu; install ktorrent from the software center or click here.
4)Don't open the program in ubuntu.First switch to the kde session and open it.
5)Then return to ubuntu and now you have Ktorrent 4.1.1 in Ubuntu!! :D


How to restore my HDD after try Ubuntu LiveUSB?

After you get a LiveUSB or LiveCD you will need to boot from it. To change the boot you don't need to modify your HDD.

And after you boot from it, if you only Try it, your HDD wont be modified neither.

Remember that you can try Ubuntu from the Ubuntu Web Site using nothing more than your web browser!

Conclusion: after try Ubuntu you wont need to restore your HDD because it will not (should) be modified on the process..


Method for screen sharing of one window only

I have discovered that chromium still supports casting a single application window. In Wayland this is somewhat limited - only certain application windows are listed to be selected. I'm not sure what determines what can be cast. Terminal windows can't, but xournal - which is what I'm mainly after - does work.


Help installing Microsoft office 10 in Ubuntu 14 64 bits using Winetricks

The "Mono is not installed" message is normal, just click OK.


Open Software & updates

Change the server from Download from:

For best download speed choose your country or a country next to you.
Alternatively, let ubuntu test and decide the fastest server by clicking the Select best server button.


Found this link that worked perfectly: https://www.andreagrandi.it/2014/09/02/configuring-ddclient-to-update-your-dynamic-dns-at-noip-com/

  noip.com is one of the few dynamic DNS free
  services that are reliable to use. If you have, like in my situation,
  a Raspberry Pi connected to your home DSL and you want it to be always
  reachable without knowing the current IP address (the IP could change
  if you have a normal DSL service at home), you need a dynamic DNS
  service.

  To update the noip.com one you just need ddclient, a tool that is
  available in Raspbian/Debian repository. You can install it with this
  command:
        sudo apt-get install ddclient

  then you just need to edit /etc/ddclient.conf

protocol=dyndns2
ssl=yes
use=web, web=checkip.dyndns.com/, web-skip='Current IP Address: '
server=dynupdate.no-ip.com
login=yourusername
password=yourpassword
yourhostname.no-ip.org

  and restart the client:

sudo /etc/init.d/ddclient restart

  Please remember that noip.com free accounts have a limitation: they
  need to be confirmed every 30 days (You will receive an email and you
  need to click on the link contained to update your DNS).

Thanks to @NickSillito for the ddclient tip.


This sounds like it could be a problem between a 32bit and 64bit architecture.

Is the CPU you're compiling your code on the same as the other machines you're trying to run it on?

If you're compiling your code on a 32bit machine and trying to run it on a 64bit installed version of Ubuntu this could be your problem.

To install 32bit libraries, allowing you to run 32bit executables on a 64bit install:

sudo apt-get install ia32-libs


If this concerns a launcher that you placed on the desktop, then find the corresponding .desktop file in your Desktop folder, open it with a text editor and edit the Exec= line.
For a launcher that appears in the Application overview which you want to edit, copy the launcher .desktop file from the system folder /usr/share/applications (or possibly other places for applications installed as a snap package) to the folder .local/share/applications under your home folder. .local is a hidden folder. Turn "view hidden files" on in the file manager to see that folder in your home folder. Customize the launcher by editing the .desktop file.


I recommend to generally use another account, i. e. "Guest Session" for other users.


Ubuntu installer to only install selected packages

The InstallCustomCD page has all the information you need to create a custom installer.

However I personally just automate the install using preeseeding instead of customizing a CD. That way I can use whatever vanilla Ubuntu CD and just add my changes on top of it as part of the install process.


google chrome full reset? huge bars and default zoom issues

The Google Chrome configuration is stored in ~/.config/google-chrome. You can try deleting or moving that folder.


It might be related to AVX2 instructions.
Support recommends downgrading to candidate branch if AVX are not supported.
snap refresh wickrme --channel latest/candidate

https://support.wickr.com/hc/en-us/articles/1260806179370-Linux-Won-t-Open


Easiest thing to do, if you can some how plug in your new hard drive at the same time the old one is plugged in:

1) Boot into a liveCD or liveUSB of a linux distro (any distro!)

2) Identify which /dev/sdX each one is (your 256 is likely /dev/sdb and the 512 will be /dev/sdX where x can be b, c, d...) Check out gparted and see what you see on the top right (sudo apt-get install gparted if you don't have it installed and you booted into a debian/ubuntu based distro)

3) Now that you know which is which (Make sure you do!) run the following command. For the purpose of this command I'll assume that your smaller SSD is /dev/sdb while the larger is /dev/sdc

sudo dd if=/dev/sdb of=/dev/sdc bs=4M

4) This will take a while, a long while. Once it's done, open up gparted and you'll notice that the there's a 256 GB portion that should match your other 256 GB with 256 GB free at the end. Simply extend your main partition into the unallocated space at the end and you should be good to go.

I'm not sure that this will work properly with the encryption + LVM, but I don't see any glaring reasons why not.


Figured out the problem. It was an overscan/underscan issue with my display in the Catalyst Control Center. I fixed the issue by going to display manager, expanding it, then going to DTV adjustments. Set overscan to max. Problem fixed!!!!


I have a problem with install Ubuntu (laptop HP)

Choose nomodeset option with LiveCD (F6).

Source and credit: comments from CoolDark above


Why is the default wallpaper in jpg format, rather than a lossless format like png?

There is the issue of space on the Live CD which is the primary distribution channel, but my understanding is that this is simply a legacy thing that has not yet been reviewed.

The difference between jpg and png when it comes to wallpaper is not all that important when you consider that wallpaper is not something that is carefully scrutinized as its often behind active windows.

If you feel strongly, and have comparable images to submit highlighting the advantages, create a bug report on Launchpad.


Console text editor with "Windows-like" shortcuts (CTRL+A, -C, -X, -V, Shift+End, Shift+Up ...)

FTE Text Editor is a good choice for windows like shortcut like shift + down key for text selection, Ctrl+z for undo, Ctrl+C and Ctrl+V.

Installs with sudo apt install fte and runs with fte

It looks like this:


Problems with floating arithmetic in bash

If your tempf.out file has DOS-style line endings (CR-LF) then you will need to fix that - either at the file level using dos2unix, tr, or sed for example, e.g.

a=$(sed 's/\r$//' tempf.out)
bc <<< "$a*2"

or by removing it from the $a variable using the shell's parameter substitution capabilities e.g.

a=$(<tempf.out)
bc <<< "${a%^M}*2"

where the ^M is an actual carriage return composed using Ctrl+V Ctrl+M


Run lsblk to get the usb drive's whereabouts. For example, here's mine:
pekka@BIG-IRON:~$ lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                    7:0    0  55,4M  1 loop  /snap/core18/1932
loop1                    7:1    0 118,4M  1 loop  /snap/chromium/1424
loop2                    7:2    0 162,9M  1 loop  /snap/gnome-3-28-1804/145
loop3                    7:3    0  56,2M  1 loop  /snap/bitwarden/33
loop4                    7:4    0  31,1M  1 loop  /snap/snapd/10492
loop5                    7:5    0  64,8M  1 loop  /snap/gtk-common-themes/1514
sdb                      8:16   1  14,5G  0 disk
├─sdb1                   8:17   1   2,1G  0 part
├─sdb2                   8:18   1     4M  0 part
└─sdb3                   8:19   1  12,4G  0 part
nvme0n1                259:0    0 953,9G  0 disk
├─nvme0n1p1            259:1    0   512M  0 part  /boot/efi
├─nvme0n1p2            259:2    0   732M  0 part  /boot
└─nvme0n1p3            259:3    0 952,7G  0 part
  └─nvme0n1p3_crypt    253:0    0 952,6G  0 crypt
    ├─vgkubuntu-root   253:1    0 930,4G  0 lvm   /
    └─vgkubuntu-swap_1 253:2    0   976M  0 lvm   [SWAP]

From this, I can see that my usb is at /dev/sdb.
Then, run dd if=imagefile.dmg of=/dev/sdb. You'll probably be prompted for root password.
dd is very silent, so there won't be any response from the terminal for a while.
I haven't used dd for dmg files, but it should work.


Easier way to connect to Bluetooth device

Take a look at a similar question/answer here.

First, the MAC Address of the Bluetooth device is needed. You can find it by running the following commands:

sudo systemctl start bluetooth
bluetoothctl (a new bash prompt "[bluetooth]#" will be visible after running this command)
devices
Look for the MAC Address of your Bluetooth device by searching through the names of the device listed, assuming the device is powered on and visible.

Finally, run the following commands which start the Bluetooth service and passes the commands through the echo program. These two commands are what you need to connect to your bluetooth device over the terminal.

sudo systemctl start bluetooth
echo -e 'connect YOUR_DEVICE_MAC_ADDRESS \nquit' | bluetoothctl

This can be put in a bash script and the bash script can be automated to run upon startup.


Unable to format USB: mkfs.vfat: unable to discover size of

Probably your partition table is corrupted.  The easy way to move forward is to open gparted and and in the top right go to /dev/XdYand select the disk you want to edit:

This will destroy everything on the USB stick!

Go to the menu Device
Then Create Partition Table
Then msdos
Press  OK

Now you can create new partitions the way you want them...
If the above fails: Your USB stick is toast!  Throw it away and buy a new one!


So you want to replicate the (single) content of two.txt after each line of one.txt. Given

$ cat one.txt
abc def
ghi jkl
mno pqr

and

$ cat two.txt
23

then modifying your attempted solution slightly:

$ paste one.txt two.txt | awk 'NR==1 {x = $NF} NR>1 {$(NF+1) = x} 1'
abc def 23
ghi jkl 23
mno pqr 23

Alternatively with awk only:

$ awk 'FNR==NR {x = $1; next} {print $0, x}' two.txt one.txt
abc def 23
ghi jkl 23
mno pqr 23


rc.local only executing after connecting to ethernet?

By default, /etc/rc.local runs after the network connection is established. This is specified in the drop-in file /lib/systemd/system/rc-local.service.d/debian.conf:

$ sudo systemctl status rc.local
● rc-local.service - /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
           └─debian.conf
   Active: active (exited) since Sat 2017-02-11 00:31:50 EET; 2h 33min ago
    Tasks: 0
   Memory: 0B
      CPU: 0

Feb 11 00:31:50 libellio systemd[1]: Starting /etc/rc.local Compatibility...
Feb 11 00:31:50 libellio systemd[1]: Started /etc/rc.local Compatibility.

$ cat /lib/systemd/system/rc-local.service.d/debian.conf
[Unit]
# not specified by LSB, but has been behaving that way in Debian under SysV
# init and upstart
After=network-online.target

# Often contains status messages which users expect to see on the console
# during boot
[Service]
StandardOutput=journal+console
StandardError=journal+console

While this default setting is fine for the kind of services which are usually started from rc.local, for your specific use-case you may want to change that setting.

Copy the service file /lib/systemd/system/rc-local.service to /etc/systemd/system. Then opy the drop-in configuration file to /etc/systemd/system/rc-local.service.d/ (make the directory if needed), then edit the copy and comment out the line After=network-online.target.


Cannot install latest version of GnuPG from source

Ubuntu Xenial installs GnuPG 2.1.11, which is available as gpg2 binary. There is a gpg which is from version 1.14. The latest version is 2.1.15. You need to install it from source by compiling if you wanted that version.

To compile from source, you need to first get the updated libraries of these packages -

npth         (ftp://ftp.gnupg.org/gcrypt/npth/)
libgpg-error (ftp://ftp.gnupg.org/gcrypt/libgpg-error/)
libgcrypt    (ftp://ftp.gnupg.org/gcrypt/libgcrypt/)
libksba      (ftp://ftp.gnupg.org/gcrypt/libksba/)
libassuan    (ftp://ftp.gnupg.org/gcrypt/libassuan/)

1. Installing npth

Download the version 1.2 of npth

wget ftp://ftp.gnupg.org/gcrypt/npth/npth-1.2.tar.bz2

Unpack

tar xf npth-1.2.tar.bz2

Go to it's dir and build it

cd npth-1.2
./configure
make
sudo make install

2. Install libgpg-error

Download the version 1.24

wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.24.tar.bz2

Unpack, cd to the directory, configure, make & install

tar xf libgpg-error-1.24.tar.bz2
cd libgpg-error-1.24
./configure
make
make check
sudo make install

3. Install libgcrypt

Download the version 1.7.3

wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.3.tar.bz2

Unpack, cd to the directory, configure, make & install

tar xf libgcrypt-1.7.3.tar.bz2
cd libgcrypt-1.7.3
./configure
make
make check
sudo make install

4. Install libassuan

Download the version 2.3.4

wget https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.4.3.tar.bz2

Unpack, cd to the directory, configure, make & install

tar xf libassuan-2.4.3.tar.bz2
cd libassuan-2.4.3
./configure
make
sudo make install

5. Install libksba

Download the version 1.3.4

wget https://www.gnupg.org/ftp/gcrypt/libksba/libksba-1.3.4.tar.bz2

Unpack, cd to the directory, configure, make & install

tar xf libksba-1.3.4.tar.bz2
cd libksba-1.3.4
./configure
make
sudo make install

6. Now Install gnupg2

Download version 2.1.15

wget https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-2.1.15.tar.bz2

Unpack, cd, configure

tar xf gnupg-2.1.15.tar.bz2
cd gnupg-2.1.15
./configure
make
sudo make install

After installation, you should is complete, check the version. But before that use this command to so that newly installed libraries can be loaded.

sudo ldconfig

Then to check version

gpg2 --version

You can also check where it is installed with

which gpg2

It should return

/usr/local/bin/gpg2

Hope that helps.


Where is the keybinding located in dconf for v for Ubuntu 19.10?

It is in the system keyboard shortcuts..

The gsettings thing is

org.gnome.shell.keybindings toggle-message-tray ['<Super>v', '<Super>m']

to remove the binding Super+V you can run

gsettings set org.gnome.shell.keybindings toggle-message-tray "['<Super>m']"

for dconf way..

dconf write /org/gnome/shell/keybindings/toggle-message-tray "['<Super>m']"

for resetting to default

dconf reset /org/gnome/shell/keybindings/toggle-message-tray


Black Screen after Installing Ubuntu 20.04 LTS

I have updated Ubuntu 19.10 to 20.04 on my laptop Dell Latitude 7490. After reboot I had the same problem.

Machine: Dell Latitude 7490

Dual boot Ubuntu 20.04 + Windows 10 (it was working fine with 19.10)

Bios: Uefi, security OFF.

I tried:

Сhanging boot mode from here and boot settings from here - Ubuntu 20.04 black screen after installing, no booting
Booting from Advanced options for Ubuntu different kernels - How to access Advanced Options in GRUB?

None of the steps helped

Then I did next:

Boot from Live USB Ubuntu
Install Boot-Repair - http://ubuntuhandbook.org/index.php/2016/11/install-boot-repair-ppa-fix-boot-problems/
Run Boot-Repair
Choose "Recommended repair"
Programm recomended execute some commands in terminal - I did it
Run Boot-Repair again
Choose "Recommended repair"
Programm recomended execute some commands in terminal again - I did it
Boot-Repair print this messege

  An error occurred during the repair.

  Please write on a paper the following URL:
  https://paste.ubuntu.com/p/sfyBwkyNGV/

  In case you still experience boot problem, indicate this URL to:
  boot.repair@gmail.com

  You can now reboot your computer. Please do not forget to make your
  BIOS boot on sda1/EFI/ubuntu/shimx64.efi file!

  If your computer reboots directly into Windows, try to change the boot
  order in your BIOS. If your BIOS does not allow to change the boot
  order, change the default boot entry of the Windows bootloader. For
  example you can boot into Windows, then type the following command in
  an admin command prompt: bcdedit /set {bootmgr} path
  \EFI\ubuntu\shimx64.efi

Reboot
Success!


How to move a window between monitors with Gnome Shell?

The following works for me (Ubuntu 12.10, Gnome Shell):

Ctrl + Alt + NUMPAD 6 moves the active window to the screen on the right

Ctrl + Alt + NUMPAD 4 moves the active window to the screen on the left

Note that, for some applications like Firefox and Thunderbird, this does not work for maximized windows for me -- the window seems to be moving, but only until I release the keys. This could be a bug in the corresponding applications or Gnome Shell. As a workaround, I unmaximize first using Ctrl + Alt + NUMPAD 5, and maximize back later with the same combination.

This is inspired by answers from How to move windows around and between monitors, using keyboard short cuts?.

EDIT: For some obscure reason these shortcuts stopped working for me. Super + NUMPAD 7 and Super + NUMPAD 9 achieve a similar effect.


Every time I try to upgrade from Ubuntu 13.04 to 13.10, it fails

You can always use gparted to extend your /boot partition.

For more information refer this question
How do I resize my /boot partition?


As far the second folder in the screenshot is concerned, your hostname.d service has PrivateTmp=true declared in the systemd file, that's why it is appearing here. You can disable this behavior by updating /etc/systemd/system/hostnamed.service file and changing the value of PrivateTmp=false.
For more details, you can see this: https://blog.oddbit.com/post/2012-11-05-fedora-private-tmp/


Simplest way:

Create a folder in your home folder
called webroot (it can be called
anything you like, but webroot or www
would seem logical)
symlink the webroot folder in your
home directory to the location of
your xampp htdocs directory. sudo ln
-s ~/webroot /path/to/xampp/htdocs
alternatively you can point the
document root value (which i believe
is found in httpd.conf - dont quote me
on that, i only use xampp on windows
and it may be different on linux) to
point to the directory in your home
folder.

You can then use the folder in your home directory as you would any other directory, since its in your home folder, and owned and created by you there shouldn't be any permissions problems. This will act as if you were placing the files in htdocs, so you can run php etc. files as you normally would. Ill also state that personally i use the lamp server available from the tasksel command, as i found theres generally more help available for this.


Open multiple files at the same time using a shell script

First of all, there is no need to cd into a directory in order to open a file in it. You can just use the full (or relative) path to the file. So instead of cd foo and then libreoffice bar.doc, you can just do libreoffice foo/bar.doc.
Now, the next issue is opening multiple files. When you run a script, each command in that script will be executed sequentially and the script will wait for the first command to finish before launching the second. That's why your script was only opening one file, it was waiting until the first libreoffice process exited to move on to calling evince.
If all you need is to open two files, all you need is:
#!/bin/bash
libreoffice '/home/me/Dropbox/00-School/03-TA POLI 397/Assignment'/grading-instructions.odt &
evince '/home/me/Dropbox/00-School/03-TA POLI 397/POLI 397 Assignment.pdf '

You don't even need a script for this. You can paste this directly into a terminal:
libreoffice '/home/me/Dropbox/00-School/03-TA POLI 397/Assignment'/grading-instructions.odt &
evince '/home/me/Dropbox/00-School/03-TA POLI 397/POLI 397 Assignment.pdf'

The trick is to use the & after the first command to send it to the background and allow the shell to move to the next command.
You can simplify further by using xdg-open which will find the default program to handle each file and with xdg-open, you don't even need to send the first to the background since xdg-open will return as soon as it launches whatever program is used for the relevant file type:
#!/bin/bash
xdg-open '/home/me/Dropbox/00-School/03-TA POLI 397/Assignment'/grading-instructions.odt
xdg-open '/home/me/Dropbox/00-School/03-TA POLI 397/POLI 397 Assignment.pdf'

With this in mind, you can write a general script that takes a list of N file names as input and opens each of them:
#!/bin/bash

## Iterate over all file names given on the command line
for file in "$@"; do
    ## open each file
    xdg-open "$file"
done

If you save that as ~/bin/openFiles.sh and make it executable (chmod a+x ~/bin/openFiles.sh), you can now run:
openFiles.sh '/home/me/Dropbox/00-School/03-TA POLI 397/Assignment'/grading-instructions.odt'
'/home/me/Dropbox/00-School/03-TA POLI 397/POLI 397 Assignment.pdf'

and it will open each file in the appropriate tool and will work with as many files as you want to give it.


W10 --> creating new folder on samba share creates 4 folders

I had the same issue. Resolved it by adding "Everyone" "All" permissions.


how to install 13.04 on a partitioned hardrive

If I remember correctly, a 13.04 install CD could upgrade/fix a broken Ubuntu install. Download the installation CD, burn the iso into a CD (your Ubuntu version should have Brasero installed, it works fine with CDs) and boot from that CD. Once you have done that, follow the instructions that will appear on the CD, they're pretty self-explanatory.


USB Stick with the latest distro packages.

I haven't tried it, but this article describes a way to upgrade an iso file without re-downloading it.


How do I map a mouse's scroll wheel to up and down array keys in Ubuntu Server?

This is not straightforward.

It is however possible using a bit of programming to make a command line filter to prove the concept. For instance in Python (see below).

This filter would take the standard input (i.e. your keyboard) and pass it on to standard output. It must also capture mouse data and when it sees scroll wheel data add arrow up or down to standard out.

You can capture mouse output on /dev/input/mouse (or mouse0 or mouse1)

You then start it as:

sudo ./filter.py | bash

A crude, working concept is here:

#!/usr/bin/python

import fcntl
import os
import sys

# make stream a non-blocking file
f = open('/dev/input/mouse0')
fd = f.fileno()
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)

while (True):
    key = sys.stdin.read(1)
    sys.stdout.write(key)
    sys.stdout.flush()
    try:
        mouse = f.read(1)
        sys.stdout.write('date\n')
        sys.stdout.flush()
    except:
        continue

It will execute all commands you enter (no prompt though) and when you move the mouse, and then hit enter it will execute the 'date' command.


I have the same problem with Cheese and on Skype I get a black screen but no message. The Audio via the webcam microphone works in Skype and elsewhere. Cheese has worked before and then suddenly does not work. I cannot identify what change I have done that has caused this.


HDTV recognized as 7-inch screen causes wrong DPI settings

After many research, this appears to be a bug in GNOME 3. This link offers a workaround, and while it's not perfectly sized, it's still an improvement from the previous scaling


Open System Settings.
Click on Software Sources.
Remove check for the cdrom.
Select the Other Software tab.
Remove the check boxes for the sun-java PPA.


Performance issue when user's home directory have large number of files

Directories grow over time. If you add many files, the space needed to store the entries grows. This may in extreme cases, and yours may be such one, slow down file search and file access.

Two steps are needed to tackle your problem:

Prune extraneous files and folders. Pruning extraneous files will to a large extent remain a manual task. Although clean-up programs such as Janitor may help cleaning up extraneous files, it essentially will remain a manual task to inspect your hidden folders, see whether the corresponding application is still installed and used before deleting the hidden directory.
Optimize the folders.  In general, this can be achieved by copying the folders and delete the originals. However, file system tools may provide means to do this without having to re-copy the data. With the ext4 file system, the option -D will cause the file system to be optimized. If for example an ext4-formatted file system is referred to as /dev/sdb1, following command will check the file system and optimize it: sudo e2fsck -D /dev/sdb1. Note that a file system that you check cannot be in use.

Yet, it allegedly is better practice to start anew every few years, i.e., perform a full fresh install from time to time. This automatically will cause you to safely get rid of superfluous files and folders that accumulated over the years, and refresh your file system. To that aim, make sure your backup is up to date, then reinstall the system wiping everything out, then reinstall (only) the applications you effectively use and copy your data back into the new installation.


Changes in grub configuration file not allowingg to login in ubuntu 14.04

Boot your computer. When the GRUB menu (the one that lets you select your OS) shows up, select Ubuntu and press 'e'. If this menu does not appear, keep pressing Shift right after the computer boots until it does.

After pressing 'e' on Ubuntu you will see some kind of text editor. Find the line that begins with linux and go to its end. Remove nomodeset from the end of the line and press F10. Ubuntu should boot.

Open a terminal window and run the following commands:

sudo gedit /etc/default/grub

Change the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash".

Save the file and exit. Then run:

sudo update-grub

Your system should be fine. Reboot and test it.


Ubuntu 12.10 fails to reconnect to wireless


Wireless Xbox 360 controller on Humble Bundle V

xboxdrv allows you to do full keyboard and mouse emulation, so it can do everything you need. An example config would look something like this (haven't looked at what keys Braid and SMB use, so you have to change them):

[xboxdrv]
ui-clear=true

[ui-buttonmap]
DU=KEY_UP
DD=KEY_DOWN
DL=KEY_LEFT
DR=KEY_RIGHT

A=KEY_ENTER
B=KEY_SPACE
X=KEY_A
Y=KEY_Z

START=KEY_ESC

[ui-axismap]
X1=KEY_LEFT:KEY_RIGHT:12000
Y1=KEY_UP:KEY_DOWN:12000

Use it with:

sudo xboxdrv -s --config path_to_config.xboxdrv


Login Loop and Missing Sidebar - Ubuntu 13.04

Try it once hope it would help you

1st Method

Try to reconfigure lightdm (if it doesn't solve your issue then go for 2nd Method)

Open terminal(CTRL+ALT+T) and execute following command:

sudo dpkg-reconfigre lightdm

Then chose lightdm from the list. As shown below:

(source: akamaihd.net)

Restart your system:

sudo reboot now

It may fix your issue. If doesn't fix then follow 2nd Method.

2nd Method

Installing a new display manager can fix your problem. Steps to install GDM(a display manager much like lightdm):

Open terminal(CTRL+ALT+T) and execute following commands:

sudo apt-get install gdm
sudo dpkg-reconfigure lightdm

then chose gdm from the list:

(source: akamaihd.net)

    sudo reboot

If it's still not fixed, try removing lightdm after installing gdm:

sudo apt-get remove --purge lightdm
sudo reboot

Hope these methods solve your issue. Reply for further assistance.


How to Duplicate a Ubuntu System for Distribution?

Duplicating a Ubuntu System for Distribution
1) Create Image file from existing operating system:

Boot Live Ubuntu USB and insert Full install, (or Persistent), USB to be copied.

Create an image file of the Full install USB, (or Persistent USB), using Gnome-Disks.

2) Truncate image for distribution, remove unwanted space from end of image file.
Example: Removes NTFS Microsoft basic data partition from end of drive.
Input
ubuntu@ubuntu:~$ cd /media/ubuntu/DATA/
ubuntu@ubuntu:/media/ubuntu/DATA$ fdisk -l DiskImageofsdd.img

Output
Disk DiskImageofsdd.img: 28.66 GiB, 30752636928 bytes, 60063744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 82741D01-6511-4A8A-8FDF-52D8C165C178

Device                 Start      End  Sectors   Size Type
DiskImageofsdd.img1     1953     3906     1954   977K BIOS boot
DiskImageofsdd.img2     3907   503906   500000 244.1M EFI System
DiskImageofsdd.img3   505856 44578815 44072960    21G Linux filesystem
DiskImageofsdd.img4 44578816 60061695 15482880   7.4G Microsoft basic data

Input
ubuntu@ubuntu:/media/ubuntu/DATA$ truncate --size=$[(44578815+1)*512] DiskImageofsdd.img

3) Compress image for distribution:

For xz compression using 7Zip. Install 7Zip for Windows: https://www.7-zip.org/a/7z1900-x64.msi or for Ubuntu P7Zip Desktop from the Ubuntu store. Once 7Zip has been installed on Windows or Ubuntu, flashing tool should work without first decompressing xz file..

PKZip compression, may also be used but is not as tight.

4) Virtual Machine: Convert .vdi file to .img file that can be flashed to bootable USB.

Open VirtualBox

cd to folder that contains ubuntu.vdi and run:

VBoxManage clonemedium --format RAW ubuntu.vdi ubuntu.img
5) Install Image File to target drive
Caution: The target drive will be overwritten.

Use the pancake icon in Disks or use Etcher, Rufus, dd or mkusb when you want to restore or clone the image to another drive.

6) Create Installer Drive for Image File.

Use Etcher, Startup Disk Creator, dd, mkusb, etc to make Live USB.

From another Linux drive, convert new writable partition to NTFS partition using:

ubuntu@ubuntu:~$ sudo mkfs.ntfs -f -L usbdata /dev/sdx3
Where sdx is the Live drive.

Place the OS image file in the NTFS partition of the Live USB, where it can be flashed to a target drive from the Live USB when required.


Just reboot your device by keeping the power button pressed. After this reboot it will work.


First, you can't have 5 primary partitions!!! The max number of primary partitions would be 4 Unless you use GPT, and choosing 4 primary partitions is not that smart idea in general as you'll not be able to add new partitions if needed, instead you should use extended partition that may include many logical partitions.

Now For having triple or quad boot,a simple answer is yes you can do, but always you have to think in order, windows must be installed before Linux since Windows bootloader will not discover your *NIX, while GRUB could easily discover other OS.

Those are some links that would help you:

How do I triple-boot Ubuntu, Fedora and Windows 7?
http://www.linuxbsdos.com/2014/06/05/triple-boot-windows-7-and-8-and-ubuntu-14-04-on-a-pc-with-uefi-firmware/
https://unix.stackexchange.com/questions/155396/how-to-have-triple-boot-linux-mint-17-cinnamon-ubuntu-14-04-windows-8
https://help.ubuntu.com/community/MacBook/TripleBoot


How to make Unity 2D show the whole application when clicking its icon?

No, I don't think so. The behavior that you are describing for Unity 3D depends on Compiz (scale plugin). Using Unity 2D normally you don't have a compositing window managers like Compiz working, witch would be necessary for those kind of effects.


How can i run Huwei E173 data card on 10.04?

Install Huwaei Mobile Partner!
Here is an externel download link for Huawei Mobile Partner 21.(Sometimes it already comes inside your dongal) Download and install it at your own risk. Perform a reboot after the installation and, network manager  will identify your device within 3 minutes.
Installation
There should be script file called "install.sh" or a similar one inside the Huawei Mobile Partner package. View the Properties of that file, and navigate to the Permissions tab. Tick the check box, Execute, and enter the below command in Terminal to begin the installation:

sudo install.sh

You have to give the path of the install.sh instead of just typing Install.sh
After installing the driver you will be able to connect to the internet. If not, try a different version Huawei Mobile Partner.


I think I deleted Windows 7 when trying to install Ubuntu 11.10

NO YOU ARE NOT

Follow these steps to recover your windows instalation!!!

Step1

Turn On your computer.
Go to bios.
Set the boot media to CD/DVD
Put the windows 7 DVD(or recovery disk) in to the drive.
Boot from the DVD

Step2

Start windows repair(if you use windows 7 DVD or if you are using recovery it will automatically show repairing option)
Allow the utility to repair startup.
If utility found a error and fixed it reboot the machine and enjoy!!

If it failed.. follow step 3.

Step3

Open command prompt in recovery mode.
Type diskpart hit enter
Then type list disk hit enter
Then select your disk(you can find it by size) - use select disk x to select the disk. Replace x by relevant number.
Then type list part hit enter.
Then select primary disk with mb in size(not in gb) - use select part x to select the part. Hit enter.
Then type active hit enter.
Close the command prompt and again run the startup recovery tool.

Enjoy!!!


Ubuntu 14.04 stuck in gui login loop and after fix attempt no login gui

After several attempts with no clear solution I have managed to get back to a successful login with a unity launcher session and everything looks fine so far. The steps I took are as follows:

I removed the proprietary graphics card driver using sudo apt-get remove fglrx*. Upon reboot this didn't seem to change anything.
I decided to remove not only the .Xauthority file but all related files using sudo rm .Xauth* after which I could log in but had no unity launcher or status bar etc, only the background and icons.
I tried to reinstall unity and ubuntu-desktop using sudo apt-get install --reinstall unity and sudo apt-get install --reinstall ubuntu-desktop, which also didn't change anything.
I tried to use a graphical method of resetting unity based on this link, which didn't seem to change a thing.
I this same link it states to dconf reset -f /org/compiz/ I got some message to state that the path was not correct, after that using unity --reset-icons &disown seems to have corrected everything and I could log in with a full unity launcher session.


Where are GTK_IM_MODULE and GTK_MODULES set?

Yes, that is most likely the cause.
As regards your question why ~/.xinputrc would contain that, it's a long story. In short it's about various attempts historically to achieve a sensible default configuration. I assume that you installed Ubuntu some years ago, and later upgraded to 20.04.
My advice: Just delete ~/.xinputrc and reboot. It won't return unless you actively change the input method configuration via e.g. Language Support.


#include <string> is a C++ directive.

Rename your file to kai.cpp

And compile it with g++ kai.cpp -o kai


This sound like an issue with Chrome. However, you can install this daemon which will significantly improve launching apps on start-up. It is called Preload. Here is the summary of what Preload, taken from the Ubuntu Software Center:

preload monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times.

Note that installing preload will not make your system boot faster and that preload is a daemon that runs with root priviledges.

I have used it, and found that when I get to my desktop, from boot, programs like Firefox, launch significantly faster.

To install it, either open the Ubuntu Software Center, and search for preload, or for Terminal users, open the terminal (Alt+Ctrl+T) and enter:

sudo apt-get install preload

Simple as that. Please report if it make Chrome open quicker. I hope this helped.


The simplest way to resolve this would be to use .htaccess rules. Here's a little template for you:

Create a file in your /public directory called .htaccess

Paste this into the file:
Options +MultiViews +FollowSymLinks
Options -Indexes

DirectoryIndex index.php

<FilesMatch "\.(htaccess|htpasswd|inc|log|sql|user|token)$">
        Order Allow,Deny
        Deny from all
</FilesMatch>

Some of these rules can also be added to your <directory> entry in the domain configuration file (probably in /etc/apache/sites-available).

This .htaccess file will allow people to access files that are linked symbolically (within reason) and prevent directory indexes from being presented. It will also automatically direct someone to index.php if they just type your site's domain without a file name specified. If you do not have index.php, create an index.html with something in there and change the DirectoryIndex value accordingly.
In the <FilesMatch> section, files with certain extensions are specifically being blocked from external access. So if you had a file named database-backup.sql sitting in the /public directory (a bad idea, regardless), it would not be downloadable.
This is not a complete solution with regards to ensuring people do not scan your entire server, but it does reduce the ease that people might have doing so.
Hope this helps.


How do a mount a NAS (WD, MyBookLive) so i can add media to a plex server?

Finally with the post and comments above I could figure it out (MyBookLive connection, Ubuntu 18.04)
The bit that helped was the SMB version (vers=1.0). For the sake of clarity:

//192.168.1.55/Videos /mnt/wdvideos cifs guest,vers=1.0 0 0


I would read this article about setting up an SSD for ubuntu:

http://www.howtogeek.com/62761/how-to-tweak-your-ssd-in-ubuntu-for-better-performance/

128 gb is an enormous amount of space for /. I have a separate partition for / and /home and my / is well under 16 gb. I think that is probably enough.

You can keep /home on the SSD and link the Downloads, Music and Video folders out to the external HDD


How to download a .tar.gz file from a redirected link in terminal?

From man wget:

   -O file
   --output-document=file
       The documents will not be written to the appropriate files, but all will be
       concatenated together and written to file.  If - is used as file, documents
       will be printed to standard output, disabling link conversion.  (Use ./- to
       print to a file literally named -.)

       Note that a combination with -k is only well-defined for downloading a single
       document.

wget http://www.snort.org/downloads/1806 -O test.tar.gz
--14:43:10--  http://www.snort.org/downloads/1806
           => `test.tar.gz'
Resolving www.snort.org... 23.23.143.164
Connecting to www.snort.org|23.23.143.164|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://s3.amazonaws.com/snort-org/www/snort-current/20120718
/daq-1.1.1.tar.gz?AWSAccessKeyId=AKIAJ65S5YX6KA26VRJQ&Expires=1373294936&
Signature=MsjjmadNXZO2b9e8Pi8IrJJjw6M%3D [following]
--14:43:10--  http://s3.amazonaws.com/snort-org/www/snort-current/20120718
/daq-1.1.1.tar.gz?AWSAccessKeyId=AKIAJ65S5YX6KA26VRJQ&Expires=1373294936&
Signature=MsjjmadNXZO2b9e8Pi8IrJJjw6M%3D
           => `test.tar.gz'
Resolving s3.amazonaws.com... 176.32.99.38
Connecting to s3.amazonaws.com|176.32.99.38|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 472,223 (461K) [binary/octet-stream]

100%[==========================================>] 472,223      664.17K/s

14:43:13 (662.69 KB/s) - `test.tar.gz' saved [472223/472223]

$ tar tvfz test.tar.gz
drwxr-xr-x 0/0               0 2012-07-10 19:51 daq-1.1.1/
-rwxr-xr-x 0/0           13663 2012-07-10 19:32 daq-1.1.1/install-sh
-rw-r--r-- 0/0           20997 2010-09-23 19:12 daq-1.1.1/COPYING
-rw-r--r-- 0/0           34823 2012-07-10 19:32 daq-1.1.1/aclocal.m4
-rw-r--r-- 0/0           22768 2012-07-10 19:33 daq-1.1.1/Makefile.in


Try using Wine to open lockdir.exe. See How can I install Windows software or games?


I'm wondering if you're using the right bundle(s).

When using OpenContrail, the latest package build from OpenContrail PPA is 2.21 and can be deployed with OpenStack Juno using this bundle:

http://bazaar.launchpad.net/~sdn-charmers/+junk/contrail-deployer/view/head:/bundles/contrail-trusty-juno.yaml

I've tested this deploys fine using Juju 2.1.1, MAAS 2.1.3. It should just work.

If deploying Contrail (requires license + package files from Juniper - https://www.juniper.net/support/downloads/?p=contrail#sw), you can deploy Contrail 3.2+ using an OpenStack Mitaka bundle:

http://bazaar.launchpad.net/~sdn-charmers/+junk/contrail-deployer/view/head:/bundles/contrail-trusty-mitaka.yaml

Note: You will need to create a local apt repo containing Contrail 3.x+ packages before deploying, as detailed here - https://github.com/tonyliu0592/opencontrail/blob/master/juju/juju-contrail.md#12-contrail-repository. Then update the bundle pointing contrail charms to your local package repo using 'install-sources', 'install-keys' options. For example:

contrail-configuration:
  charm: cs:~sdn-charmers/trusty/contrail-configuration
  options:
    install-keys: |
      - |
        -----BEGIN PGP PUBLIC KEY BLOCK-----
        Version: GnuPG v1

        mQENBFZDkpsBCAC+T+UOOLUky331HZk8RbfF7mQ35nwH1PGl2vHM6RWdqayLK4aV
        1uUNGzI3UJw0YVCMmqJSlNfU58GhxEZ/cRbVjnZ6ebAIWRGepsMYWDlA960ornnL
        VCRbr6yvHU06MSS8yl0X43QL2yGdBRiC5EAPEAawDOTMk0RxJ1AvMDHmnKommoQG
        MWJ5zKL+fYSiNEPxQ2/nYd2jVXK4a1jP8c4LcvMdo8uxrEHklr/81wX+UKZYzuZP
        bWQmiXiZzhQD2qz7IgZDaBKVEH4b2xMjilaPc2JOH0hHdP0M33PUOvCbpXQAYOok
        kzqFpglZq1mZmM1ba6x37E07YpOvNWN0kE9DABEBAAG0CENvbnRyYWlsiQE4BBMB
        AgAiBQJWQ5KbAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBmWWjLMSv5
        wDrYB/4nMGcDVFRGU4tvIykhu/l6J6uNunpACL5HrdxC93PrThB2EgJXgnPpE/O+
        KtjN2JKkSs4ehQy0wRMHc1eM/pQ1GRw4QV6vxO1FPT+y8BMdYkuwqd3uM22wg9mZ
        yKvLtWBhMEu9nAPsTSVaT7Yw1z319Nr7JP+0mRCmlkLjuQUF2RcMwH59XH+8Lpev
        MJEGdDcwWifPiO83ycBTQ760miz4B4inUWLYZ11lW/tXRSNG+o4QjemF5mWbPO+H
        knwC/9eukDath9q7itLbJsDbam0/2KCTPxly1sk6E9hCNSIxlNT6ZnnnorLUoSqH
        cTfEFYBDWmyhtqzHcfqocnBaPZT8
        =rMS6
        -----END PGP PUBLIC KEY BLOCK-----
    install-sources: |
      - "deb http://192.168.122.1:8080/3.2.0.0-19-mitaka /"
    openstack-origin: cloud:trusty-mitaka
  num_units: 1
  to: [ "lxd:0" ]


14:04: Usergroup / file permissions problems daemon proces

You should give the execute permission to others on the folders above complete. Without the execute permission on a folder, it cannot be traversed:

chmod o+x \myfolder \myfolder\torrents

Without this, a process running as debian-transmission is never able to get past \myfolder, let alone \myfolder\torrents.

See this Unix & Linux question for a discussion.

Unless you run this command recursively (with -R, which you shouldn't) this does not give execute permission to files (or anything else) within these directories. Only these two directories are affected.


Check out "Sushi Huh?" and the "Keryx Project"

http://sushi-huh.sourceforge.net/

"Sushi, huh? is a program that allows downloading all the packages needed to install the programs you want on GNU/Linux without an Internet connection on your own computer."

https://launchpad.net/keryxproject

"Keryx is an offline package management system
Keryx is a portable, cross-platform package manager for APT-based (Ubuntu, Debian) systems. It provides a graphical interface for gathering updates, packages, and dependencies for offline computers. Keryx is free and open source."


Entering ubuntu without Nvidia graphic card drivers

Ok I've found a way.
First I've tried the first solution from this topic without success. Then I've tried this other solution but I've had problems with apt-get due to impossibility to writing in /var/cache/apt/.

In the end I mixed the two solutions. In summary:

Boot with a LiveCD

Mount Ubuntu root partition, change XY accordingly:

sudo mount /dev/sdXY /mnt

Mount some partitions:

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

Change root directory to the mounted Ubuntu partition:

sudo chroot /mnt

Last, from the 2nd link, remove nvidia drivers:

sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
echo 'nouveau' | sudo tee -a /etc/modules

This works great for me, Ubuntu works perfect with low impact on graphics


Windows 10 not recognized by update-grub

There must be a fatal error with GRUB. You may need to reinstall Kubuntu and make sure that the EFI partition is mounted at /boot/efi. While installing, click Something else. Then click the EFI partition. This will be put as efi. Then, click the Change... button. This will show you a small menu, and you may be able to change the mount. THIS MAY FORCE YOU TO FORMAT THE ESP. If this didn't solve your problem, Windows is in Legacy BIOS. You need to convert to UEFI.


Unable to copy text from the terminal to external programs

To use the clipboard that way, you must have X forwarding enabled ssh -X (or ssh -Y, depending on the settings).

See How can I copy text to the system clipboard from Vim?.


This seems to have fixed the issue:

xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server"

xmodmap -pke > .Xmodmap


Sounds like hardware damage. I don't think anything via software will fix this if you tried to connect something that is 12V to a 5V USB port.


I am unable to read while loop in shell script

You can run the script with bash -x to see exactly what it's doing. I noticed it was comparing "expr 2 - 1" to see if it was equal to 0, which looked wrong. I think this line is wrong:

c='expr $c - 1"

The quotes don't match, so I originally suggested using double quotes, but what you want is to assign the result of running expr blah blah to the c variable, so you need backticks:

c=`expr $c - 1`

If you fix this, and the uppercase If near the beginning, the script seems to run correctly.


I've solved the issue, both issues with the re-installation of fonts as shown in the next command:

sudo apt-get install --reinstall ttf-ubuntu-font-family


Kernel panic after installing a driver with ndiswrapper

This is probably due to a bug in the driver or in ndiswrapper. Have you Googled, to see if other people have had success using ndiswrapper with that same device/driver?

To recover, basically: boot a Live CD, chroot into your installation, remove offending driver. Say your root partition is /dev/sda1, then after booting the Live CD, do

sudo mount /dev/sda1 /mnt
sudo mount -t proc none /mnt/proc
sudo mount -o bind /dev /mnt/dev
sudo chroot /mnt /bin/bash

(If the second command fails, it's probably because you mounted the wrong partition in the first one.) This will give you a root shell in your installed system, in which you can remove the offending driver from ndiswrapper, or even uninstall ndiswrapper altogether. When you are done, exit from the chrooted shell, unmount everything:

sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt

and reboot normally.


Check locale to make sure the server side is using UTF-8 or change locale to UTF-8. Then configure your SSH client to use UTF-8 (not ISO-8859-1). For example, if using Putty, we have to set Putty's character set:

Putty: Window->Translation->Remote character set: UTF-8

Otherwise, it will use ISO-8859-1. A Mac problem resolved.

Alternatively, running this command while connected to a mysql database will output UTF-8 characters from mysql queries.

set character_set_results=utf8, character_set_client=utf8, character_set_connection=utf8;


Wrong method

This works:

cd ~/Downloads/
mkdir pwiz/
mv pwiz-bin-linux-x86_64-gcc48-release-3_0_11537.tar.bz2 pwiz/
cd pwiz/
tar xvjf pwiz-bin-linux-x86_64-gcc48-release-3_0_11537.tar.bz2

and it will echo the extraction ...

./
./chainsaw
./unimod_2.xsd
./pepsum
./txt2mzml
./msconvert
./idconvert
./mspicture
./msbenchmark
./peakaboo
./quantitation_1.xsd
./pepcat
./idcat
./mscat
./qtofpeakpicker
./msdir
./sldout
./msdiff
./msaccess
./msistats
./quantitation_2.xsd


How can I hide Empathy's mail indicator icon?

Inspired by cl-netbox' answer, you can automatically remove the icon after empathy closes. This can be done by running (starting) empathy through a wrapper script. As far as I can see, this has no downside. The only possible downside would be that the right- click option to open with does not work, but that does not apply to empathy.

The wrapper would only run during, and only as long as, empathy is running, waiting for it to close, so the solution is very specific.

What it does

When empathy is run (through the wrapper), a small script is started, doing two things:

look (check) for the empathy indicator to be visible, by the command:

gsettings get com.canonical.indicator.messages applications

This will return a list of current indicators. If the empathy indicator is not included, the script adds it to the list and sets the altered list by the command:

gsettings set com.canonical.indicator.messages applications <newlist>

Then the script looks for the existence of an empathy window
If no empathy window exists any more, the script fetches the list of indicators again and removes the indicator in the same way.

Then the wrapper- script terminates itself, and your icon is removed from the panel.

The wrapper

#!/usr/bin/env python3
import subprocess
import time

key = "com.canonical.indicator.messages"

def hide_icon(icon, mode):
    # function to remove the targeted icon from the list
    current = eval(subprocess.check_output([
        "gsettings", "get", key, "applications"
        ]).decode("utf-8").strip())
    if mode == "h":
        try:
            current.remove(icon)
        except ValueError:
            pass
    elif mode == "s":
        if not icon in current:
            current.append(icon)
    subprocess.call([
        "gsettings", "set", key, "applications", str(current)
        ])

# run empathy
subprocess.Popen(["empathy"])
# make sure the icon shows
hide_icon('empathy.desktop', "s")

while True:
    time.sleep(3)
    try:
        # get the pid of empathy
        pid = subprocess.check_output(["pgrep", "empathy"]).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        break
    else:
        try:
            # see if the pid of empathy is still in the window list...
            wlist = subprocess.check_output(["wmctrl", "-lp"]).decode("utf-8")
            # ...if not, remove the icon from the list and break
            if not pid in wlist:
                hide_icon('empathy.desktop', "h")
                break
        except subprocess.CalledProcessError:
            pass

How to set up

Copy the script into an empty file, save it as no_indicator.py
Test-run the script with the command:

python3 /path/to/no_indicator.py

The icon should disappear if you close empathy. If all works fine:
Copy the global empathy.desktop file to ~/.local/share/applications:

cp /usr/share/applications/empathy.desktop ~/.local/share/applications

Open the locally copied file with gedit:

gedit ~/.local/share/applications/empathy.desktop

replace the line:

Exec=empathy

by:

Exec=python3 /path/to/no_indicator.py

just before (above) the line, starting with Actions=, insert the line:

StartupWMClass=empathy

This is to prevent an extra icon in the Launcher when you run empathy
Log out and back in


Can't get VirtualBox to work in Ubuntu 16.04

If you want to use VirtualBox on *buntus, the best practice is to use Oracle's server and install it from there instead of using the one in the repos.

So, you should uninstall everything concerning VirtualBox that you've installed from the repos except for dkms.  dkms is the only thing you must install prior to installing VirtualBox.

You need to follow the instructions on putting the Oracle server on your system, here: https://www.virtualbox.org/wiki/Linux_Downloads

There is a 16.04 specific section that tells you exactly what to do with the keys.

After you install it successfully, you need to install the VirtualBox Extension pack which is available on this page: https://www.virtualbox.org/wiki/Downloads

Good luck!


This is a bug and should be reported it on Launchpad. You will then be asked to:

Update all of your packages (sudo apt-get update && sudo apt-get dist-upgrade)
Upgrade your BIOS if an upgrade is available.
Try the very latest mainline kernel to verify the bug has not already been fixed.
Follow the instructions at DebuggingKernelSuspend and Kernel Documentation: Debugging hibernation and suspend

Even if the bug is fixed in later mainline Linux kernels, it is still important to report the issue on Launchpad to ensure that the bug gets fixed in the Ubuntu kernel.


Rhythmbox's not playing music from network share

I had the same problem; now fixed. As Dries says, the solution was to mount the share... but then I also had to use the dconf-editor and set org.gnome.rhythmbox.rhythmdb/locations to the mount directory. Simply using the Rhythmbox Music->Import Folder menu item only resulted in import errors being generated regardless of whether I directed it to a Nautilus 'bookmark' of the share or to a manually mounted share.

Setting up the share mount

First, install samba and cifs:

sudo apt-get update
sudo apt-get install samba cifs-utils

Then determine the IP address for your server. In this case, mine is called myserver:

nmblookup myserver

Which will output something like this:

querying myserver on 192.168.1.255
192.168.1.10 myserver<00>

You're looking at the second line of the output for the IP address of the server. Then edit your fstab file to automatically mount the share on that server each time your computer starts up. In this case, my share is called databox:

sudo gedit /etc/fstab

And insert this line at the bottom of the fstab file:

//192.168.1.10/databox /mnt/databox cifs noauto,guest 0 0

Now mount the share for this session:

sudo mount /mnt/databox

...and check that there are no errors. Your share should be listed when you type:

df -h

and you should be able to navigate to the share and view its contents:

cd /mnt/databox
ls

If you've had errors at this point, you need to review the contents of your fstab file.

Note that this method assumed that your server doesn't have a DHCP IP address assigned to it by your router. You might need to 'fix' the IP address in your router configuration before proceeding. Also, if your network share requires a userid and password, you may need to change the guest option to something similar this.

Mounting automatically on each boot

Unless you want to have to manually mount the share after every boot with sudo mount /mnt/databox, you also need to make a script to automatically mount your share:

cd /etc/NetworkManager/dispatcher.d
sudo gedit mountnfs

...and put the following into your script:

mount /mnt/databox

Save the script and exit from the text editor. Finally, make the script executable:

sudo chmod 755 mountnfs

Reboot your system, and then check that the share has been mounted successfully with:

df -h

Note that Network Manager is the Ubuntu default. If you're using a different network tool, you could try placing this script into /etc/network/if-up.d/ instead. You can't just set the fstab share option to auto, because Linux tries to mount drives before it sets up networks. Other potential approaches for this stage might be to:

include the _netdev option in fstab. However, this apparently doesn't work until you run systemctl enable NetworkManager-wait-online.service, which requires systemd, which isn't fully compatable with Ubuntu.
use autofs and automount, which apparently can hang the system on shutdown.

Getting Rhythmbox to recognise the music on your share

Now install and run the dconf-editor:

sudo apt-get install dconf-tools
sudo dconf-editor

Navigate through the tree to org.gnome.rhythmbox.rhythmdb and find the locations setting. Then change this setting to something like:

['file:///mnt/databox/Music']

...check the monitor-library tickbox... and you're done!   (fingers crossed)

NB: I'm using Rhythmbox 2.97 on Ubuntu 12.10 with Network Manager 0.9.6.0-0ubuntu7


Is there a Ubuntu network hacking derivative?

BlackBuntu, BackTrack, nUbuntu... But please, don't use them for dirty jobs, ok?


In case others come across this post.  Remmina used to come with RDP and VNC options, now they are plugins.

After you install the plugins it's not enough to just close and reopen remmina.  I think something gets left open, so you may need to kill a task or simply reboot.

ps -A | grep remmina
  4853 ?        00:01:15 remmina
kill 4853   #the process ID from above

So here's how to get everything going:

#to install remmina
sudo apt-get install remmina

# get the other mode plugins
sudo apt-get install remmina-plugin-vnc
sudo apt-get install remmina-plugin-rdp

# probably not needed
sudo apt-get install freerdp
sudo apt-get install libjpeg-dev

FYI: the plugins install to /usr/lib/remmina/plugins


Officially it is totaly unclear which Phones will run Ubuntu OS.
From a technical site: Ubuntu for Phones uses Android Kernels. This means it is theoretical possible to make it work on every Android device meeting the minimum specs. The real question is: Will the Manufacturers support installation of any other OS than their own?

There are Manufacturer limitations, such as closed bootloaders or licenses that forbid installation of OS software.

To make an unofficially statement: There will be the possibility for developers and tech-enthusiasts to install Ubuntu for phones on the Samsung Nexus Galaxy at the end of February 2013. As time goes by, there will be people trying and sharing their knowledge about installing Ubuntu on other Android phones for sure. In 2014 you will finally be able to buy an mobile with Ubuntu preinstalled.


Setting up storage servers with data replication and failover fallback

I think for data replication you should use drbd . and for failover you can use heartbeat which are both opensource and freeware softwares .
You can get more information by reading this.
http://nathan-renault.fr/wp-content/uploads/2015/01/Installation_et_Configuration_drbd_heartbeat.pdf


In the link you posted it says:

if this fails with errors like:

driver_nl80211.c:21:31: warning: netlink/genl/genl.h: No such file or directory
driver_nl80211.c:22:33: warning: netlink/genl/family.h: No such file or directory
driver_nl80211.c:23:31: warning: netlink/genl/ctrl.h: No such file or directory
driver_nl80211.c:24:25: warning: netlink/msg.h: No such file or directory
driver_nl80211.c:25:26: warning: netlink/attr.h: No such file or directory

you need to install/update libnl-1.0pre8 (or later). If all goes well and the
compilation finishes, try the minimal hostapd again, see the section Using your
distributions hostapd above for that.

So...

sudo apt-get install libnl1 libnl-dev

then run the build

I skimmed through this and I don't think your card will work for this

to be sure, run this:

lspci | grep -i network

If you have a Broadcom 43.... card this route won't work. See this


keyboard backlight Acer Nitro5 AN515-55 Ubuntu 20.10 works but 2 question

My laptop has no drivers for linux and I'm stuck with blue, can't turn it off, change color or brightness.. You probably will be stuck too if there is no driver available for linux.
Try contacting Acer and have them confirm it.


Edit the file /etc/acpi/powerbtn.sh

Put these lines in the top:

/sbin/shutdown -h now "Power button pressed"
exit 0

Note that all connected users etc. will be force-closed.


Where is your problem? halt and poweroff are two different things, as explained in the halt manual.

You should launch it with

sudo halt -p

to poweroff it.

Anyway, from the man halt:

When called with --force or when in runlevel 0 or 6, this tool  invokes
the reboot(2) system call itself and directly reboots the system.  Oth‐
erwise this simply invokes the shutdown(8) tool  with  the  appropriate
arguments.

So I think that could be a good idea to use shutdown directly, as this:

sudo shutdown -h now


/usr/share/icons/ directory is owned by root and only owner has the write permission:

drwxr-xr-x   19 root root  4096 Feb 10 00:14 icons

So, any normal user can not copy any file into that directory. You need to use sudo:

sudo cp PacketTracer.jpeg /usr/share/icons/


You can download all missing audio video codecs from restricted-extras package.

sudo apt-get install ubuntu-restricted-extras


Can't install virtualgl and optirun doesn't work

You can download latest version here.

I also had difficulties with optirun+primus, that optirun -vv outputted a segmentation fault with any process that actually used 3D acceleration, which made it useless. But optirun -b virtualgl solved it.


Mouse and keyboard not working after unplugging external displays while asleep

You can run this script to reboot you mouse, keyboard and everything else attached to the USB bus:

Add this script using sudo -H gedit /usr/local/bin/reset-usb:

#!/bin/bash

# NAME: /usr/local/bin/reset-usb
# DATE: August 17, 2018.
# DESC: Written for Ask Ubuntu Question:
#       https://askubuntu.com/questions/1061754
#       Reboots / resets all USB devices including mouse & WiFi

if [[ $(id -u) != 0 ]]; then # root powers needed to call this script
    echo $0 must be called with sudo powers
    exit 1
fi

for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
  [ -e "$i" ] || continue
  echo "${i##*/}" > "${i%/*}/unbind"
  echo "${i##*/}" > "${i%/*}/bind"
done

systemctl restart NetworkManager.service

exit 0

Copy and paste above script into gedit. Then save the file and exit. Next mark the file as executable with:

sudo chmod +x /usr/local/bin/reset-usb

Use the script by calling it from the command line using:

sudo reset-usb

If this works you can call it automatically when Laptop is resumed by modifying this script: How to prevent wifi sleep after suspend


Why does my default sound output change when I reboot?

Problem was solved by the OP with an upgrade.

  I've upgraded to 11.10 and this appears to have gone away.


Xubuntu X11VNC and Vino VNC - broken text and menus

Solution found here worked:

https://01.org/linuxgraphics/downloads

sudo nano /etc/X11/xorg.conf

Section "Device"
Identifier  "Intel Graphics"
Driver      "intel"
Option      "AccelMethod"  "uxa"
EndSection


what is the file: C:\nppdf32Log\debuglog.txt

Here's what I found using a helpful link from Tom:

  nppdf32.so is the actual browser plug-in for enabling Adobe Reader
  PDF-support in Firefox.

  There seems to be a bug in the version 9.5.1 of the plugin creating
  the "C:\nppdf32Log\debuglog.txt" in the working-directory where
  Firefox was started. This will normally be the user's home directory
  if Firefox is started graphically. If you start it from the
  command-line the "C:\nppdf32Log\debuglog.txt" file will be created in
  the directory where you type firefox. There can be multiple such
  logfiles on your system if the PDF plugin has been started using
  different working directories.


You can also use the gnome-panel-screenshot command in a terminal (of course, a different one), by dropping the --window (or -w) parameter, which will allow you to grab a window instead of the entire screen.

The command should look like:

gnome-panel-screenshot --window --delay=10

or

gnome-panel-screenshot -w -d 10

Both the --delay=10 and the -d 10 parameters will give you 10 seconds in order to choose the appropriate window of which you wish a screenshot. Change this value in order to adjust it to your needs.

If you wish a screenshot of the current terminal window simply drop the gnome-panel-screenshot -window or gnome-panel-screenshot -w without any other parameters, for the whole screen drop no parameters at all.

For a guided screenshot grabbing simply drop the gnome-panel-screenshot -i command in a terminal which will produce this window:

BTW: You don't need to drop this last one in a terminal, simply hit the AltF2 keys and enter it in the "Run application" dialog window. After which you can choose whatever options that better fits your needs for screen-shooting.

Good luck!


Lagging box around mouse cursor on Ubuntu 17.04 and nvidia driver

I also had this annoying problem, and I was able to solve it by running:

sudo service lightdm restart

(This was suggested in a comment by m00am.  At first I had tried to restart sddm, but it displayed a message saying I did not have that service. Installing the sddm package didn't help, but finally chosing the lightdm service worked.)

I clicked OK, and my computer restarted. Finally the lagging and cursor not updating problems were solved.


Broken gnome-keyring file and google-chrome hangs

Ugly fix: remove gnome-keyring execute privilege.

chmod -x /usr/bin/gnome-keyring-daemon

After this, gnome-keyring-daemon will not make any Chrome issue anymore, but it will not save any system password (google chrome password will be saved and you can used saved one too).


Can't disable active window's transparency | Hover effect not working

Try these commands in the terminal to fix the title bar opacity:

gconftool-2  -s --type=bool /apps/gwd/metacity_theme_shade_opacity 0
gconftool-2  -s --type=bool /apps/gwd/metacity_theme_active_shade_opacity 0

I'm not sure about the hover effects.


Manually connecting to a network via terminal

First of all be sure cable is connected to your laptop (I mean Ubuntu detects that cable is connected)

Second enable eth0 by ifconfig eth0 up.

Wait about 30 second and then see output of ifconfig eth0. If you have not IP address (appears in front of inet addr), use dhclient eth0 to force getting address from DHCP server. If it cannot get IP address use following command to set IP address manually:

ifconfig eth0 192.168.0.10/24

IP address must be in the range of your network address. To find out network address range, see your wife IP address (ifconfig works on MAC OSX too).

Now try to ping your default gateway. If no error occurs, you are connected and have suitable IP address. Just specify your default gateway address by:

route add default gw 192.168.0.1

Don't forget to set DNS server by changing /etc/resolv.conf.


Apparently the problem is in the file:

/usr/lib/python3/dist-packages/orca/gsettings_backend.py

I managed to get around this in Ubuntu 19.10
moving the file to a hidden file!

sudo su
cd /usr/lib/python3/dist-packages/orca/
mv gsettings_backend.py .gsettings_backend.py
exit
reboot

After the system came back I was able to change the settings!


How to connect a wired internet connection through terminal?

This is just a modified version of: http://www.ubuntugeek.com/ubuntu-networking-configuration-using-command-line.html

How to configure the network interface using the terminal

You can configure a network interface from the command line using the networking utilities. You configure your network client hosts with the command line by using commands to change your current settings or by editing a number of system files. To configure your network interface card to automatically connect when wired cable is connected you can follow this "simple" steps:

Configuring DHCP address for your network card

To configure DHCP address, edit the /etc/network/interfaces and enter the following lines replacing eth0 in the example with your network interface card:

sudo nano /etc/network/interfaces

You should see something similar to this:

auto eth0
iface eth0 inet dhcp

in my computer it looks like this:

auto lo
iface lo inet loopback

So if your network card appears as eth2 for example then you would leave the file like this:

auto eth2
iface eth2 inet dhcp

Just in case you want to configure a static IP address for your network card

Same procedure as above but you would need to include more information.

Like above, replace eth0 with your networks card name:

sudo nano /etc/network/interfaces

Example File:

auto eth0
iface eth0 inet static
address 192.168.0.100
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

After entering all the details which are needed for your static IP you would need to restart networking services using the following command:

sudo /etc/init.d/networking restart
Setting up DNS

You can add hostname and/or IP addresses to the file /etc/hosts for static lookups.

To cause your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.

For example a machine which should perform lookups from the DNS server at IP address 192.168.0.1 would have a resolv.conf file looking like this:

sudo nano /etc/resolv.conf

search test.com
nameserver 192.168.0.1

in my case it looks like this:

search cantv.net
nameserver 127.0.0.1


Fetching the kernel source code using git

You can look at the Ans

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
cd linux
git checkout v2.6.36.2

To later switch to another version, it's easy:

git checkout v3.5.2

To update your repository to include all of the latest tags and
commits:

git fetch

and for detailed steps Look at KernelBuild


Share a Folder from Ubuntu to Windows in VirtualBox

Since it sounds like you mainly need to access files from your virtual guest, you could setup a web-based file hosting service on both machines (such as Dropbox that has a good Linux client). This enables file synchronization between two computers, as the virtual guest is technically another "computer". Since everything has to be uploaded to the cloud first, this might not be so practical for larger files.

As a positive side effect you get automatic backups of the files in the cloud in case something goes horribly wrong with the virtual guest.


1) Make sure your USB stick is connected. In a terminal type:

sudo blkid

It will list all your connected drives. Search for your USB stick you want to use as swap and copy the UUID (everything inside these quotes UUID="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX").

This represents the individual name of your device.

Also note the /dev/XXX point of your device.

2) Now unmount your device by typing:

sudo umount /dev/XXX (where XXX represents your device name)

3) Format your USB stick as swap, e.g. by terminal

sudo mkswap /dev/XXX (<-- be sure to use the correct device name here or you'll probably end up formatting the wrong drive!)

or simply use GParted.

4) Now you have to edit your /etc/fstab file, so type

gksudo gedit /etc/fstab

and enter the following

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none swap sw,pri=5 0 0

(for all the Xs, use the UUID number you got by typing sudo blkid)

5) Now type

sudo swapon -a

That's it, this should already work.


Type in terminal:

sudo apt-get install synaptic -y

Then use synaptic, it is more useful.


/usr/local/lib contains libraries which Aptitude reports aren't installed

/usr/local/ contains files that are not installed by the package manager, be it due to a manual installation or additional files downloaded by e.g. an installer script from a package (although those mostly go to /opt/).

APT is therefore unaware of the files below that directory. If you installed the libraries manually, e.g. by extracting an archive there, you should also be able to remove them in the same way.
Pay, however, attention if you didn't install them manually. In this case please tell us how you installed them to receive further and better help.

Another possibility is that the libraries could be there because they may have been downloaded by something else, and not from installing libsdl2 using APT. E.g. Valve's Source Engine uses SDL2. When you install a Source-based game, e.g. Half Life or Portal, Steam will download its own libraries (although it keeps them in the users home directory). The may come from something similar. If you have no idea where they come from, leave them be. They will not disturb your development, if done correctly (see below) and deletion may break some other application.

If you want to continue using SDL1.2, you sould be able to do so without removing the other libs: Tell the compiler/linker to use the older libraries. SDL2 shared libraries are always called libsdl2-....so, so simply link against the correct libraries without the sdl2 in there.


I got this to work, and here's how I did it:

I use Thunderbird/Lightning as my email/calendar client on my main computer (Thinkpad W541, Ubuntu Unity, 16.04) and my travel Chromebook (Acer C720, Ubuntu XFCE, 16.04), and I wanted to regularly sync the calendar data between both machines.  Suggestions online often mention Google Calendar, but I'd rather use open-source tools (that I control) to do the job.  I use SeaFile (a FOSS DropBox equivalent) to sync folders & files between my machines.

Step 1:  On my new Chromebook, I copy over my entire Thunderbird directory:
rsync -zarv user@thinkpad:~/.thunderbird/  ~/.thunderbird/
Then, I install Thunderbird and open it: presto, all my accounts, old emails, and (most importantly) calendar events are accessible. Great!

Step 2: It looks like all relevant Thunderbird data are stored in ~/.thunderbird/blah.default/, with calendar data in ~/.thunderbird/blah.default/calendar-data/.  On the Chromebook, I create a new calendar event, save it, and see that ~/.thunderbird/blah.default/calendar-data/local.sqlite has increased in size and has a newer "last-modified" timestamp.  I conclude that local.sqlite contains all relevant calendar data.

Step 3: I close Thunderbird on both machines, then use SeaFile to sync the entire calander-data/ folder on both.  I see that the newer filesize and timestamp have successfully synced on the Thinkpad. I open Thunderbird on the new machine, and there in the calendar is my new event.  Success!

Drawbacks:
The main drawback seems to be that if Thunderbird is open on both machines and either calendar is edited, syncing the calendar-data files sometimes causes the other machine's Thunderbird to crash.  They just weren't built to handle that sort of I/O.  But otherwise: it works great!


How to set the desktop to $HOME/Desktop?

Create a new folder that you want to use as your folder.

For example, type mkdir ~/Desktop in a terminal (Ctrl+Alt+T to open one) to create a folder named Desktop in your home directory.
Edit your configuration.

Edit the file ~/.config/user-dirs.dirs. You can do this by opening a terminal, then enter:

gedit ~/.config/user-dirs.dirs

Change the entry for XDG_DESKTOP_DIR to your new desktop folder, or add it, if the entry does not exist. After your edit, the file should look like this:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Download"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Log out and then log in again and your desktop should show the specified folder.


You have to use the following command in order the extract the files:

tar -zxvf honeyd-1.5c.tar.gz

And about the title of your question, this link might be useful: How to install Honeyd in Ubuntu?

Hope this helps.


Drives partitioned via server USB caddy not recognized by workstation eSATA (GPT PMBR size mismatch)

I’ve had a similar issue in the past. The solution was to run fdisk on it and use w to save the existing partition table without any changes.
GPT disks come with a "Protective MBR" (PMBR) which contains a dummy partition that covers as much of the entire disk as is possible, which can result in the size mismatch issue you are seeing.
This has no effect on data stored on the disk; it is there only to guard against old MBR-only disk partitioning tools.
Hope this helps


Open a terminal window and type the following command, in order to start the GUI:

startx


Ubuntu 12.04 (server): Failed to load fallback graphics devices?

Have almost the same problem. I am using desktop version and after some hack with lightdm i was unable to boot even to bash command prompt with the same error message in boot log. I removed lightdm and now i get command prompt back. Maybe this somehow helps you.


I had the exact same issue and fixed it by following below steps:

Trigger CLI from the error screen using Ctrl+Alt+F3 and Login.
Then execute the command for release upgrade:

sudo do-release-upgrade

If there was issue with new release download, this should solve it, else it will print out:

No new release found.

If so, continue by updating the package lists and upgrading it.

apt-get update && apt-get upgrade

If there was a issue here, the system will ask you to execute the command suggested by Schwab Eugen.

sudo dpkg --configure -a

The system will finish unpacking and installing the missing resources.
After that just reboot the machine and it should will work.


Trying to resolve “Cannot open shared object file libudev.so.0”? Getting too many levels of symbolic links problem

First try to find which libudev you have and where it is:

sudo find / -name "libudev.so*"

If you find libudev.so.1, note its path, and link:

sudo ln -s <libudevpath>/libudev.so.1 <libudevpath>/libudev.so.0

Do not try to link the other direction!

ln -s file1 file0 creates a symbolic link between two files. Whenever an application looks for file0 (which doesn't really exist!), it will follow this link and use file1 instead.

Let me know if I was helpful enough.


Why is running an Ubuntu file manager as root dangerous?

It's only dangerous because you can delete important files accidentally. On servers and such, giving root a password can make the computer vulnerable to attack, since the all-powerful root is accessible to use to delete files. The only reason logging in as root or using programs as root that I can think of is the possibility of accidentally deleting something that you didn't want deleted or modified.


How to query software packages that I installed today?

The below awk oneliner command will displays all the packages that are installed today or yesterday,

awk -v foo=$(date '+%Y-%m-%d') -v bar=$(date -d "yesterday" '+%Y-%m-%d') '($1==foo || $1==bar) && $3~/^install$/ { print $4 }' /var/log/dpkg.log

Explanation:

-v -> Values assigned to the awk variables are done through -v parameter. Syntax would be, -v variable=value . This variable is used by awk for further purposes.
foo=$(date '+%Y-%m-%d') -v bar=$(date -d "yesterday" '+%Y-%m-%d')

date '+%Y-%m-%d', prints the current date. The output of this command is assigned to the variable foo .
date -d "yesterday" '+%Y-%m-%d', prints the yesterday's date. Again it's output is stored as value to the variable var.

'($1==foo || $1==bar) && $3~/^install$/ { print $4 }'

||->logical OR operator, && -> logical AND operator.
($1==foo || $1==bar) && $3~/^install$/ -> Checks if the value in the column number 1 matches the value of variable foo(which contains current date) OR the column number 1 matches the value of bar(which contains yesterday's date) AND there must be a string install present in the column number 3. If these conditions are satisfied, awk prints the value of column 4 (package name).

/var/log/dpkg.log -> Input file.


Ubuntu 12.10 installation error on Dell Studio 1558

Press Alt+F2 to bring up the "Run box", and type in "xkill". Hit Enter. Your cursor will now be an x. Anything you click would die. Click on the installer. Restart. Remove the boot device, see if Ubuntu runs off the hard-disk, if it doesn't you will have to re-install. Also check whether you have sufficient space where you're installing Ubuntu.

And the ability to boot into Windows 7 can be simply restored if you have a Windows 7 bootable DVD, just boot into and repair the startup.

Hope this helps.


After upgrade to Ubuntu 16.04 radeon driver not being used?

Answer: At the moment if you have a hybrid AMD graphics that is not specifically identified as compatible with the latest amdgpu driver, you would do well to steer clear of 16.04 for the foreseeable future.

Reason: Although the open radeon driver can be installed, it will not be used and you will not be able to shutdown the high performance graphics hardware.  This makes for a very hot and noisy machine and a degradation of graphics performance compared to fglrx on 14.04

The good news: Whilst installing 14.04 back in May 2014 was immensely difficult, due to poor support for the AMD graphics adapter, and merely very difficult back in November 2015, it was very straightforward installing 14.04.4 yesterday as all necessary drivers were made available and run reliably straight out of the pack.  Perhaps by April 2018 16.06.4 will have reliable drivers for older AMD devices.  In the meantime, if I need a new machine, I'll be looking for Nvidia.  YMMV.


"Software selection" step failure during Ubuntu 16.04 server installation

Press Alt+F2 to enter the BusyBox shell
Change directory to /target/etc/apt:

cd /target/etc/apt

Copy sources.list.apt-setup to sources.list:

cp sources.list.apt-setup sources.list

Edit sources.list:

nano sources.list

Comment out the line beginning with deb cdrom so it looks like this:

# deb cdrom:[Ubuntu-...

Upgrade packages:

chroot /target apt-get update
chroot /target apt-get upgrade

Press Alt+F1 to return to the installer, and start Software Selection


As far as my experiments go (and somehow as I expected):

the source file is removed only if the command completes normally
however, "-u" doesn't remove the previous version of the file, it merely adds it to the end, so repeated updates with the same file will make the TAR file grow indefinitely.


Do you recall sending your Mac for a custom hardware installation or something of the likes?... though I don't think that's the issue here.

It seems that the integration of the two wasn't perfect. Maybe a corrupted USB stick or something similar.

Since you're mostly using common codecs, there's no need for extra packages to be installed, and maybe that's the problem.

Try uninstalling all and reinstalling using a common "as-is" setting - meaning, just run Ubuntu 15 with VLC 2.2 - no added packages.


apt-get autoremove wants to remove linux headers

Yes it is safe to remove the old kernel and headers as you are using a higher kernel.


The kernel used to have a config option for whether to use ATIME or RELATIME; dunno if that also included some option for NOATIME.  In any case, that's gone now.

I studied util-linux as well, to see if the mount command had configurable defaults or could be modified, but it did not appear to be the case.

However, it looks like you can patch the kernel to change the default behavior.  Modify ./fs/namespace.c, around lines 2334:

long do_mount(...)
...
    /* Default to relatime unless overriden */
    if (!(flags & MS_NOATIME))
            mnt_flags |= MNT_RELATIME;
...

Swap that around:

long do_mount(...)
...
    /* Default to noatime unless overriden */
    if (!(flags & MS_RELATIME))
            mnt_flags |= MNT_NOATIME;
...

And that should do it.


Warcraft 3 on Ubuntu 19.04, graphics not working

I'll answer to that as I was able to successfully run the game, even though it wasn't with Ubuntu at the end.

===

I wanted to do it with OpenSUSE Tumbleweed, cause I want rolling release distro. Tried for almost a month to install it on the laptop with no success. I tried then with Ubuntu, but after the installed crashed twice - I left that option too.

(I think the hardware is causing the problems in the above two cases, I don't blame the distros.)

Then - I installed Manjaro. It ran from the first try.
After that - I installed wine staging and then dxvk, from these two tutorials:

https://www.addictivetips.com/ubuntu-linux-tips/install-wine-staging-on-linux/

https://www.addictivetips.com/ubuntu-linux-tips/set-up-dxvk-in-wine-on-linux/

Setup the virtual desktop in winecfg - with resolution ~1000x800.

Then - installed both launchers from Blizzard - the Battle.net and the Warcraft 3 ones.

After that - login in both launchers. It's tricky, but doable. This tutorial shows some useful info for the process :D

https://www.youtube.com/watch?v=lHkniTQFRr8&t=500s

(I didn't follow the tutorial, just sharing it because of the useful info about logging in the clients.)

===

Then - removed the setting for virtual desktop and ran the game (WC3). However - I got black screen and crash after a couple of seconds.

What I did to resolve is:

Launch winetricks.
From it - installed corefonts.
And from it again - I installed ie8 and then dxvk (latest).

And when I launched it again - I had graphics and sound, and the videos played as well.

But the video was shifted to the left, so I tried to launch the game with
wine [path-to-warcraft3.exe] -opengl - and then it ran with no issues.

(Considering the fact I have integrated Intel video :D ...)

Good luck ;)


Wifi hotspot to connect to Android using Broadcom 43xx

Switching to an open source driver did it
Short Version
Using an open source driver (brcmsmac in my case) instead of the Proprietary Broadcom STA Wireless driver (wl) and installing ap-hotspot did the trick

Long version for Broadcom Users

Go to Ubuntu Broadcomm WifiDocs. See if an open source alternative exists.

The Linux drivers page should tell you if it supports AP mode

If so yay!
If not, I can't help. Sorry.

Temporarily switch to the open- driver source to check if it does what you want
#unload all drivers
sudo modprobe -r b43 bcma
sudo modprobe -r brcmsmac bcma
sudo modprobe -r wl

#load the corresponding open-source driver (brcmsmac in my case)
sudo modprobe brcmsmac

If it works, you can edit the blacklists to make sure only the required driver works. An easier option would be to simply uninstall the proprietary drivers using sudo apt-get purge bcmwl-kernel-source

Install
ap-hotspot.
Remember, there are some issues in 14.04, and rolling back must be
done as shown in the page. Else, use hostapd as described
here

Run sudo ap-hotspot start. Your android phone should work with this conection.

Open source wins again


How to run netsurf-fb? Fails with: "Unable to set video: Could not set console screen info fbdev"

I had a similar problem getting netsurf to run, but managed to fix it thanks to persistence and blind luck.

Problem 1: init mouse failed
Solution: Add myself to the input group (the group that owns /dev/input/mice

Problem 2: Unable to set video: Could not set console screen info fbdev
Solution: Install the xserver-xorg-video-fbdev and fbset packages

Problem 3: Running netsurf causes the screen to go blank and the system to hang, requiring a hard reboot
Solution: I ran it in verbose mode and redirected standard error to a file, and I saw that netsurf was complaining about not being able to find DejaVuSans.ttf. I copied the file from /usr/share/fonts/truetype/dejavu to /usr/share/netsurf


Webupd8.org maintains a VLMC PPA since 2010. Have you tried that? The latest upload was in January 2015, so it's missing packages for Vivid and Wily, but 14.04 is covered.

Related:

What are PPAs and how do I use them?
Are PPA's safe to add to my system and what are some "red flags" to watch out for?


VNC is what you're looking for. The official Ubuntu wiki has some loose guides on setting this up.

https://help.ubuntu.com/community/VNC/Servers


Can't download anything from Software Center

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update && sudo apt-get upgrade


How can I get 1280x720 resolution support in virtualbox

Get the modeline information

gtf 1280 720 60

eg:

# 1280x720 @ 60.00 Hz (GTF) hsync: 44.76 kHz; pclk: 74.48 MHz
Modeline "1280x720_60.00"  74.48  1280 1336 1472 1664  720 721 724 746  -HSync +Vsync

Get the output device

xrandr | grep "\sconnected"

eg:

VGA-0 connected ...

Create a new mode

xrandr --newmode "1280x720_60.00"  74.48  1280 1336 1472 1664  720 721 724 746
xrandr --addmode VGA-0 1280x720_60.00

Set the new mode

xrandr --output VGA-0 --mode 1280x720_60.00

Finally you need a script for that, because this must be done every time you start VirtualBox.

Eg:

#!/bin/bash
xrandr --newmode "1280x720_60.00"  74.48  1280 1336 1472 1664  720 721 724 746
xrandr --addmode VGA-0 1280x720_60.00
xrandr --output VGA-0 --mode 1280x720_60.00

And start the script during the system start, eg in /etc/lightdm/lightdm.conf:

sudo nano /etc/lightdm/lightdm.conf

Add add the line

display-setup-script=<path_to_script>/<script_name>

If you need a more generic version, give me a ping.


How do I configure custom keyboard layout switching?

I do not think that what you are asking is possible, while the question is too localized anyway. Keeping a third layout in reserve and activating it by shortcut seems a far more inconvenient procedure to be set even if it were possible than using one shortcut to switch between three layouts.


It should use the public address to your server.

You can verify the actual address by running juju status and looking at the public-address stanza.


what is the difference between which gcc and dpkg -l | grep gcc

which

  which gives location of binary installation directory. It is used as which <pkgname>

So the command

which gcc

gives

/usr/bin/gcc

dpkg -i

  dpkg -i is used for installation.It has nothing to do with finding a package directory.

dpkg -l

  dpkg -l is used to find if a package is installed or not.dpkg -l <pkgname> will give you an output with names of installed packages matching the given name.dpkg -l gives list of all packages.

write

  It is used to send message to other user.

I can't tell why you used this one.
grep

  to show only the relevant part of the output.it is useful when piping commands.

If you want to find if gcc is installed, the best shot for you would be to use

dpkg -l|grep gcc

This will show all packages(installed) containing gcc in it's name,

You could also use dpkg -l gcc but it gives output showing only those packages which contain only gcc.
If you want to check the location of the gcc binary that is in your $PATH, try

which gcc

Though there are few others too.


Why am I unable to update from Software Updater?

might be useful to look at your sources file you can get it like this:

cat /etc/apt/sources.list

but you might try this:

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

source


You need a lightweight desktop environment, Unity is quite heavy. To avoid reinstalling the whole system, and save time, you can just install a new desktop environment. I would suggest you to install LXDE with the following command.

sudo apt-get install lxde

Once it is done, logout and login and choose lxde.


Setup new connection in mysql workbench using standard TCP IP over SSH

What worked for me was to copy the SSH private you need key in question from that .ssh folder.
Just put it in some new folder, use that copy of the key, and it should work.


How do I access that basic command line tutorial man document?

You are looking for the man intro. Just type

man intro

This will open the first man intro section, the one that you are (I will stab a guess) most likely interested in. To view all man intro sections type

man -a intro

and you will be prompted to view them all, unless you decide to quit.