Why are swap partitions discouraged on SSD drives, are they harmful?

Flash RAM cells in SSDs have a limited lifespan. Every write (but not read) cycle (or more accurately every erasure) wears a memory cell, and at some point it will stop working.
The amount of erase cycles a cell can survive is highly variable, and flash from modern SSDs will survive many more than flash from SSDs made several years ago. Additionally, the SSD intelligent firmware will ensure evenly distributed erasures between all the cells. In most drives, unused areas will also be available to backup damaged cells and to delay aging.
To have a value we can use to compare the endurance of a SSD, we can use lifespan measures such as the JEDEC published standards. A widely available value for endurance is TBW (TeraBytes Written, or alternatively total bytes written) which is the amount of bytes writeable before the drive fails. Modern SSDs can score as low as 20 TB for a consumer product but can score over 20,000 TB in an enterprise-level SSD.
Having said that, both the lifespan and the use of a SSD for swapping depends on several factors...
Systems with plenty of RAM
On a system with plenty of RAM and few memory consuming applications we will almost never swap. It is merely a safety measure to prevent data loss in case an application ate up all our RAM. In this case, the wearing of a SSD from swapping will not be an issue. However, having this mostly-unused swap partition on a conventional hard drive will not lead to any performance drop, so we can safely put our swap partition (or file) on that significantly cheaper hard drive and use the space on our SSD for something more useful.
Systems with little RAM
Things are different on a system where RAM is sparse and cannot be upgraded. In this case, swapping may indeed occur more often, especially when we run memory-intensive applications. In these systems, a swap partition or file on a SSD may lead to a dramatic performance improvement at the cost of a somewhat shorter SSD lifespan. This decreased lifespan may, however, still not be short enough to warrant concern. In all likelihood, the SSD may be replaced long before it would've died because several times the storage may be available at a fraction of today's prices.
Hibernating our system
Waking from hibernation is indeed very fast from a SSD. If we're lucky and our system survives a hibernation without issues, we can consider using an SSD for that. It will wear the SSD more than just booting from it would, but we may feel it's worth it.
But booting from an SSD may not take much longer than waking from hibernation from an SSD, and it will wear the SSD far less. Personally, I don't hibernate my system at all - I suspend to RAM or quickly boot from my SSD.
The SSD is the only drive we have
We don't really have a choice in this case. We don't want to run without a swap, so we have to put it on the SSD. We may, however, want to have a smaller swap file or partition if we don't plan to hibernate our system at any point.
Note on speed
SSDs are best at quickly accessing and reading many small files and are superior to conventional hard drives for transferring data from sequentially-read small or medium-sized files. A fast conventional hard drive may still perform better than an SSD at writing (and to a lesser extent reading) large audio or video streams or other long unfragmented files. Older SSDs may have their performance decline over time or after they are fairly full.


How can I download torrents in Ubuntu and what are the risks?

Ubuntu comes with a built in BitTorrent client; I am unsure how to use it but imagine torrent links will open automatically. The Ubuntu website has more information on it.

You're asking about the risks - torrents themselves are as safe as any other download, that is it depends on the source and what you're looking at downloading. If you're downloading from a legitimate source you shouldn't have any problems. See if the provider offers a hash of the file to verify it before running any executable content. If there are viruses they're likely to target Windows, but don't rest on that fact.

If you happen to be downloading content from an illegitimate source (i.e. usually if it's violating copyright) you have more risks, both an increased chance of downloading malicious data, and of legal ramifications. Generally if you have to ask about the safety and feel that your source is not legitimate or is known to be breaking the law you're best steering clear.


switch from SSH key-based authentication to normal account login

Look inside of /etc/ssh/sshd_config

change lines

PasswordAuthentication
PubkeyAuthentication

!check other options / lines so you don't lock yourself out. If you want to be sure, post your config file here and ask back beforehand.

If the machine is connected to the internet and the ssh port is accessible, you should take this as a warning that you don't fully understand ssh configuration.


Move windows with double tap instead of click for gnome shell

It turns out you can turn a double tap into a click thanks to this answer: https://askubuntu.com/a/971519/1195829
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
Changing right click/double click to what I used on the default Ubuntu installation can be changed in GNOME tweaks > Keyboard & mouse > Mouse click emulation, and changing the selected option to  "Area"


How to make libreoffice look better in KDE Plasma?

Try using the appimage of libre office with colibri(SVG) icon theme

It looks nice.I'm using latest version of libreoffice 6.3


Why is nodemon unresponsive to any commands in terminal?

try which nodemon to find out if that command is already there. It should run by using nodemon server.js

Also make sure you run command in global mode npm install nodemon -g


How to establish IP connection for WWAN on 18.04

I assume you would still like to know.

  How do I establish and IP connection to the WWAN of a Sierra Wireless MC7354?

You have already done that:

$ mmcli --bearer 0

Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -------------------------
  Status             |   connected: 'yes'

So basically all left is to set the appropriate WWAN interface with the IP and netmask setting given. However you would also have to route the traffic you want to go over the interface to the defined gateway.

You should maybe read the whole section around page 43 in the server guide
Be aware that if you use netplan it will screw with you, eg it will ignore your manually added connections for network-manager.

  IPv4 configuration
                 |   method: 'static'
                 |  address: '100.232.81.142'
                 |   prefix: '30'
                 |  gateway: '100.232.81.141'
                 |      DNS: '10.177.0.34', '10.177.0.210'
                 |      MTU: '1430'

That it say static is irrelevant and only mean that you will have that IP as long as the bearer stays connected. Unless you pay for a static IP, isp's will most likely give you a new one when you reconnect the bearer.

The settings you have received is most likely based on the APN you have connected.

Dependent on ISP, they could force use of they dns aswell.

So, my question is why bother to do this manually when you have at least one easy to use network manager that can take care of it?

    $ apt show network-manager
Package: network-manager
Version: 1.10.6-2ubuntu1.1
Priority: optional
Section: net
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 5 927 kB
Depends: libaudit1 (>= 1:2.2.1), libbluetooth3 (>= 4.91), libc6 (>= 2.25), libcurl3-gnutls (>= 7.16.3), libglib2.0-0 (>= 2.43.2), libgnutls30 (>= 3.5.0), libjansson4 (>= 2.0.1), libmm-glib0 (>= 1.0.0), libndp0 (>= 1.2), libnewt0.52, libnl-3-200 (>= 3.2.21), libnm0 (>= 1.10.2), libpolkit-agent-1-0 (>= 0.99), libpolkit-gobject-1-0 (>= 0.104), libpsl5 (>= 0.13.0), libreadline7 (>= 6.0), libselinux1 (>= 1.32), libsystemd0 (>= 221), libteamdctl0 (>= 1.9), libudev1 (>= 183), libuuid1 (>= 2.16), lsb-base (>= 3.2-14), wpasupplicant (>= 0.7.3-1), dbus (>= 1.1.2), udev, adduser, isc-dhcp-client (>= 4.1.1-P1-4), libpam-systemd, policykit-1
Recommends: ppp, dnsmasq-base, iptables, modemmanager, network-manager-pptp, crda, iputils-arping
Suggests: avahi-autoipd, libteam-utils
Breaks: ppp (>= 2.4.7-3~), ppp (<< 2.4.7-2+~)
Homepage: https://wiki.gnome.org/Projects/NetworkManager
Task: ubuntu-desktop, kubuntu-desktop, kubuntu-full, xubuntu-core, xubuntu-desktop, lubuntu-gtk-desktop, lubuntu-desktop, lubuntu-qt-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Supported: 5y
Download-Size: 1 500 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
Description: network management framework (daemon and userspace tools)
 NetworkManager is a system network service that manages your network devices
 and connections, attempting to keep active network connectivity when
 available. It manages ethernet, WiFi, mobile broadband (WWAN), and PPPoE
 devices, and provides VPN integration with a variety of different VPN
 services.
 .
 This package provides the userspace daemons and a command line interface to
 interact with NetworkManager.
 .
 Optional dependencies:
  * avahi-autoipd: Used for IPv4LL, a protocol for automatic Link-Local IP
    address configuration.
  * ppp: Required for establishing dial-up connections (e.g. via GSM).
  * dnsmasq-base/iptables: Required for creating Ad-hoc connections and
    connection sharing.
  * libteam-utils: Network Team driver allows multiple network interfaces to be
    teamed together and act like a single one. This process is called "ethernet
    bonding", "channel teaming" or "link aggregation".

If you read the above it stands not any place that it require Desktop, actually it stands the opposite, that the desktop will pull it in exactly to do the networking part.

So my Suggestion still stands the same, install network-manager.

If you already use any other networkmanager like networkd eg., Just configure network-manager to only configure wwan.

That could be done with editing /etc/NetworkManager/conf.d/10-globally-managed-devices.conf

unmanaged-devices=*,except:type:wwan,except:type:gsm

To set up a connection you could use nmclior manually create a configuration:

sudo vim /etc/NetworkManager/system-connections/myisp

[connection]
id=myisp
uuid=755d5082-e2e3-4691-873a-0669b27aaaa2
type=gsm
interface-name=cdc-wdm0
permissions=
timestamp=1547308598

[gsm]
apn=internet.public
number=*99#

[ipv4]
dns=8.8.8.8;8.8.4.4;1.1.1.1;
dns-search=
ignore-auto-dns=true
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

Hopefully this will lead you in the right direction, best wishes :)


Has wifi-ap module for Raspberry pi been removed?

wifi-ap is snap based and the install instructions are here:-
https://snapcraft.io/install/wifi-ap/ubuntu
and this is helpful interns of setup and configuration
https://discourse.ubuntu.com/c/ubuntu-core-docs/wifi-ap-docs/69?_ga=2.226682013.1029611758.1615397153-1161557404.1615397153


Empty menu entries (instead of greyed out) in some programs

Solved by removing packages unity-gtk2-module and unity-gtk3-module. Now menus are shown inside the program's window instead of the global menu, and they show all entries both in Sublime and Deluge. Global menus are still present in all other applications I usually use, like Chromium, nautilus, etc.
However, it would be nice to have the menu show up in the global menu instead of inside the windows.


hamster: command not found and also unable to build from source code

You are right that this package is not available from APT. According to search on Repology this package has origin in Kali Linux.
To get the source and create the deb-package you can use commands below on Ubuntu 20.04 LTS:
sudo apt-get install dpkg-dev build-essential debhelper-compat git

cd ~/Downloads
git clone https://gitlab.com/kalilinux/packages/hamster-sidejack.git
cd hamster-sidejack

dpkg-buildpackage -uc -us # for Mint 20.1
make # for Mint 20.1

