Proper fstab entry to mount a samba share on boot? I am a little confused on the proper fstab entry for a samba share in Ubuntu 12.04

I can get the drive to mount manually by using:

sudo mount -t cifs //192.168.2.2/raid_drive /mnt/homeserver -o username=jon,password=password

So I tried putting this in fstab:

//192.168.2.2/raid_drive /mnt/homeserver cifs username=jon,password=password,iocharset=utf8,mode=0777,dir_mode=0777 0 0

Which gives me this error in syslog:

kernel: [ 2217.925354] CIFS: Unknown mount option mode
kernel: [ 2217.936345] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3

This guide says to use smbfs although I believe smbfs is deprecated?

What is a common fstab configuration for a samba share in Ubuntu 12.04?

EDIT:

Using the accepted answer below I was initially getting this error message (from dmesg):

[   45.520883] CIFS VFS: Error connecting to socket. Aborting operation
[   45.520990] CIFS VFS: cifs_mount failed w/return code = -115

although it turns out this was due to network connectivity issues, and not related to improper fstab entry.

I've been through exactly this same issue this morning with 12.04 and here's how I got it working:

Install cifs-utils  (even if you already have Samba and related packages installed):

sudo apt-get install cifs-utils

Edit /etc/fstab and add your entry:

//server/share /pathto/mountpoint cifs credentials=/home/username/.smbcredentials,uid=shareuser,gid=sharegroup 0 0

Create the .smbcredentials file in your home directory:

username=shareuser
password=sharepassword
domain=domain_or_workgroupname

Make sure you secure your ~/.smbcredentials file:

chmod 0600 ~/.smbcredentials

Finally, test the mount with:

sudo mount -a

...and you should be good to go!

Your initial problem is in the option mode, as syslog says in the first line. What you probably meant was file_mode, see man mount.cifs for more information.

The credential approach mentioned by Eliah is indeed better than using username and password, but I don't think it interferes with the other options like file_mode or dir_mode.


Ubuntu Server 16.04 server GUI install apt-get install error Hi guys im trying to install GUI on Ubuntu server 16.04 but I constantly get an error about a forbidden ip 91.189.88.149 failed to fetch

The servers of the repositories change from time to time.  You can update this information using these two commands:

$ sudo apt update
$ sudo apt upgrade

It wouldn't hurt to run it twice.  Sometimes upgrades provide some updated information for locations.  Running it the second time would assure to have the upto minute lastest.  It's very unlikely having some information late by a few days would ever make a difference.

To avoid this, you might consider the two lines part of your routine when performing terminal package installs.

Check your Repository Download server:

This information is coming from your download server, which may not be the most upto date.  You can check it with these steps:

Go into Software and updates -> (click tab) Ubuntu Software -> (click dropdown to select a different Download from source).


Wireless disconnect issues Ubuntu 16.04 with RTL8821ae ** UPDATE 12/03/2016: I still have not solved this issue. Is anyone able to help? ***

I've been having trouble with my Wifi ever since I installed Ubuntu 16.04 two months ago. There are several posts similar to this one on the forums, however I've not found any that work for me. Here are some similar questions which did not help me:

How do I get a Realtek RTL8723BE wireless card to work?
wifi connection keeps dropping in Ubuntu 15.10 - RTL8821AE
http://ubuntuforums.org/showthread.php?t=2245164&page=2
http://ubuntuforums.org/showthread.php?t=2245164

Let's get into it.

The problem:

I can load about 1-2 webpages before my wifi disconnects. When my wireless disconnects, the Network Manager icon does not change its appearance, i.e. showing that I'm still connected. It will not reconnect on its own. I then remove/reinsert my driver using:

sudo modprobe rtl8821ae -r
sudo modprobe rtl8821ae

I never have internet that lasts long enough to load an entire YouTube video or upload a 3.5 MB file to Dropbox. Yikes.

Details:

sudo lshw -C network

*-network
   description: Wireless interface
   product: RTL8821AE 802.11ac PCIe Wireless Network Adapter
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:01:00.0
   logical name: wlp1s0
   version: 00
   serial: b0:c0:90:1b:b8:bd
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
   configuration: broadcast=yes driver=rtl8821ae driverversion=4.4.0-28-generic firmware=N/A ip=192.168.0.7 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn
   resources: irq:233 ioport:e000(size=256) memory:ff600000-ff603fff

 *-network
   description: Ethernet interface
   product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
   vendor: Realtek Semiconductor Co., Ltd.
   physical id: 0
   bus info: pci@0000:02:00.0
   logical name: enp2s0
   version: 10
   serial: 2c:56:dc:9d:2c:64
   size: 10Mbit/s
   capacity: 1Gbit/s
   width: 64 bits
   clock: 33MHz
   capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
   configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-3_0.0.1 04/23/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
   resources: irq:225 ioport:d000(size=256) memory:ff504000-ff504fff memory:ff500000-ff503fff

lsmod | grep rtl

rtl8821ae             225280  0
btcoexist              53248  1 rtl8821ae
rtl_pci                28672  1 rtl8821ae
rtlwifi                77824  2 rtl_pci,rtl8821ae
mac80211              737280  3 rtl_pci,rtlwifi,rtl8821ae
cfg80211              565248  2 mac80211,rtlwifi
btrtl                  16384  1 btusb
bluetooth             520192  9 bnep,btbcm,btrtl,btusb,btintel

I am happy to provide anything that is useful for diagnosing my problem. Thanks guys!

Well I recommend to upgrade your kernal version to Kernal 4.6.4 and then download the latest wifi driver from git rtlwifi_new. Now go inside the downloaded directory and compile as follows.

sudo make

sudo make install

sudo reboot

Now try loading the driver modules

sudo modprobe -r rtl8821ae
sudo modprobe rtl8821ae

Scan the wifi and check the quality level using the following command.

iwlist scan | egrep -i 'ssid|level'

If still your problem persist then need to check how many antennas your laptop have and try changing antenna (ant_sel)and check the quality level of the signal.

sudo modprobe -r rtl8821ae
sudo modprobe rtl8821ae ant_sel=1
iwlist scan | egrep -i 'ssid|level'

if not try second antenna as follows.

sudo modprobe -r rtl8821ae
sudo modprobe rtl8821ae ant_sel=2
iwlist scan | egrep -i 'ssid|level'

if any of the above antenna switching works, then make it permanent by adding options correct ant_sel= to a conf file by creating it as follows.
vim /etc/modprobe.d/rtl8821ae.conf

options rtl8821ae ant_sel=1

If everything goes fine, then reboot and enjoy.

That's a bug in Ubuntu 16.04. Try restarting the network service. Run:

sudo systemctl restart network-manager.service


Windows 10 upgrade leads to grub rescue, boot-repair dosen't work I've fallen victim to windows' aggressive handling of boot-ups. I have Ubuntu and Windows 7 side by side on my PC, and after I started the upgrade to Windows 10, I couldn't boot to continue the upgrade. Booting results only in Grub rescue prompt.

I've tried using boot-repair with no results (http://paste.ubuntu.com/12243604/) and I tried repairing the MBR with windows 10 installation iso, and it still doesn't fix the problem.

Since then I tried fixing the problem manually by enabling EFI in BIOS and i tried running the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in Windows 10 installer, but nothing have helped so far.

I've also been looking around in the grub rescue menu, and all partitions shows as msdos partitions. And I can't find any boot partition through ls (hdx,msdosx), since they all show as unknown filesystems.

Both OS are 64-bit, ubuntu version is 15.04.

SOLVED: I managed to solve this through the windows 10 startup USB. I went into the command prompt and wrote the following commands:

bootrec /RebuildBcd
bootrec /fixMbr
bootrec /fixboot
Exit
(src: http://www.thewindowsclub.com/repair-master-boot-record-mbr-windows)

That wasnt enough though, as I continued to fiddle with he troubleshooting menu in the windows 10 repair menu. I turned UEFI off and after some random fiddling and being stubborn, the upgrade process has resumed.

Do note that this nukes ubuntu from the boot order!

Use Windows 10 in a Virtualbox environment if you have sufficient memory.  Never use Windows as a your primary OS unless you absolutely have to.  It is also a lot easier to backup your Windows 10 Virtualbox, all you have to do is copy a folder to an external drive.  Furthermore, you can use your Windows 10 virtual machine on ANY computer with Virtualbox.  Just my humble opinion.


Change directory to target of move operation Occasionally, I have edited some file and want to move it to a different folder. (Typically: to a Dropbox folder, where I did not want to work to avoid giving the other owners of the folder constant updates.) I do this, for example, with

mv file.pdf ../../../Dropbox/sharedfolder/subdirectory/file.pdf

Afterwards, I often find myself wanting to change directory to the target directory of my previous move operation. I find myself hitting the up arrow, deleting the final file.pdf, holding left, deleting mv file.pdf and replacing it with cd.

Is there a faster, smarter way to do this? Is there a "move file and then change directory to" command, or a shortcut for the last used directory, or something like that?

If you're using bash, then its history interaction has just the shortcut for this. The word designator for the last argument of the previous command:

  !!:$
  designates the last argument of the preceding command. This may be
  shortened to !$.

Combined with a modifier to remove the last pathname component:

After the optional word designator, you can add a sequence of one or more of the valid modifiers, each preceded by a ‘:’.

  h
   Remove a trailing pathname component, leaving only the head.

So:

$ echo /ab/c/d
/ab/c/d
$ echo !$:h
echo /ab/c
/ab/c

The same shortcut can also be used with zsh.

Another approach is to create your own command dedicated for this purpose. This can be done via function which could looks like:

$ function mv-special { mv $1 $2; cd $(dirname $(echo $2-)); }

Where: (1) mv-special is the function name; (2) the variables $1 and $2 are arguments in the function who will be used by the commands mv and cd; (3) $(echo $2-) adds a wildcat character to the end of the string in var $2, and fixes the behaviour of dirname if the variable $2 contains only path; (4) $(dirname $(echo $2-)) will filter only the path from $2.

According to this answer the function could looks like:

$ function mv-special { mv $1 $2; cd ${2%/*}; }

Where: ${2%/*} will filter only the path from $2.

To be available as a command this function must be exported:

$ export -f mv-special

Usage:

$ mv-special file.pdf ../../../Dropbox/sharedfolder/subdirectory/file.pdf

or:

$ mv-special file.pdf ../../../Dropbox/sharedfolder/subdirectory/

Please pay attention to that - for both variants - the second argument ($2) must finishes with filename or slash (/).

To be our new command permanently available, the definition of the function and the export command must be appended to ~/.bashrc:

# My custom 'mv-special' command:
function mv-special { mv $1 $2; cd $(dirname $(echo $2-)); }
export -f mv-special

or:

# My custom 'mv-special' command:
function mv-special { mv $1 $2; cd ${2%/*}; }
export -f mv-special

Custom command can be made and via executable script file which is placed in ~/bin or in /usr/sbin: How can I create a custom terminal command (to run a script)? But to be honest, I was faced a trouble with the behaviour of cd in this scenario.


Thunderbird does not store remote address books' passwords I have the following problem:
I am running a Ubuntu 13.04 64 bit on a Lenovo Thinkpad S430. As email composer I use Thunderbird (24.0).

All my contacts are being synced from an ownCloud address book to my phone and my Thunderbird on my Windows machine (using Inverse SOGO Connector for Thunderbird). On the windows machine the password for that remote address book is saved within the Thunderbird password manager (it shows in the manager).

Now I wanted to set that configuration up on my Ubuntu notebook. So my Thunderbird with SOGo Connector can actually sync the address book just fine, but fails to store the password. It would always ask again for the login/password when I start Thunderbird.

I have already tried reinstalling Thunderbird, SOGo Connector, adding and readding the address book. I have never experienced that problem ever before. I am using that sync for quite a while now.

Maybe somebody has some suggestions which could lead to a solution.

Cheers,
andehhh

It's a bug with Inverse Sogo Connector 17.0.5, the latest version downloadable from their website at this time.

As a workaround, I've currently installed the Saved Password Editor extension for Thunderbird and added the address book password by hand:

https://addons.mozilla.org/en-us/thunderbird/addon/saved-password-editor/

After installing it, go to the menu Edit -> Preferences, then select the tab Security -> Passwords, click on the Saved Passwords button, and you'll have a button with a drop down menu where you can add a new password. Add the host of your password (e.g. https://myowncloud-bernarpa.com, without the remaining address book path, the Username and Password and the Annotation, that's the thing you get on the password window as "The server says:".

This Knowledge base article may have your answer.

Try "Tools -> Options -> Advanced -> General -> Config Editor (button)", look for "signon.rememberSignons" and change "false" to "true".


How to specify additional search domains for resolver in 16.04 GUI network settings when using DHCP? With Gnome Ubuntu 14.04, it was possible to specify additional search domains for the resolv.conf, when editing a network connection, like so:

But where do I find this field for the "additional search domains" in Ubuntu 16.04?

Is the only "real" way to modify /etc/resolvconf/resolv.conf.d/base or /etc/resolvconf/resolv.conf.d/head? Is there no GUI way to do this?

In Ubuntu GNOME 16.04, you are correct that the ability to edit or add additional search domains is unavailable, but this is only true for the 'default' network editing system that you see.  This 'newer' one was put in place, according to Jeremy Bicha in the #ubuntu-gnome IRC chat channel on Freenode, because the default editor in Settings should be easier to use for most end-users:

jbicha: sorry it's hidden by default because most people don't need two network GUIs and the one in the Settings app should be easier to use for most people

And of course you can't see search domains in the default editor:

However, the original network editing GUI is still available.  Just run nm-connection-editor.  This will launch the same, good-old Network Manager editing window that you expect to see.  That has the ability to do search domains.  (Thanks to the #ubuntu-gnome IRC channel on Freenode for this!)

This procedure/answer also works in 18.04 and 20.04 as well (tested myself).

This was driving me mad in 16.04, then I managed to follow the instructions that I found here, and they seemed to work.

https://github.com/ansible/ansible/issues/17843

It does look like a hack though and it's certainly not a "GUI" way.


Failed to implement Nginx caching - connection refused I'm having trouble getting my site to work after trying to implement Nginx caching.

I use Ubuntu 16.04 (xenial), Nginx (1.10.3), PHP-FPM (7.0) and WordPress.

Port 9000 (for php-fpm) is unfiltered by UFW.

Reproducing my environment

1 - setting confs:

nginx.conf
default conf
virtual host
/etc/php/7.0/fpm/pool.d/www.conf (comments omitted)

2 - Creating a cache dir:

mkdir -p /var/cache/nginx/fastcgi_temp/cache/
chmod 755 /var/cache/nginx/fastcgi_temp/cache/
chown www-data:www-data /var/cache/nginx/fastcgi_temp/cache/

3 - Server restart:

systemctl restart nginx.service
/etc/init.d/php*-fpm restart

4- Error and debug tries:

*1 connect() failed (111: Connection refused) while connecting to upstream,
client: MY_IP_ADDRESS, server: example.com, request: "GET /
HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000".

The browser gives:

502 Bad Gateway nginx/1.10.3 (Ubuntu)

Debug:

/etc/init.d/php*-fpm status

brings:

● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-04-27 07:09:28 UTC; 3s ago
  Process: 16336 ExecStartPre=/usr/lib/php/php7.0-fpm-checkconf (code=exited, status=0/SUCCESS)
 Main PID: 16346 (php-fpm7.0)
   Status: "Ready to handle connections"

My question

Why is the connection refused and my site is down?

Update for NerdOfLinux:

+ curl -I example.com
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Content-Length: 194
Connection: keep-alive

And

grep "listen" /etc/php/7.0/fpm/pool.d/www.conf | grep -v ";"
+ grep --color=auto -v ';'
+ grep --color=auto listen /etc/php/7.0/fpm/pool.d/www.conf
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

The issue at play is a misconfiguration by you of the nginx fastcgi_pass directive to point at a nonexistent backend/upstream gateway.

Since 14.10 (or was it 15.10, I dont remember now exactly) php-fpm listens on a local UNIX socket and not TCP port 9000 by default.  I know this because I spearheaded the effort to make this change in Ubuntu and Debian for the defaults for FPM, and it was accepted in the packaging.  And I know this is your setup because of the listen = line of your FPM www.conf which says its listening on a socket.

Put unix:/run/php/php7.0-fpm.sock in your fastcgi_pass directive in the nginx server block, and not the 127.0.0.1:9000 you have.  That should then allow it to work properly because the correct PHP upstream gateway is then used.

check in your php-fpm pool definition which is to be found in /etc/php/7.0/fpm/pool.d

User www-data is used to run php-fpm:

user = www-data
 group = www-data


What is a good MongoDB GUI client? I've been using Rockmongo on Windows - it's a php based web tool. But on Ubuntu (12.04) it's behaving funny - queries timing out often - and I'm looking for better clients. Does anyone know anything good for MongoDB on Ubuntu?

Robo 3T (formerly known as RoboMongo)

Shell-centric cross-platform open source MongoDB management tool (i.e. Admin GUI).
[It] embeds the same JavaScript engine (based on Mozilla SpiderMonkey), that powers MongoDB's mongo shell. It means that you can reuse your existing skills of MongoDB Shell in Robomongo.

Edit
Some more info:

It's available for Linux, OSX and Windows.
Regarding Linux, there are packages available in the .rpm (Fedora, CentOS, openSUSE), .deb (Debian, Ubuntu) and .tar.gz formats.
It is free (as in Speech); you can access its GitHub repository here.

Robomongo, Shell-centric cross-platform MongoDB management tool, works on most Linux systems. Has rpm ,dep packages and tar.gz archive

If system is not supported stand alone installation package is also there.


Run Shell Script after click on button - YAD I have three shell scripts and I would like to run each script after click on button in yad - lets say - I have one yad session with three buttons - if I click on one button I will open 1. script - second button open 2. script and so on.. See my example bellow -

#!/bin/bash
files=$(yad --width 100 --height 100 --title "Choose the Shell Script" \
    --text="  Please enter analysis details:" \
    --button="ShellScript1:2" \
    --button="ShellScript2:3" \
    --button="ShellScript3:3" \
    --button="Cancel:1" \
    --on-top \
    --center \
)

ret=$?
[[ $ret -eq 1 ]] && exit 0

Thank you for any idea or help.

I just add condition:

ret=$?

[[ $ret -eq 1 ]] && exit 0

if [[ $ret -eq 2 ]]; then

      /path/to/shell/1.sh
fi

if [[ $ret -eq 3 ]]; then

    /path/to/shell/2.sh

fi

To elaborate on the previous response:

processes=$(yad --width 100 --height 100 --title "Chose Process" --text="Select" --button="Run Cmd":1 --on-top --center)
ret=$?
if [[ $ret -eq 1 ]]; then
  /path/process.sh
fi


Central data storage for apps in Software Center I am trying to make a package for the Software Center, but so far the problem is that there seems to be no central place to store data for all users.

We need that to store license files that the application can later add if the users want to use the non-free parts of our software. Also we use this for storing document templates that some users edit and make them available for all users on the system.

Is there any solution for this kind of problems? From what I see on this page:
http://developer.ubuntu.com/publish/

  Write all configuration settings to ~/.<pkgName>
  (This can be one file or a directory containing multiple configuration files.)

EDIT: While talking to the Ubuntu staff it turns out there is no way you can have a central file storage for all users. At least not at the moment. I tried adding scripts to the debian source package that would create folders, but the staff looked at them and did not approve the version. At the moment we are saving the common files in the user .config folder.

For licenses, you will want to use the license key mechanism built into Oneiric and the http://myapps.developer.ubuntu.com application submission portal.

I think you answered your own question as you want to store user space configuration settings to ~/.<somedir> or ~/.config/<somedir> - following the XDG standards would be suggested.

You could provide a full debian package instead of a zip for installation under /opt/.

During your .deb installation, you can create a folder /usr/lib/<appname>/templates and make it world writable, like putting a chmod o+w /usr/lib/<appname>/templates in your <appname>.postinst script.


Choosing ubuntu version for 10 year old pc I am going to install Ubuntu 10.04.4 LTS (Lucid Lynx) on my 10 year old pc. So should I have to install by Desktop CD or Server install CD? And what happens to my partitions while installing Ubuntu in my winxp pc permanently?

For a system with 512 MB of RAM I can only recommend distros with lightweight desktop environment (DE), such as Lubuntu, that sports LXDE (where L stands for Lightweight). It's preferable to install rather newer versions of OS as it usually supports more hardware. So I would recommend Lubuntu 14.04 LTS (Long Term Support = till 2019, but you can upgrade every two years) or something similar like PeppermintOS 5/6 (both based on 14.04). There is also WattOS with LXDE based on 14.04 and they have even some "Microwatt" edition for even slower, older PCs.

Other lightweight DE choices include fluxbox, various tiling like xmonad, ratpoison, awesome etc. But if you want something more familiar LXDE is probably the best first choice.

Lastly I'd like to mention that elementaryOS Luna is quite lightweight actually although it's build on older Ubuntu base (12.04). Too bad this is not true for their new version Freya, which didn't run properly even on Atom netbook with 1 GB RAM. Still Luna is supported till April 2017 so you might give it a try too.

Hey there!

10.04 comes with an application called Gparted. You can use it to manage partitions from the live media. So I think live installation is your best bet, plus you get to test the waters of Ubuntu on your old hardware first. Also a prompt will appear when you install 10.04 that asks you to partition your HD with gparted, so at some point during the live CD installation, you will run into gparted.

There is also the option of backing up all of your XP files and software and running it in a virtual machine, if you have your XP installation media. This way you can keep XP in ubuntu. I'd post an image of how to's but this is my first post.

In my opinion, go with LXDE or Xubuntu so you can have recent software on your old hardware. Its awesome. But 10.04 isn't too bad if you know how to manage your packages but not much support will be available.


How can I access Apache (on VirtualBox guest) from host? I installed Apache on an Ubuntu VM. When I go into the guest and load up Firefox I can see that Apache is working fine when I browse to localhost.

I would like to access this same page through the host. I've tried using the IP address of the guest but nothing comes up. Ideally I would love to set up my Windows 7 (host) to request http://guestserver.com of the Apache server on the guest. How can I do this?

If you need other machines in your physical network to be able to reach your VM (or if the VM needs Internet access), use bridged networking. Otherwise, stick to host-only networking.

Stop your VM and open its settings in the VirtualBox (OSE) Manager
Go to the Network tab
Select the network mode at your choice (bridged networking or host-only) (in the below example, I'm using host-only)

If you want to use bridged networking, you've to select the right network adapter at Name. For wired connections, you'd select something named like eth0. Wireless connections are usually named wlan0 (the numbers may vary)
Save the settings
Start the Ubuntu VM
When up, you can gather the IP address by running:

ifconfig | grep addr

In the below output, 192.168.56.101 is the IP address that can be used in your Win7 host system to access your VM:

eth0  Link encap:Ethernet  HWaddr 08:00:27:70:27:fe
      inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fe7b:25fe/64 Scope:Link
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host

In your windows host system, edit C:\Windows\System32\drivers\etc\hosts as administrator and add a line:

192.168.56.101   guestserver.com

If you've a Ubuntu host system, edit /etc/hosts using sudo nano /etc/hosts
Profit!

If you are using the Bridged connection , allow the http services in the firewalld can help you to access the server page.


Removing only the broken package So  was about to install some packages so I could get programs that I want. And somehow one package got broken, I have no idea how. So now when I try to do sudo apt-get -f install it says broken one affects other packages. If I want to remove it, I have to remove a lot of other packages (I think even apt has to be removed) and I don't have any programs on Ubuntu that installed myself.

Is it possible to remove only the broken package or reinstall the uninstalled packages just after they were uninstalled? Remember that I don't have internet access on any Linux computer at my home right now. I am using Lubuntu 13.04.

Results of sudo apt-get check :

Removing only broken packages was possible through synaptic package manager.

Run the below command on terminal to install and open synaptic,

sudo apt-get install synaptic && sudo synaptic

Right-click on the broken package and then Mark for Complete Removal.After that click apply.

try sudo apt-get update and see if it works


How can I recursively change the permissions of files and directories? I have ubuntu installed on my local computer with apache / php / mysql.

I now have a directory at /var/www - inside which I have several of my ongoing projects. I also work with opensource ( drupal, magento, sugarcrm ).

The problem I am facing is changing file permission with terminal. Sometime I need to change the permission of entire folder and its subsequent sub-folders and files. I have to individually change using

sudo chmod 777 foldername

How can I do this recursively.

Also why do I have to always do it 777, I tried 755 for folders and 644 for files, but that won't work.

Just add the -R option to recursively change the permissions of files. An example, recursively add read and write permissions for the owner and group on foldername:

chmod -R ug+rw foldername

Permissions will be like 664 or 775.

Setting the permissions to 777 is highly discouraged. You get errors in either Apache or your editor regarding permissions because apache runs under a different user (www-data) than you.

If you want to write to /var/www, add yourself to the www-data group and set umask+permissions accordingly.

Add yourself to the www-data group: sudo adduser $USER www-data
Change the ownership of the files in /var/www: sudo chown -R www-data:www-data /var/www
Change the umask, so newly created files by Apache grants write permissions to the group too. Add umask 007 to /etc/apache2/envvars.
Grant yourself (technically, the group www-data) write permissions: sudo chmod -R g+w /var/www.

If you want to have all of your files be readable to the world (ie. it's just a static set of HTML files/images), then use this command:

chmod -R a+r <base directory>

That will recursively go through all of the files & subdirectories and add read permission to them.

WARNING: Don't do this for files that are executable!  Only files that should be visible by everybody.


Why are my headphones not working? My problem is that my headphones don't output any sound in Ubuntu 16.04. I'm aware that this topic has been discussed here many times, but I've tried some solutions but they didn't work. When I plug in my headphones and run alsamixer, it shows:

My headphone volume is on 100 so I don't understand why no sound is coming out of them. I'm new to Ubuntu and Linux in general. What should I do?

Try use pulse audio to check if the headphones are automatically selected as output, and if they are not, you can manually change it. Its really easy to use and simple to understand.

Program here:

Pulse Audio


Asrock J4205 / Intel Apollo Lake will not install Ubuntu 16 / 17 (ASM1061 SATA optical DVD drive cd issue) I have just purchased an AsR J4205 board, hoping to use it as a basic server / NAS - I had an older atom board doing this before, and although not an an expert systems admin am not a newbie either (used / installed Linux since ~ 1998), and have done some googling before posting, and read similar posts on here, Asrock and Debian forums.

So board is sold as Ubuntu 16.10 friendly, I've tried this and 16.04, 17.04 and the daily build, and the install always fails just after the grub screen, usually with

mce: [Hardware Error]: Machine check : 0 Bank 4 a6000000000

sometimes also various other errors, eg : udevadm : relink 'libkmod.so.2 .....

I don't think this is just a UEFI issue, I've tried all options with the CSM mode, and both CD / DVD and USB installers

Similarly the board will install win 10, and boot (gentoo based)  current Sysrescue cd, so hardware is probably OK
I have updated the supplied bios (1.1 reported as buggy) to current 1.4

SO

If anyone has this board working stably what did you do?
I'm in single channel memory mode (checks ok with memtest) with one 8 gb Sodimm - would dual channel be any better?
is board just too new / rare to be well supported?
Could it be worth downgrading BIOS to 1.2 which is the version others have reported as working?
any other ideas?

Can post further info, diagnostics if that might help.

Thanks

A partial answer, which might give others enough info to get their system working, or to give a fuller one if they have in depth knowledge of relevant hardware / linux boot process.

Worked out that next step in boot process might be initialisation of DVD drive, which I had connected to the ASM1061 sata socket (see note above)

Unfortunately the ASM1061 is allergic to (some?) optical drives - not sure if this is plain unsupported, bugs, incompatabilites or what.  Apparently some board / card blurbs warn about this in the small print. Mine didn't!
As above it didn't stop Win10 DVD booting, or sysrescue cd. BUT IT DOES CRASH BOOT OF UBUNTU SETUP, EVEN IF DRIVE IS JUST THERE, AND BOOT IS FROM A PERFECTLY OK USB STICK which is what foxed me for a while.

So easiest fix on this board is to swap sata cables about and connect DVD to SOC based controller, or not use it at all. There may be other options based on controller mode settings, or kernel parameters.

So now it boots and installs happily, just have to return my new hard drive because it has bad sectors and fails SMART :(  So can't comment on long term stability yet.

Further info in these threads:

Can I prevent an IDENTIFY PACKET DEVICE command to a specific device at boot?

Boot failure: failed: command IDENTIFY PACKET DEVICE

I had the same problem with a very strange solution, worked for both Ubuntu 18.04 & Mint 19.2 : the quoted message appears more than once.

After the first time, I took the USB stick out, and then there was some sort of a message complaining about no media, so I stuck it back in. Then the installer started fine.

But I can't assure that it works till the end, since I installed it otherwise in the end: I installed the OS on another computer and transferred the medium to this one. Then I booted Ubuntu and started bootrepair.

After that, the issue was solved.


Snap not allowing me to remove or refresh anything I installed my dev tools via snap, big updates came out for most of them recently (Jetbrains), biggest being Android studio. But no matter what I do I can't remove or update any of my applications installed via snap.
When I try to remove the snap, I get the following error message:
error: snap "android-studio" has "auto-refresh" change in progress

I tried disabling "auto-refresh" with a bunch of other recommendations from other questions and threads.
I would like to specify when I want to update. Is there any way to update snaps like regular APT packages?
When I run "snap refresh", I get the following error:
error: change finished in status "Hold" with no error message

This was the top search item for the topic as I was trying to remove a snap whilst it was "auto-refreshing".  The better answer in that it allows you to stop the refresh and take action is covered in Ask Ubuntu.
In effect:
# Check for snap changes
sudo snap changes

# This will list something like
ID   Status   Spawn   Ready   Summary
---

# Note the ID for the refresh and abort it
sudo snap abort <number>

# You must check changes until it has been actioned
sudo snap changes

# The take remedial action, in my case remove
sudo snap remove <snap_program>

Tested with microk8s on Ubuntu 18.04.

The way it worked for me was the parameter force instead of now
sudo snap remove android-studio force


how to transfer installed programs to other pc My ubuntu laptop is customised with all the programs and themes of my choise,can i transfer these software to another computer running ubuntu and install them there via usb drive.

It's not impossible, but it is a lot of work. However, it sounds like you want to keep the applications settings so that you don't have to reconfigure things. Good news! Unlike Windows, settings are not connected to the application. All settings are stored in your home directory, so if you copy it to another computer and reinstall the software, it'll be exactly as it was on the other computer.

Transferring a specific applications settings is also very easy. New software will usually store their settings in ~/.config/application_name/, it's data in ~/.local/share/application_name/ and cache in ~/.cache/application_name. Unfortunately, not all applications follow that convention yet. The old convention was to store it directly in your home directory, such as ~/.appname.

While you are coping the files into new Computer, make sure that the new computer is running the same version as the previous (where you copy all the Files).

If there is not same version of ubuntu then the System may be crashed. So be careful before doing this.


No fullscreen in COD Warzone? I'm having a major issue with this game, I got 90 fps on average but it displays no more than 30. I also don't have the FULLSCREEN option. I have window and borderless but that is it. If anybody had experienced similar issues or knows how to solve this, help would be seriously appreciated !

Didnt have the fullscreen option either. What worked for me was to install windows 10, had windows 7 before. Hope it helps


How to format a USB or external drive? Using Ubuntu 11.10, how do I format an external or USB drive?
I don't find an option to 'format' when I right click. In the new version, the drives don't come up on the desktop, but instead come on the Launcher.

You can use the disk utility(installed by default) to format the drive. There is an option 'format volume' select that option.

.

.

.

.

script automation way to format SDcard or USBstick into FAT:

mformat -i /dev/cardDevice -s 32 -h 2 -T <total number of sectors> -v cardLabel

where:

/dev/cardDevice would be /dev/mmcblk0 for SDcard for example.

-s 32 -h 2 are the few "standard" but mandatory settings (number of sectors per track and number of heads) for the legacy information inside FAT formatted partition.

<total number of sectors> will reflect the length of the partition arranged on the device

cardLabel would be the label applied to the partition

if it's necessary to format for FAT32 - append -F flag at the end

don't forget to call sync command after the formatting


Configuration tmuxinator I am a user of zsh and tmux. I discovered tmuxinator for configuration scripts to manage sessions, and it's awesome. But I have a problem on a machine, Here is my yaml file tmuxinator:

name: admin
root: ~/
tmux_options: -v -2 # Pass arguments to tmux
windows:
  - mail:
    panes:
      - mutt
      - #empty, will just run plain bash
  - shell: ls

Then the generated script. I don't know why.

It was a version problem. By installing the latest version that works.


Install ubuntu 14.04 using pen drive I am using Ubuntu 10.04 ! i want to to install Ubuntu 14.04. But i don't have Ubuntu CD.

I know we can use flash drive to install Ubuntu 14.04 But don't know how. (I have seen by brother doing that, i have asked him how to do it but reply was find it out yourself.)

So please anyone can give me step wise instruction how to use simple flash drive to install ubuntu 14.04

If I were you I'd use a small program called Unetbootin, it allows you to install any OS from a pendrive. Go here (http://unetbootin.sourceforge.net/) and download the Linux version or instead you can use the terminal to install it:

sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin

Next, you need to plug your pendrive and download Ubuntu from the Ubuntu website then save the file on a folder or on the desktok.

Then you run Unetbootin (it might ask you to run it as sudo, just enter your password), select the second option and browse to your ISO file and press OK. If your pen drive has enough space this should work, I use an 8GB pen drive.

Finally you restart your computer and go to the BIOS and select external media boot as the first one and install Ubuntu.

I hope this can help you friend: https://help.ubuntu.com/community/Installation/FromUSBStick.


Wireless and bluetooth drivers for 14.04 lts My notebook is having ubuntu 14.04 LTS running on HP Pavillion 15-n011TU. I need the wireless and bluetooth drivers for that. Anybody could possibly send those drivers.

Thank you.

The outputs:
1) lspci -knn | grep Net -A2

08:00.0 Network controller [0280]: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter [14c3:7630]
    Subsystem: Hewlett-Packard Company Device [103c:197c]
09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller [10ec:8136] (rev 08)

2)lsusb

Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0781:5583 SanDisk Corp.
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 0e8d:763e MediaTek Inc.
Bus 002 Device 003: ID 05c8:0361 Cheng Uei Precision Industry Co

., Ltd (Foxlink)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

just connect the Ethernet cable (Broadband). open Additional Drivers option (you can search it on Ubuntu search) on Ubuntu 14.04 and once you click on Additional Drivers it will start searching the missing drivers and show you the drivers what you want once you activate that restart the system. thank you i hope this will help you


Setting up a postfix server on a homenetwork via the noIP service for full-time use I'm trying to learn about linux and network administration, so I'm not especially concerned if this is not the most efficient way to do things.
I have a server at home running Ubuntu 20.04.
I've set up SSH including keys, OpenVPN, remote desktop and basic file-sharing.  So far so good.
My ISP won't provide a static IP, so I access the server using the noIP service.  Let's call the address myserver.ddns.net - so my ssh login is user@myserver.ddns.net.
I have several domain names that I'd like to add email addresses to.  Let's call one of them 'example.com'.  These are hosted by a small hosting company - to set MX records on these I open a support ticket and the admin sets them for me.
I'm looking at managing this server using postfix (because it seems best supported) and probably just having it forward email to an outlook.com box.  I know that the first step of the setup is to make sure that any email sent to mail.example.com is directed to the postfix server, which will reside at whatever IP myserver.ddns.net is currently pointing to.
I also know that the Ubuntu hostname of the server running Postfix needs to match the FQDN in the MX record.
Can you please help a newbie really break down the connections from the FQDN -> noip -> my postfix server.

The FQDN is example.com - therefore I ask my hosting server admin to place an MX record to redirect mail heading to mail.example.com?
Because I don't have a static IP, this redirect needs to go to my noIP service.  So I'm asking my hosting admin to direct mail.example.com to a) mail.myserver.ddns.net?  b) myserver.ddns.net? c) something else?
The Ubuntu server running postfix needs to have its hostname property set to match a) the FQDN name (hostname "example") b) the noIP address (hostname "myserver.ddns.net?" - but then I'm running into issues with "."s) c) something else?

I think that it should be:

mail.example.com -> myserver.ddns.net (Ubuntu hostname "example")

Like many things when I'm learning, I think the thing that's causing me the most grief is the initial step...  Everything beyond this seems reasonably straightforward.
Thanks all!

This may not be an answer that solves your question, but in the current state of Internet Email and such, is pretty much the only answer you can get at the moment:
Running an email server from your home on a Dynamic DNS provider and a Dynamic IP system from your Residential ISP is 100% going to fail and not work.  Most mainstream email providers do not accept emails originating from mail servers on residential ISPs, and most residential ISPs will not let you run a mail server on their infrastructure.  Further, a continually increasing number of providers require your forward DNS and your reverse DNS on your 'mail server' to match - you will not get the ability to do this on your Residential ISP.
Another consideration factor here is email system security.  I'm an IT Security Professional myself, and protecting email systems from hacking attempts, etc. is its own full time job and unless you're willing to invest time (and likely a good portion of MONEY) into deploying an email system yourself, you really should not attempt to run email yourself.
You should consider going through a mail provider instead, and pay them for email services.  Microsoft 365 (Business Basic license, on the Business side of their products for the Exchange access), ZoHo mail services, and numerous other providers are all out there and relatively cheap to provide services for email - unless you're willing to invest a LOT of time and effort into learning how mail works, securing your mail server properly, and paying for a VPS or such for this to run your mail, etc. you're better off just going with one of the many providers out there to run mail for you, you just have to get a domain name to go with it.
I would also advise not forwarding mail from a mail server in your home via Outlook or one of these other things directly, because there's a lot of restrictions on those types of accounts about mail volume, etc.

Do not use your Home computer and dynamic DNS for an email server (or any other server software that you want publicly available). I see several reasons:

Delivery issues: Other mail providers might (probably will) not accept your outgoing emails.

Your Privacy. Your public IP Address will be linked with a domain name, that makes you easily trackable (and attackable) in the internet at any time. The EU court has ruled that your IP address (and thus ddns address) is personal data not for nothing.

You open ports (=security holes) to a computer inside your home network. That is a security nightmare for you and christmas for hackers.

So, what to do ?
If you want to learn how to set up an email server, rent a VPS. It will cost you something like 10€ per month, for most providers you can easily change to a higher plan if you notice, that the ressources are not sufficient.
If you like (and I would strongly advise), you should take care that you can run docker containers on it (not all VPS will do, ask the support before renting if you are not sure).
Then you can try to install everything your self. Plan at least a full weekend for installation and more time for proper configuration. There are thousands of good tutorials out there.
Depending on your needs, you will need several software packages:

Postfix (Mail transfer agent / MTA)
Dovecot (SMTP server)
AMAVIS (Mail Filter)
Spamassassins (Spam scanner)
Clamav (Virus scanner)
...

If you want to have a webmailer, you will need:

Rainloop (or similar)
LetsEncrypt

Take in consideration that you need security ...

Harden your ssh server
Use Fail2ban for ssh, postfix, dovecot and the webmailer login.
Keep everything up to date at any time (means also that you need to subscribe to security bulletins or mailing lists).
...

... and for delivery ....

OpenDKIM
OpenDMARC
SPF records

... and probably more stuff ...

Sounds complicated? Oh yes it is. And if you don't want to learn about all the above mentioned stuff, you should keep off your hands from your own email server and take the advise from @ThomasWard to use your time for other useful things.
But: If you're still reading this and are still interested, go ahead and try.

And now for the easy part:
You can use the great docker-mailserver which includes all of the software mentioned (except the webmailer) and is well maintained. Please note, that this will only make the installation very easy. You will still need a deep understanding of your system to be able to configure it wisely and run it securely and without having delivery issues.


git authentication with Active Directory user I use likewise-open to connect to a Windows AD, and I am able to see AD users.

What should I do to authenticate a user for git when I push to and pull from a git repository? Where is this configured?

There is already already this script for group user authentication through AD, within gitolite, in the contrib/ldap directory.
The idea remain to have an intermediate layer (here with gitolite, a ssh-based layer through forced commands), which is able to authorized a git command based on the result of a LDAP query.

This my post on the subject (translated from Russian by Google).
Maybe it will help.

GIT, AD and SSH. Or how to control access to the GIT through AD


Safe to remove downloaded .deb packages after install? I'm not sure if this has been asked as I couldn't find it under the search feature, but I recently upgraded my kernel and installed other .deb packages and was curious if the .deb file could be deleted after install or if it was an integral part of the program itself.

Edit: I asked this not for things downloaded through apt-get to /var/cache/apt/archives but for using wget which saved to the root of my home folder, namely for when updating the kernel through command line

There is no matter you can delete .deb when you finish using it whatever the method of installation.

I'm giving you here an example how Ubuntu system really deal with .deb so it's just to know that it's not dangerous to delete them since Ubuntu itself gives you the way to do.
For example, the installation method of Ubuntu when you use software center or using apt-get is to download first the .deb to /var/cache/apt/archives then installing these .debs using dpkg.

So when finish installation there is no need for system to those .debs, unless you can use them if you delete some package and you want to install it again and there is no update then the system uses this .deb instead of downloading again.

Moreover Ubuntu offers a neat command to clean those .debs, you can use

sudo apt-get clean

This will remove all .deb that are being downloaded before in the /var/cache/apt/archives

It's safe to delete the deb files. Just keep in mind that you should not delete them if you plan to re-install the same versions of the packages at a later point in time.

This should be helpful How do I remove cached .deb files?


Music player that plays Youtube playlists I have tried all music players recommended in answers for similar questions, but I haven't found a player meeting the following requirements:

Plays youtube playlists smoothly (caches the audio before playing, I mostly don't care about video)
Allows to choose quality
Normalizes volume
Lightweight

Is there such a music player?

vlc

The stable VLC in *ubuntu 14.04 is version 2.1. To get the latest stable version:

sudo add-apt-repository ppa:mc3man/trusty-media&&sudo apt-get update&&sudo apt-get install vlc

can do this via a specific addon.

Look up the page for instructions - among others:

Installation:

put the file in the vlc /lua/playlist folder, by default:
Linux (all users): /usr/lib/vlc/lua/playlist/
Linux (current user): ~/.local/share/vlc/lua/playlist/

How to use:

Copy the URL of the youtube video or playlist (must contain "list=PL...")
Start VLC, press Ctrl+N, paste the url then click on "Play" (or Alt+P then Enter), the video /playlist should start

(In 'Media', 'Save Playlist to File' and may open it later in VLC.)

Now I see that this answer was already given here, although with a different link.

Also, I find interesting an application that runs in the terminal, Youtube Viewer (youtube-viewer) and uses mplayer or mpv to play the youtube video.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install youtube-viewer

More here.

By default it uses mplayer. To make it use mpv instead, run youtube-viewer --video-player=mpv. So, a desktop file with this content may be useful:

[Desktop Entry]
Exec=bash -c 'youtube-viewer --video-player=mpv'
Icon=youtube-viewer
Name[en_US]=Youtube Viewer
Name=Youtube Viewer
Terminal=true
Type=Application

When running the program, a terminal window opens, saying:

=>> Search for YouTube videos (:h for help)
> ^J>

Running :h for help, you get a lot of options, amongst which

[playlist-url]    : display videos from a playlistURL
:playlist=ID      : display videos from a playlistID

This means that just pasting a playlist's URL will show the playlist in the terminal as a list. (Alternatively, instead of the whole URL, :playlist=ID, where ID is the last part of the URL (after list=). Then, to play it in the video player, type the numbers of the playlist items: for a whole playlist of 10 items, 1-10, etc.

If you really don't care about the video and want mainly the audio, you can take a look at this question on how to play only audio of youtube videos.

The idea is to use mps-youtube, similar to Youtube Viewer, but audio only. To see a playlist there, just type pl <url or id>. Then similarly, something like 1-10, and the sound will be played.

Youtube Viewer can be also used with audio only by adding a corresponding argument for mpv player: youtube-viewer --video-player=mplayer -novideo.

To use VLC without video, the arguments are:

cvlc --vout none <URL>
cvlc --no-video <URL>

NOTE that for some reason not all youtube playlists can be accessed in this way.

http://www.youqueue.co.uk Music Queuer is a website which will allow you to play lists of you tube videos non stop, you can create a playlist of youtube videos or soundcloud songs and play them all as if they are in one player. The website indexes music via categories so that it is more music orientated in an album artist fashion.


GNOME shell on 3.16 for ubuntu 14.04 I am trying to install gnome-shell 3.16 on ubuntu 14.04.2 with kernel version 3.16.

I was only able to upgrade gnome-shell from 3.10 to 3.12.2. After that it is not upgrading to gnome-shell 3.14.

sudo apt-add-repository ppa:gnome3-team/gnome3

sudo apt-add-repository ppa:gnome3-team/gnome3-staging

sudo apt-add-repository ppa:ricotz/testing

sudo apt-get update

sudo apt-get dist-upgrade


How can I upgrade from Ubuntu 6.06? Please help me upgrade my Ubuntu cause it's hard for me to update firefox and can't install Flash player. I tried the terminal but it didn't work.

You have a really old version of Ubuntu installed, which is already End of Life (EOL). Have a look here for upgrade to the current version. Need to be done in multiple upgrades.

Dapper to Hardy upgrade
Next would be Hardy to Lucid
and the last one Lucid to Precise

Don't forget to do a backup before upgrading, if you have any data on your machine

Type the following in the terminal:

sudo apt-get dist-upgrade

It should automatically upgrade your Ubuntu installation.


root password not recognized I got kubuntu 12.04 on my laptop, but everytime I try t update, install or something like that it does not recoginze my password, here  is what the konsole says...

ernesto@neto-desktop:~$ sudo apt-get update
[sudo] password for ernesto:
Sorry, try again.
[sudo] password for ernesto:
Sorry, try again.
[sudo] password for ernesto:
Sorry, try again.
sudo: 3 intentos de contraseña incorrectos
ernesto@neto-desktop:~$

and no advance from there, i am some kind of new for this version (12.04 precise pangolin) and i m not sure what is next, thanks in advance for the help and answers!

How to fix “username is not in the sudoers file. This incident will be reported” Error In Ubuntu

Reboot the computer. If Ubuntu is your primary and the only operating system in your computer, press the “Shift” button when it is booting up. This should make the Grub screen show up on your monitor. On the Grub screen, press the down button to the Recovery mode and press Enter.

On the next screen, select “Check all file system (will exit read only mode)”.

When you see the message “Finished, press Enter“, press Enter.

Next, select “Drop to root shell prompt”.

You will now be at the command line. Type:

usermod -a -G root your_user_name_here

Replace the username with your own login name.

That’s it. Now type “exit” and select “Resume normal boot”.
Follow the Steps below if u messup With sudoers file

Do the Steps Untill 3

sudo cp /etc/sudoers /etc/sudoers.backup

sudo vim /etc/sudoers

Check the following lines in the file

# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

Next save the file using

 wq!

Next Change the permission to the sudoers file

chmod 440 /etc/sudoers

Then Add your Username to the Sudo group

usermod -a -G root your_user_name_here

Exit the Shell and resume normal boot are restart ...

This Will Fix Your Issue , i'm Following this and Its Found from google , While i faced the same issue ..


unable to play HEVC files on ubuntu 14.04 LTE I have tried VLC and totem players but they are not working.
I then searched and re-installed the VLC with latest version available, this time I am getting a green layer on the video.
Any help?

VLC out of the box does not play HEVC files. To fix this we need to install libde265 via PPA, which is an open source implementation of the h.265 video codec.

Open up the Terminal and run the commands below:

sudo apt-add-repository ppa:strukturag/libde265
sudo apt-get update
sudo apt-get install vlc-plugin-libde265

VLC should now play these media files.

Source: http://www.unixmen.com/fix-vlc-not-support-audio-video-format-hevc/

I had to upgrade VLC first, for which I used the PPA at https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media/ .

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade

Don't forget to purge and remove these repos before upgrading to new Ubuntu version!

Then I installed the vlc-plugin, see the other answer. And it started working.

sudo apt-add-repository ppa:strukturag/libde265
sudo apt-get update
sudo apt-get install vlc-plugin-libde265

Summed up at https://developer.jboss.org/people/ozizka/blog/2016/03/15/vlc-221-and-hevc-in-ubuntu-1404-lts .


Mouse wheel doesn't scroll after update I have Ubuntu 18.04. Today in the morning I allowed the updates were installed and after system requested reboot mouse wheel doesn't scroll content up and down anymore. Touchpad still does but it's not convenient for me.
Mouse A4tech laser Model: X6-22D which is connected to the laptop Asus UX310U by wire.
Any ideas? Can I fix it or roll back mouse driver update.

I did not find another progressive solution yet and kernel version 5.0.0-27 solved my mouse scrolling problem (until now without any side effects).

I have an A4Tech X6-80D mouse and the 4.15.0-62 kernel contained this bug, so I installed kernel 5.0 on my Ubuntu 18.04.3 LTS with the commands below (kernel 5.0 is not automatically installed if you have initially an Ubuntu version lower than 18.04.2).

Desktop edition:

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

I did not try the Server edition, for which xorg is not needed:

sudo apt-get install --install-recommends linux-generic-hwe-18.04

Original source to install kernel 5.0 can be found via How to Get Linux Kernel 5.0 in Ubuntu 18.04 LTS.

please check the mouse setting

In the Mouse Properties window, select the Wheel tab and try adjusting the number of lines to scroll the mouse or try changing the mouse to scroll one page at a time. After this is adjusted, click Apply and then click OK. Verify this change helps correct your mouse issues.

Please check Instruction in the given image


Will it be possible to create apps/games in Java SE or Java ME on new Ubuntu phones? Will it be possible to create apps/games in Java SE or Java ME on new Ubuntu phones?

Yes, For example, the JogAmp JOGL Jake2 port is known to run on Ubuntu Nexus 7 touch tablet using IcedTea and OpenJDK.

You have access to all Ubuntu java packages that you normally find on desktop.

OpenJDK implements a JavaSE like environment.

You can access OpenGL ES 1 or 2 directly from Java using the JogAmp library for most flexibility, especially suited if you write your own engine.
The JogAmp JOGL implementation is provided by the libjogl2-java package.

You may also use existing java game engine library’s such as libgdx, playn and jmonkeyengine that will get you up to speed if you want to create a game from scratch.

You could write Java applications the same way you would write them for any linux distro.

Assuming you are on an ARM device you will also need to install a JRE compatible with ARM devices, to run your application you would do it the same way as a normal linux distro (because it is a normal distro), java -jar file.jar.

Basically, it's not worth it, yet.

Summary: Ubuntu Touch has an Ubuntu core, and is a linux distro. You can write Java apps for linux distros, so yeah, you can.

EDIT And I'm not really too sure about how the window server, X11 I believe (though don't take my word for it) is implemented, so I'm not too sure how apps with JFrames would work. See this.


How do I uninstall Dropbox? After booting up, a popup screen tells me Dropbox did not install correctly, but it is lurking somewhere. To install properly I first have to delete the incorrect install. How can I do that?

I'm using the latest version of Ubuntu.

This is from Dropbox help page:

dropbox stop
dropbox status  # Should report "not running"
rm -rf ~/.dropbox-dist
rm -rf /var/lib/dropbox
rm -rf ~/.dropbox*
sudo apt-get remove nautilus-dropbox
sudo apt-get remove dropbox
rm /etc/apt/source.d/dropbox

I had the same issue and I ran all the above commands without any results. I was not able to uninstall no matter what so instead I ran with sudo apt install nautilus-dropbox and it installed all over again and at last I was able to launch and enter.


Why do I get "Required key not available" when install 3rd party kernel modules or after a kernel upgrade? This issue happens only on UEFI systems with enabled Secure Boot.

When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.

VirtualBox complains that vboxdrv is not loaded.

Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.

Also this issue may happen when I install some kernel modules from git sources.

This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.

How can I fix it?

Since Ubuntu kernel 4.4.0-20 the EFI_SECURE_BOOT_SIG_ENFORCE kernel config has been enabled. That prevents from loading unsigned third party modules if UEFI Secure Boot is enabled.

The easiest way to fix this issue is to disable Secure Boot in UEFI (BIOS) settings.

In most cases you can get into UEFI settings using grub menu. Press ESC button on booting, get into grub menu and select System Setup. Secure Boot option should be in "Security" or "Boot" section of the UEFI.

You can get into UEFI directly, but it depends on your hardware. Read your computer manual to see how to get there. It may be Del, or F2 on boot, or something else.

An alternative way is to disable Secure Boot using mokutil.

Since Ubuntu kernel build 4.4.0-21.37 this can be fixed by running

sudo apt install mokutil
sudo mokutil --disable-validation

It will require to create a password. The password should be at least 8 characters long. After you reboot, UEFI will ask if you want to change security settings. Choose "Yes".

Then you will be asked to enter the previously created password. Some UEFI firmware asks not for the full password, but to enter some characters of it, like 1st, 3rd, etc. Be careful. Some people do not understand this. I did not get  it from the first attempt either ;-)

Update: Now this kernel config is enabled in all supported Ubuntu kernels. Ubuntu 16.04, 15.10 and 14.04 are affected.

You can also Disable Secure Boot in shim-signed running sudo update-secureboot-policy. This wiki page explains this method:

Open a terminal (Ctrl + Alt + T), and execute sudo update-secureboot-policy and then select Yes.
Enter a temporary password between 8 to 16 digits. (For example, 12345678, we will use this password later
Enter the same password again to confirm.
Reboot the system and press any key when you see the blue screen (MOK management
Select Change Secure Boot state
Enter the password you had selected in Step 2 and press Enter.
Select Yes to disable Secure Boot in shim-signed.
Press Enter key to finish the whole procedure.

You can still enable Secure Boot in shim-signed again. Just execute
sudo update-secureboot-policy --enable
and then follow the steps above


Revert audio configuration to defaults I messed up the audio on my 10.10 installation. I had a problem of having no sound when plugging in the headphones and following many different solutions for that problem I (de)installed several packages. Now I have no sound at all.

I don't want a solution on how to fix my headphone problem. I just want to reset all audio-related setting and packages to the after-installation state (where at least the speakers were working).

I found several places where it is said that there is no global reset-to-after-installation possibility. Or that on could use apt-get clean, but even if this would remove all non-standard audio-packages, I don't know which packages I would have to install in order to get the standard audio-packages.

It may well be that in your case only a minor component of the sound system (mainly ALSA and pulseaudio) is missing that could be reinstalled or reconfigured easily. To tell this you should exactly know what you have done, what you have removed and what you may have installed as a replacement. From what you write in your question this unfortunately seems not to be the case.
What to do if we removed all or part of the sound system?
Restoring the sound system would in theory be possible by reinstalling all sound related packages including their default system wide settings, but to my experience a fresh install of Ubuntu is much faster, safer, and easier. Take care to keep your settings and data in your /home directory untouched. You may have to reinstall some additional packages but you will see that even these will have kept your individual settings from your untouched /home.
Is it only a wrong user setting?
If you only changed settings and configuration files but did not remove packages there may indeed be a good chance to recover your system. You can easily find out if your sound problems come from a wrong user setting or from system wide settings by looking at sound in the guest account or by creating a new user account. In case this new user has sound you will find all default settings in the new user's /home. In some cases wrong pulseaudio settings in a user's home can be removed by renaming/deleting ~/.config/pulse (~/.pulse in older releases).
mv ~/.config/pulse ~/.config/pulse.old

Of course this will not help when system-wide settings are broken.

I used Ubuntu for about 3-4 years.

In my opinion, just try to login as root and open an audio/video file. Check headset now. If it works, just login to normal account again. It may be good. It worked for me twice. Sometimes my headset port has these difficulties. Try this.


Unable to install OpenVas in Ubuntu 12.04 While installing OpenVAS vulnerability assessment suite from the software center I am getting the following error:

The following packages have unmet dependencies:

openvas: Depends: openvas-libraries but it is not going to be installed
         Depends: greenbone-security-desktop but it is not going to be installed

What might be the problem?  What should I do install it?

Ok, seems that you are trying to install a virtual packages that is confusing apt. Also, you must make sure that you have the universe repository is activated:

$ grep universe /etc/apt/sources.list
deb http://ubuntu.mirror.cambrium.nl/ubuntu/ precise main universe

The first command should return you something like that, if it don't you should add the repository.

sudo apt-add-repository "deb $(grep main /etc/apt/sources.list | grep -m1 http | gawk -F ' ' '{print $2}') universe"
sudo apt-get update
sudo apt-get upgrade

Once this is done, if you want the client:

sudo apt-get install openvas-client=2.0.3-4

This has no problem whatsoever in the packages page.

But if what you want is the server:

sudo apt-get install openvas-server=2.0.3-4

Again, this has no problem whatsoever in the packages page.

Try installing using the command line. The following guide (from the OpenVAS site) should assist you with this, but it's based on Debian and not Ubuntu (which is merely an Ubuntu derivative) so I would recommend further reading:

http://www.openvas.org/install-packages.html#openvas_debian_obs

You could also see the following blog post which explains, in detail, how to install the latest version of OpenVAS on Ubuntu 12.04:
http://samiux.blogspot.com/2013/05/howto-openvas-on-ubuntu-desktop-1204-lts.html

The software center is great for simple, single purpose applications like games and a simple text editor or some other tool, but if you start fiddling with things like OpenVAS which have more complex installations and a myriad of installation options it's often better to use the command line.


How can i change permission in linux? I tried to change permission but it cannot.it says permission denied and operation denied how can i change the mode.. i tried every thing..

I have tried using sudo, but it gave this error

sudo chown bin ns-allinone-3.21
sudo: error in /etc/sudo.conf, line 0 while loading plugin sudoers_policy' sudo: /usr/libexec/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins)

You need to fix your sudoers problem first, as it will be necessary to run chown in this case. As described in this Stack exchange question in most Unix systems users may only run chown if they have the target user and group privileges.

To fix your sudoers problem:

During boot press and hold the left Shift key or any other key and select "Advanced options for Ubuntu"
boot in "Recovery mode".
Select "Enable networking"
Select "Drop to a root shell propmpt":

Run the following commands

chown root:root /usr/lib/sudo/sudoers.so
chmod 644 /usr/lib/sudo/sudoers.so

Reboot normally.

Generally speaking to change ownership you must be the root user. If you have sudo setup then try using sudo.

sudo chown bin ns-allinone-3.21


How do i convert .dwg to .dxf with free software? How do i convert .dwg to .dxf using free software(as in freedom) only (webapps are ok) ?

ODA File Converter
(Formerly known as Teigha File Converter)
This is 'free as in beer' software however I have no other alternative.
There is a DEB package for installing on Ubuntu 32-bit.
However, for Ubuntu 64-bit users, like myself, you are relegated to downloading the Windows installer and using Wine to install it. Note that you will need Wine version >= 1.3.5 otherwise MSVC++2010 installer crashes.

You can use this website to convert .dwg to .dxf: Zamzar


Auto clear search term from lens There must be a setting or a shell script that would clear the terms from the lens every time it's closed.

The behaviour would be:

open lens and type a term.
reopen the lens with super key.
see no search term is pre populating the lens.

The goal is not to just to clear the term,  it's how to get the system to automatically do it for me.  I don't like having to manually erase the last term used every time, especially if it wasn't useful.  One problem this causes is, if the term only returned files, then all subsequent terms also only return files (I am using recoll-scope).  I must hit 'esc' to fully clear it, before I'm able to search for an app.

Disable the HUD history storage:

gsettings set com.canonical.indicator.appmenu.hud store-usage-data false

Disable all scopes, use the launcher as an application drawer only:

gsettings set com.canonical.Unity.Dash scopes "['home.scope', 'applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses always-search "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-default-view "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses home-lens-priority "['applications.scope', 'files.scope']"
gsettings set com.canonical.Unity.Lenses remote-content-search none

Via here (more tips as well)

Have you tryed enter in terminal this:

      mount (lense) /

and you can always unmount the lense, and this might work fine this way.


Ubuntu 18.04 on a Lenovo Ideapad - Can't get it to recognize USB Keyboard I have a Das Keyboard that was just gifted to me recently, and I'd like to use it on my Lenovo laptop. When I first plugged it in, it worked. Then I had to restart a couple days ago, and I haven't been able to get it to work ever since. It won't even show up when I do lsusb, so when I do dmesg, it shows me this (truncated):

[  123.174691] usb 1-3: new full-speed USB device number 14 using xhci_hcd
[  123.302592] usb 1-3: device descriptor read/64, error -71
[  123.538221] usb 1-3: device descriptor read/64, error -71
[  123.773988] usb 1-3: new full-speed USB device number 15 using xhci_hcd
[  123.902039] usb 1-3: device descriptor read/64, error -71
[  124.138200] usb 1-3: device descriptor read/64, error -71
[  124.246144] usb usb1-port3: attempt power cycle
[  124.897060] usb 1-3: new full-speed USB device number 16 using xhci_hcd
[  124.897265] usb 1-3: Device not responding to setup address.
[  125.105047] usb 1-3: Device not responding to setup address.
[  125.312629] usb 1-3: device not accepting address 16, error -71
[  125.440659] usb 1-3: new full-speed USB device number 17 using xhci_hcd
[  125.440872] usb 1-3: Device not responding to setup address.
[  125.649011] usb 1-3: Device not responding to setup address.
[  125.856604] usb 1-3: device not accepting address 17, error -71
[  125.856738] usb usb1-port3: unable to enumerate USB device

I've done the obvious, which is shutting down, unplugging everything and letting it sit (even over night.) I changed the autosuspend (used "autosuspend" instead of "autosuspend_delay_ms" because the former took when I rebuilt the boot file.) I can't remember what else. Nothing has worked so far, unless I'm just doing it incorrectly.

I'm asking two questions: a.) is there something different I could do that would work in Ubuntu 18, and b.) what specifically does "error -71" mean?

Thank you.

I have found some info referring to an error with newer Gigabyte Motherboards.
Have a look in: https://unix.stackexchange.com/questions/72625/why-is-usb-not-working-in-linux-when-it-works-in-uefi-bios

EDIT:
Basically you may need to enable the option IOMMU Controller in your BIOS, also XHCI and EHCI if it's available.


How do I set fish as the default shell? Is there a way to set fish as the default shell in ubuntu netbook remix? I put in my .bashrc to run fish, which works fine, but ubuntu recognizes it as fish running inside bash, which means that when I try to close the shell it warns me that a task is still running.

It doesn't pop up as a new application, so I can't pin it to my bar like a normal app.

You can set fish as your default shell by running

chsh -s `which fish`

To do so for another user, just add the username at the end of the command, and use sudo.

Then log out and back in.

(To set it back to bash, you need to use Fish syntax of course, like this chsh -s (which bash))

In /etc/shells, add /usr/local/bin/fish:

# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/usr/local/bin/fish

Then chsh -s /usr/local/bin/fish.


How do I downgrade Firefox v. 57 to v. 56? What is the most straight forward way to downgrade Firefox 57 to Firefox 56?

This is to have more time to wait for working replacements for legacy extensions.

Get supported Firefox ESR 60.x (LEGACY ADDONS do not work here)

If you need supported Firefox ESR then you can add one of the PPAs. Two options here:

Get Firefox ESR 60.x as snap:

snap install --channel=esr/stable firefox

Get Firefox ESR 60.x from Mozilla Team's PPA ppa:mozillateam/ppa (the first versions were published here at 2017-10-11 as the result of discussion on the ubuntu-desktop maillist):

sudo add-apt-repository ppa:mozillateam/ppa
sudo apt-get update
sudo apt-get install firefox-esr

Get Firefox ESR 60.x from Jonathon F's PPA ppa:jonathonf/firefox-esr.

sudo add-apt-repository ppa:jonathonf/firefox-esr
sudo apt-get update
sudo apt-get install firefox-esr

For your information:

This new version does not support LEGACY ADDONS.
The current status of porting LEGACY extensions to WebExtension are located in Google Spreadsheet. The percentage of WebExtensions is not too high.

Get unsupported Firefox ESR 52.x (LEGACY ADDONS work here)

Please note that ESR 52 version is not supported anymore. Proceed on your own risk.

You can get Firefox ESR 52.9.0 from Jonathon F's PPA ppa:jonathonf/firefox-esr-52 with the following commands:

sudo add-apt-repository ppa:jonathonf/firefox-esr-52
sudo apt-get update
sudo apt-get install firefox-esr

With such version I can continue to use my add-ons such as SiteDelta, TableTools2, Show Parent Folder, Manage Folders, Wired Marker and others.

Notes: if you have already added ppa:jonathonf/firefox-esr PPA before and do not want Firefox to be upgraded to version 60, then you can pin this version  with the following command (16.04 LTS as an example):

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-firefox
Package: firefox-esr
Pin: version 52.9.0esr-1~16.04.york0
Pin-Priority: 1337
EOF

If you have added any of PPAs (ppa:mozillateam/ppa or ppa:jonathonf/firefox-esr) and Firefox was upgraded from 52 to 60 then remove any PPA with version 60 and enable special one (ppa:jonathonf/firefox-esr-52) with the commands below:

sudo ppa-purge ppa:mozillateam/ppa
sudo ppa-purge ppa:jonathonf/firefox-esr
sudo add-apt-repository ppa:jonathonf/firefox-esr-52
sudo apt-get update
sudo apt-get install firefox-esr

but please note that you will not get security updates as this version is obsolete.

Update 2019-07-09: the Firefox ESR 52.9.0 version suffers from addon-problem with expired certificate. Even local XPI installation ends with "This add-on could not be installed because it appears to be corrupt." message. To fix the problem we need:

Download updated PEM certificate from pastebin (or copy from this superuser answer and save as mozilla2019.pem.
Navigate Firefox to about:preferences#advanced
Click on "View Certificates" button, click "Import" and install  mozilla2019.pem certificate.

An upstream Firefox release, or even multiple such releases, can be installed alongside the ubuntu-maintained version, as suggested in answers to this question on Unix and Linux SE.

You could then use these old versions just when you want to use the apps that need them, and disable the autoupdate in their settings.

This is the best way to deal with legacy web apps in times where browser-makers think of 10 year product lifetimes or backwards-compatibility as four letter words.


Error mounting /dev/sdb1 at /media/ on Ubuntu 14.04 LTS How I can fix the Error mounting /dev/sdb1 at /media/... It works pretty good in the past but I made a clean installed of Ubuntu 14.04 LTS and the Error mounting coming.
I try to fix it with with Gparted, ntfs-3g, pmount, but this programs can't find the external HDD.
But when I boot put the USB drive with Ubuntu 14.04 on test mode this can find and read my external HDD.
How I can fix it?

open terminal with Ctrl+Alt+T and run

sudo ntfsfix /dev/sdb1

I got the same error, but in my case, it wasn't because of a corrupted NTFS, but because Ubuntu didn't recognize that the disk was formatted as exFAT. I could open the disk with no problem in Windows. Then I checked the format and saw that it was exFAT. To open it in Linux I installed:

$ sudo apt install exfat-fuse exfat-utils

And the disk could open without any issue.


Automatic installation of NVIDIA CUDA and NVIDIA drivers My system does not have an nVIDIA card installed on it, and neither did I execute any command to install the same.

However, the upgrade check lists the installation of the nvidia driver (331.113).

What is wrong in the configuration of my system?

Your results of running the command lspci -nn | grep VGA are:

00:02.0 VGA compatible controller [0300]: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller [8086:a011] (rev 02)

Your OS has not detected an NVIDIA card installed on it, as you said in your question, and so you should uncheck the NVIDIA driver (331.113) from your upgrade checklist, because you don't need it. If you have already installed nvidia-331, you can also safely uninstall it.

If you have installed either libcudart5.5 or nvidia-cuda-toolkit, you can also safely uninstall them.

You can list the drivers with the command

sudo ubuntu-drivers devices

Also double confirm nvidia driver with its settings

gksudo nvidia-settings

Hope this helps!


How do I configure Ubuntu to reboot every day at a given time? Using the terminal or a bash file, how can I configure Ubuntu to reboot every day at (say for instance) 3 AM?

In other words, I want to schedule an automatic reboot through the terminal.

I haven't been able to find anything related to this on Google or AskUbuntu, and I'm fairly new to Ubuntu in general (just got my new Raspberry Pi).

Edit the crontab entries using crontab -e command (by default this will edit the current logged-in users crontab) and add the following line:

0 3 * * * echo $PASSWD | sudo -S reboot
#change $PASSWD with your password

Save the file and check the new crontab entry with crontab -l.

If you want to use only:

0 3 * * * sudo reboot

as crontab, this doesn't work normally and you should check this post to see how can you make it to work.

Or, simple add the crontab to the root user's crontab file offering the complete path for the reboot command using sudo crontab -e:

0 3 * * * /sbin/reboot

Why do you want - or need to do this? Whilst it's pretty simple to do, there's almost certainly a better solution with Linux which doesn't involve a reboot. Unlike Windows, Linux based OS's don't require reboots for almost anything except kernel upgrades.

If you explain what you are trying to achieve we can probably help you better.


Does Microsoft Office 2010 still have incompatibility issues with LibreOffice I know Microsoft Office 2003 and Microsoft Office 2007 have some incompatibility issues with LibreOffice. For example if I create a document in LibreOffice with doc format and try to open it in Office 2003/2007, the margin, tables and images might/will move a bit around.

Reading that Microsoft Office 2010 is "more compatible" are this issues resolved that when I create a doc or odt file, it will be correctly read in Office 2010.

Note that I say THEY have incompatibility issues. For what I have seen, the correct format is the one used in LibreOffice/OpenOffice and not the other way around. It is more standardized.

UPDATE - Would like to add that in 2 pages of Wikipedia, Microsoft Office 2010 is mentioned as having compatibility for version 1.1 of the ODF.

http://en.wikipedia.org/wiki/OpenDocument

http://en.wikipedia.org/wiki/Microsoft_Office_2010

Because of this, I made the question just to be sure from experience of other LibreOffice users in Ubuntu.

UPDATE 2 - The European IT authorities have come up with several ideas to improve the OOXML compatibility in LibreOffice. they include all the problems I mentioned like images, macros, frames and such. More info here and here.

I want to also add that after LibreOffice 4.x, the compatibility level has risen. There is more compatibility between both office suite.

With my personal experience, I say that NO they are not.

A .doc file created in LibreOffice suffers from some changes when it is reopened in MS Office 2010. You will also feel that your header and footer settings are disturbed.

Same in the case of .ppt files.

I prepared a seminar of robotics in LibreOffice and saved it as a .ppt file. But, at the time of presentation my college offered me a Windows computer with MS Office 2010. When I opened the .ppt on Windows, I have to make several changes before presentation such as  page width, table size, heading size and images (specially charts and bars).

I think "the margin, tables and images might/will move a bit around" is way too strong definition of incompatibility. This way MS Office is not compatible with itself: you may open the same document on two different computers using the same version of MS Office and get two different results. It is less related to presentations because Power Point presentations are more like sets of objects with implicitly or explicitly given coordinates, but still even in Power Point there may appear, for example, another empty slide or some other discrepancy.

The reason is obvious, .doc is a "flow of text" that has as much information about every piece as possible but still some default settings not included in the document itself may matter. For example, at least in earlier versions the page format was not included in the .doc file, and if two computers have Office with different default page sizes, e.g. US Letter and A4, they will render the same document differently.

To ensure this kind of compatibility everything should be compiled to PostScript or PDF. But even pdf may look different on another computer (though, those are mostly font-related issues when fonts are not embedded into the document). Luckily, the Acrobat Reader is available on every computer and even allows to show presentations full-screen etc.

Since you asked about own experience: for me the real issue is when one program cannot open the document created in the other one, and I believe (and from my own little experience -- little because I prefer TeX) by now they are 99%-compatible. Except for VBA and macros -- there are still a lot of issues even though LibreOffice has VBA-compatible mode. The last issue I had was when I was trying to modify a VBA macro using LibreOffice: it run the changed macro beautifully, but just did not save any changes, and did not show any errors when I was saving it... Beware.


Unable to install proprietary nvidia drivers on Xubuntu 20.04 I upgraded a bunch of old machines from Xubuntu 18.04 to 20.04, everything going smooth except a distressing flickering when windows go on focus or scroll (i can briefly see other windows that are in the background) I think it's a graphic driver issue but i'm unable to switch from nouveau drivers to proprietary nvidia ones, because Software & Updates -> Additional Drivers shows no output.
Even the command
ubuntu-drivers devices
gives no output
Is there anybody experimenting the same problems or able to help me?
Thanks,
Lorenzo
lspci | grep VGA gives:
VGA 00:12.0 VGA compatible controller: NVIDIA Corporation C68 [GeForce 7025 / nForce 630a] (rev a2)

You need to black list your nouveau driver when your linux boots up cause of some dependency problems nouveau drivers are not best suited for some graphics card.
After successfully booting up you had to switch from opensource driver that was that nouveau driver to proprietary driver by nvidia .
Please follow this link for how to blacklist that driver
What does modprobe.blacklist=nouveau do?

Have you tried updating the whole pc after updating Ubuntu version using:
sudo apt update && sudo apt upgrade


Can Ransomware effect the Linux OS? Recently, The Hacker News stated the following:

  Ransomware threat has emerged as one of the biggest threats to internet users in recent times. Typically, a Ransomware malware encrypts all files on victim’s computer with a strong cryptographic algorithm, then demand a ransom to be paid in Bitcoin (range between $200 and $10,000).
  Cryptowall is currently among the most widespread and sophisticated family of Ransomware backed by a very robust back-end infrastructure.

Source

Would this work on Linux?
If it can, what could I do to help secure my system against these attacks?

Would this work on Linux?

Why not? The general principle is applicable to Linux, the specific means might be different from common Windows attacks.

  If it can, what could I do to help secure my system against these attacks?

Don't run random executables off the internet. Keep your system updated. The usual.

There are many ways, but I_love_you.deb attachment is the easiest method.

To secure computer you should backup your data both locally and on a cloud. On computer we have (a) large-and-cheap data like movies and (b) compact and precious work related data (scripts, reports, presentations). Former can be saved on USB drive (keep it unplugged, when not syncing). The latter should be emailed to yourself daily and saved on CD-R, not CD-RV, not on USB. CD-R might sound dated, but it works.

Is it safe to transfer data from infected Windows to Linux if I don't use sudo?
It depends. If you make sure that Linux OS is a primary master then it might be. Otherwise infected Windows OS can "patch" your Linux files, then boot your Linux. Sounds futuristic, but I've experienced it.


Is it safe to leave the /home folder on an SSD? I just got a new laptop which came with a 500 GB SSD and a 1000 GB HDD. On the SSD there was a Windows 10 installation. I partitioned the SSD and now have both Windows 10 and Ubuntu installed on it. I have not moved my /home directory to the HDD. Since I am going to be apt-getting a lot of programs, I will be writing a lot of data to this SSD. From my understanding, this is potentially a bad thing as it can damage the drive.

Is this a bad thing?
By moving /home to the HDD, will this mitigate the problem?

No, it is not a bad thing. I have been using a /home on my sdd for at least 2 years.

But I did change /home/$USER/.config/user-dirs.dirs so all my user directories point to my HDD. Those directories (like Downloads and Desktop are my 2 main areas where things get written and stored).

I plan for failure: my SDD has -no- personal data. If it fails I buy me a new one and re-install Ubuntu. My personal stuff on my HDD that I can not restore (so addresses, a passwordsafe, vpn stuff etc and not music, movies or sofware I can re-download) are all also on 2 USB sticks.

The 15 minutes it takes to re-install Ubuntu onto my SDD make it worth keeping the default operating system things on it.

If I may say something about this, having done an upgrade to an SSD on a MacBook Pro, I have the OS (Mac OS X Snow Leopard) on the SSD and my /Users folder on an HDD.

It is best to have the /home folder on a separate hard drive (external for laptops and internal for desktops) rather than on the SSD. Why? An SSD has a limited number of times that you can write to it and having your /home folder on the SSD is a bad idea, an SSD will actually die because it's being written to (saving your data) constantly.

Swap is another thing you don't want to have on an SSD, for the exact same reason as the /home folder. Swap as most of us know, is used for putting the computer to sleep, it saves the data to the hard drive in the /swap partition. So, if you have an SSD and have swap enabled, remove it from the SSD, move it to the hard drive or better yet, turn it off.


Gvfs-mount does not work with FTP anymore Since I upgraded to Ubuntu 12.04 gvfs-mount does not work with FTP anymore. Trying to connect to a FTP-server using Nautilus or

  gvfs-mount "ftp://user@server.de/"

I get the following error message:

  Error mounting location: Error resolving '': No address associated with hostname

Connecting via SSH or other protocols works well. The problem occurs only with my current user. That means it can't be an issue with the FTP-Server. So I tried to delete all gvfs config files with:

  sudo apt-get purge gvfs

and after that reinstalled it. But this did not change anything.
What else could I do? Please help.

I found the answer here: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1018806
The problem results from wrong configuration of system wide proxy. If you have the same problem you can try following commands, that will reset your proxy settings to default:

gsettings set org.gnome.system.proxy autoconfig-url ''
gsettings set org.gnome.system.proxy ignore-hosts ['localhost', '127.0.0.0/8']
gsettings set org.gnome.system.proxy mode 'none'
gsettings set org.gnome.system.proxy use-same-proxy false
gsettings set org.gnome.system.proxy.ftp host ''
gsettings set org.gnome.system.proxy.ftp port 0
gsettings set org.gnome.system.proxy.http authentication-password ''
gsettings set org.gnome.system.proxy.http authentication-user ''
gsettings set org.gnome.system.proxy.http enabled false
gsettings set org.gnome.system.proxy.http host ''
gsettings set org.gnome.system.proxy.http port 8080
gsettings set org.gnome.system.proxy.http use-authentication false
gsettings set org.gnome.system.proxy.https host ''
gsettings set org.gnome.system.proxy.https port 0
gsettings set org.gnome.system.proxy.socks host ''
gsettings set org.gnome.system.proxy.socks port 0

Tut mir leid, but that looks more like an error in host resolution than a problem with gvfs-mount. gvfs-mount with FTP works fine for me.

Please make sure that the regular ftp client works:

ftp server.com


How can I get a list of all repositories and PPAs from the command line into an install script? I know how to list all packages installed on my system.

But how could I get a list of all repositories and PPA's into a script that I can run on a new machine to replicate the repository setup including the keys?

I know I can look into /etc/apt/sources.list and /etc/apt/sources.list.d, but I'm looking for a way to generate a script that executes all apt-add-repository commands on a new system (that sorts out getting all keys).

Any ideas?

You can show everything with:

grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*

Install ppa-purge

apt install ppa-purge

Then get ppa list by tab completion...

ppa-purge -o (hit Tab key twice)


Ubuntu 14.04 Wubi Installation: root.disk is write-protected cant be mount I've installed Ubuntu through Wubi. As the Wubi is not working well with 14.04 the disk / is mounting as read only. So I rebooted and gone through recovery mode and choosed root terminal. I tried to remount using mount -o remount,rw / but it says it cant be mounted and the root.disk is write protected. What to do now?

Wubi worked too well so they stopped support for it and are forcing regular install which has never worked for me.  At least not without erasing my windows partition.


How can I get the GRUB menu to appear only when I press shift on a dual boot system to give me the option of booting Windows? I have a dual boot system. I mainly work with Linux and rarely with Windows, so I want to set Linux to boot by default without bringing up the GRUB menu, but to bring up the menu if I press SHIFT so I can boot into Windows.

I already hide the grub menu and boot by default with Linux and only shows the GRUB menu when I press SHIFT, but this only works if I disable the Look for other OS option, and as a result of that Windows doesn't appear as an option in the menu, so I can't boot into it!

How can I get the configuration I want?

You need to edit as root the file /etc/default/grub and modify a few lines at the top to the hidden timeout. In my case it looks as follows:

GRUB_DEFAULT=0
#GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-101-generic"
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10


Having trouble with .tar.gz extraction I tried to extract .tar.gz file using following command

spgt@ubuntu:~$ tar xvf 12.0sp1_232_quartus_free_linux.tar.gz

but this is what I see after I press return

tar: 12.0sp1_232_quartus_free_linux.tar.gz:

Cannot open: No such file or directory

tar: Error is not recoverable: exiting now

Are you in the same folder as your tar file?

Try:

tar -xzvf 12.0sp1_232_quartus_free_linux.tar.gz


How do I prevent a folder inside of /tmp from being cleaned up? This question is about Ubuntu 14.10 on my developer laptop.
I've got a folder in /tmp that is used by an application to put temporary stuff in there. This application usually makes a temporary folder in my homedir and deletes it afterwards. For some reason that doesn't work when the homedir is encrypted. So instead, I made a symlink to /tmp/foo inside my homedir. My application can write there and make it's temporary subfolder.
Now /tmp/foo gets deleted every time I reboot my machine. Until now I've just recreated the folder manually after reboot. Now I learned in How is the /tmp directory cleaned up? that there is a job doing that.
I've looked at /etc/init/mounted-tmp.conf but my bashfu and especially my findfu are not sufficient to do what I want. Here's an excerpt from that file:

   EXCEPT='! -name .
            ! ( -path ./lost+found -uid 0 )
            ! ( -path ./quota.user -uid 0 )
            ! ( -path ./aquota.user -uid 0 )
            ! ( -path ./quota.group -uid 0 )
            ! ( -path ./aquota.group -uid 0 )
            ! ( -path ./.journal -uid 0 )
            ! ( -path ./.clean -uid 0 )
            ! ( -path "./...security*" -uid 0 )'

   # Remove all old files, then all empty directories
   find . -depth -xdev $TEXPR $EXCEPT ! -type d -delete
   find . -depth -xdev $DEXPR $EXCEPT -type d -empty -delete

What I want to do is add a condition that makes it delete everyting inside /tmp/foo, but not /tmp/foo itself. How do I do that?

/etc/init/mounted-tmp.conf is part of the mountall package, so any updates on that package and the suggested changes will be reverted.

$ sudo dpkg -S /etc/init/mounted-tmp.conf
mountall: /etc/init/mounted-tmp.conf

Instead, according to the Filesystem Hierachy standard (FHS);

Regarding /tmp:

  Programs must not assume that any files or directories in /tmp are
  preserved between invocations of the program.

Regarding /var/tmp:

  The /var/tmp directory is made available for programs that require  temporary files or directories that are preserved between system reboots.
  Therefore, data stored in /var/tmp is more persistent than data in /tmp.

So you should change your symbolic link to use /var/tmp instead of /tmp.

Run this:

echo "if [ ! -e /etc/foo/ ]; then mkdir /etc/foo/; fi; rm -rf /etc/foo/*" > /bin/foodel; sudo chmod 755 /bin/foodel

then Add this to /etc/inittab see here: where is inittab file?:

foo:2345:boot:/bin/foodel

That will create /etc/foo on boot if it doesn't exist, and then empty it.

This will do the same on bash login:

echo "/bin/foodel" >> ~/.bashrc