How can I use two Firefox profiles? I run Ubuntu 14.04 and want to use one installation of Firefox with two different profiles for the same logged in Ubuntu user.

How can I set this up, so that I may easily launch both profiles from the Unity launcher?

How to set up different Firefox profiles for the same Ubuntu user and the same Firefox installation

Excerpt of the command-line options from man firefox:

-ProfileManager
   Start the profilemanager. Use this to choose the profile you would like to
   run firefox with. You will need to also use -no-remote if there is already
   a running firefox instance.

-P profile
   Start firefox with the profile named profile. Will start the profile
   manager if a valid profile name is not specified. You will need to also
   use -no-remote if there is already a running firefox instance.

So you just need to start Firefox with one of those parameters by either using a terminal, the Alt+F2 HUD, from the launcher icon's context menu after editing its configuration file, which I will describe below.

Set up a new profile:

Launch Firefox's ProfileManager from the terminal or with Alt+F2:

firefox -ProfileManager

Rename your current profile default to profile1 (or whatever you like, you don't even have to rename it, but I will do in this guide for clarification - you just have to replace profile1 with your exact name wherever it occurs!) by clicking on Rename Profile....
Create a new profile with the wizard by clicking on Create Profile.... It will show you an info window first, read it and click Next. The second window will ask you to enter a name for the profile, enter profile2 here (or replace it wherever it occurs in this guide with exactly what you entered instead). I would recommend you not to change the folder where the profile will be stored in, unless you have a good reason to do so. Click Finish.

Exit the ProfileManager.

Set up your launcher icon to access those profiles from the context menu:

Copy the original launcher file (which is owned by root, used system-wide and will get replaced with the next update) to your home folder:

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

Edit the copy e.g. with either Gedit (GUI) or Nano (terminal):

gedit ~/.local/share/applications/firefox.desktop
nano ~/.local/share/applications/firefox.desktop

Search for the line:

Actions=NewWindow;NewPrivateWindow;

and add new context menu action identifiers like this (example names, but only used within the file, you won't see them anywhere else):

Actions=NewWindow;NewPrivateWindow;Profile1;Profile2;ProfileManager;

Insert the code snippet below at the end of the file, you may vary the Name= value and add as many translations as you want (example for German [de] is given). The Exec=firefox -P ... lines have to contain the exact (case-sensitive) name of the profiles you created in the profile manager! The -no-remote flag allows multiple firefox profiles to run at the same time. Also the last word in the lines [Desktop Action ...] has to exactly match the keys you added to the Actions= line above.

[Desktop Action Profile1]
Name=Run Firefox with profile 1
Name[de]=Firefox mit Profil 1 starten
Exec=firefox -P profile1 -no-remote
OnlyShowIn=Unity;

[Desktop Action Profile2]
Name=Run Firefox with profile 2
Name[de]=Firefox mit Profil 2 starten
Exec=firefox -P profile2 -no-remote
OnlyShowIn=Unity;

[Desktop Action ProfileManager]
Name=Open Firefox profile manager
Name[de]=Firefox Profilmanager öffnen
Exec=firefox -ProfileManager -no-remote
OnlyShowIn=Unity;

Now if you want to specify a permanent default profile for when you left-click the launcher icon (otherwise the profile you last used through the ProfileManager with the respective checkbox ticked gets launched), you also have to edit the main Exec= line. It's the topmost and should look like this:

Exec=firefox %u

Edit it to look like the one below, maybe replacing profile1 with the correct default profile name you wish.

Exec=firefox -P profile1 %u

You have to reboot (maybe logging out and back in is also enough?) before the system realizes that you want to override the system-wide firefox.desktop file and use your personal and customized one. Or you can use the command

desktop-file-install --dir=~/.local/share/applications ~/.local/share/applications/firefox.desktop

to re-initiate the launcher file. After that, enjoy your multiple profiles!

You can open a new private window in Firefox (much like Chrome's incognito window) and use it simultaneously with normal browser with different accounts.


how to remove ubuntu 12.04 from dual booting with windows xp with xp installation cd I have dual booting system with Ubuntu 12.04 and Windows XP. Now I want to remove Ubuntu 12.04 and retained Windows XP.

How do I remove the Ubuntu 12.04 with Windows XP installation CD command prompt?

If you used the Wubi installer and installed Ubuntu from while booted in windows, you can simply uninstall Ubuntu in the same manner as you would uninstall an application from windows.
If you installed Ubuntu from a live CD on a separate partition, all you must do is delete the partition that contains Ubuntu.

This link might be useful :)


unattended-upgrades stopped updating on Dec 17 2020 I have a number of servers running Ubuntu 18.04, all of which stopped updating anything on Dec 17.  No errors seen in the unattended-upgrades or unattended-upgrades-dpkg log files.
If I do apt-get update I see some stuff download, but if I do apt-get upgrade nothing upgrades.  This is despite running old kernels that have had recent vulnerabilties for which there are upgrades.
Anyone know the best way to troubleshoot why this is (or isn't!) happening?
Mirror in use is archive.ubuntu.com

Nothing is wrong with your systems, at least that is causing this.
Updates have resumed as of 1/4/21. If you do not receive any updates in the next day or so, please report back.
There haven't been any updates since then to the 18.04 repositories.  I suspect they're taking the last two weeks of the year off.  I got a google-chrome-unstable update on the 18th, but that is from a PPA.
The "stuff downloaded" is the index files that your systems use to determine if there have been updates or not.

Source: Ubuntu Updates

if I do apt-get upgrade nothing upgrades.

This is the wrong command.
Do 'apt full-upgrade' and then reboot all of the affected servers. I additionally recommend 'apt clean' afterwards to empty the package cache, 'apt autoremove' to get rid of any obsoleted packages, and 'apt purge' to remove any lingering configurations.


Enable remote VNC from the commandline? I have one computer running Ubuntu 10.04, and is running Vino, the default VNC server.

I have a second Windows box which is running a VNC client, but does not have any X11 capabilities. I am ssh'd into the Ubuntu host from the Windows host, but I forgot to enable VNC access on the Ubuntu host.

On the Ubuntu host, is there a way for me to enable VNC connections from the Ubuntu commandline?

Update:

As @koanhead says below, there is no man page for vino (e.g. man -k vino and info vino return nothing), and vino --help doesn't show any help).

Short Answer:

gconftool-2 --set --type=bool /desktop/gnome/remote_access/enabled true

as the accepted answer mentions, if vino isn't started on the remote machine, use

/usr/lib/vino/vino-server

Long Answer and more info:

A subset of the settings for the current built-in remote access server (vino) can be seen, as mentioned, from vino-preferences.  A complete list of gconf flags can be seen with the gconf-editor command, listed under /desktop/gnome/remote_access .
You can see also the other remote_access keys with this command (or a variation on it):

gconftool-2 -a /desktop/gnome/remote_access

(For whatever reason, -R will also work.)

You can also get the schema key documentation via the --long-docs arg.

E.g., for the alternative_port key :

gconftool-2 --long-docs /desktop/gnome/remote_access/alternative_port

       The port which the server will listen to if the
       'use_alternative_port' key is set to true.
       Valid values are in the range from 5000 to 50000.

So, for example, here's how to change default port via command line:

gconftool-2 --set --type=bool /desktop/gnome/remote_access/use_alternative_port true
gconftool-2 --set --type=int /desktop/gnome/remote_access/alternative_port 5999

gconftool will give you the keys under a given directory.   Here is the 'remote_access' section:

gconftool-2 -a /desktop/gnome/remote_access
 use_upnp = false
 vnc_password =
 authentication_methods = [vnc]
 network_interface =
 require_encryption = false
 disable_background = false
 enabled = true
 use_alternative_port = false
 mailto =
 disable_xdamage = false
 lock_screen_on_disconnect = false
 icon_visibility = always
 view_only = false
 prompt_enabled = true
 alternative_port = 5900

Here is how to list all the schema docs under /desk/gnome/remote/access (via command-line /bin/bash):

for key in ` gconftool-2 -a /desktop/gnome/remote_access | awk '{print $1}'  ` ; do echo $key ; gconftool-2 --long-docs /desktop/gnome/remote_access/$key ; done

gsettings list-recursively org.gnome.Vino   # Lists keys and values, recursively
gsettings reset-recursively org.gnome.Vino  # Reset all keys under the given SCHEMA

Then check this.


No sound! Deleted /etc/pulse directory After having some issues with sound i decided to delete the whole /etc/pulse directory, thinking that they are just temporary files.
I deleted the files from terminal so I cannot restore them from trash. Now i have no sound, how do i fix it?

I tried:

sudo apt remove pulseaudio
sudo apt install pulseaudio

Did reinstalling pulseaudio restore the files to /etc/pulse? The next step would be to check if pulseaudio is running.

pulseaudio --check
echo $?

0 = running

Or try: ps -ef | grep pulse

The default configuration is for pulseaudio to try to restart itself whenever it quits but it could be running into errors when starting.

This might be helpful: How can I restart pulseaudio without logout?


How to install Lubuntu core? I am a very beginner in Linux...
I use Lubuntu Desktop..

Tell me please how to make a new fresh install of Lubuntu core?

I can't find Lubuntu core's iso file, and I can't find the direct download link for mini.iso...

Thank you.

The instructions are on this page. As @mikewhatever says there are no Lubuntu Core ISOs. Instead, the directions specify downloading an Ubuntu minimal ISO. It appears that the installer menu may offer you the option to do a Lubuntu Core installation, but if not, you can run the following from a terminal window after the installation is complete:

sudo -i
apt-get install lubuntu-core
apt-get dist-upgrade
apt-get autoclean
rm /var/cache/apt/archives/*.deb
reboot

Instead of installing Lubuntu Core you can also keep your current Lubuntu Desktop install and uninstall packages you don't want using Synaptic or one of the other tools provided with Lubuntu.

New Windows machines tend to use something called UEFI when booting which the minimal install ISOs don't support:

  While the minimal iso image is handy, it isn't useful for installing
  on UEFI-based systems that you want to run in UEFI mode. The mini iso
  lacks the proper files for booting the computer in UEFI mode. Thus,
  the computer will boot in BIOS compatibility mode, and the
  installation will be in BIOS mode.

So I would say there's some extra potential to run into headaches, especially if you're dual-booting with Windows.

Maybe this could help someone...

aptitude
--- Installed Packages (1279)
--- Not installed Packages (44436)
--- Virtual Packages (5049)
--- Tasks (24509)

These packages are currently installed on your computer

This group contains 1279 packages.

A great Sunday to all ! :)


How about this:

watch -n 1 "tail -n 1 /dev/ttyUSB0 > gpsout.tr"


fern-wifi-cracker "Exec format error" breaks packaging system root@cunix:/home/cunix# sudo apt-get remove fern-wifi-cracker
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libqt4-test libqt4-sql-mysql mysql-common libqt4-xmlpatterns libqt4-help
  python-qt4 python-sip libqt4-sql-sqlite libqt4-sql macchanger
  libqt4-designer libmysqlclient16 python-scapy libqt4-scripttools
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  fern-wifi-cracker
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 3,514kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 167661 files and directories currently installed.)
Removing fern-wifi-cracker ...
dpkg (subprocess): unable to execute installed pre-removal script (/var/lib/dpkg/info/fern-wifi-cracker.prerm): Exec format error
dpkg: error processing fern-wifi-cracker (--remove):
 subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
 fern-wifi-cracker
E: Sub-process /usr/bin/dpkg returned an error code (1)

how to uninstall?

Try running:

echo -e '#!/bin/bash\nexit0' | sudo tee /var/lib/dpkg/info/fern-wifi-cracker.prerm

and then remove the package with:

sudo apt-get purge fern-wifi-cracker

The first command will replace the pre-uninstall script with a script that never fails.

Sounds like the program has a bad uninstall script. You might try purging it to see if that works. Otherwise it's gonna need some real elbow grease to get rid of.

sudo apt-get purge fern-wifi-cracker

Hope this helps.

PS: Also try Rebooting first to see of that loosens anything up.


Attach Keyboard/Mouse to X Display in Dell XPS L502x Dual Video Cards (Intel/Nvidia HDMI) The idea:
Use a second monitor in Dell XPS L502x with HDMI port in Ubuntu 12.04

The process:
I connect the HDMI cable to monitor.

I read this and I have video in HDMI monitor with Bumblebee and this commands:

optirun nvidia-settings -c :8
DISPLAY=:8.0 firefox

I have created a second keyboard/mouse master group with xinput with this solution.

The problem:
The second monitor (Display 8) doesn't recognize the keyboard/mouse and I cant use it.

The question:
Do you know some command to attach the keyboard/mouse master group to Display 8? I think that xinput -set-cs may work but it does not.

Hi you could see this post, it works for me , now my hdmi it's working on my xps 15z. http://www.webupd8.org/2012/08/get-hdmi-working-with-nvidia-optimus-on.html
I hope this help you!


Why "./" is used to run ".sh" scripts in Unix? I am executing a .sh script today.
It is executed with prefix "./.sh,I am a bit confuse because it is also executed without ./.but why this is required to use ./

Could you please explain me that why ./ is used to run .sh scripts?

The ./ is needed to tell bash interpreter where the script is located. There is a fixed set of directories that bash interpreter will check to run a command.

If your script is not in one of these directories than it will not find you script unless you specify the path. The ./ is telling the bash interpreter that the script is in the current directory.

You could also run the script from any other directory by using the full path.

e.g. ./script.sh from within /path/to is the same as running /path/to/script.sh from anywhere if the script is located in /path/to.

You can run echo $PATH to get a list of all the directories the bash interpreter will check. If you move you script or place a symbolic link in one the directories you will be able to execute it just using the file name script.

Using "./", means that you ask your file to be runned. But, your file has to be executable, else it will not work.

If your file is not executable, you will have to prefix your command with the program intended to run it. For your sh script, it will probably be : "/bin/sh myscript.sh" .


Is it possible to have different DPI configurations for two different screens? I'm using Ubuntu 12.04.3 with NVidia drivers (319) for my Quadro K2100M graphic card, and when I switch my main 3200x1800 laptop screen to mode 1920x1080 (using nvidia-settings), the display goes blurry...

I am using two screens:

My main screen is a LCD with max resolution 1920x1200.
My laptop screen (original resolution 3200x1800) is sitting to the right of that.

The main problem is that, on Ubuntu, the font is far too small on my laptop screen. Because of that, I wanted to change the resolution of my laptop to 1920x1080.

Reading Galgalesh's answer, I tried to compute my DPI and here is the DPI configuration which I should have:

94x94 for my main LCD screen 1920x1200
235x236 for my 3200x1800 laptop screen

Is there a way to have dual DPI resolutions with an extended desktop?

It seems people are still struggling trying to work with several monitors and HiDPI displays.
A good workaround is described in arch wiki https://wiki.archlinux.org/index.php/HiDPI#Multiple_displays.
So, I have:

laptop asus ln303ux: 3200x1800,
external monitor:    1920x1200

Now I use Ubuntu 14.10 & GNOME Shell 3.12.2 that has pretty usable HiDPI support.
So I just use out-of-the-box support of HiDPI - scaling factor is 2 (it can be set up via GUI).
That means that on external monitor I get everything twice bigger than acceptable.
Thus, I use xrandr; but instead of downscaling laptop screen, I upscale external monitor screen:

xrandr --output HDMI1 --scale 2x2 --mode 1920x1200 --fb 3840x4200 --pos 0x0
xrandr --output eDP1 --scale 1x1 --pos 320x2400

So, one by one:

--output HDMI1 in my case is the external screen, eDP1 is the laptop screen.
--scale 2x2 - make everything on external screen twice smaller
--mode XxY - explicitly set the resolution for screen (not necessary if is already set)
--fb XxY - set size of a virtual screen (framebuffer) (important without this, you will be able to use only a fourth part of the screen). In my case one screen was on top of another, so I added up effective heights 2400+1800=4200. Also note, that maximum framebuffer size might be specified in xorg.conf - then you cannot exceed it (it is written in the first line of xrandr -q output).
--pos XxY - in my case I set absolute positioning of the screens, so my laptop screen is directly on the bottom of the external screen. The value Y here is double the external monitor height.

And this is it! Everything is as crisp as it could be.

FYI: to get the names of the screens and available resolutions, one can run xrandr --current.
More information on setting the resolution an be found here: https://wiki.ubuntu.com/X/Config/Resolution .

UPDATE - OPTION 2: one more interesting workaround for applications that support GTK3.
If I normally use only one application on the large screen (e.g. some IDE, like leksah), I do not resize the the screen, but run the application scaled to its original size

env GDK_SCALE=0.5 GDK_DPI_SCALE=0.5 CLUTTER_SCALE=0.5 appname

I tried all of the above and nothing seems to work flawless. In the end I just put two terminal entries into my Fluxbox menu. One for the high res display and one for the low res.

[exec] (Terminal 9pt) { xterm -fa Hack:size=9 } <>
[exec] (Terminal 12pt) { xterm -fa Hack:size=12 } <>


Accidentally deleted /etc/ - what can I do? I have accidentally deleted /etc/ folder.

Apart from being completely stuffed, what options do I have?

Unless you did a custom install with /home and / on different mount points. You will have to start from scratch or start a live cd and run a hard drive recovery program to recover the /etc folder.


gparted ntfs partition mountable but can't resize Trying to dual-boot install 18.04 on a machine with Windows 10 already installed.   The installer didn't give me the option to shrink windows and dual-boot, so I went to manually repartition.

I tried to shrink the existing Windows 10 NTFS partition in gparted but there's an exclamation mark with a warning.

The warning says that it needs ntfs-3g installed, but it already is.

gparted says its installed and can shrink.

I made sure that Windows had fast startup disabled and had been shut down properly.

I also ran chkdsk /f C: and rebooted and then shut down properly before trying again.

And to prove that it's able to load, I manually mounted the partition!

I also tried resizing with gnome-disks but it goes grey as though it's opening a dialog and freezes until I press alt-F4.

So, in summary:

ntfs-3g enabled
Windows fastboot disabled
chkdsk /f C: successful
Windows shut down properly (no hibernate)
partition mountable from Ubuntu

What else could be stopping it from being able to be shrunk?

Use Windows tools to shrink the Windows partition

I suggest that you boot into Windows, and use the tools available there to shrink the Windows partition.
Do not create any new partition (because Windows will probably create a dynamic partition, which cannot be used by linux). Instead you should leave unallocated drive space.
Boot into Ubuntu live and use gparted to create a partition or partitions, that can be used by Ubuntu.

It possible to run the live installation in trial mode before attempting to use gparted.

then you can use a terminal to run ntfsfix /dev/sda4 to repair the ntfs partition.

you can now use gparted to resize the partition and create a new one.


How can I make shutdown not require admin password? If more than one person is logged in on my computer, Ubuntu requires super user authentication when shutting down the computer. How can I make it so that any user can shutdown the computer without being asked for a password?

Richard Holloway's answer is not actually the way PolickKit authorisations are meant to be granted. The files installed under /usr/share/polkit-1/actions are not meant to be modified. Instead, you should modify the authorities under /etc/polkit-1/localauthority/50-local.d/.

Here's how you do it for this question:

Create a file named /etc/polkit-1/localauthority/50-local.d/allow_all_users_to_shutdown.pkla and edit it using sudoedit to look like this:

[Allow all users to shutdown]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.stop-multiple-users
ResultInactive=no
ResultActive=yes

Then create another .pkla file in the same directory. Use any name you like ending with .pkla, for example, allow_all_users_to_restart.pkla, and fill it with these contents:

[Allow all users to restart]
Identity=unix-user:*
Action=org.freedesktop.consolekit.system.restart-multiple-users
ResultInactive=no
ResultActive=yes

References:

polkit Reference Manual: pklocalauthority
ArchWiki page on PolicyKit

Apparently, you are able to shut down without root from the GUI because gdm runs as root. Gnome tells gdm to shut down, and gdm does it.

You could do something similar with a script. I'm not sure how handy you are with BASH, but I believe one could write a script that runs as root and, when it receives a certain signal, runs the shutdown command.

Keep in mind that this may pose a security problem.


Enable trashes for mounted ext4 partition I'd like to mount an ext4 partition with subfolders for multiple users

/data
  user1/
  user2/
  ...

just like /home. Thus I copied the fstab entry of the /home mouting,

UUID=...   /data    ext4    defaults    0    2

manually created the mount point

sudo mkdir /data

and created subfolders with the appropriate rights:

sudo mkdir /data/user1 && chown user1:user1 /data/user1
sudo mkdir /data/user2 && chown user2:user2 /data/user2
...

Though this allows the users to create files in their subfolder, they are not able to move them to trash.

I manually created the lost+found folder with no luck.

# ls -al /data/ | grep lost
drwx------  2 root        root        4096 Okt 15 11:55 lost+found

What do I need to change to enable the trash?

According to this archlinux post referring to the FreeDesktop Trash Specification we can use trash folders for each user, that are located in the top folder

/data
  .Trash-<user1.uid>
  .Trash-<user2.uid>
  ...

and that are owned by the respective user.

chown user1:user1 /data/.Trash-<user1.uid>
chown user2:user2 /data/.Trash-<user2.uid>
...

After this modification users are able to create files, to delete files to the trash and to recover them.

Update: You have to re-log to make this work.

I created a script named mktrash.sh to mkdir the trash-folder.
#!/bin/bash

if [ "$1" = "" ]; then
    echo "Parameter: <mount path> - the top directory"
    exit
fi

TRASH=$1/.Trash
UTRASH=$TRASH/$UID

echo Creating Trash Directory: $UTRASH
echo Ctrl-C to Cancel, Enter to Continue
echo You will need to enter your SUDO password for creating $TRASH
read VAR

sudo mkdir -v $TRASH
sudo chmod -v 1777 $TRASH
mkdir -v $UTRASH
chmod -v 700 $UTRASH

Would be nice to have this automated for any mounts.
Once the .Trash dir exists, new users should be added automatically as Trash is world writeable.


resolv.conf still the same on new network When I switch between different networks with different dhcp servers, my resolv.conf file doesn't change (other settings like ip and gw change).

Workaround is to remove resolv.conf and run dhclient manually.

My interfaces file looks like this:

  cat /etc/networK/interfaces

auto lo iface lo inet loopback

How to fix it permanent?

I had same issue a while back, and it was because the resolvconf package was not install. try to install it using

sudo apt-get install resolvconf

then edit resolvconf file and restart the network via

sudo /etc/init.d/networking restart

also what does your /etc/network/interfaces file look like?

I also got a tip from this answer in a previous thread similar to yours. https://askubuntu.com/a/58802/49237

  A possible trigger for the seemingly spontaneous updates to
  /etc/resolv.conf is when your DHCP lease is renewed. Check how long
  you get DHCP leases for (this should appear in the system logs, I
  think in /var/log/syslog).

  You can use auditd  to find out what modifies the file. Start the
  daemon (sudo service auditd start) and tell it to watch for
  modifications to that file:

  sudo auditctl -w /etc/resolv.conf -p w
  Audit logs are in
  /var/log/audit/audit.log. You'll see the time the file was modified
  and the name of the program that modified it.

  If you have the resolvconf package installed, Network Manager may be
  stepping on its toes. Try bringing all network interfaces down, then
  stop Network Manager (sudo service network-manager stop), then restart
  it.


Ubuntu does not detect 3,5mm headphones I'm running Ubuntu 16.04 on an ASUS E402SA-FR291T laptop.

When I plug my headphones into the 3,5mm jack nothing happens at all as far as I can tell. I cannot see the headphones in the audio settings, it only shows "Speakers - Built-in Audio" as an option.

I've tried running alsamixer and it gives me the following:

Also, if I jack up the sound on the "Headphone" I do get sound from it, but that does not stop the speakers from emitting the same sound. Any ideas?

I'm fairly new to Linux so detailed instructions are greatly appreciated.

Thanks!

The 'MM' under the columns means it's muted. Crazy simple fix, just press 'M', unmute the columns and it'll work fine.


Software manager won't install deb file Since I switched to Ubuntu, I have been having tons of problems. This is only one of them.

The software manager seems to be unable to install deb files; For example, I have tried to install MegaSync from its .deb file, but when I click install, it looks like if it began loading and then the install button appears again as if it wasn't touched. Here's a GIF of what I'm talking about:

Doesn't even ask for my password, and of course, the software doesn't install. It's strange, because I could install Opera using a .deb file before.

Things I have tried;

To run sudo apt update in the terminal

Restart device

Any ideas?

EDIT: After another restart, I could install some apps; However, I am still unable to open/launch MEGASync.

EDIT 2: This is not a duplicate; Megasync is not the only not working deb, I am having some others that are not working, such as Gdebi and WPS Office.

The error message in your comment says that dpkg was interrupted. First you must run the command sudo dpkg --configure -a in the terminal to correct this problem.
You mistakenly downloaded megasync-xUbuntu_16.10_amd64.deb, however you are using Ubuntu 16.04, not 16.10, so download megasync-xUbuntu_16.04_amd64.deb for Ubuntu 16.04 instead.
Then try to install the MegaSync .deb file again by changing to the directory that contains the Megasync .deb file that you downloaded (megasync-xUbuntu_16.04_amd64.deb)  with cd and running this command:

sudo apt install ./megasync-xUbuntu_16.04_amd64.deb

The advantage of this command over sudo dpkg -i megasync-xUbuntu_16.04_amd64.deb is that it automatically installs the package's dependencies along with the package.

I experienced a similar issue and i was able to figure out the next step by entering a terminal and doing the installation manually with dpkg:

cd /home/user/dir/with/package/
sudo dpkg -i package.deb

In most cases i would recommend  to use the package provided from the repositories or use an PPA to avoid this kind of conflice and any further conflicts it may cause.


Type chinese PinYin with tones I am trying to write chinese characters and pinyin with indicated tones.

Setting up chinese Characters with pinyin input was failry easy. Just adding Chinese as a language and then Chinese - Simplified for the Keyboard Input.

But now I would also like to write the pinyin with tones to make Flashcards in Anki.

How can I enable this Input?

Have you tried the pinyin-editor on chinesisch-lernen.org?

http://www.chinesisch-lernen.org/werkzeuge/pinyin-editor.html

The input yan1 will automatically be changed to yān and similarly for the other tones.
You can also enter several words in one go to get a whole paragraph in pinyin.

On the downside, the editor only works in that browser window. So you will have to type it there, then copy it and insert it where you want it.
And, obviously, you will have to be connected to the internet.

Chinese - hanyu pinyin (m17n) in ibus

The "ibus-m17n package" mentioned above did not work for me. I am in a VirtualBox Linux Mint 19.3 Virtual Machine running on Windows 10. I found "Rachel's Page", and went down to the section called "How to input Hànyǔ Pīnyīn with tones in Ibus?" I will quote,

  "Sometimes, you don't want to enter 漢字 or 汉字; sometimes, you want to
  enter Hànyǔ Pīnyīn, the actual Latin script with tone marks. How do
  you do that under Ibus?

  The method you want is called "Chinese - hanyu pinyin (m17n)" in the
  Input Method menu; the icon is ā with the other tone marks next to it.
  Once this is activated, it's quite easy to type Hànyǔ Pīnyīn with tone
  marks. Just type the spelling (for example, "han"), then type the
  number of the tone (for example, "4"). It instantly puts the tone mark
  over the appropriate vowel -- no additional keystrokes needed. If you
  want to enter ü (a u with umlauts), use the old "v" trick."

Works great!


Make any app run full-screen Is there any systemwide command to make any app run full screen? It seems some apps have this feature, and some don't. Is there any way to force any app to go full screen?

Depending on your security with ubuntu you may or may not need sudo you can always force in terminal.

sudo application-fullscreen


Count the sum of each column in a file In a file with different number of columns delimited by space ' ', How to count the sum of the columns. An example would show the need:

File A:

1 2
2 3
4 5 6
1 1 1 5

Then the output would be:

for column 1 (1+2+4+1)=8
for column 2 is 11
for column 3 is 7
for column 4 is 5

Using awk

awk '{for (i=1;i<=NF;i++) sum[i]+=$i;}; END{for (i in sum) print "for column "i" is " sum[i];}' FileA
for column 1 is 8
for column 2 is 11
for column 3 is 7
for column 4 is 5

A simple solution:

awk '{sum += $i} END {print sum}' file

Replace i with column number for  example column1:

awk '{sum += $1} END {print sum}' file

output is:

8


How do I fix a "E: The method driver /usr/lib/apt/methods/http could not be found." error? I tried updating my packages from the terminal and this is what I got:

$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.
E: The method driver /usr/lib/apt/methods/http could not be found.

What does this mean? I'm using the United States mirror an I've tried using the main server for the mirror and I keep getting the same result is this because there are no updates?

SirCharlo said in the duplicate of this question:

sudo apt-get install apt-transport-https

I tried it and it worked for me.

I have faced this problem before, in my case the problem was in /etc/apt/sources.list. Make sure there are no quotation marks '' or "":

deb "http://archive.canonical.com/ubuntu/ maverick partner (Source Code)"

Remove quotes and change those lines to:

deb http://archive.canonical.com/ubuntu/ maverick partner (Source Code)

Also, as @arhimed suggests, make sure the protocol is well-formed: http://


What CCTV Software is available? I would like to setup Ubuntu to capture motion in my studio and e-mail pictures of anyone who enters it. MS Windows has plenty of software to do this, but now that I switched 100% to Ubuntu, I need a software to accomplish this. Ideas?

You can use Zoneminder.

  ZoneMinder is intended for use in single or multi-camera video
  security applications, including commercial or home CCTV, theft
  prevention and child or family member or home monitoring and other
  care scenarios.1

  The three main reasons for surveillance are security, safety and
  nosiness. Whether you need a visual check on a sleeping baby, or a
  video of a stranger putting your cat in a wheelie bin, Zoneminder fits
  the bill. Zoneminder is a sophisticated camera manager, including
  support for multiple image sources, motion detection, email alerts,
  and X10 automation. It supports most V4L (Video for Linux) devices,
  and can control network IP cameras. The web interface makes it ideal
  for use on our headless server.2  Read On

To install Zoneminder, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install zoneminder

Or

1Source:Ubuntu Apps Directory

2Source:TuxRadar

I am UBUNTU user as well and I'm using Xeoma software for my CCTV system. (It is available over the Ubuntu Software-Center.)


Lubuntu rejects password when resuming from automatic suspend History

I have Ubuntu. Because of its extraordinarily slow speed (especially after upgrading to 16.04 from 14.04, almost as slow as Windows), I installed lubuntu-desktop and now use Lubuntu. The change has greatly speeded my computer.
I am able to choose whether to boot into Ubuntu or Lubuntu each time I log in.
After this change, in Lubuntu, the automatic suspend would not work because it asked for the password. I fixed this using the solution to Authentication required before suspend.

Problem

When I resume from automatic suspend, I am greeted with an unusual login screen, which has only three elements:

The day and time
The title "Light Display Manager"
A prompt to enter a password without a user being displayed

When I enter my password, the prompt responds with, "Incorrect password". I have, of course, tried multiple times and typed my password carefully.

I cannot proceed from that screen, and even Ctrl+Alt+Delete doesn't work. I have to use REISUB. EDIT: I can also sign into a console (Ctrl+Alt+F1) and sudo reboot.

Extra notes

If I suspend manually, or if I use Ubuntu, the computer resumes properly with the correct login screen, accepting my password and allowing me to continue. Only the automatic suspend from Lubuntu gives this problem.

Question

How do I get the computer to resume correctly from automatic suspend when using Lubuntu?

Had similar problem. After a reboot, the screensaver password screen keeps asking for my password. Entering my password just keeps me going back to the same screensame password screen. Went to TTY and by sheer luck, i saw the out of space notice when I tried to uninstall light-locker. Turns out I had no more free space on my hdd.

Edit /etc/lightdm/users.conf as administrator.
In the [UserList] section, make sure you have

hidden-users=nobody nobody4 noaccess lightdm

(user lightdm is often missing)


A condition with multiple commands Is it possible to do something like this?

if
rsync $folder/coopshop/prod $folder2/coopshop
rsync $folder/coopweb/prod $folder2/coopweb
rsync $folder/unihobbyshop/shop $folder2/unihobbyshop
rsync $folder/unnihobbyweb/web $folder2/unihobbyweb
then
  echo "OK! rsync done!"
else
  echo "Error! rsync crashed!"
fi

I know there is a possibility to do with \ character at the end of the line, but this is not quite an elegant solution. Is there a better way to do this?

Consider set -e.

If this is in a script, then you'll probably want to remove the if...then entirely and just put set -e at the top of the script. This causes the script to stop immediately if any command fails. When any of those rsync commands fail, they'll display error messages explaining the failure, so you probably don't need to write your own message at all.

If you want to show the commands that are run before running them, use set -x. You can combine the two by writing set -ex.

With &&, you don't need \.

If you do decide to write something along the lines of what you've shown, then as Ronny Blomme says you can separate the commands with &&. Note that you don't need to run the commands in subshells, i.e., you don't need to enclose them in parentheses.

If you write an && operator at the end of a line, then you don't need to write \ to specify line continuation. A command can't end in && (logical AND) or || (logical OR) so the shell will continue parsing onto the next line.

if
    rsync "$folder/coopshop/prod" "$folder2/coopshop" &&
    rsync "$folder/coopweb/prod" "$folder2/coopweb" &&
    rsync "$folder/unihobbyshop/shop" "$folder2/unihobbyshop" &&
    rsync "$folder/unnihobbyweb/web" "$folder2/unihobbyweb"
then
    echo 'OK! rsync commands completed successfully!'
else
    echo 'Error! some rsync command failed!'
fi

You don't have to put && at the end of a line. You can write multiple commands on the same line separated by && if you like.

Note that the final command being tested doesn't end with && because && separates the commands. If any command fails, the others will not run.

Running all the commands even if some of them fail

You may instead want to run all the rsync commands even if some of them fail, then test if any of them failed and operate accordingly. For this, you can trap ERR. This is not an actual signal, but the ERR signal_spec in bash catches commands that fail for any reason, including a crash (and including SIGINT). See pLumo's answer (but omit set -e to keep going) and this post by William Pursell; for more general information, see the output of help trap.

The way I like to do it (with commands like yours plugged in) is:

failed=
trap 'failed=yes' ERR

rsync "$folder/coopshop/prod" "$folder2/coopshop"
rsync "$folder/coopweb/prod" "$folder2/coopweb"
rsync "$folder/unihobbyshop/shop" "$folder2/unihobbyshop"
rsync "$folder/unnihobbyweb/web" "$folder2/unihobbyweb"

if [ -z "$failed" ]; then
    echo 'OK! rsync commands completed successfully!'
else
    echo 'Error! some rsync command failed!'
fi

About the other changes I've made... and what if command really tests.

Your arguments to rsync use parameter expansion so I've taken the liberty of double-quoting them. Otherwise, word splitting and globbing will be performed. From context it appears you don't want those additional expansions. (Usually you don't.)

Note that, contrary to the message your script prints, you are not actually testing if any rsync command crashed. You are instead testing if any rsync command failed. Crashing is abnormal program termination, where a process is terminated by a signal, typically due to a bug or a condition that cannot be reasonably handled. This is far rarer than normal program termination, which may itself occur with an exit status indicating success (zero) or failure (some other number). If rsync does crash, the code above will catch that too. But most of what it's catching, in practice, is normal program termination with an exit status indicating failure.

I tried this.

commands=$(
mkdir 1
mkdir 2
)

if($commands); then
  echo 'Ok.'
else
  echo 'False.'
fi

It works. Problem is when I add for example ls -la to commands, it failed with this.

./test: line 7: total: command not found

I don't know why.


Unable to uninstall maas completely I'm not able to uninstall MAAS

sudo apt-get purge maas ; sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'maas' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up maas-region-controller (1.2+bzr1373+dfsg-0ubuntu1) ...
Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Module expires already enabled
Module wsgi already enabled
sed: -e expression #1, char 91: unterminated `s' command
dpkg: error processing maas-region-controller (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of maas-dns:
 maas-dns depends on maas-region-controller (= 1.2+bzr1373+dfsg-0ubuntu1); however:
  Package maas-region-controller is not configured yet.

dpkg: error processing maas-dns (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 maas-region-controller
 maas-dns
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up maas-region-controller (1.2+bzr1373+dfsg-0ubuntu1) ...
Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Module expires already enabled
Module wsgi already enabled
sed: -e expression #1, char 91: unterminated `s' command
dpkg: error processing maas-region-controller (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of maas-dns:
 maas-dns depends on maas-region-controller (= 1.2+bzr1373+dfsg-0ubuntu1); however:
  Package maas-region-controller is not configured yet.

dpkg: error processing maas-dns (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 maas-region-controller
 maas-dns
E: Sub-process /usr/bin/dpkg returned an error code (1)

this stands out to me, in the walls of text:dpkg: dependency problems prevent configuration of maas-dns: maas-dns depends on maas-region-controller (= 1.2+bzr1373+dfsg-0ubuntu1); however: Package maas-region-controller is not configured yet.
try reinstalling and configuring the maas-region-controller

This looks like you do not have the directory /var/log/maas
just create this directory and re-try installation. it should work.


Why don't popular programs like Photoshop or World of Warcraft support Ubuntu? The only thing stopping me from making Ubuntu 12.04 my main OS is that a lot of programs I use on Windows 7 and Mac aren't available for download on Ubuntu.

Why don't popular programs like Photoshop or World of Warcraft support Linux?

Also, would a company have to create the program (eg: Photoshop) for every possible distro (Gentoo, Arch Linux, Ubuntu, etc...), or would they just have to make one binary and it would work across all distros?

I think market share is very important aspect, because producing complicated softwares (like Photoshop) or game (like Warcraft) are too expensive for software production companies and when market share of an operating system (Like Ubuntu) is low then the sell of this kind of software will be low therefore produce this king of software (expensive and complicated) is not beneficial for software production companies.

Ubuntu is a very high built open source flavor, many of the gamers of today use windows for their "goto gamer gooru" Ubuntu is mainly meant for software development and network debugging and setup. However Ubuntu is capable of having artistic measures such as gimp 2.4 as in a Basic rundown version of Photoshop, but not made by Adobe. Back to the gaming case there is not really a whole lot you can do besides run a designated "wine program" which is compatible with the wine runner. Anyways if your a gamer gooru then your going to have to face the inevitable that Ubuntu or any other Linux Distro cannot run many games today that are meant for a dedicated graphics card and or a dedicated computer which is ported with graphics capable of running any game at maximum settings. art Graphics and Photo wise you can depend on Gimp, but its not a reliable as Photoshop.

P.S no the company wont have to make a "ex Photoshop, that would be one discombobulated bunch!


How to Install Ubuntu on Windows? I downloaded Ubuntu from torrent, and opened it by extracting the file.
Now, I don't know what to do, and copied all the files in C: drive and restarted my PC, but Ubuntu doesn't get started. What more I've to do ?

To install Ubuntu, first you need to burn the ISO that you downloaded to CD.  To do so see Burning ISO How to.  Once that is done, you need to boot from that CD, and make sure that your system is set to boot from CD. Once it boots, you will have the option to install Ubuntu alongside windows, and that way you have both Ubuntu and Windows on the same machine.  A second way, is to install Ubuntu from within Windows, just like any application, by running wubi.exe from the CD. For more information on how to install Ubuntu you may check out Installing Ubuntu Desktop or Welcome to the Ubuntu installation guide!

Ubuntu is an operating system. it does not run in Windows, it is an alternative to Windows. Go to Ubuntu.com for advice on how to install and try Ubuntu


How do I uncompress a tarball that uses .xz? I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives.

Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?

Ubuntu includes GNU tar, which recognizes the format by itself! One command works with any supported compression method, per the manual.

tar xf archive.tar.xz
tar xf archive.tar.gz
tar xf archive.tar

etc. If tar gives a Cannot exec error, you may need to sudo apt install xz-utils first.

unar is quite a  nice simple program and easy to type, to unarchive almost any format including 7z and RAR

it seems to be written in (GNU) Objective-C and so requires installation of some gnustep (GNU's Objective-C implementation) libraries (gnustep-base-runtime and  libgnustep-base1.25)

if you use --install-suggests or have configured apt to install suggested packages, unar will suggest and install many GUI GNUStep programs which are not what you want

sudo apt install --no-install-suggests unar
unar linux-source.tar.xz

it will create the output directory linux-source automatically.


Why did the command ":(){ :|: & };:" make my system lag so badly I had to reboot? DANGER!
Do not run this command to 'test' it unless you are prepared for a crash and/or force-rebooting your system.

I was in my Virtualbox running 12.04 trying to compile an app, and while waiting I happened to chance upon a forum where a comment said:

 Try :(){ :|: & };:
 Fun, too, and doesn't need root.

Without thinking, I ran it in my gnome-terminal. It made my 12.04(in Virtualbox) lag so badly, I had to shut it down.
My question is what does this command do?

 :(){ :|: & };:

This is called a fork bomb.

:() means you are defining a function called :

{:|: &} means run the function : and send its output to the : function again and run that in the background.

The ; is a command separator.

: runs the function the first time.

Essentially you are creating a function that calls itself twice every call and doesn't have any way to terminate itself. It will keep doubling up until you run out of system resources.

Running in Virtualbox was quite sensible really otherwise you would have had to restart your pc.

It is called a “fork-bomb”, as explained above, and another way of doing this would be to use background execution rather than piping:

:(){ :&:;};:


How do I install Cinelerra 4.4? Where I can found a ready-made Cinelerra 4.4 .deb package to install ? Im not an expert to compile everything and resolving all dependencies on my own.

OK, first of all, Cinelerra has 2 versions:

Comunity maintained version called cinelerra-cv which the last update was in November 13, 2011 and in the Git repositories 24 Sep 2012. Quite old.
Heroine Virtual LTD maintained, which from now I will call cinelerra-hw. Last updated July 9, 2012. Still old.

Ubuntu repositories includes cinelerra-cv package in the repositories while cinelerra-hw seems no were to be found. Or so it seems. In the launchpad page of cinelerra-cv there is a note that reads:

  Experimental builds of Cinelerra based on the upstream Heroine Warrior release (4.4) are available here:

  https://launchpad.net/~cinelerra-ppa/+archive/cinelerra-hw

So, we only need to sudo add-apt-repository ppa:cinelerra-ppa/cinelerra-hw and ready. Please note: This ppa provides EXPERIMENTAL and therefore untested builds for the upstream release of audio and video editor Cinelerra (v. 4.4). Any problems with the installation and use goes for your own accord. If you need stability use cinelerra-cv or use the fork lumiera.

I don't have a .deb for you, but here are some easy to follow instructions for compiling Cinelerra 4.4. There is a good chance that these steps will work for you:

http://n1njahacks.wordpress.com/2013/03/09/installing-cinelerra-4-4-on-ubuntu-12-04/

EDIT: Just found this page with a bunch of debs. I have not tried them myself yet.

http://www.deb-multimedia.org/pool/main/c/cinelerra/cinelerra


I want to update apache 2.4.7 to 2.4.25, will it destroy my current configuration? So, I wanted to upgrade my apache (on ubuntu 14.04) and enable http/2 doing:

$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/apache2
$ sudo apt-get update
$ sudo apt-get install apache2

Will it have any affect to my current configuration, I mean my conf files, modules, virutal hosts etc.?

Anyone tried this?

In my case I had modified one of the system configs so apt-get asked me if I want to keep my changes or not. I chose to see the differences and it was 1 modified line.

You should do:

First step: Do a backup.
Second step: Test in virtual machine
Third step: Upgrade and select keep your old data
Fourth step: Test apache.
Firfth step : Resotore the backup if the upgrading failed


How to host Java based website? I am a web developer.  I have developed a website based on Java, Hibernate and Oracle Database Technologies.

I want to host this website on internet. Previously, I use to contact 3rd party organizations to host them on their virtual servers. Now I am looking forward to host it myself. But I have no knowledge.

Please help me on how to host the java based website through my Ubuntu Desktop 13.10.

How can I imagine a "Java based" website ? If there are any .html files you can try

apt-get install apache2

I hope I could help you


Bitcoin PPA installation problem Im trying to download Bitcoin for my Ubuntu Oneiric.

 sudo add-apt-repository ppa:bitcoin/bitcoin
 sudo apt-get update
 sudo apt-get install bitcoin/bitcoin

Everything goes smooth until the install line.

 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 E: Unable to locate package bitcoin

Help! I've never done a PPA before!

I got it installed and working with these. Open a terminal and run the following commands:

Add the Bitcoin Ubuntu PPA repository in your Ubuntu:

sudo add-apt-repository ppa:bitcoin/bitcoin

Update package lists

sudo apt-get update

Install bitcoin-qt

sudo apt-get install bitcoin-qt

Ready! Look for Bitcoin under "Applications menu"

The problem appears to be the apt-get install command you gave:

sudo apt-get install bitcoin/bitcoin

Looking in the PPA, the package you want is just called bitcoin, so this is probably what you wanted to type:

sudo apt-get install bitcoin


How to change GRUB timeout only for the next reboot? Similarly as I change the selected GRUB option with grub-reboot 2 which affects only the next boot, I want to change the GRUB timeout time for the next boot only. After that, the timeout value should be reset to the previous value.

How can I achieve this? I have Ubuntu 18.04.

You can make use of Grub's Environment-block.

We can save a variable in /boot/grub/grubenv and modify
the value of the variable during the next boot.

Add the following lines to /etc/grub.d/40_custom:

if [ ${boot_once_timeout} != "x" ]; then
    set timeout=${boot_once_timeout}
    set boot_once_timeout=x
    save_env boot_once_timeout
fi

Make the file executable with sudo chmod +x /etc/grub.d/40_custom

Run sudo update-grub.

Now write the variable to /boot/grub/grubenv and reboot:

sudo grub-editenv - set boot_once_timeout=0
sudo grub-reboot 0

You can always check the value of the variable with

~$ cat /boot/grub/grubenv
# GRUB Environment Block
next_entry=
boot_once_timeout=x

Note that this will work only if Grub is able to write to /boot/grub/grubenv, so if your /boot folder resides in a BTRFS-partition or in a LVM-volume this solution will not work.

Please also take a look at this answer, another example which explains the use of Grub's environment-block.

In 19.04 and 19.10 I mistakenly set the timeout in the /boot/grub/grub.cfg  file and that only worked for one boot.


No longer able to use WiFi, adapter Intel WiFi Link 5100, Ubuntu 12.04 Computer: Acer Aspire 7730. Only Ubuntu installed.

Hi, I installed Ubuntu 12.04 yesterday and WiFi worked out of the box. But now the WiFi does not work anymore. It was after I did a

sudo apt-get update

in order to try to fix Spotify (native) (couldn't start it), but I've since learned that update does not actually update any packages (correct me if I'm wrong). But if was after the reboot (Ubuntu wanted me to reboot) that my WiFi no longer works.

If I type

sudo lshw -c network

This is the output:

   *-network UNCLAIMED
       description: Network controller
       product: WiFi Link 5100
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:07:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: memory:c0a00000-c0a01fff

So my WiFi adapter is unclaimed, which I've read means that no driver is associated with it.

Also:

iwconfig

gives

lo        no wireless extensions.
eth0      no wireless extensions.

This is the link that I wanted to use to try to install iwlwifi (I first wanted to try a Linux driver instead of the whole Windows wireless Driver thing. Plus when I tried to find the driver for this adapter, I could only find .exe files, while it said that I should find .inf files).

Running this

cd /lib/firmware
ls *.ucode

gives

iwlwifi-1000-5.ucode  iwlwifi-2030-6.ucode  iwlwifi-6000-4.ucode
iwlwifi-100-5.ucode   iwlwifi-3945-2.ucode  iwlwifi-6000g2a-5.ucode
iwlwifi-105-6.ucode   iwlwifi-4965-2.ucode  iwlwifi-6000g2a-6.ucode
iwlwifi-135-6.ucode   iwlwifi-5000-5.ucode  iwlwifi-6000g2b-6.ucode
iwlwifi-2000-6.ucode  iwlwifi-5150-2.ucode  iwlwifi-6050-5.ucode

Notice the iwlwifi-5000-5.ucode. This looks very similar to the file(s) that I downloaded from the previous website that I showed. So since it is already there, I haven't tried to install it to that directory yet (and I'm not quite certain how to do it). Maybe the kernel/system/whatever simply doesn't load the driver on boot-up?

Most of the problems I've had with Ubuntu so far have been solved with copy pasting terminal commands without knowing what they do, but it feels like the more I do this the more brittle the whole system becomes (because I don't know what I'm doing). It seems that installing and updating software can lead to unforeseen, bad side-effects that I don't have the skill to foresee. So for this problem I want to ask someone directly before I proceed.

Thanks!

The driver for your card, iwlwifi, is already present in the 12.04 kernel, as is the required firmware. Let's load it and see if your wireless springs to life:

sudo modprobe iwlwifi
iwconfig

Did a wireless interface wlan0 get created? If not, check the message logs to troubleshoot:

dmesg | grep iwl
rfkill list all

The pipe symbol | is on the right side of my US keyboard on the same key with backslash.

Your problem looks similar to mine, and I think the new kernel and broadcom drivers are the problem. I ran this, restarted, and it fixed it:

sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl

If that does not work then you can look at these two links for some other ideas:

http://ubuntuforums.org/showthread.php?t=1966673#3
http://ubuntuforums.org/showthread.php?t=1966012#5
http://ubuntuforums.org/showthread.php?t=1966012#6

If you use the #6 solution please also run the commands found at this link:http://ubuntuforums.org/showthread.php?t=1966012#9

Hope this helps!


How to resize partitions? Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.

Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).

Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.

How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?

(Step 0:) Back up anything really valuable. This is a pretty tried and tested formula but things can go wrong. A power cut at the wrong moment could really ruin your day if you haven't backed up.

Boot to a LiveCD or LiveUSB drive in "try me" mode.
Load gparted (should be installed by default, you can apt-get it if it's not)
Resize your partitions (right click, click resize, follow the instructions).
Click apply and sit back while it does the job.
Reboot, taking out the USB stick or CD when it tells you to.

One way that you can shrink partitions without losing data is by using GParted.  A very good application, but be careful with it.

Edit: Boot from a live CD so you will be able to do the resizing. Install gparted with Ubuntu Software center, or any other way (synaptic etc) you prefer, if it isn't already installed.

It will ask you to authenticate when you run it, as it has access to things that can damage your installation badly. Realise that by altering partitions on your hard drive(s) you can potentially stop your system booting completely.  As I said, be careful.

It will then search devices it can see and display the partitions on the first one (probably /dev/sda, if not try different devices from the pull down at the top right).  You should be able to see that one of them contains your root (/) mount point. When you are sure you have the correct one (the size itself is a good indicator), right-click on that partition and choose Resize/Move (if it is greyed out, you might need to unmount it first (make sure you have booted off a live CD, and not your installed linux system).   Reduce the size in the middle (New Size) edit box to what you want (make sure it's still large enough for your system's needs).  Click on resize/move, then use the big green tick to apply the changes. If it reports success, then should be able to shutdown the live cd and reboot into your main system.

Edit2:  I just googled a tutorial you might look at  gpart tutorial


Updated to 18.04, PC freezes before the login screen (Ubuntu logo) My PC freezes before the login screen (Ubuntu logo); if I select RECOVERY MODE and resume boot everything goes well. I suspect a problem with the graphics driver.

Finally I was able to solve the issue by uncommenting the line #WaylandEnable=false in /etc/gdm3/custom.conf

A combination of the advice here solved the same issue for me on Ubuntu 19.10.
When the system started and hung with the mouse pointer at the bottom right of the screen, I was able to move it but there was no login window.
I pressed Ctrl+Alt+F2 to start a console session in TTY2, logged in and opened the file /etc/gdm3/custom.conf. There I uncommented the line #WaylandEnable=false (by deleting the # at the beginning of the line)
I then typed reboot and tadaaaaaa!


Using Amixer to control volume I'm running 14.04, and I was told I could use amixer to control volume via the command line. For example, to mute sound you would use

amixer set Master mute

The output for me is

amixer: Unable to find simple control 'Master',0

So I did some man reading and found out I needed to replace Master with the name of my laptop's mixer control. Typing amixer returns:

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

So naturally, I enter amixer set IEC958 mute but all I get is

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

Once again. I've tried sset and some other commands but every single one returns the same text. Also, why is there no "Master" or "Speaker" controls? Is there something I'm doing wrong?

If you want to use amixer to control the volume, this should work in a terminal:

amixer -D pulse sset Master 0%

(0% to mute or use any percentage you like)

To reduce/increase the volume, you can add - or + after % (but that doesn't work to increase the sound beyond 100%).

amixer set IEC958,0 mute

You have to specify your card as shown in the amixer output. Use "unmute" instead of "mute" to turn the sound back on again.


How do I prevent the file 'recently-used.xbel' from being created? I want to permanently prevent Ubuntu 12.10 from creating a "recently used" file list. This list seems to be stored in the file:

/home/user/.local/share/recently-used.xbel

I have tried deleting this file, but it keeps being recreated every time I start a new login session. I need to know how to prevent this file from being recreated.

To disable the list for GTK 3 based applications follow these steps:

rm ~/.local/share/recently-used.xbel

If THERE ISN'T a "~/.config/gtk-3.0/settings.ini", then

mkdir -p ~/.config/gtk-3.0
    echo -e "[Settings]\ngtk-recent-files-max-age=0\ngtk-recent-files-limit=0" > ~/.config/gtk-3.0/settings.ini

If THERE IS a  "~/.config/gtk-3.0/settings.ini", then

echo -e "\ngtk-recent-files-max-age=0\ngtk-recent-files-limit=0" >> ~/.config/gtk-3.0/settings.ini

(note the ">>" vs the ">" difference ; ">>" appends to a file while a single ">" completely overwrites it, without backup, if it already exists)

And in either case:

rm ~/.local/share/recently-used.xbel

To disable the list for GTK 2 based applications follow this step:

echo gtk-recent-files-max-age=0 >> ~/.gtkrc-2.0

These steps are better than changing permissions on the file as they prevent error messages from being shown when launching GTK based applications that rely on the file.

Detailed information can be found here - https://alexcabal.com/disabling-gnomes-recently-used-file-list-the-better-way/

Assuming it's only that file that you want to prevent from being written, you could try changing its permissions so it cannot be accessed.

First, delete the file. Then, create a new, blank one. Then, customize its permissions.

cd ~/.local/share
rm recently-used.xbel
touch recently-used.xbel
chmod 000 recently-used.xbel

If you want, you can even change its ownership so no program running as your user can change its permissions and write to it:

sudo chown root:root recently-used.xbel

Some programs might issue errors (with or without that final customization).


BlueTooth shown in `lshw` but not activated lshw shows:

          *-usb UNCLAIMED
               description: Bluetooth wireless interface
               product: HP Integrated Module
               vendor: Broadcom Corp
               physical id: 1
               bus info: usb@3:1
               version: 1.00
               capabilities: bluetooth usb-2.00
               configuration: speed=12Mbit

lsusb shows:

Bus 003 Device 002: ID 03f0:171d Hewlett-Packard Bluetooth 2.0 Interface [Broadcom BCM2045]

But hcitool dev gives:

Devices:

What am I missing to get BlueTooth active?

On of these helped:

root@hk:~# modprobe btintel
root@hk:~# modprobe bnep
root@hk:~# modprobe bluetooth
root@hk:~# modprobe brcmfmac
root@hk:~# modprobe brcmutil
root@hk:~# modprobe realtek
root@hk:~# modprobe evdev

hcitool dev still shows nothing, but hciconfig -a now shows:

hci0:   Type: Primary  Bus: USB
        BD Address: 00:27:13:6D:4C:DF  ACL MTU: 1017:8  SCO MTU: 64:8


How do I install a root certificate? Can anyone point me to a good tutorial on installing a root certificate on Ubuntu?

I've been provided with a .crt file. I gather that need to create a directory at /usr/share/ca-certificates/newdomain.org and place the .crt  in that directory. Beyond that I'm not sure how to proceed.

Installing a root/CA Certificate

Given a CA certificate file foo.crt, follow these steps to install it on Ubuntu:

Create a directory for extra CA certificates in /usr/share/ca-certificates:

sudo mkdir /usr/share/ca-certificates/extra

Copy the CA .crt file to this directory:

sudo cp foo.crt /usr/share/ca-certificates/extra/foo.crt

Let Ubuntu add the .crt file's path relative to /usr/share/ca-certificates to /etc/ca-certificates.conf:

sudo dpkg-reconfigure ca-certificates

To do this non-interactively, run:

sudo update-ca-certificates

In case of a .pem file on Ubuntu, it must first be converted to a .crt file:

openssl x509 -in foo.pem -inform PEM -out foo.crt

To add a Root CA certificate in FireFox is now-a-days very easy. Just open preferences, go to "Privacy & Security", scroll down to "Certificates" and click "View Certificates...". Here you can click "Import Certificate".  Point to your root CA (.pem) and OK. That's all folks.


Ubuntu won't detect boot partition for Kali Linux I have Kali Linux installed alongside Ubuntu, and when I run update-grub it detects it but does not add it to the grub config file. Also when I run blkid it doesn't show the /boot partition for Kali. When I run GParted it does, as /dev/sdb3.

Any solutions to this?

try up boot repair from this link:
https://help.ubuntu.com/community/Boot-Repair
and if didn t work try to see the report to know the the exact problem


Not able to install Gnome Tracker Trying to install Tracker search application to index my pdf files. [Found recoll's search result page cluttered.] But everytime I try configure before installing, I get the following error -

checking for LIBTRACKER_BUS... yes
checking for LIBTRACKER_COMMON... yes
checking for LIBTRACKER_DATA... no
configure: error: Package requirements (glib-2.0     >= 2.40.0
                          gio-unix-2.0 >= 2.40.0
                          sqlite3      >= 3.7.9
                          uuid) were not met:

No package 'sqlite3' found
No package 'uuid' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBTRACKER_DATA_CFLAGS
and LIBTRACKER_DATA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

werunom@linux-matter ~/Downloads/tracker/tracker-1.6.1 $ sudo apt-get install sqlite3
[sudo] password for werunom:
Reading package lists... Done
Building dependency tree
Reading state information... Done
sqlite3 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

werunom@linux-matter ~/Downloads/tracker/tracker-1.6.1 $ sudo apt-get install uuid
Reading package lists... Done
Building dependency tree
Reading state information... Done
uuid is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I am not sure what package I have to install more for the configuration to happen successfully.

Thanks for any help/suggestion.

Try running sudo apt-get -f install. If this doesn't work you might have to install the packages that are missing manually. However, you could also try adding 3rd party repositories, maybe they serve the packages on ther servers.


Laptop gets stuck after closing lid on after upgrading to Ubuntu 19.10 I just installed Ubuntu 19.10, and now when I close my laptop's lid and then open it again the system won't start back up, however the screen does turn on and an underscore symbol appears in the upper left corner. I have to then restart the computer.

This worked perfectly fine before (on 19.04). I would like my computer to go into suspend automatically when I close the lid, I would rather downgrade than lose this ability.

My computer is a Lenovo Legion Y540. The processor is an Intel i7-9750H and the graphics is NVidia GeForce RTX 2060.

Not sure if this is relevant, but I found some similar issues that had something to do with the boot loader, and when I upgraded I got a warning saying that my version of GRUB had been locally modified (!). I selected the option to replace it with the package maintainer's version.

Does anyone know of a fix for this?

Not sure if it is the same problem but since i've upgraded to Xubuntu 19.10 when I closed and open my laptop lid the graphical window became non-responsive. I could see the mouse cursor moving otherwise the screen is frozen.

Removing the screensaver service from the startup seems to have solved the problem. Hope it helps on regular Ubuntu too.

8-9 months ago, I had a huge crash (non-recoverable thing even though there were tons of articles on "how-to-fix-it" - non of them worked) caused by the usage of the free graphics drivers (nvidia card).

Reinstalled ubuntu 19.4, specifically used the proprietary ones and it worked.

Recently (end-of-April 2020) there was a big-ish update. After this, my laptop stopped suspending when I was closing the lid. The fan was blowing like crazy until the battery was drained.

I've seen lots of people  with similar problems around video-card drivers, so I decided to restore them to the open-source version. Et voila: it works like a charm. Hopefully, that crash that made me reinstall the OS will not reappear.

Don't have to approve this as an "accepted answer" - unless it really worked for you - because, to be honest, I cannot explain it and give more details on whys and hows. I am just dropping this here so it can help other poor soul going through the same pain as I did and have less gray hair. ;-)

HTH.


How to install Python 3.4 on Ubuntu? If I open Terminal and type in python, I see the version is 2.7.4. How do I get python 3.4? And do I need IDLE if I have sublime text?

python 3.4 is installed on the stable release of Ubuntu 14.04. You need to use python3 to use python 3.4. For example, to execute a script file.py, use:

python3 file.py

This will use python 3.4 to interpret your program or you can use the shebang to make it executable. The first line of your program should be:

#!/usr/bin/env python3

and then use chmod +x file.py to assign executable permissions and then run your python script as ./file.py which would use python3 to execute.

If you want python3 to be used when you type python on the terminal, you can use an alias. To add a new alias, open your ~/.bash_aliases file using gedit ~/.bash_aliases and type the following:

alias python=python3

and then save and exit and type

source ~/.bash_aliases

and then you can type

python file.py

to use python3 as your default python interpreter.

No, you don't need IDLE just to use python3 to interpret your programs.

There are a ton of legacy python apps out there and thus the need for python 2.x , however as others mentioned  python3 -V shows Python 3.4.0 is installed and thus with Ubuntu 14.x it is there.

 python -V     shows   2.7.6

 python3 -V    shows   3.4.0

Knowing which interpreter to use then is up to you.


Installation of 14.04 on Asus Zenbook UX301LA alongside Windows I am afraid I messed up things pretty badly while trying to install Ubuntu 14.04 or Mint 17 on a brand new Asus Zenbook UX301LA. The situation is:

I am pretty sure that I have destroyed Windows8 (that's fine)
I think I have installed Linux somehow
I can't boot for some reasons I do not understand, and Boot Repair did not solve the problem either.

Details are here: http://paste2.org/vLk6tdxN.
I tried many BIOS configurations. At the moment:

secure boot is disabled
CSM is enabled
not sure of what to do with Sata settings of the 2 SSD (256GB each): should I leave RAID on, at least during installation, or may I choose AHCI?

The important thing is that I do not need the preserve partitions/data. Rather, I don't need Windows and I am willing to erase everything (provided there are no problems in doing that, with this Asus) and just install Linux on a good old /dev/sda, instead of all this mess of partitions and containers which I don't understand (see http://paste2.org/vLk6tdxN for my boot-repair log).

This is the first new PC I've had with EFI, Win8 and this sort of stuff.

At the moment, the pc boots only with a live distro.

Hardware: Asus Zenbook UX301LA
Ubuntu: 14.04

Check out my blog post here : http://ux51vz.blogspot.ca

Might be a bit late, I guess you might figured it out already, but anyway, might help you as well... Instructions are for UX51VZ but I am pretty sure it can apply to UX301LA as well as the specs are pretty similar.

I you wanted to keep Win8, you can still restore it from the backup partition an reinstall Linux after.


Are there any tweaks for fixing the appearance of Eclipse Juno on ubuntu? As we have previously established ;-) running Eclipse on ubuntu is a bit disappointing on the UI side. Things are even worse now that Juno is out. Are there any tweaks specific to Gtk3 and Juno that help make things better?

The new UI maybe needs some getting used to, but I'm not convinced. Padding got much worse with all the extra (useless?) space between panes. The gradient on the toolbar looks ugly, the quick search looks like it needs some more polish, the buttons to switch perspectives maybe would look nicer without the quick search bar, tabs are waaay to big. Not sure the color scheme has been fixed since I'm running a modified theme for the sake of old 3.7 (the infamous white on black tooltips)

You may switch to classic Theme in the menu: Window->Preferences->General->Appearance.
This will get you back to the looks in eclipse 3.7 if you find that more appealing.

Hi make the definition in the e4_basestyle.css for .MPartStack{}


What's the correct driver to use with a GeForce 6150SE nforce 430 on Ubuntu and Ubuntu flavours? I've  tried three other posts about how to install drivers for

NVIDIA GeForce 6150SE nForce 430
Video Drivers for Onboard GeForce 6150SE
Nvidia geforce 6150-unity 3d won't work

The problem is I've tried installing all the drivers suggested, one by one, test them, remove them, install another and until now the one which is working best is nouveau, but It also freezes the screen on random actions, most notably when I start Firefox.

If you have this card installed and working well please tell us what driver/distribution/configuration you are using. Thank you.

Xorg.0.log file: http://pastebin.com/8HLG59y7

syslog tells me this:

Feb 23 11:55:19 xxxxxxx kernel: [   48.418101] systemd-logind[1202]: Failed to start unit user@1000.service: Unknown unit: user@1000.service

Feb 23 13:22:30 xxxxxx kernel: [ 5286.305415] nouveau E[    PBUS][0000:00:0d.0] MMIO write of 0x00000000 FAULT at 0x00b010

I found that the correct driver (working well now for two days) is the nvidia-304 which can be installed from repositories. This might be problematic if you are making a clean install because the Geforce 6150SE will not work well when installing from the Ubuntu DVD: the Ubuntu live session will freeze, so follow this sequence:

Boot from the DVD and press Space to choose different methods of installation.
Choose Experienced Install.
Install Ubuntu.
After install is done, press CTRL+ALT+F1 and login.
Update your system:

sudo apt-get update

sudo apt-get upgrade
Install the driver:

sudo apt-get install nvidia-304
DO NOT run nvidia-xconfig (THIS IS IMPORTANT).
Reboot the system (just press CTRL+ALT+DEL)
Login normally.
Open Nvidia X server settings from the dash.
Backup your configuration (you can copy and paste it to a txt file)

I hope this helps others, it's worked for me (so far).

I had the same experience with Linux Mint 19.0. The fix was to avoid the update to kernel 4.15 or to install Linux Mint 18.2 which works for me. I can do all of the updates and still have my video driver, Nvidia Geforce 1650 SE Nforce working.

I wanted to dual boot with either Debian or PCLinuxOS but since those are rolling releases, the updates break the system since the X driver gets moved into the kernel.

Another fix would be to just buy a cheap video card.


Shell script I made is ridiculously verbose, and also is probably inefficient. Help! I am new to Ubuntu, and so far have done several things I am quite proud of:

Made an apache webserver with my own html (before a week ago I had never touched it)
Made a stratum mining server +titcoin node

And my latest project is making a shell script to backup my ENTIRE (that’s right) hard drive to a huge external one. Getting to the point, I know there’s quite a bit I could improve on (like the fact that it tells you the contents of everything it tars?), and I would like your opinion on it:

Code:

#!/bin/bash
read -n1 -p “Would you like to back up your system? Uno for Si, and Dos for No.”
echo
case $input in
1) fdisk -l;
echo;
read -p “Please enter the name of your backup disk that was displayed in the fdisk window: ” disk ;
echo;
echo “Backups now in progress! Please be aware that backups are saved to a Backups directory which this script creates, and backups are tarred and labelled by date!”;
echo “THIS WILL TAKE A VERY VERY LONG TIME IF YOU HAVE A LARGE FILESYSTEM! PLEASE BE PATIENT!!!”;
cd /;
sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cp $(date +%Y%m%d).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . && sudo cp $(date +%Y%m%d-%H).tar /mnt/$disk/Backups;
echo “Okay, all done! To restore your system, you will have to untar and manually do it yourself. If you have any issues, email name@example.com!”;;
2) echo “Then why are you running this script?”;;
*) echo “I'm sorry, but I can’t do that…”

esac

Honestly, I have no idea what I am doing. Any suggestions?  Here is an excerpt from the output that has been going for around ~3 hours...
Well actually, the text is moving so fast I can't even copy/paste it...

Global issues:

Use indentation. It makes your code more readable (for you and for us).
Use only straight quotes in bash. Other types of quotes might break commands.
Do not append ; at the end of a single command. The ; character has a specific meaning and it's useless if appended to a single command.

Specific issues:

fdisk -l;

You need to run fdisk as sudo: sudo fdisk -l

read -n1 -p “Would you like to back up your system? Uno for Si, and Dos for No.”

You're not storing this input anywhere. Seeing the code below, you're missing input at the end (mind the space after the double-quotes): read -n1 -p "Would you like to back up your system? Uno for Si, and Dos for No." input

sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cp $(date +%Y%m%d).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . && sudo cp $(date +%Y%m%d-%H).tar /mnt/$disk/Backups;

The tar command is missing a -f option: without it tar outputs to stdout and not to the specified file; also the filename should be $(date +%Y%m%d-%H) to match the filename expected from cp: sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cpf $(date +%Y%m%d-%H).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . && sudo cp $(date +%Y%m%d-%H).tar /mnt/$disk/Backups;

Final note: doing so, you're leaving all the backups in /, but you're also excluding a /backups/ directory from the backup, so it seems like your goal is to store a copy of each backup in such folder. Make sure that such folder exists. The corrected version of the last command according to this is:

sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cpf backups/$(date +%Y%m%d-%H).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . && sudo cp backups/$(date +%Y%m%d-%H).tar /mnt/$disk/Backups;

So the indented, straight-quoted, useless-;-free, fixed version of the script is:

#!/bin/bash

read -n1 -p "Would you like to back up your system? Uno for Si, and Dos for No." input
echo
case $input in
    1)
        sudo fdisk -l
        echo
        read -p "Please enter the name of your backup disk that was displayed in the fdisk window: " disk
        echo
        echo "Backups now in progress! Please be aware that backups are saved to a Backups directory which this script creates, and backups are tarred and labelled by date!"
        echo "THIS WILL TAKE A VERY VERY LONG TIME IF YOU HAVE A LARGE FILESYSTEM! PLEASE BE PATIENT!!!"
        cd /
        sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cpf backups/$(date +%Y%m%d-%H).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups . && sudo cp backups/$(date +%Y%m%d-%H).tar /mnt/$disk/Backups;
        echo "Okay, all done! To restore your system, you will have to untar and manually do it yourself. If you have any issues, email name@example.com!"
        ;;
    2)
        echo "Then why are you running this script?"
        ;;
    *)
        echo "I'm sorry, but I can’t do that…"
        ;;
esac

Last thing: Never ever leave your email address around the web. Spammers will scrape it. I have replaced it with name@example.com in my answer, in your answer and in your question.

Alright, got it.

#!/bin/bash
read -n1 -p "Would you like to back up verbosely and with minimal directories?? Uno for Si, and Dos for No." input
echo
case $input in
1) fdisk -l
echo
cd /
mkdir TempBackup && cd TempBackup
read -p "Please enter the name of your backup disk that was displayed in the fdisk window: " disk
echo
echo "Tarring your /etc/ folder, be patient!" && sudo tar -cpf etc.tar /etc && echo "etc is tarred, copying now!" && sudo cp etc.tar /mnt/$disk/Backups && echo "Tarring your /bin/ folder!" && sudo tar -cpf bin.tar /bin && echo "bin is tarred, copying now!" && sudo cp bin.tar /mnt/$disk/Backups && echo "Tarring your /home/ folder, if you use bitcoind or litecoind it will be a bit!" && sudo tar -cpf home.tar --exclude=.cache --exclude=.gvfs /home && echo "home is tarred, copying now!" && sudo cp home.tar /mnt/$disk/Backups && sudo tar -cpf var.tar /var && echo "var is tarred, copying now!" && sudo cp etc.tar /mnt/$disk/Backups && cd / && echo "Tarring usr, IT IS UNLIKELY THAT THIS FILE CAN BE COPIED ON A FAT32 FS!!! AUTOSPLIT HAS BEEN ACTIVATED!!!" && sudo tar -cpf usr.tar /usr && echo "usr is tarred, copying/splitting now!" && mkdir split-files && cd split-files && split --bytes=1G /usr.tar split.tar && sudo cp * /mnt/$disk/Backups && cat split*.tar > usr.tar && cd /TempBackup && echo "Okay, finished! Let me clean up..."  && sleep 5 && echo "Cleaning all files...." && sudo rm -rf *.tar && echo "All Done!"
2) fdisk -l
echo
cd /
mkdir TempBackup && cd TempBackup
read -p "Please enter the name of your backup disk that was displayed in the fdisk window: " disk
echo
echo "Backups now in progress! Please be aware that backups are saved to a Backups directory which this script creates, and backups are tarred and labelled by date!"
echo "THIS WILL TAKE A VERY VERY LONG TIME IF YOU HAVE A LARGE FILESYSTEM! PLEASE BE PATIENT!!!"
echo "THIS IS NOT THE SAME AS THE VERBOSE MODE! THIS COPIES ALL FILES TO DISK, NOT JUST THE COMMON ONES! YOU STILL HAVE TIME TO QUIT!!!"
sleep 10
cd /;
sudo mkdir -p /mnt/$disk && sudo mount /dev/$disk /mnt/$disk && sudo mkdir -p /mnt/$disk/Backups && sudo tar -cpf $(date +%Y%m%d).tar --directory=/ --exclude=proc --exclude=sys --exclude=dev pts --exclude=backups . && sudo cp $(date +%Y%m%d-%H).tar /mnt/$disk/Backups
echo "Okay, all done! To restore your system, you will have to untar and manually do it yourself. If you have any issues, email name@example.com!"
*) echo "I'm sorry, but I can't do that..."
esac

Feel free to use this!


Dual Boot full disk encryption greyed out I'm trying to install a dual boot system with Windows 10 and Ubuntu 16.10, both fully encrypted.

I have a 230 GB SSD and installed Windows in the first 100 GB.

Now I'm trying to install Ubuntu using the rest of the disk. The problem is, that during the Ubuntu installation, the two options

Encrypt the new Ubuntu installation for security and
Use LVM with the new Ubuntu installation

are both greyed out. Why is that so?

Is this because I'm trying to install both on the same SSD?

Is there a way to encrypt both installations on one disk?

Dislaimer: This is not a fully detailed/verified answer yet. I will update it when I install again.

So my setup: Non-EFI. 500GB hard drive. Preinstalled with windows 10. I shrank my Windows 10 partition to 80GB. Turned on BitLocker. Created an Ubuntu 16.04 install USB drive.

When installing Ubuntu, I hit the same problem as you where the 'encrypt' option was grayed out on dual-boot (but I did verify that non-encrypted install works just fine).

To get past this, I selected Try Ubuntu. When in call from a Terminal sudo swapoff -a

Run sudo gparted to verify that the unallocated space you want to allocate is accurate.

Run Install Ubuntu 16.04 from the desktop. When you get to the location where the encrypted option was grayed out originally, select Do something else to specify partitions manually. For the partitions, I first created an ext4 of 20GB (note: waaay too big) and put the mount point at /boot. Then I created a physical drive for encryption that took the remainder of the disk. The new logical drive created should have its mount point set to /. Then press install. It will complain about there being no swap drive. Press OK because swap can be turned on later.

At this point, install should proceed as normal.

Note that as soon as the encrypted drive is selected, things get messy as the new partition is officially created. At this point, I'm no longer able to boot without the Ubuntu USB disk. To get aroudn that I can either a) use gparted to delete the newly created partition and try again or b) just install unencrypted Ubuntu

It seems, that the ubuntu-auto installer does only work if he can encrypt the whole disk.

I fixed the issue by doing the partioning by hand before the actual installation wizard. (I followed this german tutorial)


111: Connection refused when trying apt update I am using Ubuntu 16.04. Whenever I try to run sudo apt update, nothing gets updated, and the output is as follows:

Err:1 http://dl.google.com/linux/chrome/deb stable InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
Err:2 http://gb.archive.ubuntu.com/ubuntu xenial InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
Err:3 http://security.ubuntu.com/ubuntu xenial-security InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
Err:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease Unable to connect to 213.192.64.75:41258:
Err:5 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease Unable to connect to 213.192.64.75:41258:
Err:6 http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu xenial InRelease Unable to connect to 213.192.64.75:41258:
Reading package lists... Done
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to 213.192.64.75:41258:
W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Unable to connect to 213.192.64.75:41258:
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease Could not connect to 213.192.64.75:41258 (213.192.64.75). - connect (111: Connection refused)
W: Failed to fetch http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/dists/xenial/InRelease Unable to connect to 213.192.64.75:41258:
W: Some index files failed to download. They have been ignored, or old ones used instead.

No proxy running. No active firewall. Pinging the server in question works fine.

I am also unable to install any software packages due to unmet dependencies. My package manager seems to be completely messed up; not sure if the two are linked in any way so I made a separate question here for this: askubuntu.com/questions/1081041/apt-get-unmet-dependencies

The port you are trying to connect to is not open on the IP address that you are trying to connect to for one of the following reasons.

You are connecting to the wrong IP address. Use nmap on the server with hostname of localhost (nmap localhost) to check if the server is running properly in the port you want, and on the client with your server's public IP address to check if the destination port is open.
You did not open the port on your firewall(s) successfully.
Your system is configured to use a local HTTP proxy for apt connections, and no such proxy is running (included in this answer for the sake of completeness although you commented that no proxy is running). Many companies and higher education institutions have restrictions in place which includes a policy to control the types of websites you can access.

This might help you. https://ubuntuforums.org/showthread.php?t=1844030.
You can also give this a try https://ubuntuforums.org/showthread.php?t=1844030.


Need help with installing driver for ASUS PCE-N53 11n N600 PCI-E Adapter I've been trying to get my ASUS PCE-N53 11n N600 PCI-E wireless network adapter to connect to my home network without success. lspci -nnk | grep -iA2 net gives the following information on the wireless:

06:00.0 Network controller [0280]: Ralink corp. RT5592 PCIe Wireless Network Adapter [1814:5592]
Subsystem: ASUSTeK Computer Inc. RT5592 PCIe Wireless Network Adapter [1043:851a]
Kernel modules: wl

Searching the Internet tells me getting this network card to work is an ongoing issue. Asus' own driver only have support for the 2.6.x kernel, and there have been several posts later that attempts to get the driver to work with later kernel versions. Amongst other this post uses a solution that was used to resolve the same problem in ArchLinux using this patch. I've tried patching the driver following the instructions provided, which seem to work without error, but when I try to run make and make install I still get the same error messages I've been getting from the beginning. (I believe they are the same anyways) I'm unfortunately unable to post the whole text from the run, but I identified the following error messages:

When running make:
user@user-homePC:~/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326$ sudo su
root@user-homePC:/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326# make

(...)

`/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’:

/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.c:4896:85: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
 intf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );
                                                                     ^~~~~~~~
/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.c:4896:95: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
 , size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, __DATE__, __TIME__ );

(...)

/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.c:6960:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  *(ULONG *)pData = ralinkrate[rate_index] * 500000;
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:308: recipe for target '/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.o' failed
make[2]: *** [/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/../../sta/sta_cfg.o] Error 1
Makefile:1550: recipe for target '_module_/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux' failed
make[1]: *** [_module_/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-36-generic'
Makefile:381: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

Following error messages were recorded during make install:

root@user-homePC:/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326# make install

(...)

install -m 644 -c rt5592sta.ko /lib/modules/4.13.0-36-generic/kernel/drivers/net/wireless/
install: klarte ikke å hente informasjon om 'rt5592sta.ko': Fila eller mappa finnes ikke
Makefile.6:294: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/user/Nedlastinger/Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux'
Makefile:474: recipe for target 'install' failed
make: *** [install] Error 2

(For those who don't understand Norwegian, it essentially says it's unable to find and install the file 'rt5592sta.ko'.)

I have posted the full text from the compiling and running the script below. If anyone has an idea what might be causing the error, some help would be appreciated.

There's an AUR package rt5592sta_linux_patched-dkms which was last updated in 2016 for kernel 4.7.1-1. If you're on kernel >=5 this will not work for you, and consider manually installing the patched driver from this GitHub repo - you will get B/G support (no N support) but it is better than nothing.

The answer to your question, ‘how can I get my ASUS PCE-N53 11n N600 PCI-E wireless network adapter to connect to my home network’, is that you probably cannot.

When we both Google your device, more precisely, 1814:5592, we see many trouble-filled threads involving exactly what you found; it won’t compile on a modern kernel, even with a few different patches.

The ancient and rusty file that Asus provides for kernel version 2.6 will never, ever compile on your modern 4.13 kernel.

The links you found for Arch Linux are all for kernel version 3.15 or so; that’s still a generation behind your 4.13.0-xx.

I am unaware of any driver at all that will work with kernel version 4.4 or later.

Finally, here is a reliable and useful link: https://wikidevi.com/wiki/ASUS_PCE-N53

  Probable Linux driver  none

I regret that there is no better suggestion, aside from purchasing a different device.


Permissions issue when trying to save file to /var/www Possible Duplicate:
  How to avoid using sudo when working in /var/www?

I have install PHP from this article on my ubuntu computer

http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/

now when I tried to save a simply php file I am unable to do that. I have no access to that folder var/www

$ chmod +x /var

chmod: changing permissions of `/var': Operation not permitted

I am not sure what this command do. can someone let me know how to get it worked then I can save file from any software I use.

I just have install php and it's work fine and this post is about giving 'var/www' permission that I can save the file their.

Thanks

Now after a restart my computer I got my permission worked.

If you are using it for development just change the owner of /var/www folder to your username.

sudo chown username:username -R /var/www

make sure to change the "username" word from the above command to yours.

The folder /var/www needs root permission to change its rights. Why not try:

sudo chmod +x /var

If that is not working for you, then try to modify only the www folder which seems to be of special interest to you, like this:

sudo chmod 777 /var/www

Hope that helped.