rm debian/source/format # fix error with deb-helper
dpkg-buildpackage -uc -us -d

sudo apt-get install ../hamster-sidejack_2.0-1kali4_amd64.deb

and enjoy.


Check if packets are making it to the NIC first, use wireshark or

  sudo tcpdump -nn dst 224.X.X.X #put your mcast IP here


Gedit Text size plugin keyboard shortcuts not working

This is a known bug at Launchpad.

On the meanwhile, these shortcuts work on Gedit 3.4.1 on Ubuntu 12.04:

Zoom In: ctrl + shift + +
Zoom out: ctrl + -
Normal size: ctrl + 0

ctrl + mouse wheel don't work in either zoom in or zoom out.


not able to change volume in ubuntu 12.04

First, goto "System Settings", then, "Sound", under the Hardware category. You should see the slider, which you can change the volume.


Authentication Failure while accessing super-user privilege

Open Terminal By CTRL+ALT+T and Type :-

sudo passwd

And  Re-Enter your password. This command will have you change your current password.


How do I install my Lexmark X1270 printer on Ubuntu 12.04

Try finding the software drivers and installing them into linux, just google the brand, model, and make and then type drivers into google, and find their offical website, and under downloads, there should be our hardware driver. hope this helps.


Warning: This solution is working for me so far, but I have only used the internet for about an hour.

First off, I figured out that this issue was a problem with the drivers. Thus, I was prompted to start searching for drivers for my wireless adapter (formally called the mini wireless n usb adapter, which brought up more results regarding this error).

I came across this website which had drivers for my particular adapter.

After following there instructions on how to install the driver, I rebooted and started using the internet. The only step I did differently was I just performed

sudo nautilus

Which made transferring the driver files to where they needed to be a bit more user friendly.


What is the difference between do-release-upgrade and the GUI "upgrade" option in Ubiquity?

Since there is no other answer I'll write up what I gathered during the last few days trying both methods and various occasions in the past.

The Ubiquity/GUI Upgrade makes a note of what packages were installed previously. Then it proceeds to plop a fresh base system and mostly replacing the old one. After that the same set of packages is installed.
Many /etc files and for example /var/www get reset during this process.

This method is not very nice for servers with custom configuration or data, but it is very fast and guarantees a properly modernized system.

The do-release-upgrade method runs from inside the system. It executes some custom transition scripts, but mostly it is apt-get upgrade but to the next LTS system. If you are 2 LTS releases behind like I was, you will need to run it twice. Differences between default configuration files are detected as the packages are installed.

If all goes well many custom configurations are be preserved or are pointed out by the upgrade and need a small amount of manual work each.

The downsides are that the process takes a long time and may need manual intervention multiple times along the way. It may get technical trying to figure out the differences between old and the new config files. Also the result can be a weird crossing between the latest Ubuntu technology and old packages and configurations carried over.

Some notes on running do-release-upgrade and graphical sessions.: Running this from a graphical user interface may be a bad idea. The graphical session gets tormented in various ways when packages get upgraded from underneath it. Wisely the do-release-upgrade wraps it self in a screen session. (I had trouble reconnecting to the screen session. Luckily I also had a tmux running on top of that. and after getting an older version of tmux I was able to resume from a text console.)


error while installling qt mobility tool kit

To compile packages you need to install the dependencies, including the headers, or -dev packages. Try

sudo apt-get install libasound2-dev

Check the dependencies listed in any README included with the source code (more likely then not you will have more dependencies to install).


Getting USB wifi adapter to work with Ubuntu 18.04

So for now it seems that the best way to fix this issue is finding the chipset of your specific dongle and find a driver for it that works with your current kernel. I found out, through lots and lots of googling, that my chipset was the mt7610u. This chipset has annnoyed Linux users for many years. I then tried to find the most up to date driver for this chipset, which happened to be https://github.com/xtknight/mt7610u-linksys-ae6000-wifi-fixes. Installing this driver using DKMS seemed to fix the adapter issues. I also found another driver, which seems to be made for a newer version of the linux kernel. https://github.com/rebrane/mt7610u
Only problem for now is getting the 5Ghz band to work. This also means that, for now, if you have a dual band router you can only connect to the 2.4Ghz band, and not the 5Ghz band.
I also had the issue that the dongle would power off after about 20 minutes of use. This has to do with power saving features that the BIOS has, these options should be shut off. They can also be shut off within Windows if you are dual boot.
Hopefully this helps someone out!


Force apt-get to overwrite file installed by another package

After python2.5 is installed try running:

sudo apt-get -o Dpkg::Options::="--force-overwrite" install python-profiler

This should pass the --force-overwrite flag to the underlying dpkg instance which will tell dpkg to overwrite one package's file with anothers.

source


If you're looking for cross-compatibility between both encrypted systems, I'd recommend using TrueCrypt.

Since you have a /home partition already, things get a little difficult.

NOTE: MAKE BACKUPS of all files you modify in case this doesn't go totally as planned.

Recommended Backups:

dd if=/dev/sda of=/some/path/mbr.bin bs=512 count=1 #Backs up your Master Boot Record (GRUB2). You should also do this again if you create another partition (once you know it worked correctly).
#You should back up this file in a place that can be accessible both from Windows and Linux. Ideally a flash-drive or external drive.
#Your home folder will be safe until the end when you can delete it. After knowing everything works (you make a backup in the process of this guide)

So, you have Windows and Linux already installed, the first thing you should do it attempt to encrypt your /home partition.

Linux

Firstly download and install the appropriate architecture's .deb file from TrueCrypt.org

Next, you have two choices:

Move all folders from /home back to the root filesystem. It's probably best to move them to /home2 for now.
Make a partition to house your new, encrypted Linux home folder

Choice 1:

First, log out and Ctrl+Alt+F1 and login.

cd /
sudo umount /home
rmdir /home
sudo mv /home2 /home
exit

Ctrl-Alt-F7 to get back to the login screen and log in as usual

Now assuming all went well, remove /home's line in /etc/fstab and format the partition that used to house your /home folder as a TrueCrypt container:

homepartuuid=$(cat /etc/fstab | grep -E "[^#][ \t]/home" | awk '{print $1}' | sed 's/UUID=//')
homepart="/dev/$(basename $(readlink /dev/disk/by-uuid/$homepartuuid))"
echo $homepart #just to make sure we got it, if not set it manually
sudo sed -ri "s/^(UUID=$homepartuuid)/#\1/" /etc/fstab #Comment out /home entry... useful if you screw up and after you re-make the partition.
sudo truecrypt -c $homepart #If you installed the GUI, you have to use that for the process of creating the encrypted partition

Set options as desired. If you installed the GUI version, the goal is to prompt for a mount password before showing the login screen. I'm not sure how the command-line version will react to this. I would recommend using the keyfiles for the command-line version. Make sure you make it an ext2 paritition and not ext3/ext4, if you want it to be readable by Windows with the ext2fs driver for Windows)

Choice 2:
If you've got the extra space, you can take the easy way out and make a new partition to house your encrypted home folder.

Use gparted or a similar tool to make your new partition (from a LiveCD if you have to resize /home or /)

Reboot.

Now, if you have to use gparted again to find your new partition's device (/dev/sda6, for example). Format the new partition using TrueCrypt. As stated above, I recommend using keyfiles for the command-line version as I don't know if it can prompt for a password. And again, make it ext2 if you want to be able to use it in Windows.

Now, mount the new TrueCrypt partition using the GUI or the command line. There are so many options here I'm going to leave it to you to read the TrueCrypt help.

Copy home files to encrypted volume

