Ubuntu 20.04 - No wifi adapter found DELL I know there are many questions about this, but no one works for me.
I have been more than a week testing blogs, github and forum solutions, actually I really don't know what I have installed, blacklisted and created to try to get back my wifi adapter.
Problem started after I connect my ipad to my laptop.
Manufacturer: Dell Inc.
Product Name: Inspiron 3521
Kernel release:
5.4.0-37-generic

If I throw this line:
lspci -knn | grep Net -A3; rfkill list

Output:
02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
    Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]
    Kernel modules: bcma, wl
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

If I throw this line
sudo modprobe wl

Output:
modprobe: FATAL: Module wl not found in directory /lib/modules/5.4.0-37-generic

If I throw this line:
grep wl /etc/modprobe.d/*

Output:
/etc/modprobe.d/iwlwifi.conf:# /etc/modprobe.d/iwlwifi.conf
/etc/modprobe.d/iwlwifi.conf:# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
/etc/modprobe.d/iwlwifi.conf:# microcode file installed on the system.  When removing iwlwifi, first
/etc/modprobe.d/iwlwifi.conf:# remove the iwl?vm module and then iwlwifi.
/etc/modprobe.d/iwlwifi.conf:remove iwlwifi \
/etc/modprobe.d/iwlwifi.conf:(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
/etc/modprobe.d/RTL810xE.conf:options RTL810xE fwlps=N

BIOS:
secure boot disable
load legacy option Enable
Boot list option legacy

Secure Boot not enabled on this system.
Done.
if I throw  sudo apt install --reinstall bcmwl-kernel-source:
wl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.4.0-37-generic/updates/dkms/

depmod.........

DKMS: install completed.
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for initramfs-tools (0.136ubuntu6) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-37-generic

Anyone could help me?

The driver is installed it is shown here:
Kernel modules: bcma, wl

wl is the correct driver for this adapter.
But the problem it is not in use. The reason may be that Secure Boot is enabled in UEFI settings, or it is blacklisted.
Check if Secure Boot is disabled in UEFI aka BIOS. If that doesn't help, run
grep wl /etc/modprobe.d/*

and look if wl is blacklisted somewhere.
If that doesn't help, reinstall wl by
sudo apt install --reinstall bcmwl-kernel-source

I also face the problem.I solved this via "Additional Drivers" tab in "Software&update". Here already selected "Do not use the device"
Now u select " Using 802.11 Linux STA wireless driver source from bcmwl-kernel-source(proprietary)" click "Apply changes"


Can I use all my RAM for application data? I have yet another question about "where is my Linux memory"

Question goes: can I use cache for application data?

On my laptop I have 1GB ram. Situation after some time of work: browser takes 400MB and all other apps caa 300MB (quickly summed in system monitor). System monitor says I use 90% of RAM and I have already 200MB on swap. Laptop is getting slower when I start new things (e.g. open new tab in browser or open new Nautilus window). probably putting memory on swap

So there should be 1200MB (ram+swap) used but all app I see uses only 600MB. Where are other 600MB? Out of this 600MB there is 400MB real RAM.

I am not copying or any other massive IO activity.

I read about Linux smartly uses all ram it has using buffers and cache. So, kernel (cache) uses 300MB. What if I don't want to have disk mirrored and I want to use memory for application data (e.g. new browser tab)? I don't need 200MB of mirrored disk data, because I (for example) won't use open the same photos on data partition I just seen.

So can I use all my RAM for application data? (including browser, desktop, xorg, other services). How?

Applications use ram on their own; you don't have to DO anything.  Whatever ram ISN'T in use by applications is used to cache recently accessed files to speed things up if they are needed again, thus between the two, ram usage is usually close to 100%.  As applications request more ram, the cache gives it up.

Try setting the swapiness to 100, it should improve performance in your machine and avoid freezes by making a more intensive usage of the swap, keeping only what is active on memory.

See here how to do :
https://help.ubuntu.com/community/SwapFaq#What%20is%20swappiness%20and%20how%20do%20I%20change%20it?


MenuBar in the right corner doesn't work My Menubar doesn't show the icons for "network-manager" and the "indicator-multiload". It worked fine until today. Here is a screenshot:

I want that it looks like this:

I'm using a VPN and recently I had a lot of disconnects so I downloaded this: http://sourceforge.net/projects/vpnautoconnect/

It didn't work for me so I removed it, but after a reboot my menu bar looked like this. So I think there is a connection between this two events but I have no idea what exactly.

bash history:

sudo aptitude update
sudo aptitude full-upgrade
ps x
sudo aptitude purge vpnautoconnect
sudo aptitude purge vpnautoconnect:i386
sudo aptitude update
vim /etc/network/interfaces
gsettings get com.canonical.Unity.Panel systray-whitelist
sudo aptitude install indicator-multiload
indicator-multiload
sudo aptitude purge indicator-multiload
sudo aptitude install indicator-multiload
indicator-multiload
sudo apt-get install compizconfig-settings-manager nm-applet
sudo aptitude reinstall network-manager network-manager-gnome
indicator-multiload

Not sure if you still need this but you can restart or quit the multiload indicator by running the following command in a terminal:

indicator-multiload &

The screenshot signifies that the network manager is not running.

To check if network manager is up and running:

sudo initctl list | grep "network-manager"

To start the network manager:

sudo service network-manager start


How do I set the grub timeout and the grub default boot entry? In Ubuntu 12.04 (or above), how do I set the GRUB time and the default OS (that I see at boot time) as I'm dual-booting Windows (7/8) and Ubuntu (12.04 or above)?

Press Alt + F2, type gksudo gedit /etc/default/grub press Enter and enter your password.
You will see the following contents:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

You can change the default from 0 to any number, corresponding to the entry in the Grub bootup menu (first entry is 0, second is 1, etc.)
You can change the "hidden timeout" (no menu); and also display the countdown (GRUB_HIDDEN_TIMEOUT_QUIET=false)
You can force the grub menu to show by commenting out the two GRUB_HIDDEN lines with a # at the beginning of the line
And set the grub menu timeout (default is 10 seconds)
Make your changes, press Ctrl + S to save and Ctrl + Q to exit
Important: Open a terminal with Ctrl + Alt + T and type sudo update-grub to apply the changes you just made
Reboot and you should see your timeout/default entry change

Linked Question:

How do I set Windows to boot as the default in the boot loader?

It can be done easily without any codes. Just follow these steps.

Open file system.
Open /etc folder.
Open default folder.
Find grub file and open it with leafpad (or any other text editor).
Set GRUB_TIMEOUT to your need and save it.
Now open terminal and type update-grub.
Reboot your system.

That's it.


How to migrate the whole system to a new machine? I use ubuntu to deal with daily job. Now I buy a new laptop, and I want to migrate my whole system(programs, packages, data, settings, etc) to the new machine.

I know I can copy my home folder to new machine and I will get (almost) all data and settings. But is there a safe way to copy the whole system? Or it's a bad idea?

Prerequisites:

The same version of Ubuntu is installed on both machines. The architecture (32/64 bit) can be different.

Step 1: Store the list of installed packages

Run the following command on the source machine to store the installed packages names in ~/pkglist:

sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/pkglist

Step 2: Transfer your config

Use scp or rsync or even a flash drive to transfer your home directory (~/, ~/.), the source list (/etc/apt/sources.list) and any other files you customized or installed (like apache config under /etc or softwares on /opt) from the source machine to the target one.

Step 3: Install packages

On the target machine run the following command in a failsafe terminal session to install your packages:

sudo aptitude update && cat pkglist | xargs sudo aptitude install -y

Extract from:

http://eggsonbread.com/2010/01/28/move-ubuntu-to-another-computer-in-3-simple-steps/

There are several utilities that can make direct copies of your file system and some (Norton Ghost for example) can adjust your partitions to adapt to the new disk.  Software like this allows you to not only copy from disk to disk but also keep a separate, compressed backup for yourself in the future.

There's also the tool dd to do this, however it takes a bit more knowledge and research to produce the results that you would like.


Ubuntu cannot boot (stuck on black screen) I cannot find the answer to my particular case at the forums. I had successfully installed ubuntu 16.04 with dual boot windows 10. But, the problem is I cannot boot into ubuntu, at least not in a normal way.

I can boot ubuntu from recovery mode (advanced option from grab menu), but every time I tried to boot it normally, I got stuck sometimes on a black screen. Sometimes, (after several reboots), I got to the ubuntu logo with progress dots, but I got stuck there again.

One time I was successfully able to boot normally, I don't know why or how (I had been trying every solutions I can find over this problem), but after restart, I got stuck on the black screen again.

Sometimes, some lines of code appear on the left top corner of the screen, and I got stuck there. No matter what I tried, I just cannot boot normally.

Please help. (I am a newb and this is my very first attempt to install ubuntu, the only OS I am familiar is windows)

Here you go:

Are you on Nvidia Graphics card? If yes, then start in nomodeset instead of quiet and install nvidia graphics driver using terminal and restart, voila.

Permanent Solution : Start your system in nomodeset, after the system is up and running open terminal and add the graphics driver repo using 'sudo add-apt-repository ppa:graphics-drivers' then update using 'sudo apt-get update' then finally install the latest nvidia drivers using the command 'sudo apt install nvidia-384', after the installation is done, reboot your pc and you won't longer need to change it to nomodeset everytime you boot up, also you can install nouveau drivers instead nvidia, which are opensource and may be more stable than the nvidia one, if you don't do any extreme gaming on your Ubuntu then I'd suggest you to install the nouveau drivers.


Problem with installing Steam on Ubuntu 15.04+ Actually I have installed the new Ubuntu 15.04 64bit, and when I'm trying to install Steam on it, there is a problem.
In fact I have downloaded the deb package from steam website, installed it and when I start it nothing happens.
I tried to start it from terminal and what I've got

$ steam
Running Steam on ubuntu 15.04 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(0_client)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

This was originally a problem with Steam on Ubuntu 15.04/15.10.  Steam bundles old libs and are colliding with mesa drivers, that is also why closed drivers aren't seeing this problem. Update: It might also be that you are missing some things. See other mchid's answer.

There is an open bug in Steam's github.

The current workaround is to remove the old lib version, at least until valve fixes the issue in their startup script or something like that.

So enter these folders and do this (ignore the x86_64 if you only have a 32bit system):

cd $HOME/.steam/steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
mv libstdc++.so.6 libstdc++.so.6.bak
cd $HOME/.steam/steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu
mv libstdc++.so.6 libstdc++.so.6.bak

If you have problem with the directory above then you should try this:

Some people have the .steam/steam/ubuntu12_32, others have only .steam/ubuntu12_32. If you don't have these folders, find the correct location by checking where your steam is looking for the user profile:

$ fgrep config=  /usr/games/steam
config=$HOME/.steam

Use that to find your lib location:

[config value] + /ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu
   |
   \-> $HOME/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu

It worked for me... but please note that if some game required that old lib from the steam runtime, it may crash (that is why valve should fix this)

Edit 2015-08-22:

As Steam now has a link in the $HOME/.steam/root that always points to the correct Steam install directory, this command should work for everybody and it simpler for a fast fix:

find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ -name "libstdc++.so.6" -exec mv "{}" "{}.bak" \; -print

Also, please remember that on each steam runtime update, you will probably need to run this.

Edit 2016-02-16:

Also see the mchid reply below, simply doing:

sudo apt-get install libgl1-mesa-dri libgl1-mesa-dri:i386

might be enough to fix this.

Edit 2016-10-23:

For ubuntu 16.10 the command was updated to remove more files that are breaking mesa drivers, so this new command should work:

find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ \( -name "libstdc++.so.6" -o -name "libgpg-error.so.0"  -o -name "libxcb.so.1" -o -name "libgcc_s.so.1" \) -exec mv "{}" "{}.bak" \; -print

For NVIDIA closed source drivers, see Vincent's reply below.

Edit 2017-01-08:

Probably final edit, the latest steam linux update should fix most, if not all problems! finally! :D

Edit 2017-08-03:

Sadly, returning from vacation found that some recent update again broke steam.
So if you get this when starting, just after update download:

process 23148: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file dbus-connection.c line 2688.

and then steam crash, then you are hitting this bug, reported as non-fatal, but it do crash steam on same distros. workaround is this:

ln -s ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libdbus-1.so.3 ${HOME}/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_32/libdbus-1.so.3

good luck

Just ran into this issue on a fresh install of Ubuntu 18.04 LTS. Turns out the Steam runtime version of libgcc_s.so.1 was the culprit. Renaming the file fixed the issue for me:

$ cd ~/.steam/root/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/
$ mv libgcc_s.so.1 libgcc_s.so.1.bak


"Waited for * || true but it wasn't there " each time I run apt Every time I try to install ANYTHING with apt-get,i get this error

E: Waited for /usr/sbin/dpkg-preconfigure --apt || true but it wasn't there
E: Failure running script /usr/sbin/dpkg-preconfigure --apt || true

I have looked at many forums but none of them seem to have any answer.

Any help would be much appreciated at this time!

(everything must be done via command line, 13.04 server)

Tried Braiam's command, this was the output + command:

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-pr
econfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"
[sudo] password for swech:
--apt: 1: --apt: Syntax error: Unterminated quoted string
-bash: true;};' >> /etc/apt/apt.conf.d/70debconf: No such file or directory

This means that you somehow screwed up your configuration scripts, the reason why is happening is because DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";}; doesn't exist in your scripts so you may have to create it:

sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"

Then try again.

try-

sudo apt-get update && sudo apt-get -f install

then see if error prompts.


Download Ubuntu 11.10 with all update and upgrade Where can I get Ubuntu 11.10 with all update till now? Because every time i have update to Internet and it take hour for that.

Please help me.

Easy answer - you don't. The LTS LiveCD is updated once every half-year, and the normal versions are made once and then left that way unless something very extraordinary shows up.

Intermediate answer - By installing from the MinimalCD (quite a lot more advanced than using the LiveCD, but it should give you the latest) you'll get the latest when installing. https://help.ubuntu.com/community/Installation/MinimalCD

Every time I download a image, it takes at least 15 to 20 minutes. Depending on bandwidth it may take hours. I am not endorsing piracy (I have got warnings before in other places entioning torrents of linux) you can get torrents somewhere that may go faster. The seeders are what give the speed. As far as I know every copy of Ubuntu comes up to date. You will still have to update wireless and flash... ect. I am not a expert, but thaty is my 2 cents ... lol.


What procedure should I take to update a specific application? I installed nmap from the Software Center and their version is 5.21. After this, I downloaded the latest version that is 6.01 but I haven't installed it yet.

What I should do and why?

Uninstall the currently installed version and then install the new version.  Or..
Even with an older version installed, install the new one over this.

Is this applicable to upgrading any software packages on Ubuntu or it doesn't?

When you chose install, the Software Center will replace the current version with the newer version, i.e. upgrade to the newer version.

By just upgrading, you will be more likely to keep any  custom settings you have.  The only way I would uninstall first is if I thought I might have some bad settings that are stopping the program from running properly and wanted to do the quick and dirty fix instead of tracking down the incorrect setting..  However the only way to reliably wipe all you old settings it to run

apt-get purge {application name}

and to the final part of your question, this applies to just about any application I can think of.  I have even upgraded my network manager while online and then continued to stay online(the old version continues to be used until the program is restarted, in the NM case that is reboot unless you force it to stop and start manually.

Uninstall the version 5.21 currently installed and then install the new 6.01 version fresh. If it is a .deb file, double click on it and Software Center will take it from there. Software Center may reject a non-repo source if there is a repo source application already installed. In rare instances, the software may be installed separately, resulting in two versions of the same software installed on the same computer. In any case, removal of the old package and installation of the new package is recommended, not required.

Does that answer the question that you implied but wrote incorrectly?


2 ip addresses for 2 Server on 1 computer? I want to create 2 ip addresses, which every single one leads to a diffrent website, I tried to do it with virtual hosts, but I couldnt configure it the way I want it to work.

I want it to look like this:

(192.168.1.41) goes  to var/www/html/sitea/hs.html

(192.168.1.46) goes to var/www/html/siteb/index.html

I tried adding an IP address , with this tutorial, and it worked fine:
How can I (from CLI) assign multiple IP addresses to one interface? I can now access my diffrent serverpages on both internal IP addresses.

but I tried to forward the second IP to use it with my external IP, and now when I want to get on my page from the www, it just displays me siteb on both ports.

I've made it work with giving the virtual host (etc/apache2/sites-enabled) an specific IP like so:

<VirtualHost 192.168.1.41:*>
..
(sitea)
..
<VirtualHost/>

<VirtualHost 192.168.1.46:*>
..
(siteb)
..
<VirtualHost/>


Upgrading Ubuntu from 14.04 to 16.04 over https My ISP is using some kind of stupid transparent proxy and I am getting hash mismatch error during upgrade. This has happened before - but the ISP is either incompetent or uncooperative. Good thing they can cache https traffic. So I was wondering what I can do upgrade os over https with a peace of mind. Some repos are on https as mentioned here.

Or if there is anything else I can do. Moving the server or getting connecting from another server is a time consuming and service disrupting process and I would like to avoid it if possible.

Screenshot of hash mismatch error:

Thanks for any help.

to switch to https from http you just need to update the urls in your source.list and source.list.d files to use https not http.


"Failure to download extra data files" after installing ttf-mscorefonts-installer After fresh install 12.04 I && updating apt and system restart, I always get this annoying message after reboot :

  Failure to download extra data files

  The following packages requested additional data downloads after
  package installation, but the data could not be downloaded or could
  not be processed.

  ttf-mscorefonts-installer

  The download will be attempted again later, or you can try the
  download again now. Running this command requires an active Internet
  connection.

But if I run attempt now, it shows flashing terminal window and like nothing happen. It'll happen again when I restart system.

I found someone have this problem too, but he haven't replied yet.

I'm a newbie here, please help.

Solution 1:

Connect to the internet and run this command below, to fix the error

sudo apt-get install --reinstall ttf-mscorefonts-installer

This will reinstall the package, and download the data files needed to configure the package. Wait for some times to finish downloading. The download size is approximately 4MB.

Solution 2:

Connect to the internet and go to this sourceforge link and download all the .exe files there except wd97vwr32.exe file.
Copy those files in your home directory.
Run this command to configure the package

sudo dpkg-reconfigure ttf-mscorefonts-installer

This will ask you whether you have downloaded microsoft fonts or not. Use Tab to select OK, and hit Enter.
Then again you will be asked to enter the directory name for the downloaded files, Type the location of your home directory and  use Tab to select OK, and hit Enter.

For example, if your login name is anwar, the location will be /home/anwar, because I copied the downloaded files there.

Done! you have successfully configured and setup the package.

Note: If the files cannot be downloaded due to 404 error, check the "Can't download?" section

What was the cause of the problem?

This package ttf-mscorefonts-installer is used to download Microsoft's font files (those files are made freely available by Microsoft) from the Internet and install them. Since you must accept the EULA of Microsoft to use those font files, those fonts cannot be included in the package like other Free (Free as freedom) packages.

The problem was, somehow you get disconnected from Internet before downloading those files. So, is the message asking to download more data files.

Can't download?

If you can't download the files due to 404 errors, I have prepared a tar.gz archive of the downloaded contents. You can download it from this dropbox link and extract it to a folder. If you extract it to /tmp/, you'll type that directory after the dpkg-reconfigure command in Solution 2.

look for the file gksudo

which gksudo

and for kdesudo

which kdesudo

since i use kubuntu, gksudo is missing when the automated script is trying to download the missing files.

that's the bug!!

workaround:
i solved it with a symlink:

ln -s /usr/bin/kdesudo /usr/bin/gksudo
sudo apt-get remove --purge ubuntu-restricted-extras ttf-mscorefonts-installer flashplugin-installer
sudo restart

after the restart:

sudo apt-get install ubuntu-restricted-extras flashplugin-installer

later you can remove that ugly workaround-symlink again with:

sudo rm -i /usr/bin/gksudo

Quite a hammermethod but it works


Gnome 3.16 HiDPI scaling only accepts integers I recently upgraded to Ubuntu 15.04 with Gnome 3.16, which is working really great on my machine (despite what I found on many forums around the web). Having a high DPI screen however (13.3" with 1920x1080) I need to scale the entire system to use it. There is a setting for that in the TweakTool, but it only seems to accept integers as scaling factor.

Does anybody know about a workaround for this? Scaling by two is way too large for my screen. The value I want is closer to 1.2

Any help will be greatly appreciated!

I checked with my Fedora 21 install where I have Gnome 3.14.2 and it doesn't seem to be possible to set your desired value:

[btegge@za21 ~]$ gsettings set org.gnome.desktop.interface scaling-factor 1.2
invalid character in number:
  1.2
   ^
[btegge@za21 ~]$ gsettings set org.gnome.desktop.interface scaling-factor 1,2
expected end of input:
  1,2
   ^

My assumptions:

There is a another setting to achieve what you want. The only thing that comes to my mind is font rendering related, though that is not exactly what you are looking for.
It's a mistake that the key only accepts integers as datatype and you should file a bug.

Non-integer scaling is not (yet) supported in Gnome and therefore Ubuntu. Athough, it is possible to achieve with some workarounds using xrandr, which involves an upscaling and a subsequent downscaling, I cannot recommend this as it is very CPU/GPU intensive and comes with other quirks and problems and does not necessarily lead to the desired result. There are a lot of ongoing debates and argues on r/linux over at reddit if you are interested and here is also an article from one of the elementary devs (a distro based on Ubuntu) who talks a bit more about High DPI in depth: link. Hope this helps a bit.


How to establish VPN Connection using Vodafone K3773 HSPA USB Stick? I am using Ubuntu 12.04 Desktop. I am trying to establish VPN PPTP connection to Ubuntu 12.04 Server.

VPN connection available when PC is connected to LAN -> ADSL modem -> Internet -> VPN Server.

No VPN connection available when using 3G modem Vodafone K3773 HSPA USB Stick -> Internet -> VPN Server.

Internet is connected. VPN is not. How to establish the VPN Connection?

Server side log: GRE: Bad checksum from pppd.

The problem was NAT. I used OpenVPN instead PPTP.

In case of using "3G modem Vodafone K3773 HSPA USB Stick" connection goes through the Vodafone firewall. It may be an incompatibility with Vodafone firewall. I used OpenVPN package to create vpn-network instead pptpd. It is working fine.


18.04: Bionic Beaver: enforce static /etc/resolv.conf Previously, on Ubuntu 16.04, I felt betrayed when an Ubuntu update installed dnsmasq package, configured it, and gave it precedence over my own super-stable, ultra-fast, and own-configured BIND DNS server. It exactly felt as if Ubuntu hacked my workstation.

Since I happened to be working as a system admin, this was extremely unacceptable. This was a freak-out call. This is when you go to troubleshoot a problem and in one of your steps you use dig or nslookup and you get stunned to see the lo interface replying to you. PANIC

Is there a way to not only fix this issue, but also guarantee that /etc/resolv.conf will be tamper proof?

A simple edit to /etc/NetworkManager/NetworkManager.conf and disabling systemd-resolved.service(as in this answer https://askubuntu.com/a/907249/719422). But that alone, while essential, does not guarantee tamper-proof resolv.conf.

To really enforce a static /etc/resolv.conf that you know will survive restarts of any kind, you need to set the immutable attribute to it. Adding to the answer of Bastian Voigt mentioned above, you do this as SuperUser:

echo nameserver 8.8.8.8 > /etc/resolv.conf
chattr -e /etc/resolv.conf
chattr +i /etc/resolv.conf

...changing the nameserver to your chosen value. That way, you can have a really static /etc/resolv.conf.

The file present is a symlink to another file.
Delete the file

rm /etc/resolve.conf
vim /etc resolve.conf
enter your data
:wq

The file is no longer a symlink but a persistent file.


How to install Netbeans 8.0.2 on ubuntu 14.x I have netbeans downloaded from the netbeans.org site.
This is the file name → netbeans-8.0.2-linux.sh
I dont know how to install it on ubuntu 14.10
Is there any one can help me install netbeans on ubuntu?

Open the Terminal and considering the file is in Downloads directory then do

  chmod +x ~/Downloads/netbeans-8.0.2-linux.sh

After that

  cd ~/Downloads && ./netbeans-8.0.2-linux.sh

And that will bring up the Installation Window.

To Uninstall run

  ./uninstall.sh

in the install directory

Here is how I handled it, after reading this thread;
I tried first to check the file permissions, through the graphical interface, by opening

  'home', 'download',

i.e. the location where I put netbeans-8.0.2-linux.sh;
seeing the button for changing the file to executable was unchecked, I checked it;
I opened a terminal, changed to the directory where netbeans was, and typed:

  'netbeans-8.0.2-linux.sh'

only to be greeted by a 'command not found'...
so I went over the web to check the reason...
and found this thread;
by reading it, I have a better idea of what is going on;
so, I tried, as a last resort, to issue the command like that:

  sudo bash netbeans-8.0.2-linux.sh

...and it went on, smoothly, installing everything.
I just want to add that it didn't really need my password, strange enough;
but it looks it needed to be prefixed with 'bash', otherwise it didn't recognize it, even if the permissions were all there, I checked with
'ls -l', and it was executable for all :user, groups, and others...
I wonder if I have something out of order, or simply configured in some special way, in my config files, maybe in the proc directory...
but now I have another problem:
I started a C project, just to try how netbeans worked, and it did open, create really, a project skeleton;
but it does not find the standard library headers, 'stdio.h' and s'tdlib.h'...

Because, now, this is a separate issue, I will not expand it here; I should start another thread on it.

Anyway, thank so much for the help found in this page :)

I am new to linux, and trying to learn it.
Any clarification would be very welcome.

Ubuntu 14.10 amd turion x2 64 advent 9515 2GB ram


Playing iPhone (iOS10) music in Rhythmbox on Ubuntu 14.04 I have been using Rhythmbox on Ubuntu 14.04 to play music from my iPhone for a while now. Sometimes I get the annoying "initialize your iPhone" dialog box, but I just cancel it, unmount and reconnect my phone, and the problem is solved.

Background: Getting things to work with iOS 10

Recently, I updated to iOS 10, and mounting the iPhone stopped working. I somehow fixed this by cloning libplist, libimobiledevice, libusbmuxd, usbmuxd, and ifuse [note: ifuse doesn't seem necessary if you use gvfs], checking out the master branch in each repo, and installing via

./autogen.sh
make
sudo checkinstall

so that the package versions and dependencies could be managed via dpkg.

For libimobiledevice I also did ./autogen.sh --disable-openssl so that I'd use GnuTLS instead.

Because I had originally installed most of these packages via apt-get, I installed libplist as the dpkg package libplist1, libimobiledevice as libimobiledevice4, and libusbmuxd as libusbmuxd2. I also did echo /usr/local/lib > /etc/ld.so.conf.d/libimobiledevice-libs.conf and some extra symlinking when programs complained that /usr/lib/libimobiledevice.so.4 and such were missing.

Getting gvfs to work

ifuse will now successfully mount the iPhone, but my actual goal is to get gvfs to detect and mount the phone so that it'll work with Rhythmbox. I may have needed to do additional symlinking to even get the gvfs-related programs to run, I forget.

If I naively try to plug in my phone at this point, I (with high probability) get the error message Message did not receive a reply (timeout by message bus). I have to run /usr/lib/gvfs-gvfs-afc-volume-monitor 3+ times until I get lucky enough for the phone to mount; this seems very wrong.

Running sudo usbmuxd -f -v spams me with messages like

New client on fd 19
Client 19 connection closed
Disconnecting client fd 19

over and over, plus an instance of Receive from client fd 19 failed: Connection reset by peer and Connection reset by device 4 (3->62078). Basically, I have no idea why mounting only works intermittently. Things seem to work more often when I run usbmuxd in the foreground with -f, but that may just be confirmation bias.

When I finally do get the phone to mount, Rhythmbox will start and display the "initialize your iPhone" dialog, with two problems:  (1) it hangs for a long time while loading this dialog (trying to connect with phone, possibly, or maybe Rhythmbox is just ultra slow?) and (2) if I hit "cancel," I can no longer see the phone mounted on Rhythmbox. Before, after cancelling once, I could unmount and reconnect my phone and the dialog would no longer pop up, but this method is far less reliable because I can't reliably mount my phone! So after all this...

Questions

Is there a "more correct" way that I should have gone about the installations from source?
How do I get gvfs to reliably mount my phone on the first try?
Should I stop using gvfs/rhythmbox and start using ifuse+something else?

You can play your iPhone's music by using your laptop/desktop speaker. To accomplish this, please follow the steps below:

Ensure your Ubuntu's laptop/desktop Bluetooth is turned on.
Turn on iPhone Bluetooth and pair with the Laptop/desktop.
Once pairing done connect your iPhone with Ubuntu via Bluetooth.
and play songs on iPhone and all your music buffer on your Ubuntu.


Can't connect to wifi with static IP on Ubuntu server Disclaimer: I've never worked with servers before, so this is new territory for me.

I have gotten my server (no GUI) running with a static IP at my home, but I am now at college trying to connect it. The college wifi network is unprotected, but has one of those after-connection verification pages in the browser that verifies if the connected computer has a mac address registered in the system. I registered the mac address when a previous OS was installed.

Anyway, this is what I have for my /etc/network/interfaces file..

auto lo
iface lo inet loopback

auto wlo1
iface wlo1 inet static
 address 10.36.133.145
 netmask 255.255.248.0
 network 10.0.0.0
 broadcast 10.36.135.255
 gateway 10.1.1.1
 wireless-essid ISU-CARDINAL

I have made sure the wlo1 interface is up with ifconfig wlo1 up, and verified its state with ip addr.

After doing /etc/init.d/networking restart, and making sure wlo1 is up, I am unable to ping google.com with the output ping: unknown host google.com. I am also unable to use apt-get update without getting errors.

If it makes a difference, I do not have NetworkManager installed.

Could someone help me figure out what I'm missing? I'd be happy to provide the output of any other commands that may help diagnose the issue.

Thank you so much in advance.

You have neglected to add DNS nameservers. I suggest you amend your /etc/network/interfaces to:

auto lo
iface lo inet loopback

auto wlo1
iface wlo1 inet static
 address 10.36.133.145
 netmask 255.255.248.0
 gateway 10.1.1.1
 wireless-essid ISU-CARDINAL
 dns-nameservers 8.8.8.8 10.1.1.1

Restart the interface:

sudo ifdown wlo1 && sudo ifup wlo1

Check:

ping -c3 10.1.1.1

If you get ping returns, you are ready to access the verification page and proceed.

I assume that all the numbers above are verified correct, possibly from other connected devices or from the college.

Ok, you want us to debug your WiFi connection. No problem, but do not expect it to work right now. Wireless errors can creep in all sort of places and we need to discard them out.

First, install the bsdutils package in your Ubuntu. This will provide script which you will need to capture your onscreen TTY output.

$ sudo -i
[sudo] password for youruser:
# script
Script started, file is typescript
# ifconfig
(some interesting output)
# route -n
(some interesting output, record the gateway corresponding to 0.0.0.0)
# cat /etc/resolv.conf
(some interesting output)
# ls -l /etc/resolconf/resolv.conf.d
(this will either give an error, 0 files, or a list of files. If you
get a list, show me their contents file by file)
# cat /etc/network/interfaces
(more)
# ls -l /etc/network/interfaces.d
(either says that no files in that directory or it enumerates them)
(in which case, I will also need their contents)
# ping -c 5 your_gateway_recorded_from_route_-n_command
# ping -c 5 gmail.com
# ^D
Script done, file is typescript
#

Last one is you press the control key, and while pressing it press the D key.

Now review the typescript file and make sure it does not contain any personal information, then post its contents here.


What does it mean that a package is "set to manually installed?" When packages are already installed and I run an apt-get install <package-name>, sometimes it will print a line <package-name> is set to manually installed.

What does that mean?

You can use sudo apt-mark auto $PACKAGES to mark packages as automatically being installed again, if you accidentally mark them as manually installed.

Automatically installed packages can be removed using apt-get autoremove (or using similar processes, e.g. via Synaptic).

It means that a package was manually selected and not automatically by another packages or a meta-packages. The difference it, that the latter can be auto-removed, when the package that triggered this install is not anymore present (after an upgrade, or because it was removed). A manually selected package should not be removed in this way.

This has no impact on the ability to upgrade package when such upgrades are available or the notifications thereof.


matlab 2014b libxerces-c.so.27: cannot open shared object file: No such file or directory I have just installed matlab 2014b but when i tried to run it, I am getting this problem

/usr/local/MATLAB/R2014b/bin/glnxa64/need_softwareopengl: error while loading shared libraries: libxerces-c.so.27: cannot open shared object file: No such file or directory
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2014b/bin/glnxa64/MATLAB: error while loading shared libraries: libxerces-c.so.27: cannot open shared object file: No such file or directory

I have tried to find it on the internet but most of them are 28 and 3.1. All the 27 i found seem to have broken link so how can I solve it ? I'm running Ubuntu 14.04

As you said, no package for the supported Ubuntu versions contains libxerces-c.so.27

Therefore create a symbolic link

sudo apt-get install libxerces-c28
sudo ln -s /usr/lib/libxerces-c.so.28 /usr/lib/libxerces-c.so.27

An other idea, here you can download xerces-c-2.7.0, the archive contains libxerces-c.so.27

% find . -name '*.so.27'
./xerces-c-2.7.0/lib/libxerces-c.so.27
./xerces-c-2.7.0/lib/libxerces-depdom.so.27

In some cases no other version would work in place of 2.7. Not 2.8 neither 3.4. I found the 2.7 version of this shared library coming as part of another software here. It is in the folder lib of the zipped file.
I mention this since the website in the second method of this answer does not seem to be freely available and the first mentioned method does not work for me. I spent two days finding this, hopefully it would save some trouble for other people.

wget http://genie.weizmann.ac.il/software/nucleo_pred_exe/ver2_64bit_nucleosome_prediction.tar.gz
tar -xvzf ver2_64bit_nucleosome_prediction.tar.gz
cd lib
sudo ln -s libxerces-c.so.27 /usr/lib/libxerces-c.so.27


How do I shut down or reboot from a terminal? How can I shut down or reboot Ubuntu using terminal commands?

For shutdown:

sudo poweroff

For restart:

sudo reboot

Appendix:
If your keyword is "lockup" so you can't enter a command like "reboot" which would run from "su" anyway, use the keyboard: hold down Alt + PrintScreen/SysRq, buttons and type "REISUB".  It doesn't have to be capital letters.  It will restart your computer gently.  http://blog.kember.net/articles/reisub-the-gentle-linux-restart/

Use

sudo shutdown -h (time) (message)

This will shutdown your computer and halt it. That is what the -h is for. Then, in the time area you can choose the shutdown delay (in minutes) and if you want you can send a broadcast message in the message area (like goodbye, or I'm shutting the thing down :P).

To restart the computer, type

sudo shutdown -r (time) (message)

Now, instead of shutting it down and halting it, you will restart your computer once it's shutdown. :)


Set default resolution in Lubuntu How does one set the default resolution in Lubuntu 12.04. I set it using both Arandr and the default resolution setter. Both times would reset after a reboot. How do I permanently set the resolution.

Note: I am doing this as an unprivileged user. Should I do it on my admin account?

The solution in this page should work for you. At the bottom it shows you how to make it permanent -> Set Resolution ->

Let me know if it works for you, I know it is for 11.10 but it should work for your current version as well.


(K)Ubuntu 16.04 can't install mysql server unmet dependencies When I try to sudo apt-get install mysql-server I keep getting following error:

    The following packages have unmet dependencies:
 mysql-server : Depends: mysql-community-server (= 5.7.12-1ubuntu15.10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

and have no idea how to deal with it

When i try to install mysql-community-server i get:

    The following packages have unmet dependencies:
 mysql-community-server : Depends: mysql-client (= 5.7.12-1ubuntu15.10) but it is not going to be installed
                          Depends: libmecab2v5 (>= 0.996-1.1ubuntu1)
E: Unable to correct problems, you have held broken packages.

And then when installing mysql-client:

    Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  mysql-common mysql-community-client
The following packages will be REMOVED:
  mysql-client-core-5.7
The following NEW packages will be installed:
  mysql-client mysql-community-client
The following packages will be upgraded:
  mysql-common
1 upgraded, 2 newly installed, 1 to remove and 11 not upgraded.
Need to get 0 B/7705 kB of archives.
After this operation, 32,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 177480 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.12-1ubuntu15.10_amd64.deb ...
Unpacking mysql-common (5.7.12-1ubuntu15.10) over (5.7.12-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/mysql-common_5.7.12-1ubuntu15.10_amd64.deb (--unpack):
 trying to overwrite '/usr/share/mysql/russian/errmsg.sys', which is also in package mysql-server-core-5.7 5.7.12-0ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-common_5.7.12-1ubuntu15.10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

After running dpkg -l | grep mysql I get:

ii  akonadi-backend-mysql                           4:15.12.3-0ubuntu6                         all          MySQL storage backend for Akonadi
ii  libmysqlclient20:amd64                          5.7.12-0ubuntu1                            amd64        MySQL database client library
ii  libqt4-sql-mysql:amd64                          4:4.8.7+dfsg-5ubuntu2                      amd64        Qt 4 MySQL database driver
ii  libqt5sql5-mysql:amd64                          5.5.1+dfsg-16ubuntu7                       amd64        Qt 5 MySQL database driver
ii  mysql-apt-config                                0.7.2-1                                    all          Auto configuration for MySQL APT Repo.
ii  mysql-client-core-5.7                           5.7.12-0ubuntu1                            amd64        MySQL database core client binaries
ii  mysql-common                                    5.7.12-0ubuntu1                            all          MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server-core-5.7                           5.7.12-0ubuntu1                            amd64        MySQL database server binaries

The answer is in the comments, but I think It is worth to post it there.

I downloaded mysql-apt-config_0.7.2-1_all.deb (MySQL APT repository - dev.mysql.com/downloads/repo/apt) from dev.mysql.com and during config I have chosen Ubuntu Wily since 16.04 was not on the list. And that was the problem, Xenial already has MySQL 5.7 in its official repositories.

I fixed it by running sudo apt-get purge mysql-apt-config and then sudo apt install mysql-server.

I want to point that You should thank fkraiem, not me.

I had the same problem and nothing worked for me, the easiest and fastest way for me was to erase MySQL from system with this commands:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-*
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean

and install it again, with:

curl -OL https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
sudo dpkg -i mysql-apt-config*
sudo apt update
sudo apt install mysql-server -y

That worked for me, aside from having a compativility problem because of Ubuntu eoan 19.10 there were no more problems. I posted originally this in here, for you to take it as a reference.
Hope I was able to help.


How do I find matching filenames in a directory listing? I have bunch of ISO images in my hdd and I have their whole content listed inside a text file in the following format:

<immage>.iso, <dir structure>/<filename>.<extension>

example:

OS Backups.iso, ubuntu-12.04-desktop-i386.iso
OS Backups.iso, xubuntu-12.04-desktop-i386.iso
OS Backups.iso, background/pictures.jpg
Pictures vacation 2011.iso, documents/cost_estimates.xls
Pictures vacation 2011.iso, italy/img1.jpg
Pictures vacation 2011.iso, italy/img2.jpg

Now I want to issue a grep command against that text file to find files that contain "pictures" in their names. The expected result would be (for the previous example):

Pictures vacation 2011.iso
OS Backups.iso, background/pictures.jpg

Any ideas on how to accomplish something like this using grep? Alternatives? Thanks!

Here's how to do it with grep, using Perl regular expression syntax -P, and the return-only-matching-part switch -o:

grep -Poi "(.*pictures.*\.iso.*pictures.*|.*pictures.*\.iso|.*pictures.*)"  | sort | uniq

which returns:

OS Backups.iso, background/pictures.jpg
Pictures vacation 2011.iso

for each line, grep first checks if it's an .iso files with "pictures" in its name, which also contains a file with "pictures" in its name, e.g.:
Pictures vacation 2011.iso, italy/pictures5.jpg
If it finds, it prints the line and moves on; if not, it checks if this is an .iso files with "pictures" in its name;
If so, it prints just the ISO name; if not, it checks if this line contains a file with "pictures" in its name...

import fileinput
import sys
lookFor = sys.argv[1]
for line in fileinput.input("textfile.txt"):
    if lookFor in line:
            print line

You can run this script with python scriptName.py WORDTOLOOKFOR
For example, if I want to check for a line in the textfile containing the word "ubuntu", and the script is named script.py I write the following

python script.py ubuntu

Be sure to rename the textfile in the script.

Edit: This will only print the lines containing it, not store it anywhere, much like what grep can do.


ccsm falls ubuntu 12.04 Hi I find ccsm keeps crashing in ubuntu 12.04
has any-one can suggest to me how can I prevent from this happening
the window opens up and ask to report and I do however it keeps
occurring at least 2-3 time a day
Any-one can he

Don't play with ccsm in unity
Yeah, ccsm is still not stable in Unity. If it wrecked your desktop try Ctrl+Alt+T to launch the terminal and type unity --reset.
If that doesn't work try
Alt+Ctrl+F1 to enter console mode. Enter your username and password, and type
unity --reset

Consider removing ccsm if you want a stable desktop.

Get into a terminal and run:

unity --reset


How to execute a script just by double clicking like .EXE files in Windows? How can I make a bash script executable by double clicking just like .exe files in Windows? I tried creating a launcher and assigning the script to it, but there are two consequences:

the terminal twinkles, disappears, and nothing is done.
you must specify to run in terminal in order to work.

I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.

Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?

I tested this and it worked fine. Ensure your script begins with the correct shebang, e.g. #!/usr/bin/env bash .

Then follow these steps:

Hit Alt+F2 to run a command.
Type dconf-editor and hit Enter.
In dconfg-editor go to: org ➤ gnome ➤ nautilus ➤ preferences
Click on executable-text-activation and from drop down menu select:

launch: to launch scripts as programs.
OR
ask: to ask what to do via a dialog.

Close dconf-editor. Thats it!

Alternative way, using terminal: Run:

gsettings set org.gnome.nautilus.preferences executable-text-activation 'launch'

Note: The file should be executable. You may also need to change permission of file. Right click and set "Allow executing file as program"

Source.

Specially for Android Studio You can follow my original answer here:
To Create Desktop Launcher:

Click on Create Desktop Entry.. from Tools menu.

It will be prompt for password, enter password of your current login.

Finally it will be display notification in Android Studio screen like:

You can see in Applications => Programming => Android Studio, and you may see on desktop also after restarting system.

Thank you. :)


What is the correct way to share directories with Ubuntu running in a Virtual Box VM with correct permissions? In VirtualBox, what is the best way to share a directory between an OS X host and Ubuntu
guest?

Host: Mac OS X 10.7.3
Guest: Ubuntu 12.04
Guest has a shared directory mounted via VirtualBox settings with
Access=Full and Auto-Mount=Yes.

The problem with this setup is illustrated below. In my shared directory, I
can't change the permissions at all (not a permissions denied error, but they
just don't take effect).

Ubuntu 12.04 (guest):

% ls -l
total 0
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 10
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 2
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 3
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 4
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 5
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 6
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 7
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 8
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 9

Mac OS X 10.7.3 (host):

$ ls -l
total 0
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 1
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 10
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 2
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 3
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 4
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 5
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 6
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 7
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 8
-rw-r--r--  1 <my-mac-user>  staff  0 Apr 17 21:56 9

If I chmod on the guest, nothing changes:

% chmod +x 1 | ls -l 1 # guest
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1

If I chmod on the host, it changes on the host but not on the guest:

$ chmod +x 1 | ls -l 1 # host
-rwxrwx--x  1 <my-mac-user>  staff  0 Apr 17 21:56 1

% ls -l 1 # guest
-rwxrwx--- 1 root vboxsf 0 Apr 17 21:56 1

I've figured it out!

To reproduce:

Shutdown the VM, add shared folders in VBox's settings (Permanent=Yes, Auto-Mount=No)
Start the VM
From a terminal, run umask && id as the normal user to get something like this:

002 # this is your umask
uid=1000(luser) gid=1000(luser) groups=1000(luser),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),109(lpadmin),124(sambashare),125(vboxsf)

sudo mkdir -p /media/sf_src # src is the shared directory

To mount the src directory as a test:

sudo mount.vboxsf -o umask=002,gid=1000,uid=1000 src /media/sf_src
                           |   |        |        |   |-> where to mount
                           |   |        |        |       the file
                           |   |        |        |-> name of the shared dir
                           |   |        |            (in VBox settings)
                           |   |        |
                           \   |        /
                        from the `id` command

To automatically mount it on login, edit /etc/fstab and add the following:

src /media/sf_src vboxsf umask=002,gid=1000,uid=1000

From https://askubuntu.com/a/171357/476506

# usermod -aG vboxsf user

Above command will give access to shared folder for "user".


Extracting embedded images from a PDF Before I started using Ubuntu I used Nitro PDF reader to automatically extract images from PDF files. Is there a PDF reader for Linux that does this?

I would like to be able to extract images faster/easier than when taking a snapshot.

Use pdfimages

pdfimages is a PDF image extractor tool which saves the images in a PDF file to PPM, PBM, JPEG or JPEG 2000 file(s) format.

It's a part of the poppler-utils package, which you'll need to install.

Usage: pdfimages [options] <PDF-file> <image-root>

option -all will extract images in original format.
option -j will extract images as .jpg (caveat: images are converted and usually size is larger than original)

Example1: The following extracts all images from a PDF file, saving them in their orginal format.

pdfimages -all in.pdf /tmp/out

Example2: The following extracts all images from a PDF file, saving them in JPEG format.

pdfimages -j in.pdf /tmp/out

Will save images from PDF file in.pdf in files /tmp/out-000.jpg (or /tmp/out-000.pbm; see below), /tmp/out-001.jpg, etc.

The pdfimages man page explains:

-j:  Normally, all images are written as PBM (for monochrome images) or PPM for
     non-monochrome images) files. With this option,  images in DCT format are
     saved as JPEG files. All non-DCT images are saved in PBM/PPM format as usual.

I use pdfimages which is a command line tool and it works great for me. It is very easy to use and you can use --help option to learn more about its usage. I use Ubuntu and it comes pre-installed. If your pdf files is encrypted or password protected there are options for that, so this tool works great. You can read  more about pdfimages  here


mdadm doesn't seem right I watched a youtube video where a guy made a raid 1 with 2x 2 gb usb drives. I am using 2 x 3tb disks to have a raid 1 mirror. My concern is my sdb1 size=-1364702208K sdd1 size=-1364702208K. which is half the size of the drives. When the guy done this on his little 2 gb disks, his 2 sizes where still around the 2gb (1.9gb to be exact) mark as was his mdadm size at the bottom.

Also my drives are ext4 not ext2

chris@MediaServer:~$ sudo mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/sdb1 /dev/sdd1

mdadm: /dev/sdb1 appears to contain an ext2fs file system
size=-1364702208K mtime=Thu Jan 1 01:00:00 1970

mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90

mdadm: /dev/sdd1 appears to contain an  ext2fs file system size=-1364702208K mtime=Thu Jan 1 01:00:00 1970

mdadm: size set to 2930133824K

Might be a little bit late but:

Create the array using the block devices and not the file systems:

mdadm --create --verbose /dev/md0 --level=raid1 --raid-devices=2 /dev/sdb /dev/sdd
Create the partition on the newly created block device.

I don't suspect there is really a performance difference between the two methods, but using the block devices just seems better suited.


Can't enter BIOS settings after installing Ubuntu (Samsung NP300E5S) I've Samsung (NP300E5S-01IN) laptop, I installed Ubuntu 14.04 LTS on it and now I want to install Windows 8.1 on another partition but whenever I press "F2" key to Enter BIOS settings. it brings me to the black screen and there are 2 options
   (1) Ubuntu
   (2) Advanced options for Ubuntu

It was working fine before I installed Ubuntu..
Also I can't boot from CD/DVD or USB.

Someone help me please. :(

Did you ever boot an older kernel or distribution? If so, you may have hit the infamous Samsung BIOS bug documented in bug #1040557.

You might need to reflash the BIOS, comment from that bug report:

  This topic is probably not Ubuntu related, but any UEFI linux distro.
  What I found out so far: Notebook: Samsung series 3 NP300E5C-A05DE
  (German), BIOS-ID: RAC, current version: P05RAC

  Installed Linux Mint 13, MBR mode. Later converted to GPT/UEFI - all
  seemed ok. Device booted ok, but then I recognized, that I was unable
  to enter the BIOS Setup with F2 anymore.

  What still works: F3 to boot from CD, FAT32-Stick with EFI-Shell v1.0
  saved as \EFI\BOOT\BOOTx64.efi (2.0 does not work even if BIOS version
  is UEFI 2.31)

  My fix: CD with WinPE, then flash BIOS (if using Samsung Flasher need
  to remove version check is BIOS is current, or directly use WinFlash)

  What's causing this?

  After I fixed my BIOS I tried to re-enable UEFI booting my linux using
  "efibootmgr", which instantly messed up my BIOS again (but I need
  stuff like that twice...)

  So I messed around with HexEdit and efishell and found 10 - in words
  TEN - efi boot entries within the Samsung BIOS, that are not even
  shown in "efibootmgr" - the first Entry is "Setup", second is
  "Recovery", third is "CD-ROM" and so on, so it seems like Samsung is
  misusing those hidden bootentries for their own stuff, putting the
  Setup into the first boot entry, which will be overwritten by
  efibootmgr - explains why it was still booting, but unable to enter
  Setup.

  Since I found the key assignments to these entries within Samsung
  related BIOS modules, they are responsible for this non-standard
  stuff. Thank you, Samsung.

  My stuff still does not explain complete bricks like others have
  encountered. But maybe the hint with the version 1.0 efishell might
  help, or even pressing F3 still helps, if the BIOS is not bricked
  completely.

  For all the Linux EFI programmers: Those bootentries are there, but
  only shown by efishell. Why does the nvram-module in linux not show
  them? Maybe there is an unusual way to get them from the nvram - if
  you could check them you should be able to avoid these bricks..

If you have a have Samsung np300-e5c (all versions) and maybe other Samsung laptops, this solution is easy.

First of all, the laptop must boot with F3 key. If you F3 key, you boot from a CD or DVD.

If it can start from the CD/DVD, follow these steps.

Windows install CD for setup.
Laptop Startup Press F3 then Windows boot on CD.
Install Windows on the computer.
Windows want to restart. Take the boot CD (windows install CD) out of the drive, then put the install CD for some Linux distribution (I used Linux Mint) in.
Press F3 again and the Linux distribution will start.
And you select (start on HDD).

So Windows continues the setup and finish it. Then you can set up the BIOS update.

You can do these steps on a Samsung laptop. It works perfectly.


Can I dual boot a Nexus 4 with Touch preview? Can I  dual boot a Nexus 4 with Touch preview?

I have installed Ubuntu touch preview on my phone, but I cannot use it as primary device. I still like to have it for development and testing.

Any guidance would be helpful.

Well, a real dual boot like with a pc is not possible, but maybe this app works.

It runs under rooted Android and you can select what ROM to boot next reboot. Maybe worth a try

It certainly seems possible and should be.

Listed here on how to do it: http://forum.xda-developers.com/showthread.php?t=2165491


How do you get Netflix-Desktop to run for multiple users? Netflix-Desktop keeps telling me I do not have extended filesystem enabled on the guest account. I would like to allow my sister to watch Netflix on my laptop without giving her my password.

I was able to download the application, but, when I play a movie the screen remains black... Here is how to download the application but the screen stays blank when launching the application. If you can figure out how to get past the black screen please share.

Open terminal enter the following

sudo apt-add-repository ppa:ehoover/compholio

Enter your password when prompted and then run:

sudo apt-get update
sudo apt-get install netflix-desktop

Open dash and click on Netflix.


No Windows7 entry on GRUB2's menu after installing Ubuntu I Installed Ubuntu 12.04  and after installation no Windows 7 entry shown.

Boot-Repair output : http://paste.ubuntu.com/1396793/

Some Windows boot files are missing. Probably there was a separate Windows boot partition that was erased when you installed Ubuntu.

Solution:

Use a Windows7 disk this way: https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader , until you get direct access to Windows
then use Boot-Repair's Recommended Repair to recover the GRUB menu

"Grub2 (v1.99) is installed in the MBR of /dev/sda"

So basically you installed the grub to the only place the windows Bootloader can resist. Not a very good Idea.

The (from a Usability Poihnt of view) easiest Solution imho is:

Reinstall Windows MBR like this:

You need: A Windows Installation or Recovery Medium

This restores the MasterBootRecord. Grub will be gone (or at least not useable anymore) only Windows boots up.

boot from that Windows Disk
select "Repair my Computer"
select your Windows Installation
select "Command Prompt"
now execute following command each at a time:

bootrec.exe /FixBoot

bootrec.exe /FixMbr

Now reboot and install ubuntu again, but this time do NOT install grub directly to the sda mbr, but somewhere else.

Good luck, I recommend google and reading some articles about partitioning, double booting and stuff. It is worth the time, since it saves much in the future.


Playing videos from terminal I am trying to play videos from terminal using this command

vlc my_video.avi

The error that I am getting when I try to run the command--

VLC media player 2.1.4 Rincewind (revision 2.1.4-0-g2a072be)
[0x8663910] main libvlc: Running vlc with the default interface. Use 'cvlc' to use    vlc without interface.
[0xaafddf80] filesystem access error:cannot open file the_file_path (no such file or directory)
[0xb040a990] main input error:open of 'file://the_file_path' failed

Then I tried to use 'cvlc' but again same error!

Try install mplayer

sudo apt-get install mplayer

and run

mplayer -vo caca <movie_file

and check whether you are able to play the video

This is easy :

playername video_or_audio_file_name

And you should not be under root.


Compiz Wallpaper plugin doesn't exist in Ubuntu 12.10 I just upgraded to quantal and once I installed ccsm and compiz-plugins-extra i couldn't find the Wallpaper plugin, among other plugins that I used to use in 12.04.  Could someone please tell me what happened\where they are?

Looked all over for this plugin and at this time I am assuming this is a bug.  A rather serious one for me.  Please vote here:

https://bugs.launchpad.net/compiz/+bug/1020830

The Wallpaper plugin is still in the list of official plugins for Compiz as can be seen here:

http://wiki.compiz.org/Plugins/Wallpaper


Problem opening some PDF files I have a PDF form I need to fill in. But I cannot open it, the message displayed is: "To view the full contents of this document, you need a later version of the PDF viewer", plus a link to adobe.

I tried with Konqueror, pdfedit and xpdf. Please advise.

If you cannot get a satisfactory result from any available Linux application, you can try this freeware Windows application under WINE as a much lighter (with many more features) alternative to Adobe Reader: www.tracker-software.com/product/pdf-xchange-viewer


How do I check the SHA1 hash of a file? How do I check the SHA1 hash of a file?

sha1sum

  Print or check SHA1 (160-bit) checksums.  With no FILE, or when FILE is -, read standard input.

sha1sum {file}

If you want to send the file together with its sha1sum output redirect the output to a file:

sha1sum {file} > {file}.sha1

Send both files and the other party can do a...

sha1sum -c {file}.sha1

It should show OK if the sha1 is correct.

Python

Python  has excellent hashlib library, that allows calculating multiple hashsums, including sha1. Here's a simple script that can do the job:

#!/usr/bin/env python3
import sys
import hashlib
import os
from collections import OrderedDict as od

def get_hashsums(file_path):
    hash_sums = od()
    hash_sums['md5sum'] = hashlib.md5()
    hash_sums['sha1sum'] = hashlib.sha1()
    hash_sums['sha224sum'] = hashlib.sha224()
    hash_sums['sha256sum'] = hashlib.sha256()
    hash_sums['sha384sum'] = hashlib.sha384()
    hash_sums['sha512sum'] = hashlib.sha512()

    with open(file_path, 'rb') as fd:
        data_chunk = fd.read(1024)
        while data_chunk:
              for hashsum in hash_sums.keys():
                  hash_sums[hashsum].update(data_chunk)
              data_chunk = fd.read(1024)

    results = od()
    for key,value in hash_sums.items():
         results[key] = value.hexdigest()
    return results

def main():
    for path in sys.argv[1:]:
        print(">>> ",path)
        for key,value in get_hashsums(path).items():
            print(key,value)

if __name__ == '__main__': main()

Test run:

With a single file:

$ ./hash_sums.py /etc/passwd
>>>  /etc/passwd
md5sum ce5f247e016ba2bb92049fc86158376a
sha1sum b8abadf4618b09bd3eebb6064fc2df5b90e5ae03
sha224sum 044579d46e0d969a860602216ea4764465e5618ed714109cf782ff50
sha256sum 53f2ff8997625c958f77aef034f9c96d9fcfc8bcb4bb8a96fd8ac89a5ed5adf6
sha384sum b84b6cafa178147614e6b7903e1b7a342e09d95e3101e55c6a3b5b093a22190f2d367c69b1ee12b1ec59726337a40e9c
sha512sum edacca8237d3be5095f392c9d347dce3a5249c79d09f9b99a055b796edd74541b4529c499ff0e4f25e817b702c206073bfe5b0fccae6773680c79ea1e0efa9e2

With glob:

$ ./hash_sums.py *
>>>  3-4-placement.py
md5sum a81dd2a6eb122176204cacd92d76d08c
sha1sum 4972f8cf08701cdfc6308def05d3ec2eedfcdd9a
sha224sum 32c4dad60f59584ba39ce73c1a1c96d4da36ee6fe3fd291145692b2b
sha256sum 7460ebf8736b0d6e7be8a1025743d0498871c7013cf5ad4463366fd95fe7576a
sha384sum 77de28b4b185d9a5d7d49aef0aad432d37145b914557dc6ecf3e6cdcbd6cd4a1999d717c027489ac99751f066050199b
sha512sum 7bf6a8059601c72e1278e321f225fef82f12a7bad73e1e8c5c43c1fcbdc2243934bf7d1ad07534bdbf10e2dd9ea9265e1debcbdf6603bec24ede665d2f651cf5
>>>  SHA256SUMS
md5sum 3c37318d45676c1db2598aa817b37679
sha1sum 8338b8ae5f749551d131dc28aebb80a2b125d651
sha224sum e89ad392f10a77b0940792a03470f3a23df2f2df9c8b6a91a1c496e0
sha256sum dd4a53f7da270f3b6ab691841ca911a231e20af53d7fabc5a39059b9dbdb036d
sha384sum aadfb55856730eb5b7e4192111bfb8fc4c022396a5809cb37fdd8e8b6ac8dbb3b7e462266cde2b34f90d7015fb42fe2b
sha512sum baba0ed86ad781daffb5905512459e353b7ca7da7b04cf67a26cfb320906041da2d4bc73673926aab7c98869f25bc2fd6ea0116c21c40c07188e6dcbbba3dbcf
>>>  answer.md
md5sum b6111facdba5978e6cf3a200706ba6fd
sha1sum 5c2eb00c4c0c4799d4457d3a84eea283a3a0d249
sha224sum 7172f877ab579e1ee845c723e0d42ff3acb96859cc43a56aebc39f59
sha256sum dc6ac7365f680e98b9f1279d2e22ed21b9b82c988b99b0facd5e8a98ff50ddd6
sha384sum 5082b3b62d677c5b1b8938f871da16c595be16a540bd76bc9c25ea6572dc9020f236237ec310cfa78fdaa1d0c0a51b0f
sha512sum 81f21316ab6c5a4038cdcde528766e620988a0ccf53bf2e9932399f4534c070468949a5a43ea68629c07e622404574e46bb20cf60c51da4e2a7a44a1df71d920


erasing/formating/deleting a Usb Flash drive I loaded Ubuntu on to flashdrive. Now I want to remove it but when I try it returns Drive write protected.
I have tried sudo dd if=/dev/zero of=/devsdb bs=512 count=1, but that returns Read only file system. I have tried many different USB format programs and all say the same. It does not have a switch on it! It is a 32gb CoreMicro USB flash drive. How do I remove Ubuntu from this USB drive?

then you have really problem on that drive cause They are no chance to unlock it, my friend have this too and i tried everything on it but can't format or everything.


WiFi stops working after some time I have a problem with my Ubuntu.
I have Ubuntu 14.04 as dual boot (alongside windows 10) on my ACER E5-771G-79VT laptop.
My network card is Realtek RTL8723BE Wireless LAN 802.11n PCI-E NIC.

When I start my Linux partition, the wifi works great as it should. But after some time, the pages start to load indefinitely. Meanwhile the signal icon is still full and showing that I am connected to network. After that, nothing can bring wifi back to life. The connection by cable works perfect. Also my windows partition has no problems with network.
When i restart Linux i can again use wifi for some time, until it drops again.

Now, i read some other similiar topics, but they didn't helped me, so that is why i am opening my topic.

Thank you

I have a Lenovo Laptop - G50. I found that my wireless also disconnects every now and again. I installed Windows 7 and found it doing the same. The only way I could get it working in Windows was with the Specific Brand driver from the website. Even the Windows driver wouldn't make it work for longer than a few minutes, it had to be the specific driver from the website. I now use a USB wireless adapter in Ubuntu which solves the problem. Luckily I don't use wireless that often - I am usually on a cable.


How to upgrade to the latest GNOME version? I am running Ubuntu 15.04. I installed GNOME on top of that. Now I am using GNOME Shell. I heard 3.16 has many improvement. I am thinking about upgrading. My question is that, if I upgrade to GNOME 3.16 will I be able to upgrade to the next version of Ubuntu (15.10) when it arrives?

Warning: this version is in development.
You can install the latest version of GNOME with two PPAs:
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3

Update the repositories:
sudo apt-get update

Upgrade your system (avoid using upgrade, it can cause problems to the PPAs you just added):
sudo apt-get dist-upgrade

Or if you want to reinstall GNOME
sudo apt-get install --reinstall ubuntu-gnome-desktop

To revert the upgrade install ppa-purge
sudo apt-get install ppa-purge

and run the following commands, in this order:
sudo ppa-purge ppa:gnome3-team/gnome3-staging
sudo ppa-purge ppa:gnome3-team/gnome3

I assume this question should be updated with the receipt for latest Ubuntu 18.04 aka Bionic Beaver.

Just as usual:

sudo apt-get update

Then install two main and essential GNOME packages

sudo apt install gnome-session gdm3

This will be enough for vanilla installation.

Full GNOME installation can be achieved via tasksel tool:

sudo apt install tasksel
sudo tasksel install ubuntu-desktop


Installing Ubuntu On An Old PC I have recently received a new pc and would like to install Ubuntu on my old one.

Can I simply install it and write over the old hard drive, or do I need to do something special?

If you do not plan to keep/transfer the information from your old hard drive then you can simply do the installation and overwrite the hard drive, there is nothing you have to do beforehand to prepare the hard drive.

If however there is information on the old hard drive that you would like to keep then I would suggest you backup the contents of that old hard drive before you do the installation.

YES, you can just install it.

Try installing Ubuntu 12.04 LTS.

If you have an issue (while installing), this is the forum for help ..


Remote invocation of shell script There are two systems A and B. I have two shell scripts on A (called as server).

  B has to call these shell scripts and only if B is authenticated A has
  to run shell scripts and send the output to B (client).

Call to shell scripts will also include command line arguments.

How to proceed?

Install openssh-server on system A:

sudo apt-get install openssh-server

Then from system B type:

ssh -t user_login@ip_of_system_A "/path_to_your_script arg1 arg2"

Just replace user_login, ip_of_system_A and path_to_your_script for your needs.

In A you must place your user@A_ip-adress

   for host in A; do echo "== $host =="; ssh $host '/path_to_script_in_A/script; echo'; done


How to log access to a specific file? I have already looked at this question and its answers How to log access to a specific folder and changes in its contents?, however I would like something more specific, so that it logs the access to one file, or a collection of them in different locations (not in the same folder). So that every time the file is opened, the location and name of that file is logged along with the date and time stamp. Modifications to these files should also be logged.

Any way of doing this? I am running Ubuntu GNOME 15.04.

inotifywait can do this. Install the package inotify-tools:

sudo apt-get install inotify-tools

Then run inotifywait like this:

inotifywait --timefmt "%F %T" --format "%T %w %e" --daemon --outfile </path/to/logfile> </path/to/file1> </path/to/file2> ...

It will log the date, time, file and the event that occurred.

More information: inotifywait manual page.

man inotify

Then check inotify-tools.
Its in the repository so install via

sudo apt-get install inotify-tools

Copying From above wiki link

inotifywait -  This command simply blocks for inotify events, making it appropriate for use in shell scripts. It can watch any set of files and directories, and can recursively watch entire directory trees.


Can’t login to GUI but can on tty I use Kubuntu. I can’t login to GUI but can on tty mode, I check the log and it show this log:

invalid session "/var/lib/sddm/.desktop"

The output of journalctl -xe:

Any change in your system before it stopped working? Please post a better pic of your log (with those lines related with sddm).

As is recommended in this post, you could try startx or move /etc/X11/xorg.conf to a backup file, if the issue is caused by a misconfiguration of the configuration file.


What commands should I use? My computer (HP Pavilion dv7) does not start correctly, but it at least shows me a list of commands to enter.

For example: thierry-HP-Pavilion-dv7-Notebook-PC login: (thierry = my session name)

So I get the name of the session.
Then Password. I enter the password.
Then thierry @ thierry-HP-Pavilion-dv7-Notebook-PC: ~ $ and I do not know what to enter next.

How do I get my computer to start correctly so I can login to my normal desktop environment?

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

startx


How do I achieve a PPPoE connection over wifi? I am trying to move my PPPoE dialling from my router to two machines on that router, a Windows 7 and an Ubuntu 12.04 machine. (Actually one machine with dual boot for now).

I set up a DSL (PPPoE) connection using the Edit Connections dialogue, and while I am connected to the router via cable, the DSL connection is available and works, but as soon as I disconnect the cable, and connect to the wlan (the wifi AP is part of the router), the DSL connection is no longer visible. I need to dial the PPPoE using the wifi to connect my PC to the router. How should I do this?

My router is a a Billion 400G, set to Full Bridge. My Windows PPPoE connection works fine, cable or wifi, so the device is capable. This video - suggests I need to use pppoeconf to create the DSL connection while connected over wifi. I'll try that asap.

Obviously, it is at least funny question if I right understand where this intended :)
It can be missed LAN cord for example ... ok.
I suggest to clear your DSL(PPPoE) settings which you created through Edit Connections dialogue. Then reset your DSL router, and connect to him through your Ubuntu Wireless like to the default Wireless Network, by default IP. Next, just you will need configure your router through router's interface.
Defaults, like the default wireless network SSID for your router you can find at official website. However, I do not know how much possible that wireless is enabled by default.

If yes, obviously YES, it possible.


Weird "Dynamic Top Bar" bug every time I reboot/boot up i'm using gnome flavour of ubuntu 16.10,with macbuntu theme and few gnome extensions. the problem i'm facing is activity text gets overlapped by the apple logo every time i start the computer. so every time i boot up i've to go to gnome tweak tool>extensions> dynamic top bar settings> enable and disable "show activity button text" option. and that solves the issue for that session. and it comes back when i reboot again

so my question is can i automate this action everytime i boot into my computer? or is their anything else i can do about this? or is their any other similar extension or app that i can use?

UPDATE
i tried the instructions in the answer but it's still not working

gsettings list-schemas | grep extensions

output

  org.gnome.shell.extensions.auto-move-windows
  org.gnome.shell.extensions.screenshot-window-sizer
  org.gnome.shell.extensions.classic-overrides
  org.gnome.shell.extensions.user-theme
  org.gnome.shell.extensions.native-window-placement
  org.gnome.shell.extensions.window-list

UPDATE 2
the same problem is happening in another desktop with same setup

Link to dynamic top bar

Link to gtk theme that i'm using

Link to the source of the Extension

UPDATE 4
Tried few other extensions, nothing works like dynamic top bar, is their a way that i could disable the activity text altogether

Yes you can. For everything that you can change in gnome-tweak-tool there is a corresponding gsettings command. The general syntax is:

gsettings set SCHEMA [:PATH]  KEY VALUE

You won't need the PATH parameter. Now what you should use as SCHEMA and KEY depends on the gnome-extension you want to use. First do

gsettings list-schemas

or perhaps

gsettings list-schemas | grep extensions

to find the correct schema. Then find the correct key with

gsettings list-keys [SCHEMA]

using the name you found in the previous step. The key will be something like dynamic_top_bar_settings. Then finally, do

gsettings get [SCHEMA] [KEY]

to see whether the dynamic top bar settings are enabled or disabled at this time; and do

gsettings set [SCHEMA] [KEY] enabled

to enable the setting.


Why doesn't resolv.conf remember dns addresses? I have installed dnsmasq and added nameserver 127.0.0.1 to the resolv.conf file so I can use wildcards in my apache configuration. But every time I restart the computer or change Wi-Fi connection I have to add it again to get it working.

Why is this happening and how can I make it work ?

If you are running an Ubuntu system prior to 12.04 that hasn't yet been upgraded to 12.04 or later, or if you have removed the resolvconf package then install the resolvconf package.

sudo apt-get install resolvconf

If resolvconf was already installed, ensure that /etc/resolv.conf is a symbolic link to ../run/resolvconf/resolv.conf.

sudo dpkg-reconfigure resolvconf

Once you have installed the dnsmasq package (not to be confused with the dnsmasq-base package) you do not need to edit /etc/resolv.conf. The dnsmasq initscript causes (via resolvconf) '127.0.0.1' to be added to resolv.conf when dnsmasq starts, provided the value of IGNORE_RESOLVCONF is not set to yes in /etc/default/dnsmasq.

Doubters, please read /etc/init.d/dnsmasq.

P.S. In Ubuntu 12.04 there is a complicating factor. NetworkManager by default starts a dnsmasq process which listens exclusively on 127.0.0.1. This conflicts with the "standalone" dnsmasq process; only one of the two can start. This is a known bug, #959037, which was fixed in Ubuntu 12.10 (by moving NM-dnsmasq's listen address to 127.0.1.1). If you are still running Ubuntu 12.04 and you want to run standalone dnsmasq then you should either disable the NetworkManager-controlled dnsmasq (by commenting out "dns=dnsmasq" in /etc/NetworkManager/NetworkManager.conf) or configure the standalone dnsmasq not to listen on 127.0.0.1.

You need to specify your preferred dns server in Network Manager. Otherwise, it will continue to overwrite the config-file. See What is the proper way to change the DNS IP?


Permissions for Video folder for minidlna? I have a secondary hard drive that is mounted as /media/Media and I would like to user a folder called Videos located on that drive that I would like to share the videos located on this folder out via minidlna.
I have minidlna working with /home/jonathan/Videos which is on my smaller drive and would like to instead move the videos to the larger drives.

However after I edit my minidlna.conf to point to the /media/Media/Videos folder and do a sudo service minidlna force-reload to reload the database I get a permssions error.

Can someone point me to the correct permissions I need to set on this folder?

I tried following the examples in this thread but still could not get it to work. I ended up stumbling on this article here:  Running minidlna on Ubuntu and followed it step by step and I now have the media on my second drive being served through minidnla. If any one else struggles I suggest you follow his process.

I have quoted his text in case his page ever disappears.

He installed a service called minidlna which is supposed to allow streaming of media. However, it didn’t like the permissions on his chosen folder.
The path is /media/jw/drive2/foo.

jw@FooPC:~$ sudo service minidlna restart
* Restarting DLNA/UPnP-AV media server minidlna
[2014/07/23 21:03:30] minidlna.c:594: error: Media directory "/media/jw/drive2/foo" not accessible [Permission denied]

He pointed it to a folder in his home folder and it liked that just fine, but not the 2nd drive that holds the media.

He tried setting the user as me in the conf file and in the default file. But eventually He discovered he had to set the user as “root” to make it work.

He opened terminal and entered ...

sudo gedit /etc/default/minidlna

...and edited the file...

# User and group the daemon should run as
USER=”root”
#GROUP=”minidlna”

...then saved and back to terminal and entered...

sudo gedit /etc/minidlna.conf

... and edited the file...

# Specify the user name or uid to run as.
user=root

He restarted the service using...

sudo service minidlna restart

... in terminal and this time there was no error about permissions.

I hope that helps someone as it helped me. If it helps you then please visit his page and leave him a comment like I did so he knows that his page is helping!

UPDATE:

This works straight away but if you power off the machine and then restart it the second drive is not served by the minidnla server until you run:

sudo service minidlna restart

Getting it to work from bootup is a user-mode drive problem and can be fixed by adding the drive to fstab. The downside is that the system will not boot automatically if the drive is not plugged in, as it will annoyingly demand to retry or ignore before continuing to boot.

An alternative to adding the drive to fstab is to restart the minidlna service at reboot from cron:

sudo crontab -e

then add the next line at the end of the file:

@reboot sleep 60 && sudo service minidlna restart

To let miniDLNA rescan its library we may issue the following commands:

sudo service minidlna stop    # stop minidlna
sudo -u minidlna minidlna -R  # rescan the library
sudo service minidlna start   # restart minidlna

Note that with default library settings the second line needs to be run under the user minidlna in order to let minidlna have access to this library later.

Depending on your settings you may have defined a location for the library other than default /var/lib/minidlna. Then we may need different permissions.


Is there an easy way to rearrange or move the icons in the Unity launcher? It looks like the only time that you can choose where an icon goes on the unity launcher, is when you add it. Is there a way to rearrange the order of an icon after it has been added?

Click and hold the application's launcher icon, and then drag it up or down.

Yes. Click and hold a launcher. Pull it out to the right so it detaches.
Drag it up and down and watch the little marker in between the other launchers. When you let go it will insert where that marker is.

Launchers have to stay within their 'group': the workspaces, files and folders and applications are one group (they have letters when you hold super) and the other icons are also 1 group (those have a digit when you hold super).


Error installing Gerix Wifi Cracker Xubuntu 14.04 I tried installing Gerix Wifi Cracker. Everything is going great until the last step where I'm supposed to install it by typing:

sudo dpkg -i deb.deb

I then get the following error message:

dpkg: error processing archive deb.deb (--install):
 unable to open file '/var/lib/dpkg/tmp.ci//.svn': Is a directory

I've only been using linux for about a week and would appreciate any kind of help!

Edit: I followed the guide that was on here How to install Gerix-Wifi-Cracker?

Open a terminal
Download your deb again. eg:

cd
wget http://www.clshack.it/nopaste/gerix-wifi-cracker-ng-2.0-bt7.deb

Download the package

sudo apt-get install dpkg-dev

Create a temporary folder

mkdir ~/deb$$

Make a copy of the deb file

cp gerix-wifi-cracker-ng-2.0-bt7.deb ~/deb$$

And use this commands:

cd ~/deb$$
dpkg-deb -x gerix-wifi-cracker-ng-2.0-bt7.deb deb
cd deb
dpkg-deb -e ../gerix-wifi-cracker-ng-2.0-bt7.deb

Create the file

nano ../svn.sh

Add this code

#!/bin/bash
# SVN Emergency Fix
function rdirls() {
    for i in $1/*
    do
        if [ -d "$i" ]
        then
          echo $i
          rm -rf $i/.svn
          rdirls $i
        else
          echo "NOT " > /dev/null 2>&1
        fi
    done
}
if [ -d "$1" ]
then
  echo $1
  rm -rf ./.svn
rdirls $1
fi

Save and close
Use this commands

chmod a+x ../svn.sh
../svn.sh .
cd ..
sudo dpkg-deb -b deb
sudo dpkg -i deb.deb

Source

To install software you need to use:

cd directory

sudo dpkg -i package_name.deb

Make sure you are in the proper directory as well


Troubleshooting Ubuntu Sounds Issues with Working Speakers I'm still very new to Ubuntu and I'd like some help troubleshooting sound problems and I don't know where to start.

Specifically, I've hooked up my speakers and can play audio through them (with Ubuntu - ie. on Youtube or wherever else) but there is a weird static sound that comes out of the speakers whenever I move my mouse and when sound is playing...it's very unpleasant.

I know my speaker hardware is ok because I use the same speakers all the time on my Windows machine. So I'm imagining either the hardware is not compatible with Ubuntu or I have to update the drivers or something.

I had the same problem and I managed to block the static sound  by going to my sound settings and leaving that window open the entire time i'll be using my headphones or speakers.

I've searched for a permanent solution but still no answer, any way, leaving the window open is not much of a problem.


Brightness keys not working and no obvious interface for adjustment either New to Ubuntu and so far pretty happy with it but one niggle is the brightness controls do not seem to work. I have looked at fixes on here + google but nothing seems to get it right. Mostly effecting GRUB config in different variations and none show any change except for this one
Toshiba Satellite P850 FN-Keys not working
which fixes the keys presses and displays the brightness modal but does not actually affect the screen brightness.

The problem is that there seem to be no UI controls for brightness in my fresh install of ubuntu on to a Toshiba C50-B-14D laptop. The keys for brightness do not work either (F2 + F3) and the increas brightness button seems to send the laptop in to sleep mode.

I have been in to sys/class/backlight and have found both video0 and intel folders here

Any help would be greatly appreciated.

Open a terminal and type ls /sys/class/backlight. Note the exact name of the Intel interface. In my case it is intel_backlight.

Then type sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf

Copy and paste the following:

Section "Device"
    Identifier  "card0"
    Driver      "intel"
    Option      "Backlight"  "intel_backlight"
    BusID       "PCI:0:2:0"
EndSection

Edit the option line as necessary.

Logout and in again.

Source: http://itsfoss.com/fix-brightness-ubuntu-1310/

For HP G60:

I had no files in the backlight folder so I searched for that and found the information in the Ubuntu wiki.

From there I followed the troubleshooting guides until it finally began to work after adding "apci_osi=" as a kernel parameter. Jeez.


How to run a file in a different directory There is a file that I would like execute in a different folder, under about four sub-directories.

For example:

My pwd may be /home/directoryA. However, the file I would like
execute may be in directoryD. At the moment if I want to execute the file I would need to go to cd /home/directoryA/directoryB/directoryC/directoryD/ and then execute the file. Or I might have do something like src /directoryA/directoryB/directoryC/directoryD/somefile

Is it possible to execute the file without actually being in the directory where the file is?
Is there a shortcut way of executing the file somefile without going into the directory?

No you don't need to use:

cd home/directoryA/directoryB/directoryC/DirectoryD
./somefile

You can simply run the command by prefixing it with its path:

/home/directoryA/directoryB/directoryC/DirectoryD/somefile

Because you are already in the /home/directoryA you can use the current directory shortcut . and run the command like this:

./directoryB/directoryC/DirectoryD/somefile

I noticed OP has expanded scope via comments under other answers. Here is some additional information:

To find out where somefile is located use: locate somefile.
If somefile was added today you need to first update the locate database by running sudo updatedb.
When there are multiple versions of somefile located in the PATH you can find out which one is executed first use which somefile.
If you want to run somefile without specifying a directory name in front put it in the path. To check the path use echo $PATH. Common path locations to put somefile are /usr/local/bin (if it uses sudo powers) and /home/your_user_name/bin (you might have to create the directory first).
You can also add /home/directoryA/directoryB/directoryC/DirectoryD/ to your path but that would be highly unusual. However you could then simply type somefile no matter what directory you are in and it will run.
Of course somefile must be executable which you set with the command: chmod a+x /home/directoryA/directoryB/directoryC/DirectoryD/somefile

There is another way (somehow not already mentioned) by using shell profile (.bashrc, .zshrc etc).

You can run:

# Assuming it is a script you made, changing file permission to make it executable
chmod a+x ~/directoryA/directoryB/directoryC/directoryD/somefile

# Appending your shell profile with an alias to run the script from wherever you are
echo "alias somename=\"source ~/directoryA/directoryB/directoryC/directoryD/somefile\"" >> ~/.profile

# replace ~/.profile with config file of whichever shell you use
# Also replace source with python if the script is a python script or whichever interpreter it requires for execution
# Make sure you have #!/usr/bin/env python or #!/path/to/interpreter on your computer as the first line of your script

Although above method allows the script to be run from anywhere you should make sure the script doesn't depend on the pwd (present working directory) for execution (unless intended).

You can then run the script as executable in any directory, like:

somename

P.S.:
As for why not append the directory to PATH was simply under the assumption that only the single executable was to be added and not a directory full of executables like adb-platform-tools in which case appending the directory path to PATH would be the method to use.


network UNCLAIMED Ubuntu 16.04 I was facing some issues with wifi disconnection. So I followed some askubuntu forum answers and solved the problem by manually installing the wifi device. But still I had to follow the first answer of this question
(How do I get an RT3290 wireless card to work?) to make it work on every start up.

Then suddenly it stopped working now. Now when I run sudo lshw -C network it gives me this error.

*-network UNCLAIMED
       description: Network controller
       product: RT3290 Wireless 802.11n 1T/1R PCIe
       vendor: Ralink corp.
       physical id: 0
       bus info: pci@0000:08:00.0
       version: 00
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:b5510000-b551ffff
  *-network
       description: Ethernet interface
       product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:09:00.0
       logical name: eno1
       version: 08
       serial: a0:1d:48:d1:23:d9
       size: 100Mbit/s
       capacity: 100Mbit/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 autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-2_0.0.1 04/23/13 ip=192.168.1.3 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:42 ioport:4000(size=256) memory:b5404000-b5404fff memory:b5400000-b5403fff

it says network UNCLAIMED. Why is that ? How can I solve that issue ?

When I run lspci it shows me my wifi adapter model as

08:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe

I followed this. But it says that it will work when secure boot is disabled. But the thing is I've already disabled secure boot and I was working fine about two hours ago.

How can I solve this? Any help would be much appreciated.

I had exactly the same problem today. Turned off my laptop after finishing with my job and than turning it back on when I got home. Ubuntu wasn't able to find any wi-fi. I know that this might sound stupid, but try turning off (not restarting) your pc, leave it for a few seconds or a minute and then turn it back on. This, no matter how stupid it sounds, just solved my problem and I'm able to use wifi again (I also ran sudo apt-get update and sudo apt-get upgrade, which I don't think helped solving this issue, but updating can't be bad).
Just for the record, I was also restarting my laptop few times but it didn't helped.

Hope this helps you.


Export image as SVG in GIMP I have a project I have been working on (an image) within GIMP and I would like to export it as an SVG. Is this possible, or am I going to have to stick with exporting multiple sizes of an image?

I know GIMP can read SVGs, but can it export them?

GIMP v2.8 does not natively export bitmaps to SVG files. There used to be a plugin to do so but this project apparently is discontinued. We could import an image as a bitmap object to Inkscape  and save it as an SVG file. The image will then remain a bitmap file, i.e. it will get aliasing artifacts on scaling (see below).
But Inkscape can do even more. We can import the bitmaps we had already put so much work in to Inkscape and convert them with a few mouse clicks to nice vector graphics.
Here is how to do that:

Open Inkscape.

Choose "File - Import" to import a bitmap file.

Choose to "embed" the image.

Select the image with the select tool (↖).

Select Path - Trace Bitmap... for settings (below shown for 2 colors = "Scans" ):

Select "Update" for a preview until settings are fine.

Start tracing with "OK".

Now a vectorized image of your original bitmap will be seen on top of the bitmap. We can resize or move this newly created object, delete the original image, or choose to "Object - Ungroup" in case we need to adapt shapes or colour of sub-object created.

If necessary, reduce size of the vectorized image (hold down CTRL to lock ratio), so that it fits on the page.  Otherwise it may appear "cropped" when viewed.
Use "File - Save As" to save your file in SVG format.

The advantage of a vector graphic can most rapidly be seen when we increase its size. Shown below was zooming to 2500%. Top is the original bitmap, bottom is the vectorized object:

This image and object was created from your original from chat

potrace is the tool for that. You can process them bulk, but first you have to convert the images to monochrome:

ls ./p*.jpg | xargs -L1 -I {}  convert -monochrome {} {}.bmp
ls -1 ./*.bmp | xargs -L1 -I {} potrace {} -r 300 -b svg -o {}.svg

install:

sudo apt install potrace


Does TwinView work with Nvidia SLI? This might be a rubbish question for AskUbuntu but I'm getting a hardware itch and I think the cheapest way to alleviate it is by chucking another Nvidia GTX 260 in my box and strapping it to my existing one...

But I use Twinview (that is two monitors coming out my one card) showing a single screen. I also use Compiz and I also play games, and watch video using VDPAU.

So before I spend £100 on another card, I'd like to know what I'm getting myself in for. Does twinview work with SLI? Does 3D performance increase as much as it does in Windows? Where's Wally? Should I just forget it for now and buy a mid-range 5xx in a year or so?

Well I found this post: http://www.nvnews.net/vbulletin/showthread.php?t=153283

And the people there are somewhat less than happy with SLI performance on Linux. Some of the posts are quite recent and there's no sign of performance being any better than single-card mode.

I guess I'll keep my eye on the driver releases to see if nvidia improve things.

I think this is for the Windows driver set, but I hope it can be used also to configure Linux TwinView with SLI: http://www.slizone.com/object/sli_multi_monitor.html