cp -ar /home/[myusername]/* /media/truecrypt1 #Default truecrypt mount point
cp -ar /home/[myusername]/.??* /media/truecrypt1
#The only thing potentially missing after this are very rare files that are named .?, where '?' can be any character.

Do not delete the files in /home/[myusername] yet!

Now, cp /media/truecrypt1/.profile /home/[myusername]. Also, move your keyfile if you used one to here (insecure!) or know where it can be referenced (as long as it's not inside the TrueCrypt partition.

Add the following line to the end of /home/[myusername]/.profile:

sudo truecrypt /dev/sda6 -k /path/to/key/file /home #Where /dev/sda6 is the TrueCrypt partition. Omit the -k option if you didn't specify a keyfile.

Add this line in /etc/sudoers using visudo:
[myusername]    ALL    =    (root) NOPASSWD  :  /usr/bin/truecrypt

Now, log out and log back in.

Just because you've made it this far doesn't mean anything.

Check the output of mount. If there's an entry that says /home/[myusername], then you're all set! Alternatively, you can check the contents of .profile. If the line we added isn't there, then you were successful!

But! Just to be absolutely sure, reboot and do it from a fresh boot.

If you've made it this far successfully, logout. Ctrl-Alt-F1

cd /
pulseaudio -k #I had to do this in my test install. Found it via: lsof /home
sudo umount /home/[myusername]

and delete everything in /home/[myusername] EXCEPT the .profile file. (You might be wondering what's going on right now. If you weren't paying attention, I overlapped the existing /home with a mount, which hides all files that already existed in /home until you unmount the overlaying filesystem. This is why we can check the .profile file to see if we were successful.)

Finally! Back up your MBR with dd if=/dev/sda of=/path/to/backup/mbr.bin bs=512 count=1. Remember, it must be accessible from both Window and Linux. Run grub-install --force /dev/sda3, where /dev/sda3 is your root filesystem partition.

If something's not working correctly, go through the tutorial again and make sure you did every step. If you're having trouble here, you should probably undo everything.

Undoing choice 1:
 - Re-format the TrueCrypt partition back to what it was (probably ext4)
 - Delete the line from /home/[myusername]/.profile.
 - sudo mkdir /home2;sudo mount /dev/sdaX home2 Where /dev/sdaX is the re-made /home partition
 - sudo cp -aR /home/* /home2
 - Verify your files (especially dot files)
 - sudo umount /home2;sudo rmdir /home2
 - sudo rm -R /home/*
 - Then, uncomment the line in /etc/fstab that starts with
   #/dev/sdaX.../home
 - sudo mount -a
 - Log out and back in

Undoing choice 2:
 - Open Gparted and put your partition back the way they were (probably a delete and expand operation. This will probably take logging out, Ctrl+Alt+F1, login, cd /;sudo umount / home; sudo su and using parted instead. Or you can boot from a LiveCD to resize your /home partition).
 - Back in your normal system, Remove the added line from .profile
 - Log out and log back in

Windows

Reboot into Windows and run the TrueCrypt full disk encryption. This will place a new TrueCrypt MBR onto your disk.

This is the easy part.

How to Select Between Windows/Linux

Some of you might be packing right now because your boot screen doesn't look like it used to. Well, we prepared for this by installing grub to your root partition instead of the MBR. When the TrueCrypt screen shows up, hit ESC to be kicked into the GRUB2 bootloader - ideally.

If it doesn't work download "dd for Windows" and running dd.exe if=F:\path\to\backup\mbr.bin of=\?\Device\Harddisk0\Parition0 (may have to run it with administrator privileges).


OK, you are basically asking two questions and I will provide answer for both.
Your problem is that apparently you accepted the default Ubuntu installation partition recommendation and now you want to give Ubuntu more space on your hard drive, correct?
Answers:

Without having to re-install Ubuntu, you can resize both partitions
by booting into a Live CD (like the one you used to install Ubuntu),
just make sure to select "Try Ubuntu" instead of "Install" when the
choice appears.  Then, go to the top left corner and hit the Ubuntu
logo button, then type GParted.  When GParted opens up, you can
re-size the Windows installation to make it smaller.  After this,
make the Ubuntu installation bigger by filling in the empty space
that the Windows installation left and wait for the process to end.
Exit the Live session and your partitions should be the size you
want them. However, since Ubuntu has already been installed, this
may (most likely) take longer than doing a fresh install which
ultimately is what I recommend.
If you just barely installed Ubuntu and you don't have any work
already saved in your installation, just go ahead and re-install.
It's the easiest and quickest way.  If you've already been working
on Ubuntu for a while, try to save all that you can to an external
hard drive or to a cloud service like Dropbox before doing the fresh
install.  Just make sure that when you re-install you first delete
the Ubuntu partition with GParted, then you make the Windows
installation the size you want it to be and leave the empty space
for the Ubuntu installation.  The installer should automatically
choose the empty space to install Ubuntu.


Why are Ethtool WOL settings reset on startup?

The Community Ubuntu Documentation on WakeOnLan states that it is a normal behavior - you have to, in one way or the other, set the option after every reboot. I am using the /etc/network/interfaces method, as it is described in the article, in two machines and it works well.


Where do I find the SUDO_COMMAND environment variable?

SUDO_COMMAND is an environment variable set by sudo only in the environment of the process started by it (and inherited by any child processes). If you run sudo some-command arg1 arg2, then SUDO_COMMAND will contain the absolute path to some-command, and arg1 arg2. If you ran sudo -s or sudo -i, then the variable will be set to the shell that was started. In any case, you probably won't see it outside of a process tree started by sudo.

For example:

$ sudo sh -c 'echo $SUDO_COMMAND'
/bin/sh -c echo $SUDO_COMMAND

Or:

$ sudo env
HOME=/home/muru
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
TERM=xterm-256color
LANG=en_US.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
MAIL=/var/mail/root
LOGNAME=root
USER=root
USERNAME=root
SHELL=/bin/bash
SUDO_COMMAND=/usr/bin/env
SUDO_USER=muru
SUDO_UID=1000
SUDO_GID=1000

  I noticed that the information comes in order

I don't know which command you're using, but you cannot rely on the output of set, declare, env or printenv to be in some order.


Can ls output in CSV format with directory and file columns?

ls cannot print data in CSV format, but find can, when given a custom output format:

find . -type f -printf '%h,%f\n'

%h denotes the directory part, %f the filename part. See the manual, especially the section about -printf format.

However, be aware that this won't work properly when your filenames have special characters or a , in them.


I want to boot directly to my UBUNTU OS without chosing on GRUB menu

Initial Default

  If no other operating system is detected GRUB 2 will boot straight
  into the default operating system and no menu will be displayed.
  If another operating system is detected the GRUB 2 menu will
  display.

  Timed Display

  The menu is displayed for a predetermined number of seconds. The
  default entry is highlighted and other selections may be made by the
  user until the timeout expires. The default timeout is 2 seconds.
  The timer continues until any key is pressed or the highlighted
  entry is selected by pressing ENTER.
  If no user input is made GRUB 2 boots the default entry at the end
  of the timeout period.
  Once a key has been pressed the timeout is deactivated and the user
  must make a selection manually.
  The default entry is determined by the GRUB_DEFAULT= setting in
  /etc/default/grub; the first "menuentry" has a value of "0".

  Hidden

  Normal Hidden Operations Enabled:

  No menu entries are displayed. The splash screen, if configured,will be displayed.
  The time the screen remains blank but available for display is
  determined by a setting in /etc/default/grub (GRUB_HIDDEN_TIMEOUT)
  GRUB 2 can display a countdown timer to provide visual feedback on
  the time remaining until the default selection is chosen. The
  timeout setting is enabled in /etc/default/grub
  (GRUB_HIDDEN_TIMEOUT_QUIET)
  The user may display the menu by pressing any key.

  Once the menu displays, the GRUB_TIMEOUT counter begins. Pressing any key stops the countdown.

  If no key is pressed by the end of the timeout the default entry determined by settings in /etc/default/grub will be
  selected.

  Hidden Menu Operations Not Expected (Abnormal):

  The user may be able to display the menu in one or more of the following ways:

  Holding down the SHIFT key early in the boot process until the menu displays.

  GRUB 2 searches for a depressed SHIFT key signal during boot. If the key is pressed or GRUB 2 cannot determine the
  status of the key, the menu is displayed.

  Pressing the ESC key during a 3 second window as GRUB 2 runs

You can follow the steps in here to change default boot entry to Ubuntu and to change default timeout:
 How do I set the grub timeout and the grub default boot entry?


Can we in any way drag and drop the extensions icon/symbol to change their positions. How we can control it easily in Ubuntu 20.04 LTS?

As you probably experienced yourself, no, you cannot drag and drop to change the order by which extensions are displayed in the top bar. In addition, it is not trivial to control the order extensions load and in which they are displayed. The latter is also the topic of a previously asked question.


Boot Windows ... disable hibernation and Fast startup.

Open command prompt as administrator and execute:

powercfg /h off

Open the old version of Windows Control Panel.
Go to the Power Settings - uncheck Fast startup.

Shutdown the machine completely, do NOT reboot.
Boot into BIOS and select Ubuntu as the default OS.
Now you should see the GRUB boot menu on PC start.


sudo Crontab isn't running, but crontab is ? :)

The most helpful should be to get errors messages.

2  3  * * *  { date; bash -v "/usr/local/scripts/backup-mysql.sh"; date; }  &>/tmp/cron-backup-mysql.log
25 3  * * *  { date; bash -v "/usr/local/scripts/backup-prestashop.sh"; date; } &>/tmp/cron-backup-prestashop.log

Output is recorded in /tmp/cron-backup-mysql.log and /tmp/cron-backup-prestashop.log.  bash -v outputs lines of the script as they are read.

You can check the owner of the file to be sure it run as root.  Then read the file, you have the start and end time to check if the run is finished and if the duration is what you expect.

If the script now run correctly, the problem was probably the shell invoked implicitly (remove bash -v from crontab and add echo SHELL = $SHELL to the script) or the execution permission missing on the script (chmod +x).

If the script crash, bash -v will help you to find the bug.  You can show more details by replacing -v by -x, but this will flood the output with each expression as they are evaluated.


The solution is to type:
<Control>Escape as a hot key in dconf-editor.


Strange journal behavior in incremental backups


This seems to be because the Home lens doesn't search the "info" group of scopes by default, which include the calculator scope.

To enable follow the steps linked below and add 'info.scope' to the always-search list.

How to change default "Categories" and "Sources" in Unity Dash?


Chromium (Snap) on Ubuntu 20.04 - Some webapp shortcuts not working - workaround

So from the big story above:

Try to launch Chromium from the console ($ /snap/chromium/1123/usr/lib/chromium-browser/chrome) and see if you can create working webapp shortcuts then. In my case, this fixed everything. If not, at least the console will hopefully give you a hint on what's going on.

Edit: apparently it's a big hit-and-miss game, as per this bug: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1732482

Please indicate on Launchpad that you're affected by this bug to increase the heat and hopefully have it fixed faster.


How to install libschroedinger on Ubuntu 17.10

Yes, it has been removed from Debian, and thus from Ubuntu as well, due to "security issues" and lack of maintenance from developers.

Installing the 16.04 packages in 17.10 is likely to work. Otherwise, you can build it on 17.10 from the source package.


If the SSD is an Intel, than this is a known firmware bug. See more info about this issue here.


Color calibrate printer/ink/paper using the integrated scanner (without requiring a colorimeter/photometer device)

Solved by upgrading to latest Ubuntu stable release

I have not calibrated my printer but I post here how this issue has been solved as requested by Jens' comment.

In fact, the computer had been repaired by a shop and the Ubuntu 15.04 I had originally installed had been replaced by the 14.04 LTS release. As I did not notice the Ubuntu version downgrade I was thinking about a printer calibration problem...

This issue got fixed when migrating from that Ubuntu LTS release to the latest stable release.

As a complement, I can tell a story at my office in 2015: Nobody was able to print on the single printer of the floor from Ubuntu (we were all using Ubuntu LTS). We had to reboot on Windows :-(
One day, I installed the latest Ubuntu stable release, and I became the first to print on that printer :-) (see my tutorial). But I was not using the same official Ubuntu release as my other colleagues...


Now I do feel a bit like a cock, it turned out I had an add-on which blocked the html5 player, so I got it working now!


I am unable to mount my previous btrfs RAID 1 home directory on reinstall of Ubuntu server 14.04 (was using 14.10)

Like the command said, your 5th drive is missing.  Either get it working right again, or mount with the -o degraded option to proceed without it ( and the redundancy it provided ).


The message is harmless, but if you really want to get rid of it, specify a relative path for tar to archive, instead of an absolute one:

cd "$SRCDIR"
tar -cpzf "$DESDIR/$FILENAME" .

Or:

cd /home/ubuntulover/
tar -cpzf "$DESDIR/$FILENAME" scripts


The embedded GtkInspector is available since GTK 3.14 while Ubuntu 14.10 has version 3.12. So you'll have to wait for Ubuntu 15.04 to use this feature.

You might want to try GtkParasite instead, which GtkInspector is based on. I tried it some months ago, but couldn't get it to work with Python3. This might have changed in the meantime though.


In the Lyx "File" menu choose "New from Template" and scroll down to the Hollywood template.
Click and Enter. This is one possibility.
To get more options you could install texlive-extras from Synaptic. Then you will need to go to the Lyx menu and click Tools>Reconfigure.
Otherwise consider specialized play writing apps like Trelby.
All the best.


Is the Wndows 10 installed on pre-built desktop lost if I choose to erase disk when installing Ubuntu?

Backup Windows Disk for Later Re-install
1) Create Image file from existing operating system:

Boot Live Ubuntu USB in the computer with disk to be cloned.

Create an image file, on a data drive with adequate space, of the disk to be cloned, using Gnome-Disks.

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

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

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

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

3) Compress image to save space:

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

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

4) Re-install Image File to original drive
Caution: The target drive will be overwritten.

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

Store the OS image file in the NTFS partition of a storage drive, where it can be flashed to the target drive when required.

Some people prefer using Clonezilla to using Gnome-Disks. I find the learning curve is steeper for Clonezilla.


completly removing a package of this kind

Installs PPA Purge

sudo apt-get install ppa-purge

Removes the PPA

sudo ppa-purge ppa:linrunner/tlp

Uninstalls the packages

sudo apt-get purge tlp tlp-rdw

Restart system. Optionally, if there are no open documents etc, shutdown -r 0 for a quick reboot.


I have a super old windows computer and a mac how to put linux on the windows pc?

as you have mentioned it's an old machine, here are the some of the alternatives(linux OS) for old machines which you can install :
/
1. Linux Lite /
2. Lubuntu /
3. Ubuntu MATE /
4. Puppy Linux /
5. Best Lightweight Linux Distributions For Older Computers /
/
How to install Linux on old Windows Machine :
/

https://www.instructables.com/id/Bring-new-life-to-an-old-laptop-with-Ubuntu/ /
https://www.youtube.com/watch?v=o3aCdxjOySE
/
Hope it helps. Stay Safe.


Radiance Theme : Wrong colour Title Bars - Ubuntu 16.04 Gnome fallback compiz

open dconf Editor from Menu/System tools, go to org/gnome/metacity/theme and type Radiance instead Ambiance

credits to this dude
https://askubuntu.com/a/820346/590091


Why can't I find ubuntu-restricted-extras?

Do you have the multiverse repo enabled?  It shows up there on my xenial system.

Here's the output of apt-cache policy ubuntu-restricted-extras:

ubuntu-restricted-extras:
  Installed: (none)
  Candidate: 65
  Version table:
     65 500
        500 http://archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages


Ubuntu full-install won't get past login (amd radeon gpu)

Try to add to grub radeon.modeset=0 to this line :

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

that it reads :

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=0"

works better for me than "nomodeset"


ntpdate " no server suitable for synchronization found"

In light of the ntp DDOS attacks many ISPs took the heavy handed approach and blocked all ntp  traffic. Usually this means that they have an ntp server inside of their network for customers to use. I would check with your ISP to see if they have an ntp server to use and/or if they are blocking ntp.

In the mean time just to double check that you did not somehow get screwy results:

Check to make sure that your DNS is working:

$ host pool.ntp.org
Check to make sure that you did not get four screwy servers. This command will try 16 pool servers. If this does not work your ISP is definitely blocking ntp (assuming you did turn off all FW rules)

$ seq 0 3 |xargs --replace ntpdate -p 1 -d {}.pool.ntp.org |grep receive

If a server responds you will see something like: receive(xxx.xxx.xxx.xxx) where xx.xx.xx.xx is the IP address of the ntp server that responded.


Lenovo ThinkPad T440p + Ubuntu 12.04/14.04

Downgrade BIOS from 2.22 to 1.14   resolved mine problems.

BIOS update utility :

http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS037575

I've ran file 'gluj04us.exe' (1.14 BIOS) from Windows 7, then Laptop restarted 3 times (flash operations).

After 4th reboot laptop I've reinstalled Ubuntu 14.04 and every hardware stuff working properly.


What is KDE's relationship to the graphic's drivers? Can someone explain how it works?

Well - ;)

1) Your command:

sudo apt-get remove --purge nvidia-*

Is removing all packages that have the 'nvidia' part.

About regex:

apt-get remove with wildcard removed way more than expected. why?
https://unix.stackexchange.com/questions/60036/meaning-of-asterisk-in-grep

2) You could simulate things:

man apt-get

       -s, --simulate, --just-print, --dry-run, --recon, --no-act
           No action; perform a simulation of events that would occur but do not actually change the system.

Simulation, at here

A simulation, at here, (K)ubuntu 13.04, KDE 4.10.5, I have the AMD not the Nvidia:

:~$ apt-get -s remove --purge nvidia-*
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done

The following packages will be REMOVED:
  glx-alternative-mesa* glx-diversions* kde-window-manager* kde-workspace* kde-workspace-dev*
  libkwinactivenvidiahack4* libkwinnvidiahack4* nvidia-installer-cleanup*
0 upgraded, 0 newly installed, 8 to remove and 0 not upgraded.
Purg glx-alternative-mesa [0.2.90]
Purg glx-diversions [0.2.90]
Purg kde-workspace [4:4.10.5-0ubuntu0.1]
Purg kde-window-manager [4:4.10.5-0ubuntu0.1]
Purg kde-workspace-dev [4:4.10.5-0ubuntu0.1]
Purg libkwinactivenvidiahack4 [4:4.10.5-0ubuntu0.1]
Purg libkwinnvidiahack4 [4:4.10.5-0ubuntu0.1]
Purg nvidia-installer-cleanup [20120731+1]

Whole output: http://pastebin.com/t3Nwca8f

Why the kde-window-manager will be removed

The kde-window-manager is depending

:~$ apt-cache show kde-window-manager
...
Depends:..libkwinnvidiahack4,...

Why the kubuntu-desktop will be removed
(if it is installed)

The kubuntu-desktop is depending

:~$ apt-cache show kubuntu-desktop
Depends:...kde-window-manager, ...


dpkg, apt-get: Executing post-install steps hangs

THERE WAS NO WAY I WAS ABOUT TO MAKE MULTIPLE COMMENTS!

No, you would have to do far more than that. Do you have a list of the dependencies? With in the Oracle database documentation for the installation, and through many sources online you should have something like this:

:~$ sudo bash

:~# apt-get -y install alien

:~# apt-get -y install autoconf

:~# apt-get -y install automake

:~# apt-get -y install autotools-dev

:~# apt-get -y install binutils

:~# apt-get -y install bzip2

:~# apt-get -y install doxygen

:~# apt-get -y install elfutils

:~# apt-get -y install expat

:~# apt-get -y install gawk

:~# apt-get -y install gcc

:~# apt-get -y install gcc-multilib

:~# apt-get -y install g++-multilib

NOTE: You will have to drop into the Precise Pangolin repository in order to find the ia32-libs, and considering you didn't do that immediately it could break your system.

:~# apt-get -y install ia32-libs

:~# apt-get -y install ksh

:~# apt-get -y install less

:~# apt-get -y install lesstif2

:~# apt-get -y install lesstif2-dev

:~# apt-get -y install lib32z1

:~# apt-get -y install libaio1

:~# apt-get -y install libaio-dev

:~# apt-get -y install libc6-dev

:~# apt-get -y install libc6-dev-i386

:~# apt-get -y install libc6-i386

:~# apt-get -y install libelf-dev

:~# apt-get -y install libltdl-dev

:~# apt-get -y install libmotif4

:~# apt-get -y install libodbcinstq4-1 libodbcinstq4-1:i386

:~# apt-get -y nstall libpth-dev

:~# apt-get -y install libpthread-stubs0

:~# apt-get -y install libpthread-stubs0-dev

:~# apt-get -y install libstdc++5

:~# apt-get -y install lsb-cxx

:~# apt-get -y install make

:~# apt-get -y install openssh-server

:~# apt-get -y install pdksh

:~# apt-get -y install rlwrap

:~# apt-get -y install rpm

:~# apt-get -y install sysstat

:~# apt-get -y install unixodbc

:~# apt-get -y install unixodbc-dev

:~# apt-get -y install unzip

:~# apt-get -y install x11-utils

:~# apt-get -y install zlibc


How to reinstall Ubuntu but keep /home folder?

As your error message states, you need first to define the root file system.

So these steps should resolve the problem:

create an ext4large partition.

  ext4 is a modern iteration of ext3. Best choice for new installations where
  super-standard isn't necessary.

select mounting point (/) and set as primary drive
create a swap partition (logical)


Cannot create create a new system with a RAID1 partition for /

Thanks for your help folks. I faced 2 problems:
a. The installer will not allow the creation of a RAID array without using the whole disk, and
b. The installer would not allow the use of a RAID array to boot from.
Linux itself might allow these options, but the installer did not.
So, I installed a 30GB SSD, put 8GB aside for swap, used the 240GB x 2 as MD0


Install 12.04 on top of existing Linux Mint installation

First, backup your /home folder. Once you format sda5 your home folder will be lost. All traces of Mint will be also gone, so there is no need to delete it first.

You can check the box next to sda5. It should be formatted ext4 and the mount point should be "/" (without quotes).

You can leave the swap partition alone. It is used as virtual memory and hibernation. Nothing permanent is stored there. Ubuntu will use it just like Mint.

The boot loader (GRUB) should be installed in sda (not sda1).

Hope this helps


Home and desktop got merged in Ubuntu 14.04

I found the solution from here: http://johnpoelstra.com/gnome-desktop-full-of-files-directories/

1.Open Nautilus

Press Ctrl+H to show hidden files.
Got to the .config directory.
Open the file ''user-dirs.dirs''
Find the line and make sure it reads as follows: XDG_DESKTOP_DIR="$HOME/Desktop" .
Save changes and exit editor.

I have not been able to test it myself but hoping to solve your problem.


UDisks2 uses D-Bus "objects". These are essentially paths to data structures.

Here's how the manual puts it:

  The process that owns the well-known D-Bus name org.freedesktop.UDisks2 on the system bus (typically udisksd) exports an object at the well-known path /org/freedesktop/UDisks2.  This object implements the org.freedesktop.DBus.ObjectManager interface and should be used by clients to discover other objects.


How can I install iTunes on command line?

There is no practical way to install a fully functioning iTunes on Ubuntu.  Search for the many questions about this on this site.

Your only recourse is to set up a Windows virtual machine and run iTunes in that.  Assuming you are willing to do that, it works quite well.  I have had to do this to maintain a family member's iPod, although I do not leave it running all the time.


There is a Realtk Linux driver that was recently updated in September 2014...

http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=7&PFid=7&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

Installation instructions are in /r8101-1.026.00/readme after you untar the r8101-1.026.00.tar.bz2 download.


If you installed Java using Webupd8 script, then to uninstall Java do the following:

sudo apt-get remove --purge oracle-java8-installer

If you installed Java from Ubuntu repositories, then you can remove it by typing:

sudo apt-get remove --purge openjdk-*


What are source, binary files, signatures and packages?

These are some essential things to install software in a system.

Binary file: this is a file written in binary language (the "computer language"), consisting of 0's and 1's, unreadable to a human. They can be executed and their function is to do a task like reading/writing/moving/copying files. Some examples of binaries are the GNU core utilities, such as ls, cat, mv, cp, cd and pwd. They are usually executed through a terminal. Binaries are compiled from a source code.
Source code: the source code is the "recipe" of any software. It's written with a programming language (or several of them). Some sources need to be compiled to work, for example those written in C, C++, Java and FORTRAN. This task is done with a compiler, such as the famous GCC (GNU Compiler Collection). What a compiler does is "reading" the content of the text files containing source code and "translating" it to binary. The output is a binary file.
Signature: also known as hash, a signature is usually a 32-character long string. It's used to confirm data integrity. For example, if you download something,  you could make sure it's not corrupted comparing your signature with the one provided by the download source. It's basically an algorithm, and if even a bit of the file was modified the signature will show it. A famous example is MD5.
Package: the definition of package may be a bit too broad, but considering the GNU/Linux and Ubuntu environment, a package can be:

a container for a program's source code, usually stored in .tar file with gz/bz2/xz compression;
a compressed file container, such as .zip, .rar and .tar.gz files;
in the Debian ecosystem (which includes Ubuntu), we usually refer to "package" as a .deb file. A .deb package contains binary files, documents and manual pages to install a specific program. It also comes with scripts to tell the installer where all the files should be put. There is a program called dpkg which installs .debs.


How to connect Raspberry Pi 4 to a hidden WiFi network on Ubuntu Server 20.04?

netplan
.yaml files are very fussy with the formatting.
Use this .yaml, and keep the spacing, indentation, and no tabs exactly the same... edit in your SSID and password...
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: true
      optional: true
  wifis:
    wlan0:
      #hidden: true # only in netplan 0.100
      dhcp4: true
      access-points:
        "MYREALSSID\"\n  scan_ssid=1\n# \"hack!":
          password: "MY_PASSWORD"

sudo netplan generate
sudo netplay apply
wpasupplicant
Ubuntu Server does not come with wpasupplicant installed, and it's required for wireless to work. We'll install it. A working ethernet connection is required, or a USB flash drive.
sudo apt-get update
sudo apt-get install wpasupplicant
reboot
Update #1:
A hack to get hidden networks to work is here.


How can I find the IP addresses of devices on my local network?

There should be a list of connected devices on your router, so you should probably check that first if you have access.

Of course, that won't help you if you want to look up subnets on connected devices. So if that is what you are after, I would suggest that you try to connect to the device that is making the subnet and check what IP you get from there. Then you could scan for other devices using something like nmap.

But like, in general, you won't be able to access subnets without being part of it.


Does a mountpoint have to be an empty directory?

No it does not have to be an empty directory. You can "overmount" it, but be aware, that you hide the files originally in that directory.

This can lead to some confusion since the space on the underlying filesystem - not the newly mounted one - stays occupied.


How can I assign custom icons to folders persistently?

Ok, this requires getting creative! For this we are going to "hack" together a .desktop file that will then launch the folder, the .desktop file can have a icon that will be the same.

In you Documents folder Create your folder but name it with a . so it will become "hidden" example .new
Find your icon example icon.png and put it in your folder also put a . in front ex .icon.png
Make a third file called foldername.desktop( How can I create launchers on my desktop? ) open it in a editing program like gedit and paste this:

[Desktop Entry]
Type=Link
Terminal=false
Icon=/home/mateo/Documents/.new/.icon.png
Name=Folder
URL=file:///home/mateo/Documents/.new

but replace "mateo" with your user name for the icon and folder paths, and "Folder" with your folder name.
Make the foldername.desktop file executable - How do I mark a file as executable via a GUI?
Now to copy the folder needs to be in the same place - but the launcher can move anywhere - don't forget that the "real" folder is hidden - you can view them -> view -> show hidden files. So now you can have a folder within a drive that will be viewed the same on two different Ubuntu computers.

It wasn't easy, and most people stick with letting the theme do the job ;)


Who can change a file permission or ownership in ubuntu?

Check this one. Or you can go for further details here.


How to change administrator user when I install an application on GNOME Software

In Linux when you change any file outside your local home, system will ask you for  the root permissions.

Root is the full permission user that can make changes to system, and for security reasons most distributions disable the root account by default, instead you can use the sudo command.

sudo is a program for Linux that allows users to run programs with the security privileges of another user, by default the superuser.

In addition any administrator account will have the sudo ability, So AS an answer for your question, you can enter any password for any user who have this ability.

You can know whom are the users with sudo by running the command:

getent group sudo

Or you can check the users from settings.


After a bit of scratching, it turned out that the USB cable was too long: I used a 5m USB cable which works fine with a printer, but in this UPS' case fails when there is more communication on it. Using a 1m cable (*) worked fine and I could talk to the UPS successfully.

(*) I went full paranoid and also added a ferrite core on the cable ...


dual-boot : Ubuntu / Windows 10 on Hp pavilion x360

I've got a HP pavillion x360 11k001nl. I managed to prepare a usb live key with ubuntu 14.04 64bit which does everything but recognizing the partitions (ubuntu installer says that the partitions are "hidden" and sees only that of the usb key I don't know how to make them visible as well as usable by ubuntu installer). Anyway I followed this advice:

to activate wifi negli x360

from terminal:

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "11n_disable=1"

Then reboot.

to remove the block of the shutdown of the system
from terminal as root (of course):

echo "blacklist dw_dmac" | sudo tee -a /etc/modprobe.d/blacklist.conf
echo "blacklist dw_dmac_core" | sudo tee -a /etc/modprobe.d/blacklist.conf

If Acer

rfkill list all

I don't run Ubuntu (Fedora) but had the same problem (wifi not switching on) on an HP PAV x360 and also had the same symptoms, namely:

1: acer-wireless: Wireless LAN
Soft blocked: yes

You need to blacklist the acer_wmi module (it never should have been loaded!)

lsmod | grep acer

Edit (or create if it doesn't exist) /etc/modprobe.d/blacklist.conf

Add the following lines

# Disable acer_wmi as it breaks wifi on this model
blacklist acer_wmi

Now unload the module (it will be blacklisted on the next boot so you only need to unload once)

 modprobe -r acer_wmi

Enjoy your working wifi!


How can I resize an ext root partition at runtime?

GUI (Ubuntu 14.04 and later):
GParted v0.17 and later provide a nice GUI for this. (Older versions will refuse to resize a mounted partition).

Command line (any Ubuntu version):
There are three steps to this.

Step 1.
The partition must first be resized. If you're using LVM, it's easy, and you presumably know how to proceed. If you're using classic partitions, it's a bit more complicated, and may require a reboot (though you never have to boot another system or live CD).

This is how I do it: Use fdisk to first delete the partition (the idea is that the data on disk will be preserved), then carefully recreate it with a larger size at the same position.

Example:

$ sudo fdisk /dev/sda

Command (m for help): p

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     9437183     4717568   83  Linux

Command (m for help): d
Selected partition 1

Command (m for help): p

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-10485759, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-10485759, default 10485759):
Using default value 10485759

Command (m for help): p

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    10485759     5241856   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

Again, it is critical that the new partition starts at the same block as the old. The Id should also match (83 for Linux systems). Be prepared to lose all your data at the slightest typo.

To be on the safe side, you may also restore the boot flag (which according to Wikipedia is still required on some computers) by pressing a.

See the comment section for what to do if your swap partition is in the way.

By now it should be apparent why people recommend using a live CD. ;-)

Step 2.
As fdisk helpfully reminds you, you must reload the partition table before proceeding. The safest way is to simply reboot; but you can also use partprobe or kpartx (more information).

Step 3.
Once the partition is resized and the partition table reloaded, it's a simple matter of running resize2fs on the file system, and you can do this even when it's mounted as the root partition.

Example:

$ sudo resize2fs /dev/sda1


How do I get a version of ubuntu for pentium M?

You just have to download the 32bit version for a system running a Pentium-M. I have a netbook running Ubuntu, and Mint, just have to use the 32bit version disks.

If the issue is you're unsure how to get the 32bit disk (the Ubuntu site always shows the 64bit in the download box), all you have to so, is when it brings you to the download link, where it says "Choose your flavour", just click on the dropdown menu under it, and you will see the 32bit version right there.


Cron job : dump and scp tar dump to remote server

No need scp, just compress the file and write it to remote path would be enough.

tar cvzf - /path/to/myBase.sql | ssh USER@HOST "dd of=/path/to/backups/myBase$(date +\%Y\%m\%d\%H\%M\%S).tar.gz"

The - telling tar command to don't create output file, instead it will write outputs into stdout. see man tar.

You can use cat >/path/to/bsckups/... as well instead of dd.

Even you can use rsync with -z option which compares the file before transfer but it will decompress after transfer in remote path.

Or you could dump directly to remote path if compression is not the matter.

mysqldump .... | ssh USER@HOST "dd ..."

Also you can use -h option of mysqldump like below in remote server (which is local now) and dump from local server (which is remote server now):

mysqldump -h HOSTNAME/IP ...  > /path/in/local


What does Service: storm has neither charm url or branch specified mean?

The bundle is referencing a local charm. Denoted by the local in local:trusty/storm. The message - while not immediately obvious - was correct. There was no branch (deploying from VCS like bazaar), nor was there a charm-store url specified (eg: charm: cs:trusty/hdp-storm)

Working with local charms in a bundle

There's an assumption in the juju tooling that this charm should reside within $JUJU_REPOSITORY - and is a common bash export when working with charms that only reside locally. You can set this with a one-liner in bash

export JUJU_REPOSITORY=/path/to/charms

in my case, this is set to $HOME/charms

and the actual storm charm resides in $HOME/charms/trusty/storm (referencing the bundle format above - i do beleive we only have hdp-storm in the charm store)

Updating the bundle to use store-charms

What might be a better option if you're not working with a locally modified storm charm would be to update the bundle to point at the charm store copy which resides here


your device is not an officially supported device, and thus it does not have an image in the image server.

In https://wiki.ubuntu.com/Touch/Devices you can find a list with the devices that have at least a port, but as long as I could see your device doesn't have one yet, unfortunately.


I can point you to the package for x86_64 arch.

http://launchpadlibrarian.net/139606892/netperf_2.6.0-2_amd64.deb

These packages have amd64 in the name.


You can use touch command with -t option. This is from man touch:

NAME
       touch - change file timestamps

SYNOPSIS
       touch [OPTION]... FILE...

DESCRIPTION
       Update  the  access  and modification times of each FILE to the current
       time.
[...]

-t STAMP
              use [[CC]YY]MMDDhhmm[.ss] instead of current time

An example:

touch -t 1312031429.30 /path/to/directory

will change the date modified for directory to 2013-12-03 14:29:30.


Config test failed when restarting apache2

Enter into mysql:

sudo mysql

Create owncloud database:

mysql> CREATE DATABASE owncloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
mysql> GRANT ALL ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'change-with-strong-password';
mysql> EXIT;

Install apache2, php and its modules:

sudo apt install apache2 libapache2-mod-php7.2 openssl php-imagick php7.2-common php7.2-curl php7.2-gd php7.2-imap php7.2-intl php7.2-json php7.2-ldap php7.2-mbstring php7.2-mysql php7.2-pgsql php-smbclient php-ssh2 php7.2-sqlite3 php7.2-xml php7.2-zip

Allow apache in firewall:

sudo ufw allow 'Apache Full'

Download, extract owncloud and change its folder owner:

wget https://download.owncloud.org/community/owncloud-10.3.2.zip -P /tmp
sudo unzip /tmp/owncloud-10.3.2.zip  -d /var/www
sudo chown -R www-data: /var/www/owncloud

Create owncloud.conf configuration file:

sudo nano /etc/apache2/conf-available/owncloud.conf

 Alias /owncloud "/var/www/owncloud/"

 <Directory /var/www/owncloud/>
   Options +FollowSymlinks
   AllowOverride All

  <IfModule mod_dav.c>
   Dav off
  </IfModule>

  SetEnv HOME /var/www/owncloud
  SetEnv HTTP_HOME /var/www/owncloud

 </Directory>

Enable the newly added configuration and all required Apache modules
 with:

 sudo a2enconf owncloud
 sudo a2enmod rewrite
 sudo a2enmod headers
 sudo a2enmod env
 sudo a2enmod dir
 sudo a2enmod mime

Reload apache2 service:

sudo systemctl reload apache2

Install ownCloud at the next address:

http://domain_name_or_ip_address/owncloud

Reference


Terminal ssh session freezes after waking from suspend

For the SSH escape sequences to work you need to be on a newline, so hit the RETURN key first.

Then usage of eg ~. (terminate connection) will work.

To see all supported escape sequences use ~? in a SSH session:

Supported escape sequences:
 ~.   - terminate connection (and any multiplexed sessions)
 ~B   - send a BREAK to the remote system
 ~C   - open a command line
 ~R   - request rekey
 ~V/v - decrease/increase verbosity (LogLevel)
 ~^Z  - suspend ssh
 ~#   - list forwarded connections
 ~&   - background ssh (when waiting for connections to terminate)
 ~?   - this message
 ~~   - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)


Is it possible to display a keyboard map in terminal?

Using setxkbmap you can get some information in terminal such as the layout, rules, model, options, keycodes, symbols, etc.

For example on my machine typing setxkbmap -print outputs the following:

xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+gr:2+inet(evdev)+group(alt_shift_toggle)"    };
    xkb_geometry  { include "pc(pc105)" };
};

And typing setxkbmap -query outputs:

rules:      evdev
model:      pc105
layout:     us,gr
variant:    ,
options:    grp:alt_shift_toggle


How to make Ubuntu fast like Lubuntu? (older PC)

The main difference between Ubuntu and Lubuntu is that Lubuntu is lighter, less resource hungry and more energy-efficient as it uses lightweight applications, including the LXDE desktop (Lightweight X11 desktop environment). Lubuntu is ideal for users having low hardware specs. Both Ubuntu and Lubuntu share the same core system and repositories. Ubuntu is the original creation with Xubuntu, Lubuntu, Kubuntu all basically the same systems with different desktop environments and default applications.

Source: https://wiki.ubuntu.com/Lubuntu


How can i make my computer use only python3.7?

Ubuntu 20.04 doesn't have pyhton2 installed by default.

But some programs may require python2. If you remove it, the programs won't work. Python2 is not compatible with Python3.

You can remove the python2 package if you are sure you don't need it by running

sudo apt remove python2


How To: moving the touchpad cursor WHILE typing?

This can be done with a simple terminal command. Open a terminal (CTRL+ALT+T) and run the following command:

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing false

Note: this command was sourced from jasomux's post from Ubuntu Forums.


Based on your comments:

Bad news my friend. You can add and/or remove the workspace name and the name of the perspective in the title bar. But you can't remove the other entries.

And this trick only works until the title of Eclipse itself is changed again:

wmctrl -l | awk '/Java.*Eclipse/ {print $1}'  | xargs -I {} wmctrl -i -r {} -T "Eclipse"

The command searches the Eclipse window and changing its title.

And this is a really dirty hack:

#!/bin/bash
/<your_eclipse_path>/eclipse &

# Wait for eclipse
sleep 15

WIN=$(wmctrl -l | awk '/Java.*Eclipse/ {print $1}')
echo "$WIN"
while [[ "$WIN" != "" ]]; do
  sleep 1
  wmctrl -i -r "$WIN" -T "Eclipse"
  WIN=$(wmctrl -l | grep -o "$WIN")
done


Installing mysql-server showing error. Unmet dependencies:

(SOLVED)
I realized the problem. When I tried installing both mysql-common and mysql-community-client-plugins individually it showed that the other one was not installed and is required. Meaning when I tried sudo apt install mysql-common it showed

Depends: mysql-community-client-plugins

and vice versa.
Therefore, I installed both on a single command like

sudo apt install mysql-community-client-plugins mysql-common

and both installed successfully. I installed mysql-server later, that too installed successfully and mysql is working well.


How to setup apache2 virtualhosts on your home directory on ubuntu 14.04?

When you use any non-standard directories with apache you need to also edit /etc/apache2/apache2.conf, and add in a <Directory /bla/bla> stanza so that apache knows it is OK to access the area. Just copy the existing /var/www or /var/www/html one. For example (from another question, and for a different location):

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

<Directory /media/newhd/test_web/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>


Fn + left arrow shortcut activates screen settings

In Keyboard > Application Shortcuts I have xfce4-display-settings --minimal listed in a couple of places. You may want to try deleting or re-assigning those. Sometimes you cannot delete particular entries for keyboard shortcuts for applications. I know this is the case for some in Window Manager > Keyboard. In order to assign the same shortcut to something else they must be re-assigned to a different shortcut. You can always pick something random or obscure for that.

You may also want to run the following to see what comes up. You may need to manually delete an entry in this file. For those changes to activate, you'll need to log out and log in again.

grep -i display ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml


Ubuntu 12.04 orange hex name (it's not #dd4814)

The default orange used in Ubuntu products and throughout the Ubuntu software - officially named Ubuntu Orange is:

#dd4814

This is confirmed and officially stated here. There is no questions about it, #dd4814 is Ubuntu Orange!

I even took the liberty to test this in Gimp. I used Libre Office Writer and wrote the following below in the preset colour called 'Ubuntu Orange'. I then went into Gimp and used the colour-grab tool. Sure enough, the link is true and any doubts can be put to rest!


tty7 Server Crash (logs included with problem, unknown solution)

From the logs:
tanish   tty7         :0               Fri May 14 06:05 - crash  (09:41)

reads as 06:05 start time + 09:41 runtime = 15:46 crash time, which allowing for rounding error matches the reboot time:
May 14 06:26:11 (myservername) systemd-sleep[2068]: Suspending system...
Random @^@^@^s for like 12 lines
May 14 15:47:39 (myservername) kernel: [    0.000000]...

The "crash" was because the server was rebooted during sleep.  Your real problem was that sleep after 20 minutes, which was not a crash, but seemed like it.
Network manager was only delaying a shutdown request from something else.  I suspect it's caused by a sleep on idle power management setting.  Idle is a misleading name for user not at keyboard.
If you cannot fix that, a workaround is to run any program on the server which needs to keep running unattended with:
systemd-inhibit COMMAND

to block sleep and shutdown requests until it has completed.


from the gnome-shell.css file, at line number 2989 find below content.
#panel .panel-button {
  -natural-hpadding: 8px;
  -minimum-hpadding: 8px;
  font-weight: bold;
  color: white;
  transition-duration: 150ms;
  border-radius: 6px;
}

For testing purpose I have changed the font-weight to noraml and edited some other related to Activities.

The font-weight field is responsible, however I guess you have many extensions installed and enabled. One of the extension is overwriting this. Turn on extensions one by one and find out which extension is causing this. Provide the link to that extension for further improvement.


Brightness level resets itself back to full brightness after every reboot

You can achieve that using xbacklight

sudo apt-get install xbacklight

Then you can check current brightnes by xbacklight -get and set it by xbacklight -set xx where xx is percent...
To make it permanent you can make a startup script. here is a great guide how to do so: How to run scripts on start up?


Attempting to remove initial section of mp4

Do what the message says: Use the -bsf:a aac_adtstoasc option on your ffmpeg command:

fmpeg -i clip-1.mp4 -bsf:a aac_adtstoasc -acodec copy -vcodec copy -ss 0 -t 00:43:00 OUTFILE.mp4


How do I increase console-mode resolution?

I've found a solution that works from this forum post

In short:

Open /etc/default/grub with your favorite editor as root.

Localize the line that says GRUB_GFXMODE= ... and change it to the resolution you want. Add another line for a new variable called GRUB_GFXPAYLOAD with the same resolution. It should look similar to this:

GRUB_GFXMODE=1440x900x32
GRUB_GFXPAYLOAD=1440x900x32

Save and exit. Then edit as root /etc/grub.d/00_header

Localize the line that says if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=... . As before, change the resolution there to the one you want and add another line for payload:

if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1440x900x32 ; fi
if [ "x${GRUB_GFXPAYLOAD}" = "x" ] ; then GRUB_GFXPAYLOAD=1440x900x32 ; fi

Finally, locate the line that says set gfxmode=${GRUB_GFXMODE} and add a line for payload below it. It should look like this:

set gfxmode=${GRUB_GFXMODE}
set gfxpayload=${GRUB_GFXPAYLOAD}

Save and exit.

Still as root, refresh grub with

update-grub2

Reboot, and both the grub menu and the console should have nicer resolutions.

Finished!


Canonical Live Patch was just announced today for 16.04:

http://blog.dustinkirkland.com/2016/10/canonical-livepatch.html
https://www.ubuntu.com/server/livepatch

This uses the live patching technology in the upstream Linux kernel since 4.0 was released.


Can I copy my files into that partition?

Yes, use sudo mkdir /var/directory  to create "directory"  and then do a sudo chown $USER:$USER /var/directory and you can move/copy files to /var/directory. Use it as a temporary method though and not to permanently store files.

  What is the minimum space I should leave free under /var?

0; with a partition a few Gb 1, 2, 5 is enough. I doubt it will use up extra space when just using your system. /var will get used when installing new software but to fix your space problem you can just not do that.

A desktop should not have a /var/ partition. For servers there is softwares that use /var to store data (like MySQL) and even those have settings to put the data somewhere else.

  My PC is running out of space. I need a temporary solution to store some files.

you can also use a USB disk.
you can also store files on google drive.
you can also remove the /var/ partition (it is not really difficult but do consider making a backup 1st though).

Boot from a live media
You will have several disks on the launcher or on the desktop

Mount /var partition in /mnt/var
Mount the root directory in /mnt/root

Edit /mnt/root/etc/fstab and remove the line that holds the /var partition
Remove the old mount point with rmdir /mnt/root/var
Run cp -a /mnt/var /mnt/root/var
Boot the real OS

I would advice the following setup for desktops:

a /. 25 Gb is more than enough.
optionally a /home of 10 Gb.
/{datapartition}. Move the directories from /home/ do /datapatition, edit ~./config/users-dirs.dirs to point to that location.

With that you are 100% certain backup of /data/partition backups up all your data and when reinstalling you format /, /home (if you created that) and just mount /data/partition. When you have a SSD and HDD and you put the system on the SSD and the datapartition on the HDD you can even take out the harddisk, put it into another system and you have all your data available.

I once set my system up like that and have moved to 2 new notebooks (all with 2 harddisk slots) using a new SSD and the same 1Tb HDD.


LVM partitioning - how to assign disk space equally

No, there is no special tool or parameter for that. You probably should not do that, anyway.

You should leave some unused space on your volumegroup, so that you can grow your logical volumes in case of an emergency (space runni.ng out on your / partition if you install updates, space running out on database, etc.)

You also want free space on your volumegroup for lvm snapshots.

Growing of logical volumes is easy and fast and you can do it in production, shrinking volumes is harder and riscier so always keep some space in reserve.


How can I trash a file from the command line?

Make sure you have the gvfs-bin package installed. gvfs-trash is part of it.


How to remove lines with a number less than 60 in column 3?

No need for Gawk extensions:

awk -F '[()]' '$4 >= 60'

Here the awk field tokenizer specified via -F is a regex set []: fields get separated by either an opening or closing parenthesis, hence you see the number of your 3rd column is the 4th awk field.


android studio does not launch in ubuntu 14.04

You are using Java 9 and not Java 8 how your JAVA_HOME will make you credible. The option was abolished with Java 8 and even ignored at this time. With Java 9 is no longer the case, the start is aborted. Therefore use Java 8 via

sudo update-alternatives --config java

and/or remove the entries MaxPermSize=350m in the files

/opt/android-studio/bin/studio64.vmoptions

and

/opt/android-studio/bin/studio.vmoptions

Note, I have Android Studio installed in /opt


Changing colour of text and background of terminal?

On certain XTerm/ANSI-compatible terminals (like xterm and gnome-terminal), you can set colors using a palette bigger then the default 8/16-colors palette (for example using an 88-colors, 256-colors or 16777216-colors (RGB) palette; both xterm and gnome-terminal support both the 256-colors and the 16777216-colors (RGB) palette); mind that the shell might override this (this is the case e.g. for zsh).

Here's a script to list the colors in the 256-color palette along with their ANSI color code in XTerm/ANSI-compatible terminals with a 256-color palette support:

#!/bin/bash
for((i=16; i<256; i++)); do
    printf "\e[48;5;${i}m%03d" $i;
    printf '\e[0m';
    [ ! $((($i - 15) % 6)) -eq 0 ] && printf ' ' || printf '\n'
done

Depending on whether you want to apply the color to the foreground or to the background, use an <fg_bg> value of 38 or 48 (respectively) in the following command:

printf '\e[<fg_bg>;5;<ANSI_color_code>m'

For example, to set the foreground color (<fg_bg>=38) to red (<ANSI_color_code>=196) and the background color (<fg_bg>=48) to black (<ANSI_color_code>=0):

printf '\e[38;5;196m Foreground color: red\n'
printf '\e[48;5;0m Background color: black\n'

It's necessary to redraw the prompt using printf '\e[K' in order for the background color to apply to the whole line and in order for the foreground color to apply to the cursor:

The same thing can be accomplished using RGB values instead of ANSI color codes in a compatible terminal; depending on whether you want to apply the color to the foreground or to the background, use an <fg_bg> value of 38 or 48 (respectively) in the following command:

printf '\e[<fg_bg>;2;<R>;<G>;<B>m'

For example, to set the foreground color (<fg_bg>=38) to red (<R>=255, <G>=0, <B>=0) and the background color (<fg_bg>=48) to black (<R>=0, <G>=0, <B>=0):

printf '\e[38;2;255;0;0m Foreground color: red\n'
printf '\e[48;2;0;0;0m Background color: black\n'

Again, it's necessary to redraw the prompt using printf '\e[K' in order for the background color to apply to the whole line and in order for the foreground color to apply to the cursor:

Using either methods, you can use printf '\e[0m' to reset all the attributes:


What's the best image compressing software for Ubuntu?

png is the way to go. In very specific cases, you get a better lossless compression by saving the file as a bmp and then compressing it using 7zip, but this makes it impossible to view them with normal image viewer software or to edit them with normal image editing software.

You will still be able to save a tiny, tiny amount of storage space by compressing png images with 7zip, but it's not worth the unacceptability that comes with it.

If you first use a lossy compression (like jpeg) and then a lossless compression (like png), not only will you have the same quality like the jpeg image (which lost quality in respect to the original image) and use more storage space than the jpeg image, the use of storage space will also be higher than if you took the original image directly and converted it to png. This is generally true, even for using the same lossy compression over and over again: If you do so, not only will the quality (of course) decrease every single time, you also will use more and more storage space. So make sure to convert the original image to png, not images which are currently stored as jpegs. Do, however, store images which used to be stored as jpegs as png, after you edited them, to avoid further loss of quality and making the storage space use when eventually saving them as pngs even worse.

You convert a lot of images to png using the command

mogrify -format png /your/path/*.jpg

or

mogrify -format png /your/path/*.jpeg

depending on which file extension the images have.

If you want to move the converted images somewhere else, use

mv /original/path/*.png /new/path

, and if you want to just delete the old ones, use

rm /your/path/*.jpg

or

rm /your/path/*.jpeg

You will be able to store individual images as pngs in about every graphics program (like gimp).


What happened to Facebook in Online Accounts - 13.10?

It seems like you have to attempt to install some third part software in order to make the missing accounts to come back.

Missing integration options for online accounts in 13.10

It is all described there ^^

Good luck!


You can edit these files manually in the ~/.themes directory.  I would find a working 3.4 theme like Axiom, and compare where things have gone afoul.  I've actually cut the entire apps section of Axiom and placed it in another theme's app section, and worked like a charm to remove the cluttered icon effect that's being seen a lot by 3.2 themes on 3.4


I don't think the keyboard shorcuts are ran through bash, so || won't work. However, you can do this:

sh -c 'wmctrl -Fxa gnome-calculator.Gnome-calculator || gnome-calculator'

-F means match the full title case-sensitively, and -a means activate/focus said program, -x means select by the "WM_CLASS" name which you can get by running wmctrl -xl.


How to install certificates for command line

TL;DR

For everything to work and not only your browser, you need to add that CA certificate to the system's trusted CA repository.

In ubuntu:

Go to /usr/local/share/ca-certificates/
Create a new folder, i.e. "sudo mkdir school"
Copy the .crt file into the school folder
Make sure the permissions are OK (755 for the folder, 644 for the file)
Run "sudo update-ca-certificates"

Why

Let me explain what is going on also, so the other posters see why they don't need any certificate to use Github over HTTPS.

What is going on there is that your school is intercepting all the SSL communications, probably in order to monitor them.

To do that, what they do is in essence a "man in the middle" attack, and because of that, your browser complains rightfully that he is not being able to verify github's certificate. Your school proxy is taking out github's cert and instead providing its own cert.

When your browser tries to verify the school's provided cert against the CA that signed github's cert, it rightfully fails.

So, for the SSL connection to work in the school, you need to consciously accept that "MITM" attack. And you do that by adding the school's CA certificate as a trusted one.

When you trust that school CA, your verification of the fake github cert will work, since the fake github cert will be verified by the school CA.

Be aware that SSL connection is not safe anymore since your school administrator will be able to intercept all your encrypted connections.


i need to write a bash script to check a service status and restart

you could use grep not tested but it would look like this

service ipsec status | grep "1 tunnels up"
RET=$?
if [ ! $RET -eq 0 ];then
    echo "[!] No tunnels up, better restart"
    service ipsec restart
fi


How to Access UEFI Settings on my computer that had Windows 10

I don't know what keys Toshiba uses to access the firmware setup utility, if that's what you're asking. Installing Ubuntu should not change this detail, but I've seen enough reports from people who say it does to be pretty sure that some EFIs are buggy and change this detail after installing Ubuntu. If you think this is happening to you, you might want to post on a Toshiba forum. Somebody here might know what's happening to you, but brand-specific questions are sometimes best answered on brand-specific forums.

That said, there are OS- and bootloader-specific ways to enter the firmware setup utility. In Ubuntu, on an EFI-based computer, the following command will usually do the trick:

sudo systemctl reboot --firmware

This command doesn't always work -- it relies on EFI features that didn't become common until a few years ago.

Some boot managers also provide a way to enter the firmware setup utility. GRUB provides this functionality, but it's not always available in the default menu. (I don't think Ubuntu activates it by default, but you may be able to activate it with the help of GRUB Customizer or by manually editing grub.cfg. I can't say how to do it with more specificity than that, though.) My own rEFInd boot manager also provides this functionality, in the form of a second-row icon of a computer chip. In the case of rEFInd, this icon appears on the menu by default, but only if the firmware supports the necessary function.


How do I make Unity quit opening Firefox under the Shiretoko icon?

There two folders where you can find all "starters" that Unity know and the Dash can find.
/usr/share/applications is the system wide folder and /home/<yourusername>/.local/share/applications is the one specific to your user.

You should have an entry for Firefox and for Shiretoko, delete the one you do not like.

This is an easy solution. If it does not help, you might want to dig deeper in how this works here: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles

Good Luck!


libprotobuf-c.so.1 is provided by the libprotobuf-c1 package in Ubuntu 18.04.

Open the terminal and run the following commands:

cd ~/Downloads
wget https://mirrors.kernel.org/ubuntu/pool/universe/p/protobuf-c/libprotobuf-c1_1.2.1-2_amd64.deb
sudo apt install ./libprotobuf-c1_1.2.1-2_amd64.deb

If your Ubuntu 14.04 is 32-bit architecture you need to download protobuf-c/libprotobuf-c1_1.2.1-2_i386.deb instead.


Virtualbox windows 7 guest - pressing windows key launches unity menu

Unfortunately this issue still seems not to be solved.

Virtual Box may grab all keys from the host OS but Unity seems not to release the Super and the Alt key. Therefore our VM will not be able to grab them before the host OS does (see here).

As a workaround we may define other keys for opening the Dash and the HUD in the virtual machine and avoid using Super and Alt keys when working in the VM.

See also:

How can I stop Unity 2d intercepting meta key when I'm in VirtualBox?


How to modify an icon in the Unity Launcher?

Try to add StartupWMClass=Eclipse line to the eclipse.desktop file.

To detect application's _WM_CLASS_ use: xprop | grep CLASS

After the plass appears, just click on your application.

Read this for further information.


juju bootstrap fails on local environment - Could not install mongo service

OP posted:

Turns out dbus was not installed.  sudo apt-get install dbus Solved my problem.


Made huge mistake with dd, Ubuntu does not boot

You have effectively erased the first 700MB of your hard drive. So what was in that? I am surprised you get a grub rescue as the MBR should have also been overwritten with syslinux and partition table converted to one entry for the FAT32 installer version.

You may be able to use testdisk to restore old partitions.  If your dual booted Windows it has 100MB boot partition which will be gone and the first 600MB of Windows, so it will not boot. If Ubuntu was further into drive you may be able to recover it.

For what testdisk cannot recover with deeper search you can use photorec to scan drive for anything that looks like a file. It does not find file names, just extensions or file type. It is slow and you need lots of room for restored files as it will also find deleted files and some partial files.

https://help.ubuntu.com/community/DataRecovery

http://www.cgsecurity.org/wiki/TestDisk

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

http://www.cgsecurity.org/wiki/Menu_Analyse

http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_NTFS

http://www.cgsecurity.org/wiki/PhotoRec


How can I create zip file with the date in its name?

By slipping the date command into the filename:

zip -r "archive-$(date +"%Y-%m-%d").zip" file1 file2 file3 file4

That just does year-month-day but you can use times, weeks, etc if that suits you more. You can read more about the substitution strings in man date.


History
Medibuntu was an external repository which held packages for non-free software such as RealPlayer.
However, in 2013, this repository was taken offline and has ceased.

The Medibuntu Project has come to an end - what do I do now?

Development of RealPlayer from the original software house has ceased.  The source was passed to the Helix Community. It appears from the Helix CVS repository, no significant linux updates have been made for some considerable amount of time.
Thus, RealPlayer is in reality a self compile and install method.  The helix community has some notes how to achieve this.
PPA's for this software may exist - but I've not been able to find any for recent supported versions of Ubuntu.
Alternatives
There are other linux media clients that cover the stream-types and functionality that the old RealPlayer and Helix-Players did.

What media (music and video) players are there?
How do I play a real media '.rm' file

XMBC is also a good media system that covers some of real-player's streaming capabilities

How do I install XBMC?


How to change several directories' names?

There may be better ways, but this is how I would do it:

file-rename -n 's/.*/sprintf "%02d", ++our $i/e' FVSFT1092?

If your shell tells you that the file-rename command does not exist, install the rename package.

If you wanted to replace just the last characters, rather than everything in the original names, you could use this instead:

file-rename -n 's/.$/sprintf "%02d", ++our $i/e' FVSFT1092?

As written, those commands don't rename any files. When it's time to rename them, remove the -n. Before removing -n, you should inspect the output. It should show what each file is renamed to. You should also make sure that only the files you actually want to rename, and not other files, are listed. For the first command shown above, it should show this:

rename(FVSFT1092A, 01)
rename(FVSFT1092B, 02)
rename(FVSFT1092C, 03)
rename(FVSFT1092D, 04)
rename(FVSFT1092E, 05)
rename(FVSFT1092F, 06)
rename(FVSFT1092G, 07)
rename(FVSFT1092H, 08)
rename(FVSFT1092I, 09)
rename(FVSFT1092J, 10)
rename(FVSFT1092K, 11)
rename(FVSFT1092L, 12)
rename(FVSFT1092M, 13)
rename(FVSFT1092N, 14)
rename(FVSFT1092O, 15)
rename(FVSFT1092P, 16)

Running it without -n actually renames the files. You should pretty much always run file-rename (and the related commands prename and rename) with -n first to do a dry run. But in this case it is even more important than usual, because in this case the behavior of the command may behave differently for different locale settings or if you have other similarly named files that you don't want to rename.

The way that command works is that the shell expands FVSFT1092? into a list of all files in the current directory whose names are FVSFT1092 followed by any one additional character. This list is passed to the file-rename command, which modifies the names according (in the first command shown above) to the Perl expression:

s/.*/sprintf "%02d", ++our $i/e

That renames any filename passed to it to the lowest number not yet used, starting with 1, and formats it as two digits even if it's less than 10. Therefore it depends on the order in which the filenames are supplied, which in turn depends on what files actually exist in the current directory and what order the shell expands them in.

This should work. In strange corner cases, it won't do what you want, and it's easy to check for that by running the command with -n first (as shown above), which you should do anyway to catch any mistakes.

For general information on how the syntax accepted by the file-rename command works, I recommend Bulk renaming files in Ubuntu; the briefest of introductions to the rename command (by Oli).


How to install a brightness indicator in unity?

There is no indicator-brightness package directly on main repos, you'll have to add the ppa (Personal Package Archive) from its developers.

Adding the PPA

Run the following command in your terminal to add the ppa:

sudo add-apt-repository ppa:indicator-brightness/ppa

You'll be prompted to accept adding the ppa, press Y and (or simply) Enter to accept.

Install indicator-brightness

First, you need to update you package info after adding the ppa, so run this from your terminal:

sudo apt update

Next you can install indicator-brightness by simply running:

sudo apt install indicator-brightness

Then you can launch the indicator from Unity's Dash, add it to your startup applications, etc.

Hope it helps.


Firefox: ogv and webm video format dont fire

I guess it is because of the lack of H.264 codec support on Firefox.

Try to install the FFmpeg plugin for GStreamer :

sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg


How can I, in Terminal use Sublime Text to open a remote directory mounted by Nautilus?

I uninstalled the Sublime Text installed from Ubuntu Software and then reinstalled it according to the offcial doc from its official site, which essentially uses apt. And it works!


The problem was that I did not checkout the data files from the SVN.


Why is the 12.10 version linking to the 12.04 version?

You can get it at the central releases server.

If the main download page on the Ubuntu website ever has a problem, or when it no longer has Ubuntu 12.10 (once 13.04 comes out), you will always be able to get 12.10 here:

http://releases.ubuntu.com/quantal/

More generally, if a release's code name is X, its files are available in http://releases.ubuntu.com/X.

End-of-life releases move to http://old-releases.ubuntu.com/X, but the first URL still works as it's made a redirect. URL's to files inside may not redirect. In any case, folks really shouldn't use EoL releases as security vulnerabilities are not patched when discovered.

You can access bootable CD images there. If you did want to use Wubi (which I understand you don't), you could get it there too. For that, you'd scroll down to the bottom.

.torrent files for bittorrent are also there. If you have a reasonably fast Internet connection--DSL or better--then torrents are probably the best and fastest way to get Ubuntu, and it's an easy way to help out by uploading it to others during and after you download it.

You can browse all the supported releases here:

http://releases.ubuntu.com

Clicking a release name there goes into that release's folder as explained above.

Weird architecture? No problem!

For the minority of users who want ISO images to install on less common, community-supported architectures, those are on a different server:

http://cdimage.ubuntu.com/releases/quantal/release/
http://cdimage.ubuntu.com/releases/

Logistics and Troubleshooting

During times of heavy load, downloading from the releases server may be slow. Even during normal load, it's generally recommended to download from a mirror--that usually maximizes speed, makes it so you don't have to wait as long for the download to begin, and provides for the efficient distribution of Ubuntu to many people around the world at the same time.

There's nothing wrong with downloading from the releases server, especially if you have problems downloading using the download page. One of the things the download page does--besides making it easier for novice users to get the right ISO image--is to select a randomized, probably suitable mirror for you to download from.

Therefore, if there's a problem downloading using the download page, it could be:

a problem with the download page itself, or
a problem on one or more of the mirrors that get selected.

Either way, the best thing to do (after you've started downloading your file from someplace that's working right, so that's done) is to report the problem by filing a bug on Launchpad against the ubuntu-website-content package. You can search for it, and then report it if nobody else has, here. If someone else has reported the same problem then you can subscribe to the bug to get notifications and show your interest, and (especially recommended, and totally separate from subscribing) you can use the This bug affects link near the top of the bug page to indicate that you are affected.

Before reporting a new bug, or if you have any confusion about bugs and bug reporting, it's a very good idea to read this guide, even though some of the information is not relevant to reporting bugs in ubuntu-website-content. This is also an excellent resource.


Samsung n150+ touchpad settings disappeared

I am also using the same N150 netbook, there is a default shortcut on the keyboard for this netbook for enabling and disabling touchpad while typing.
It is

Fn+F10

It will disable the touchpad when you want while typing. I don't think there is any way to disable touchpad and still use the scrollbar as you have mentioned.


Can't launch android-studio in linux, getting this error Error: Could not find or load main class com.intellij.idea.Main?

Either the file <your_installation_path>/android-studio/lib/bootstrap.jar does not exist or has the wrong ownership.

Because the installation is located in your home directory, execute the following command that will give your user ownership:

sudo chown -R $USER:$USER <your_installation_path>/android-studio/

If that does not work, check if the file android-studio/lib/bootstrap.jar exists. If not, then download and extract the archive again.


Close terminal and avoid closing running program

You can close the terminal by pressing Ctrl-D at the prompt instead of using the window controls. This will do what you want.


[Kubuntu 14.04][Eclipse] ADT crashes at button OK from Project properties

You've hit the following bug that is not fixed yet: https://bugzilla.gnome.org/show_bug.cgi?id=736323 .

Workaround:

Find your GTK2 theme config file. For Oxygen it is /usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc.
Edit the theme config file (as root): change GtkComboBox::appears-as-list from 1 to 0.