How to autohide the Launcher in Unity 2D?

There is a tool named Unity 2D Settings made by Krytarik Raido for configuring Unity 2D. It wasn't working under Ubuntu 11.10; however, he updated the tool and now works under Ubuntu 11.10.

Install it through terminal:

sudo add-apt-repository ppa:krytarik/tuxgarage
sudo apt-get update
sudo apt-get install unity-2d-settings

Run this when you are logged in via Unity 2D.

Source: OMG! Ubuntu!


The package for Evolution integration that has to be installed is
evolution-indicator


Is there a way to disable asterisk * interpolation for certain bash commands?

Yes. You can use set -f:
set -f
echo *  # prints *
# turn glob expansion back on, if you want:
set +f

If you choose this route, you'll have to set it in the terminal where you're calling your script, not in your script itself, as the * expands before reaching your script as an argument.
As mentioned in the comments, it's probably better to just escape the *, either via '*', "*", or \*.


Local mail in Thunderbird in /var/mail/username

$ ls -l /var/spool/mail
lrwxrwxrwx 1 root root 7 Feb 14  2012 /var/spool/mail -> ../mail

As displayed, my /var/spool/mail is just a symlink back to /var/mail. I didn't create that but if you don't have it, and it's causing you significant grief in Thunderbird, I wouldn't hesitate to add a link:

sudo ln -s '../mail' /var/spool/mail

And now I read the original answer, it does suggest to use /var/mail/username and shows a screenshot of how to specify it (in the Server Settings tab).

If you're getting read errors and /var/spool/mail exists check:

file /var/spool/mail to make sure it's the right thing
stat /var/mail/$USER is it accessibly by your current user? Is it owned by the right person? Have you copied this from a filesystem with different UID/GIDs? If in doubt, reset the permissions back to the correct ones:

sudo chown $USER:mail /var/mail/$USER
chmod 0600 /var/mail/$USER


18.04: System install fails with filesystem error in LiveUSB

I have now successfully installed Ubuntu and checked that everything is working perfectly. According to me, either there might have been a problem in the downloaded iso file or the UNetBootin software. Then I had redownloaded the iso and used Universal USB installer to install it.

For those who will be installing Ubuntu, I have some advice for them to prevent any problems :

After downloading the iso file, check whether the file have downloaded properly or not by matching the checksum. See this https://ubuntu.com/tutorials/tutorial-how-to-verify-ubuntu#1-overview
Before installing Ubuntu, select Check disk for errors from the boot menu to check for errors in the installation media.
Install Ubuntu on a separate partition in the main disk to avoid any data loss.


Try sudo apt-get purge linux-image-3.2.0-35-generic-pae
then sudo apt-get install linux-image or sudo apt-get -f install I expect would clean up for you also after that first command.

Source: http://ubuntuforums.org/showthread.php?t=1036016


Is there a way to access files on my Windows partition like an external drive or USB?

You should see your Windows partition from the file manager, and you should be able to access it. However, you can use Gparted to resize your partitions. See here:

http://gparted.org/display-doc.php%3Fname%3Dmoving-space-between-partitions


This will not work in compiz! Compiz expects that _MOTIF_WM_HINTS property type is _MOTIF_WM_HINTS, but xprop command sets it to CARDINAL. If you use xprop | grep _MOTIF_WM_HINTS you will see this:

  _MOTIF_WM_HINTS(CARDINAL) = 2, 0, 0, 0, 0

It should be like this:

  _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 2, 0, 0, 0, 0

Your python script works, because GTK+ properly sets this property. :)


How to enable cloud providers for Déjà Dup on Ubuntu 17.10

I think it's hidden for "user convenience" and commercial reasons - trying to promote a particular vendor.

you can Install a tool called dconf that lets us visually search for deja.
the key parameter we need to change is backend by default it's goa which only allows few cloud providers.
If you want to enable others-  change s3 or gcs accordingly.

or using the command lines tool gsettings:
to check your current value use:
gsettings get "org.gnome.DejaDup" "backend"

To change it use the set. for instance,
gsettings set "org.gnome.DejaDup" "backend" "gcs"


I installed Ubuntu 13.10 "inside" Windows 7 but Windows automatically boots

When your system boots there will be options displayed to allow you to select the operating system you want to run .In that select ubuntu and press enter like this ,

then ubuntu will run.


Problem with Window Titlebars when not maximized in Ubuntu 16.04

Hold down the ALT key, left-click/hold in the white space in the window, and drag the window to your position of choice. This will allow the menus to be visible again.


Actually my problem has been solved (I asked the question offline):

For this particular code, double precision FFTW must be used, so I edited back this Makefile line to return it into its original state:

FFTW_LIB =  $(FFTW_LIBS) -ldrfftw_mpi -ldfftw_mpi -ldrfftw -ldfftw

Single-precision FFTW does generate a Makefile, but it won't work.

Edit the FFTW_LIBS line so that the correct path to my computer (/home/van/fftw/lib/) is linked:

FTW_LIBS=  -L/home/van/fftw/lib/

Add this line to the ~/.bashrc file so that the executable is always linked to all its dependencies:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/van/fftw/lib


How to create a Directory, which can be accessible to all user and will be locate at Places like Desktop/Documents

Create a directory /home/shared accessible to everyone:

sudo mkdir /home/shared

Change owner of the directory, assume name of the user is alice:

sudo chown -R alice:alice /home/shared

Change access rights with read-only access:

sudo chmod -R 744 /home/shared

or with read-execute access to everybody:

sudo chmod -R 755 /home/shared

or with read-write access to everybody:

sudo chmod -R 766 /home/shared

or even make full-access directory including executable rights:

sudo chmod -R 777 /home/shared

Next everyone can add a bookmark for the directory /home/shared to Nautilus by pressing Ctrl+D.
More about Nautilus bookmarks:

How can I add a bookmark in my nautilus folder explorer
Bookmarks in nautilus only in menu, not in the shortcut tab


Run these following commands to install xournal in Lucid

sudo gedit /etc/apt/sources.list

add the following line in sources.list file

deb http://http.us.debian.org/debian squeeze main universe

save the sources.list file and update the repositories by running the below command,

sudo apt-get update

Then install xournal by running the below command,

sudo apt-get install xournal

This will install xournal and its dependencies.

Run the following commands to uninstall xournal in Lucid

uninstall xournal only

sudo apt-get purge xournal

uninstall xournal and its dependencies

sudo apt-get purge --auto-remove xournal


How do I move numbers in filenames, in a batch renaming operation?

If you have rename installed, you can use

rename -n 's/(\.\d+)\.pdb$/.pdb$1/' *.pdb   # just watch what WOULD happen
rename    's/(\.\d+)\.pdb$/.pdb$1/' *.pdb   # actually rename the files

The command rename can be installed via

sudo apt install rename


menu toolbars suddenly missing 16.04 LTS

This same issue was happening to me as well. I tried installing apps to manage menu settings and got nothing. Finally the combination of CTRL  + M worked to bring back the menu; except in Firefox, which ended up being the ALT key. I would not call this a complete solution as the menus should just show up regardless, but at least it might help you get back to work. Unless you have already found another solution of course.


Modprobe.conf options not loaded on startup

If a module is loaded at boot time (before the root filesystem is opened), you need to update the initial ramdisk. This is the first "filesystem" that is loaded, it will load drivers, discover and mount partitions, etc.

To update this initrd, run:

sudo update-initramfs -u

(this will automatically be called by kernel upgrades/installations, hence you need to run it only once)


What is UEFI ST2000LM003 HN-M201RAD in boot sequence. How can I enable dual boot options everytime I switch on my PC?

If you get three options the way you describe them, then you have dual-boot options enabled. If you install a third Linux, that system will be added to the GRUB menu, as an option at startup. UEFI is how the computer boots up. You can see it in your BIOS, if UEFI is enabled.


Can I install MaaS on the same server my nodes will be on?

No, you don't need separate server for MAAS. You can share MAAS services:

maas - seed cloud setup, which includes both the region controller and the cluster controller below.
maas-region-controller - includes the web UI, API and database.
maas-cluster-controller - controls a group (“cluster”) of nodes including DHCP management.
maas-dhcp/maas-dns - required when managing dhcp/dns.

with KVM or VirtualBox for other OS.
Installing MAAS and Metal as a Service will be more helpful to understand what MAAS is.


How do I keep Geany's versions updated after installing it in my system?

After the release of an Ubuntu version packages are only updated for security and big fixes. No further release is done for individual packages.

If you want to keep Geany up to date you need to add a PPA. Luckily Geany keeps a developers PPA that has the version you are looking for.

Install it by using these commands on a terminal

sudo add-apt-repository ppa:geany-dev/ppa
sudo apt-get update
sudo apt-get install geany geany-plugins


PDF a set of Office Libre files from the command line

This simple command should help:

soffice --headless --convert-to pdf ./* --outdir /path/to/target

Or:

soffice --headless --convert-to pdf /path/to/files/folder --outdir /path/to/target

The format is:

soffice --headless --convert-to <TargetFileExtension>[:NameOfFilter] file_to_convert.xxx

Where:

filter: specific format of file to convert
headless:          Starts in "headless mode" which allows using the
                   application without GUI. This special mode can be used
                   when the application is controlled by external clients
                   via the API.

Then to "output" the converted files I used this command:

ls -p | grep -v / | xargs -d "\n" soffice --headless --convert-to pdf --outdir /tmp/convert/target 2> /dev/null | grep -Eo "/.*\.doc[x]?"

Info:

ls -p: Append indicators to folders.
grep -v /: Only return files.
xargs -d "\n": Used to pass the output to the soffice command, takes care of white spaces in filenames.
2> /dev/null: Hide errors.
grep -Eo "/.*\.doc[x]?": Return only affected files. And the [x]? catches both .docx and .doc files as used on my end and can be left out.

Let me add an anwser using the example OP gave:

ls *.docx | xargs -d "\n" soffice --headless --convert-to pdf --outdir /tmp/container/target

see: https://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/

User soffice --help to see more options to that command.


sudo apt-get install php5-imagick gives "404 Not Found" error and "E: Failed to fetch ..."

Other questions were near duplicates but had different error messages and very complicated solutions, so it seemed sensible to post this question and answer to try to keep things simple.

In my case, it was resolved by simply running:

sudo apt-get update

Hopefully others will find it's as simple as this too :-)


Configure 'mail' command to send external email when servers domain name is used

From [1] pg 832

  Another parameter we should set is mydestination, which specifies the
  mail domains that are local.

The changes which are relevant to my question:

Change the mydestination setting in /etc/postfix/main.cf to be blank.

mydestination =

run

sudo postfix reload

[1] Unix and Linux system administration handbook, 4ed, 0-13-148005-7, 978-0-13-148005-6


How to configure IPMI when installing MaaS on HPserver

You need to setup the physical cables between the iLO port and the common switch that is accessible by MAAS server.

Once the node boots up using PXE, the MAAS will detect it and the POWER TYPE is automatically setup.


How to clear Vinagre recent connections?

Found it

Delete the file $HOME/.local/share/recently-used.xbel


Just so it's all written down together, in my setup all containers and their host machine get their IP from the same DHCP server (my router's), and are all available over the LAN.

On an Ubuntu Server 16.04 host, my /etc/network/interfaces reads:

iface br0 inet dhcp
  bridge_ports eth0
iface eth0 inet manual

As I said in comments, after a restart and when the host's network works as intended, I think you can reconfigure LXD's network (among other things) with sudo dpkg-reconfigure -p medium lxd.

When I did lxd init, I answered yes to Do you want to configure the LXD bridge (yes/no)?, then told it <No> when it asked to setup a network bridge, <Yes> I would like to use an existing one, and br0 as the bridge name.

Finally, I rely on MAC's to assign static IP's to any machine (including the host and several containers), in my DHCP server's (my router's) settings. This simplifies settings in the containers and host.


Replace the current clipboard selection with a modified version of the original selection

Thanks to @meuh's comment above, I was able to complete this task:

Install these programs:

sudo apt-get -y install xclip xdotool libnotify-bin

Create a .bash script for the transformation:

#!/bin/bash
# Script to replace selection with a 'sed' transformed output (callable with easystroke or similar)
IN=`xclip -o`
# Example: Replace all 'ab' by 'ef'
RESULT=`echo "$IN" | sed -e 's/ab/ef/g`
# Output result to clipboard
xdotool type "$RESULT"
# Transform result to HTML for output with notify-send
RESULT_HTML=`echo "$RESULT" | sed 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g'`
# Create a notification in the lower right corner with the transformation
notify-send  "Changed clipboard text" "Input: $IN\nOutput: $RESULT_HTML"

Call this script from easystroke or a similar program that processes key- or mouse-strokes.


I suggest to create 4 partitions on the disk - you can use GParted to do it.

Partition 1 - format : ntfs - label : Data - size : 500 GB (for personal things)

Partition 2 - format : ntfs - label : Media - size : 500 GB (for music and videos)

Partition 3 - format : ntfs - label : Rescue - size : 500 GB (for file and system backups)

Partition 4 - format : ntfs - label : System - size : 500 GB (for system related stuff e.g. ISO files)

The size of the partitions should be chosen according your needs ... 500GB is just an example ...

I selected ntfs file system because you can access everything from within Ubuntu and Windows.


My keyboard is not working. How do I get back keyboard driver back?

Solved it

Start Ubuntu on recovery mode. (Hold shift when turn on your PC, go to advance option, select recovery mode, I selected last one)
Enable network. (Make sure you connected your Laptop with Ethernet cable)
Go to the command from root option (on recovery mode option)
Type (as mentioned in comment by @binamenator):

apt install xserver-xorg-input-all
Your keyboard drive will be installed.
Reboot your laptop
reboot


Keepass: Update in binary file foo.kdbx results in conflicts

I'm not very familiar with owncloud or how it handles file conflicts, but there are a few Keepass options you can change to try to get the functionality you want.

If you want Keepass read-only and always have it open on the source machine, you can try using Keepass's native lock files option under Tools → Options → Advanced → File Input/Output Connections → Use database lock files. I would assume that would provide a similar function, though it probably isn't the most secure way to do things.

You can also try the Do not ask whether to synchronize or overwrite; force synchronization option (in the same section) to ensure your database updates are always synced, which (I believe) should prevent most if not all conflicts.

For the actual data storage, while you can hide or show details like "Last Modification Time", I'm pretty sure you can't actually remove the variable or tell Keepass not to track that information.


manually change the startup scripts in /etc/rc2.d

Yes and no. As explained in /etc/rc2.d/README, to disable a service in that runlevel you can rename as you suggest but should also run update-rc.d script defaults to reorder the scripts:

  To disable a service in this runlevel, rename its script in this
  directory so that the new name begins with a 'K' and a two-digit
  number, and run 'update-rc.d script defaults' to reorder the scripts
  according to dependencies.  A warning about the current runlevels
  being enabled not matching the LSB header in the init.d script will be
  printed.  To re-enable the service, rename the script back to its
  original name beginning with 'S' and run update-rc.d again.

However, it is much simpler and safer to use the tools provided. Instead of removing the ssh service, use update-rc.d to disable it on runlevel 2:

sudo  update-rc.d -f ssh disable 2


How do I enable the "Other" user for login with Active Directory?

Edit /etc/lightdm/lightdm.conf and add the following line :

greeter-show-manual-login=true

Then restart lightdm :

sudo service lightdm restart


You have to change the command in your crontab to something like:

0 18 * * *   DISPLAY=:0 /home/your-username/bin/FreeFileSync /home/your-username/bin/FreeFileSync/Sync.ffs_batch

to provide full path to the FreeFileSync executable (/home/your-username/bin/FreeFileSync) and to its job-file (/home/your-username/bin/FreeFileSync/Sync.ffs_batch).


Can I search Deja-Dup backup for a filename?

One simple solution is to use duplicity (on which Déjà-dup sits) and produce a list of files in the backup:

duplicity list-current-files --no-encryption --time <timestring>  target > list.txt

where "timestring" is given, according to man duplicity, as:

  The acceptible time strings are intervals (like "3D64s"), w3-datetime
  strings, like "2002-04-26T04:22:01-07:00" (strings like
  "2002-04-26T04:22:01" are also acceptable - duplicity will use the
  current time zone), or ordinary dates like 2/4/1997 or 2001-04-23
  (various combinations are acceptable, but the month always precedes
  the day).

and "target" is the path to the directory where your backup is.

In my case the full command was:

duplicity list-current-files --no-encryption --time 3D file://mybackup > list.txt

After this, you can open "list.txt" in any text editor and search for the filename.

If you want something more elaborated, have a look on https://askubuntu.com/a/486458/213084


No, you do not need to install the graphic drivers on the guest. The guest is unaware of your real GPU. The other part of your question has not much to do with Ubuntu. It is either a hardware, a windows or a virtualbox on windows problem. You should ask it on superuser.


Cannot find bluetooth devices. Atheros [0cf3:817b]

For Ubuntu 14.04, 15.04 and 15.10 this can be fixed by a custom module. I've sent a patch upstream and it will be fixed in the official kernels some time.

Now you can install the module by running

sudo add-apt-repository ppa:hanipouspilot/bluetooth
sudo apt-get update
sudo apt-get install btusb-lp1506615-dkms

After you install the module power off the laptop, not just reboot. After that the bluetooth should work.

Also it makes sense to enable bluetooth and wireless coexistence by running:

sudo tee /etc/modprobe.d/ath9k.conf <<< "options ath9k btcoex_enable=1"

This will fix lags or disconnects when using Wi-Fi and bluetooth at the same time. It will be applied after reboot.


Is it possible to switch Ubuntu back to base-2?

The only way to do this, would be to patch (or in some cases, un-patch) all of the code which displays sizes to the user, and recompile your own fork of Ubuntu which has all of the sizes displayed using base 8 math (which is what you are asking for, and not base 2). It is a very invasive change to make, and is not an Ubuntu specific thing, as upstream applications were already doing this. The Ubuntu policy on size display is merely to clarify the matter, and to provide an official stance.

There is no setting which will switch between GiB and GB in all applications. If that's what you're looking for, the only way you're going to get it is to maintain patches to everything, which does so; unless you can convince all the upstreams to use such a setting, and provide patches, which they accept.

I'm sorry if you're looking for a simpler solution, but it doesn't exist, and isn't likely to anytime soon.


Dropbox synchronizing every time I press a key in Kate

Maybe this is due to the backup files which Kate creates regularly.

You might check if the described behaviour stops when changing parameters under Settings - Configure Kate - Editor Component - Open/Save.


Huawei 3G modem disconnects after successful connection

Hmmm... See if you can enable Mobile broadband.

If not, open up the terminal and type in the following:

gksu gedit /lib/udev/rules.d/40-usb_modeswitch.rules

Find the entry:

# Huawei E352
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1449", RUN+="usb_modeswitch '%b/%k'"

Disable it by adding an extra # in the beginning, before ATTRS:

# Huawei E352
#ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1449", RUN+="usb_modeswitch '%b/%k'"

Save the file and reboot.. Should work..

I did for my Huawei E1550 3G device...


Installing NVidia drivers helped

https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux


Simple way of enabling SSLv2 and SSLv3 in OpenSSL?

My solution was to build just the openssl binary to avoid overwriting the system OpenSSL installation:

wget https://openssl.org/source/openssl-1.0.2k.tar.gz
tar -xvf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k/
# --prefix will make sure that make install copies the files locally instead of system-wide
# --openssldir will make sure that the binary will look in the regular system location for openssl.cnf
# no-shared builds a mostly static binary
./config --prefix=`pwd`/local --openssldir=/usr/lib/ssl enable-ssl2 enable-ssl3 no-shared
make depend
make
make -i install
sudo cp local/bin/openssl /usr/local/bin/

To test:

$ openssl s_client -connect google.com:443 -ssl2
CONNECTED(00000003)
139675635414688:error:1407F0E5:SSL routines:ssl2_write:ssl handshake failure:s2_pkt.c:412:

$ openssl s_client -connect google.com:443 -ssl3
CONNECTED(00000003)
140647504119456:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:365:

I've got a more complete script here if you're interested: https://gist.github.com/bmaupin/8caca3a1e8c3c5686141


fail message upon boot up on kubuntu "failed to reset device"

Seems this is a problem with the touchpad, when you see this message you won't be able to use the touchpad. The way to fix it is by going to the login screen and enabling your touchpad(fn+f7 on acer) restart and then it will work again.


It seems that it is already running. Try to find the zoom icon in your tray. If it is not there and you still are getting this from Terminal, you can try to kill zoom and call it again:

killall zoom


keyboard not working but mouse is working

I've a dell xps 15z laptop and faced the same problem (with 12.04, I didn't do fresh install of 14.04). The recipe is found on ubuntu hardware web-site -- You could try this recipe, or search for You hardware on this web-site.

So keyboard didn't work. I opened

vitual keyboard
konsole

Then typed in konsole:

sudo kate /etc/default/grub

in there I had to change the following line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="acpi=noirq quiet splash"

saved it, and run

sudo update-grub

On reboot keyboard worked.


If you install SchoolTool from the Ubuntu Software Center it gives you an older version of School Tool (not 2.0), which is different than what's shown in the current docs. That might be what happened; if so, follow the directions here http://book.schooltool.org/install-2_0.html


Unable to download website for offline view in Ubuntu?

The program “httrack” will do exactly what your looking for. For more info goto Ubuntu httrack.

Install with : sudo apt install httrack and start it by entering httrack in your terminal.

For that particular site, it will take a very long time and doesn’t show any indication of progress. Be patient ;)


Perl has native methods for this. From CPAN:

fmove()
Copies the file then removes the original. You can manage the path the original file is in according to $RemvBase.
dirmove()
Uses dircopy() to copy the directory then removes the original. You can manage the path the original directory is in according to $RemvBase.
rmove()
Like rcopy() but calls fmove() or dirmove() instead.

And 1 that uses globbing:

rmove_glob()
Like rcopy_glob() but calls rmove() instead of rcopy()

It mentions ...

rcopy_glob()
This function lets you specify a pattern suitable for perl's glob() as the first argument. Subsequently each path returned by perl's glob() gets rcopy()ied.
It returns and array whose items are array refs that contain the return value of each rcopy() call.
It forces behavior as if $File::Copy::Recursive::CPRFComp is true.

From the examples in the link:
rmove('foo/bar/baz', '/etc/');
# "baz" is removed from foo/bar after it is successfully copied to /etc/


asus webcam is flipped upside down everywhere

UPDATE: Since the new skype app is basically a WebApp this solution
  won't work with Skype for Linux Beta (Skype 5.0+). Also many functions
  present in older releases are not yet implemented in this new one. For
  this solution to work you need to look for a multi arch build of an
  older version, e.g. skype-4-3-0-37-multi-ubu.deb

Try this, mate:

sudo nano /usr/local/bin/skype

(or whatever your text editor is)

add entry (64x)

#!/bin/bash
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so /usr/bin/skype

Save. Ctrl+O Close. Ctrl+X

sudo chmod a+x /usr/local/bin/skype

Close terminal. Run Skype.

This worked for me, Linux Mint 18 Sarah - Xenial Xerus 16.04
Also tested in Ubuntu Mate 16.04


Download and use the following program to install the *.iso from here.


You can use wmctrl. E.g. to move the update-manager window to x=10, y=10 with width=400, height=400:

wmctrl -r :SELECT: -e '0,10,10,400,400'

The option -r :SELECT: means that you can select the window you want to resize/move after having entered the command.


I think the best you can do is to run the commands you need to run using sg.

DESCRIPTION
   The sg command works similar to newgrp but accepts a command. The
   command will be executed with the /bin/sh shell. With most shells you
   may run sg from, you need to enclose multi-word commands in quotes.
   Another difference between newgrp and sg is that some shells treat
   newgrp specially, replacing themselves with a new instance of a shell
   that newgrp creates. This doesn't happen with sg, so upon exit from a
   sg command you are returned to your previous group ID.

So, after you have created the group and added yourself to it, you will be able to run commands as a member of that group with sg groupname command. So, for example, this will work:

sudo groupadd --system webapps
sudo useradd --system --gid webapps --home /home/lucio/server/webapps/hello_django hello
sudo chown -R hello:webapps .
sudo chmod -R g+w .
sudo usermod -a -G webapps $(whoami)

## From now on, run all commands through sg
sg webapps "mkdir foorbar"

Since that will be a pain to write, I would put it in a function:

run_as_webapps() sg webapps "$@"

Then, call whatever commands you need to call using that function

run_as_webapps mkdir foobar

And the end of the day though, it might be easier to just run the whole script as root instead. Either that or have two scripts, one to set up the groups and another to do everything else. Just log out and log back in before running the second one.

The POSIX specification clearly states that functions should be defined in this way:

foo () command

For reasons I don't understand, the OP had trouble with this and instead had to use

function run_as_webapps(){
    sg webapps "$@"
}


Extracting Multiple tar.gz files and copying the files present in sub directories into common folder

I think, there are better solutions. But maybe it could be helpful for you until a better solution will appear, which you could accept. Run it in folder with your archives.

for arc in ./*.tar.gz;
  do
    tar xvf $arc && \
    mv $(echo $arc|sed 's/.tar.gz//')/Cscf/*.xml abc && \
    mv $(echo $arc|sed 's/.tar.gz//')/Cscf2/*.xml xyz  && \
    rm -r $(echo $arc|sed 's/.tar.gz//');
  done

arc variable in for loop will keep each .tar.gz archive name
tar xvf $arc will extract current archive
mv $(echo $arc|sed 's/.tar.gz//')/Cscf/*.xml abc will move .xml files from extracted archive's Cscf folder into abc folder
rm -r $(echo $arc|sed 's/.tar.gz//') will remove extracted folders


You can add a new logical volume from that spare space but not a new volume group, because a VG would require its own PVs and your only PV is sda3.
So to create a new 100GiB logical volume called my-new-lv:
$ sudo lvcreate -L100g /dev/ubuntu-vg/my-new-lv

To make use of it:
$ sudo mkfs.ext4 /dev/ubuntu-vg/my-new-lv
$ sudo mkdir -p /mnt/media
$ sudo mount /dev/ubuntu-vg/my-new-lv /mnt/media

Verify it's there and mounted:
$ df -h /mnt/media

Should show a roughly 100GiB filesystem mounted there.
Don't forget to add it to /etc/fstab so that it gets mounted next time. Example line:
/dev/ubuntu-vg/my-new-lv /mnt/media ext4 defaults,noatime 0 2


"You do not appear to be using the nvidia x server"(screenshot included)

The GT 520M is a nVidia Optimus laptop which is unsupported in Ubuntu. There are ways to get program to run on the nvidia card though which is described in Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

After installing Bumblebee, you are able to run nvidia-settings using:

optirun nvidia-settings -c :8

Do not just run nvidia-xconfig, it'll create the /etc/X11/xorg.conf configuration file which breaks compositing and such because the driver does not support the nvidia card out-of-the-box. If you've already ran that command, remove the file:

sudo rm /etc/X11/xorg.conf


Can't install Ubuntu 18.04 on USB with persistence on mac

First, remember Macs and Linux are funky. Sometimes, a live USB made on one Mac will not work on another .

As a person who has used Mac Linux USB Loader regularly, I have found this to be your actual best possible step by step instructions:

Go to 7/11
Buy a prepaid Visa or Mastercard with the correct amount of money on it
Bring it home and buy MAC Linux USB Loader
If it doesn't work right after you buy it, email the guy for support, and he's super happy to help

Here's what you do if you decide you want  to install Linux on the Mac  using the USB.

Installing Linux on a Mac is kind of a pain, but the basic steps are

make your partitions using the recovery disk version of Disk Utility in Mac
use the live USB to install Linux on the Linux partition
then reinstall OS X

If you have OS X installed on the box, even if it's a very small partition, you still have mac Linux USB loader if you need to remake a live USB

This should make it so you boot directly into Linux, and can use the alt option menu to boot into OS X.

If it boots into OS X first after this type of install, start over. If it's booting into OS X first, it will not boot into Linux.

Switch it around to see if there's a different order you need to install stuff.


I have 2 SSD's (windows and ubuntu), but the SSD with Ubuntu not being recognized alone, only when together with Windows's SSD

Thanks to @oldfred I solved my issue. Just followed the steps in https://help.ubuntu.com/community/Boot-Repair. Thanks a lot!


1. Installing SSH

First thing that has to be done is to install a SSH (Secure Shell protocol) server. For ubuntu it's easy as writing one command. Just copy-paste the following command and the server will be installed.

sudo apt install openssh-server

If it exists, it might be a good idea to

sudo apt purge openssh-server

before and resinstall to avoid any issues with the installation.

Another good idea might be installing the client too, if you want to test if your server works.

sudo apt install openssh-client

 2. Configuring SSH server

Now SSH has to be configured to enable key based authentication for increased security. As the first step here, the original configuration should be backed up, but you could skip this part if you are sure you won't mess it up.

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo chmod a-w /etc/ssh/sshd_config.bak

Now you can use text editor you wish to edit the configuration file. You can use for example gedit, nano or vim as the editor.

sudo <TEXT EDITOR HERE> /etc/ssh/sshd_config

Now that you've opened the configuration file. The first thing that should be done is to change the port. It's usually recommended to change the port of the SSH server to hide it a bit. It also stops most bots from trying to get into your machine.

To change the port

Port <Port number>

Change it to for example

Port 2213

To enable X11 forwarding (remote displaying your PC's screen) change.

X11Forwarding <Value>

to

X11Forwarding yes

Now run this command to restart the server (for the configuration changes to apply.

sudo systemctl restart sshd

Let's check the status. It must be green "active (running)".

sudo systemctl status sshd -l

Now try to connect to your ssh server by using this command.

ssh -p <Port number> <Username>@localhost

 3. Setting up the RSA keys

First steps that should be taken is creating the folder for the keys.[1]

mkdir ~/.ssh

Now let's generate the key. Follow the instructions.

ssh-keygen

Encrypted home

If you have an encrypted home directory, SSH cannot access your authorized_keys file because it is inside your encrypted home directory and won't be available until after you are authenticated. Therefore, SSH will default to password authentication.

To solve this, create a folder outside your home named

sudo mkdir /etc/ssh/<username>

This directory must have 755 permissions and be owned by the user. Move the authorized_keys file into it. The authorized_keys file must have 644 permissions and be owned by the user.

Then edit your /etc/ssh/sshd_config and add:

AuthorizedKeysFile    /etc/ssh/%u/authorized_keys

After the key is generated, let's copy it to the host.

ssh-copy-id -p <Port number> <User name>@<Host (localhost)>

After that is done. Correct permissions on the key and folder must be set to secure it.

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
(If you have encrypted home look at that section's folder permissions)

If the permissions are wrong you will most likely encounter errors.
(Source: Ubuntu Wiki)

Now to secure the authentication finally, find these lines.

RSAAuthentication <Value>
PubkeyAuthentication <Value>
PasswordAuthentication <Value>
ChallengeResponseAuthentication <Value>

Change them to.

RSAAuthentication no
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication no

< optional> Also add/edit these following lines to your configuration file to further secure ("harden") your system. Read more about these lines here or from the man pages of sshd.

TCPKeepAlive no
ClientAliveInterval 60
ClientAliveCountMax 5
UsePrivilegeSeparation yes
PermitEmptyPasswords no
PermitRootLogin no
UseLogin no
UsePAM no
MaxAuthTries 2

Allow compression to be used if client requests it. Use the compression flag in the client to either save bandwidth(yes) or CPU (no).

Compression yes

< /optional>

Finalizing install

Now run this command to restart the server (for the configuration changes to apply.

sudo systemctl restart sshd

Let's check the status with

sudo systemctl status sshd -l

Make sure it's green and "active (running)". If it is not, you need to check the error messages. If all is okay, try to connect to your ssh server by using this command.

ssh -p <Port number> <Username>@localhost

If it fails, starts sshd via command line with debugging enabled. That way it'll print you instantly what's wrong.

 4. Setting up a portable USB drive for X11 forwarding

Download PuTTY portable. Then just import the keys, enable x11forwarding. Set your port and username. Then the x server location.

Download Xming X Server for Windows. As Windows does not have a X server by default, you need to download one. It works portably too (it should at least). Start it before connecting to the ssh server with PuTTY.

 5. Setting up dynamic DNS.

The first step that should be taken is to select the dynamic dns provider, I, myself chose dynu.com. Now let's install the required software. For that copy-paste this command to your terminal. This time we'll use ddclient.

sudo apt install ddclient

It'll launch a configuration screen, just skip it and let's edit the configuration file ourselves. (Use nano, gedit whatever you wish to edit the file as previously)

sudo <your text editor> /etc/ddclient.conf

Now let's copy the contents from here.

# ddclient configuration for Dynu
#
# /etc/ddclient.conf
daemon=60                                                    # Check every 60 seconds.
syslog=yes                                                   # Log update msgs to syslog.
mail=root                                                    # Mail all msgs to root.
mail-failure=root                                            # Mail failed update msgs to root.
pid=/var/run/ddclient.pid                                    # Record PID in file.
ssl=yes                                                      # Use ssl-support.  Works with ssl-library .
use=web, web=my.ip.fi/                                              # Get ip from hardware interface.
server=api.dynu.com                                          # IP update server.
protocol=dyndns2
login=YOURUSERNAME                                             # Your username.
password=YOURPASSWORD                                        # Your password or MD5 of password.
MYDOMAIN.DYNU.COM                                            # List one or more hostnames one on each line.

Edit the network interface, hostname, username and password line to make it work properly. You also need to have IO::Socket::SSL. You can install it by using this command.

sudo apt install libio-socket-ssl-perl

Now let's set up the ddclient to run in background.[2]

sudo <your text editor> /etc/default/ddclient

Find the lines that say

run_dhclient=<value>
run_ipup=<value>
run_daemon=<value>

Change them to

run_dhclient="false"
run_ipup="false"
run_daemon="true"

Now let's start it

sudo systemctl start ddclient

Let's check if it works properly

sudo systemctl status -l ddclient

Make sure it is green ("Active = active(running)")

Dynamic DNS should now be set up. You can now test it with

ssh -p <Port number> <Username>@<Hostname (your dynamic DNS one)>

It should say

The authenticity of host '[<Dynamic DNS hostname>]:<Port> ([<Your IP address>]:<Port>)' can't be established.

It'll also print the ECDSA key fingerprint, you can use

ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub

To verify if the fingerprints are identical and then write "yes" to continue. NB! It should NEVER again ask the same question on the same machine when you have not cleared the known hosts file and the IP has nto changed (if you use dynamic DNS it will change). If it does absolutely do not proceed unless you can again verify it's the same fingerprint key as yours on the server.

It should now have connected just fine, maybe asking your key's passphrase, but nothing else.

 6. Port forwarding

Now that dynamic DNS and server has been set up and you wish to connect to your PC from other networks. Then you must somehow open your router's settings and forward the port you set in the sshd configuration file. Otherwise you can't connect to the PC, because the router will block it. This is highly dependant on the manufacturer of the router so just Google " port forward" or " port forward". You could also read the manual.

If something was left unclear or is wrong, do let me know, please.


You can edit /etc/lightdm/lightdm.conf file (using sudo -i gedit /etc/lightdm/lightdm.conf` command) and append the line:

session-setup-script=/usr/local/bin/noip2


Remove the default keybinding using the following commands

 gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['']"
 gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['']"


Dell Gateway 3001 with Ubuntu Core adduser with --system error

I was able to create the user with useradd command instead of adduser:

First create group: groupadd --extrausers --system ggc_group

and then the user: useradd --extrausers --system -g ggc_group ggc_user

So I think the first step is now done :D

This answer helped me: https://unix.stackexchange.com/questions/121071/what-does-adduser-do-that-useradd-doesnt


Latest 18.04.1 not working on virtualbox

NOTE: GO to Bios and set Virtualization and Hyper-v to ENABLE in ubuntu as well.

(This will enble the option for 64-bit in all os) by default it is DISABLED

just restart and goto BIOS and you are good to go.


how to make programs that autostart at login start hidden?

kstart --iconify <program name> in KDE starts  minimized. I really don't know if there is a specific command to close to systray (even because many apps don't have a systray).

Another possibility is using ksystray. For example ksystraycmd --hidden kmail will start kmail and put it in the system tray. But i'm not quite sure if it will work for any app.
If not, probably you have to check if there is a specific option for your application.

You can find more info here.

EDIT : more info here too


ffmpeg options: -acodec libfaac -ab 192k produce 150kbit files?

I can't provide any further explanation, but several places (e.g. [1]) mention:

  Note that the maximum average bit-rate (what -ab specifies in the context of
  libfaac) is 152 kbit/s. Setting this higher will be ignored and 152
  kbit/s will be used.


Sure, ps -ax will list itself, because ps -ax is a running process!

In fact you're typing your command in the shell, and the shell will create the new process for you. ps -ax see itself because it exists while it's running...

The next time you call it, it will have a new PID since you run it once more.


How to configure wine to install Evernote?

The easiest way to install Evernote is to install PlayOnLinux first, then download the Evernote executable, then open PlayOnLinux and install Evernote as an "other application".

However, lately, Evernote under Wine has been complaining that it can't reach the server. This is supposed to be due to a lack of support of TLS. PlayOnLinux may be able to correct this, but I'm not sure about that.


Is Ubuntu touch available on the Meizu MX6 android version?

You can find supported device here:
https://devices.ubports.com/#/
And the official devices on the ubuntu touch site.
For now the project is a bit slow down becose they are putting their efforts in moving .click to snap ..
Anyway i won't try .. I never heard about ubuntu touch on mx6 and the flash could brick your phone.
Follow the mailinglist...


NFS : Requested transaction contains an unfixable cyclic ordering dependency: Transaction order is cyclic

Jun 23 15:09:04 acer systemd[1]: nfs-server.service: Unable to break cycle starting with nfs-server.service/start

This means that you are stuck in an infinite cycle. You can visualize it with this command:
systemd-analyze dot nfs-server.service | dot -Tsvg > graph.svg

Use something like inkview to open the svg. Pay attention to green lines - they mean "After". You should see a loop somewhere: a >>> b >>> c >>> a >>> and so on or a simpler a >>> b >>> a >>>


The renice command can be used to reset the priority of running processes or control the priority and scheduling of all processes owned by a user. Regular users can only numerically increase process priorities (that is, make tasks less important) using this command, but the root operator can use the full nice range of scheduling (-20 to 19). Lower number is higher priority. Most processes seem to run at nice of 0. If you run CLI top you'll see your running processes. The column labeled NI is the nice number. If you run CLI nice with no parameters you'll see:

Usage:

 renice [-n] priority [-p|--pid] pid  [... pid]

 renice [-n] priority  -g|--pgrp pgrp [... pgrp]

 renice [-n] priority  -u|--user user [... user]

 renice -h | --help

 renice -v | --version

I suggest you experiment as I have no infinite wisdom as to the right nice value for your purposes.


Are there any PDF viewing software that allows split view?

The answer lies, as you have suspected, in Konqueror which has an option under:

Window --> Split View Left/Right
Window --> Split View Top/Bottom

I attach a screenshot demonstrating this on my own system:


Ubuntu doesn't recognize specific package through apt-get

Version 1.58 of libboost-thread exists in Ubuntu 16.04. Install it by typing the following in a Terminal Window:

sudo apt install libboost-thread1.58.0


How can I set a global timeout for the screensaver?

Which dconf keys are used

To know which keys are changed in dconf, you can use dconf watch / while changing settings. In this case, you'll see something like :

/org/gnome/settings-daemon/plugins/power/sleep-display-ac
  1800

/org/gnome/settings-daemon/plugins/power/sleep-display-battery
  1800

/org/gnome/desktop/session/idle-delay
  uint32 1800

Then, you put these keys in a file in /etc/dconf.

Create and activate /etc/dconf

If this directory does not exists, you have to create it and activate its use with these commands :

mkdir -p /etc/dconf/profile /etc/dconf/db/local.d
cat <<EOF >/etc/dconf/profile/user
user-db:user
system-db:local
EOF

cf: https://live.gnome.org/dconf/SystemAdministrators

Put your global settings

Use a file in /etc/dconf/db/local.d named, for example, screensaver-delay:

[org/gnome/settings-daemon/plugins/power]
sleep-display-ac=1800
sleep-display-battery=1800

[org/gnome/desktop/session]
idle-delay=1800

Apply it running the command: dconf update. It will (re)generate the file /etc/dconf/db/local which will be used if keys do not conflict with user defined values.

Force global values

If you want to force these global values over user selected values, you can do it by using a file in /etc/dconf/db/local.d/locks named, for example, screensaver-delay:

# Force screensaver delay
/org/gnome/settings-daemon/plugins/power/sleep-display-ac
/org/gnome/settings-daemon/plugins/power/sleep-display-battery
/org/gnome/desktop/session/idle-delay


Try to add route in /etc/network/interfaces

Example

auto eth0
iface eth0 inet static
       address 10.0.0.21
       netmask 255.255.255.0
       gateway 10.0.0.1
       up ip route add 10.0.1.0/24 via 10.0.0.1 dev eth0
       down ip route del 10.0.1.0/24 via 10.0.0.1 dev eth0

Note up ip ... and down ip ...

This will secure that will route go up when interface eth0 go up, or down when eth0 go down.

Edit 1

Also on this way you can add eth1:1 int an route for that int ...

auto eth1
iface eth1 inet static
       address 10.0.0.21
       netmask 255.255.255.0
       gateway 10.0.0.1
       up ip addr add 10.0.1.21/24 dev eth1 label eth1:1
       down ip addr del 10.0.1.21/24 dev eth1 label eth1:1
       up ip route add 10.0.1.0/24 via 10.0.1.1 dev eth1:1 metric 20
       down ip route del 10.0.1.0/24 via 10.0.1.1 dev eth1:1 metric 20

If you need more help comment answer


There are many videos in the site. I think andrew.46's proposal get confused by the fact. I could not find any init file for Vimeo videos.
Final solution.

Study the source code and see if you can see the video sources coming from some major video provider. My case: Vimeo.
Install the extension: Download Vimeo Videos, Premium
Go to the site and activate videos; just downlod.


@Goldgum Installing Ubuntu on a mac is sadly not as straight forward as it is for many windows based PC's. Since your particular mac computer does not appear to have a version that is officially supported by Mactel (https://wiki.ubuntu.com/MactelSupportTeam/CommunityHelpPages) this means you are doing an Unsupported Version install. it looks like the problems you are experiencing are fairly common and addressed here. I would start with the support page and see if that has what you are looking for.


You should check Zeal, it is an offline documentation browser for software developers.

Here is a screenshot:

Also another option to consider is DevDocs, as they say:

  DevDocs combines multiple API documentations in a fast, organized, and
  searchable interface.

And finally, you can check DevHelp:

  Devhelp is a developer tool for browsing and searching API
  documentation.

  It provides an easy way to navigate through libraries and to search by
  function, struct, or macro.

  The documentation must be installed locally, so an internet connection
  is not needed to use Devhelp.

  Devhelp works natively with GTK-Doc, so the GTK+ and GNOME libraries
  are well supported. But other development platforms can be supported
  as well, as long as the API documentation is available in HTML and a
  *.devhelp2 index file is generated (see the README file for more information).

  Devhelp integrates with other applications such as Glade, Builder or
  Anjuta, and plugins are available for different text editors (gedit,
  Vim, Emacs, Geany, …), see the plugins directory.

Hope it helps.


I have never tried it, but it seems that openSUSE build service will help:

openSUSE:Build Service cross distribution howto
openSUSE:Build Service Debian builds

Ubuntu has obs-build package in repositories since Xenial.

Also you can try Snap or Flatpak.


Can i use file system in ubuntu without installing (running via USB)

If you mean running Ubuntu from the USB flash-drive, then Yes you can. It will work OK.

But if you mean install Ubuntu on a flash-drive, then you can create a persistence USB.  You can create it by using  Live USB creator.

For more information click Here

keep in mind that it might be a little slow


How can I launch Thunderbird from Command Line and Auto Check IMAP Email?

Perhaps fetchmail would be better suited to what you're trying to accomplish?
http://www.fetchmail.info/


You can try using dnsutils to do that exactly. They are not installed by default so here you go:

sudo apt-get install dnsutils

Then you can dig around the DNS System:

dig host.tld

Which will in return give you a DNS Record from your DNS Server specified in /etc/resolv.conf.

Caching is usually done by individual applications, like for example Firefox. To my knowledge there are only tools to flush the cache, not to read it out.

Cheers!


Ubuntu Raring is using Upstart 1.8 and they mention it in changelog https://wiki.ubuntu.com/RaringRingtail/ReleaseNotes#Upstart_1.8

Comparison of features by systemd developers http://0pointer.de/blog/projects/why.html


Empathy fails to reconnect after awake from suspend

Maybe not ideal, but have you tried Pidgin?


Prepare a Boot-able Live USB stick with Ubuntu.

Boot the computer with this Stick.

Open Terminal and type :

update-grub.

If this does not work then install Boot Repair program from internet on to the pen-drive and run the program.

Run the Program and fix Grub record

Detailed Steps to use, here : Using Boot Repair


Is there an applet or tool that can show an overview of workspaces?

I'm not sure if this is similar enough, but the workspace switcher in Unity Ubuntu 11.04 provides a visual overview of all workspaces, and allows windows to be dragged from one workspace to another.

It can be invoked by clicking the workspace switching icon in the Unity panel  or with the shortcut Super-s


Trying to create a folder with date and time with a space

You need quotes both around the whole $(...) command substitution (must be "double quotes") as well as around the format string argument to date ("double" or 'single' is okay):

mkdir "$(date '+%Y-%m-%d %H%M')"

If you don't quote arguments containing spaces (including command substitutions which could potentially have spaces in their result), they will be subject to word splitting by the shell, and you end up with multiple separate arguments instead of one, which will be interpreted differently by the command.

The main difference between "double" and 'single' quotes is that you can still have variable expansion and command substitution inside double quotes, whereas single quotes prevent any kind of evaluation and make the shell treat the string literally as it is.


I was finally able to solve it. The problem was fractional scaling.
Solution: I logged into a wayland session and set fractional scaling back to 100%.
Procedure: Logged into a wayland session. Went to Settings > Displays > Set the fractional scaling back to 100% and disabled fractional scaling. Then I did a reboot and tried logging into an XOrg session which worked again.


Upload libreoffice impress presentation to youtube?

Convert odp to swf using LibreOffice Impress.

Launch LibreOffice Impress.
File -> Open, open the .odp presentation that you wish to convert to flash.
Click File -> Export.
Choose Adobe Flash (SWF) (.swf) in the Filter box. Click OK.

Cons: All the animations, multimedia files in the presentation will disappear after conversion.


You could try reinstalling GRUB into the MBR (Master Boot Record) of your hard drive.
To do that, you will need an Ubuntu live CD/USB stick.

There are many tutorials available online, f.e. this one.


If you are in recovery mode, you will see # there. It means you already have access.
change permission of the files you want to by using chmod command :

chmod 774 /etc/sudoers.d

If all fails, why not just create a new user. And if you find this too tedious, you can run a live usb, chroot into the environment, take a backup and re-install the OS.
This is a template for chroot, don't use it directly, change the values to suit your directory structure. If this seems too advanced, post output of command 'mount' in recovery mode.

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt update-grub
sudo umount /mnt/sys
sudo umount /mnt/dev
sudo umount /mnt/proc


how to upgrade my Ubuntu Studio 14.04 to Ubuntu 14.1?

Have you tried Update Manager, from the Systems menu.
Above the packages list will be a notification to upgrade to the latest version - Press this button to upgrade.
It Updates Upgrades (if chosen), I have newer seen it to mess with my personal files or data, only the installed packages.

You can also use the terminal with these commands:

sudo apt-get update
sudo apt-get upgrade
sudo do-release-upgrade

It request your password, but doesn't show anything (security)
And it will ask for confirmation on upgrades.


Choppy Video on Intel 965GM running 14.10

Oh the pain of it all! Lol. For anybody who finds this I ended up downgrading to ubuntu 14.04 64 bit. Everything is running smooth as butter:-)


Ubuntu 13.04/13.10 on Sony Vaio Fit 15 SVF15A1C5E

As far as I've searched, It works OK, except for configuration of the sound card:

Sony Vaio Fit with Ubuntu 12.04, sound missing

And a major problem with the Wifi card, that its not acknowledged by Sony. The only really effective solution to that is to replace wifi card with a better one, for example:

Intel Network 6235AN.HMWWB Centrino WiFi Card Advanced-N 6235 Dual Band Bluetooth Retail


I'm not able to install nginx 1.15 with PageSpeed module

You may set the version of nginx and pagespeed by adding the -n flag, i.e.:

bash <(curl -f -L -sS https://ngxpagespeed.com/install) -n 1.16.0 -a '--with-compat'

When building PageSpeed, I automate by using a script that can be found here:
https://www.majlovesreg.one/adding-pagespeed-to-a-running-nginx-instance

Note that this installs PageSpeed on a pre-installed NGINX running in your system. You may edit it based on your specific needs.


Adding additional dns search domains - is there a maximum?

Yes, 6 domains with a maximum total of 256 characters is the maximum amount of search domains.

This is a limitation by the BIND DNS client library in GNU libc and is not easily changed.

See this great answer on Unix Stack Exchange for more information.


adbd cannot run as root in production builds

You have to unlock your bootloader. Please follow these steps:

Step 2 - Device unlock

With the device powered off, power on the device by holding the Power button + volume up + volume down.
The device will boot into the bootloader.
Plug the device into the computer via the USB cable.
On your computer, press Ctrl+Alt+T to start a terminal. Type sudo fastboot oem unlock, followed by Enter
On the device screen, accept the terms of unlocking.
Boot the device by pressing the power button (pointed by an arrow with Start on the screen).

Source

Please let us know if this worked.


Easiest way is to put cron job to start it minute earlier and then add timing by your own.

You can also use at. At least man page of at says that you can use rather exact timing, including seconds. You can test this by adding at job that records time, for example shell script running

date > ~/at_test

If you go with cron route, date +%s is your friend.

For example

#!/bin/bash
target_time=1298301898
let wait_time=target_time-`date +%s`
if [ $wait_time -gt 0 ]; then
 sleep wait_time
fi
# Execute your code

With this approach your next problem is to figure out how to determine target_time. If you always know that you want to start it in the next minute, you can use

sleep 2 # Avoid running on xx:59, if cron starts immediately.
let wait_time=60-`date +%M`
sleep wait_time

to wait until minute changes.


No, there isn't any specialized Facebook lenses for Ubuntu yet (11-October-2012)

What lenses for Unity are available?


Looks like there are problems with the samba package.

Type sudo apt-get --purge remove samba in the terminal to remove the package.  This removes the Samba server that you installed.


Just copy the command, and add the -lm at last, like:
cc -L/usr/local/lib -o miniperl \
    `echo  gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o perl.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o  | sed 's/ op.o / /'` \
    miniperlmain.o opmini.o -lm

then re-run the make, the make program will thought the dependecy is solved and will continue to compile.


How do I enable Wireless networking with an Atheros 9485 device?

Get rid off from the Network manager on Ubuntu. Before doing it, first, install Wicd Network manager by sudo apt-get install wicd, then remove the connection manager sudo apt-get remove --purge network-manager-gnome network-manager. check if you have any settings on /etc/network/interfaces just keep

   auto lo
iface lo inet loopback

then Wicd should give you what you want


ERROR error parsing environment "maas": no public ssh keys found..is it a bug

You don't need to specify authorized-keys-path as juju will automatically discover your ~/.ssh/* keys and try to use them.

See juju help authorized-keys for more information how to manage these in an environment.

Also you don't need to specify admin-secret, it will be auto-generated when bootstrapping. The bootstrap-addresses-delay and bootstrap-retry-delay rarely need to be overridden in environments.yaml at all (and you're using the defaults anyway, so I'd skip them), just bootstrap-timeout.


Type this in terminal

ln -s /usr/bin/java /opt/java/32/jre1.6.0_30/bin/java

Now, run your program.


Can't log into ubuntu-desktop Ubuntu 14.04 but other DE's okay

I've had to do many fresh installs before I learned this. Use the command sudo apt-get update && sudo apt-get -f install. The first half gets a current list of packages and their dependencies from the server. The && tells the computer to run the second part after the first part completed successfully (which keeps errors from snowballing). Finally, the last part tells it to fix ( -f ) any broken packages by installing needed dependencies. If that doesn't work, try running sudo apt-get install ubuntu-desktop --reinstall (or whatever package needs to be fixed).


You should have no problem using it. The first time you insert a DVD Ubuntu should autodetect and prompt you; if not, go to System Settings > Details > Removable media and find your drive.


How to encrypt sensitive info on exec line in .desktop shortcut?

Unfortunately, this is not generally possible.

  "In general, command line arguments are visible to all."

Unless the program in question is willing to accept encrypted passwords as command-line arguments, then you must either supply the password in plaintext or omit it entirely.

Some common applications provide an option for prompting the user for their password immediately. For example, the mysql command offers the -p option:

  "If you omit the password value following the --password or -p option on the command line, mysql prompts for one."


Why do Intel HD3000 graphics show as "unknown" on my Lenovo B570?

Try this one:

apt-get remove mesa-utils

Reboot and verify that the problem persists, if so:

apt-get install mesa-utils

Reboot and verify if the problem is solved.

I've tried this solution many times, i also have an intel card, and it works


How to use existing SSH key on my newly installed Ubuntu

If you have a copy of your ssh keys (e.g., on a USB stick) then simply copy the key files to the ~/.ssh/ directory.

E.g.,

cp /path/to/my/key/id_rsa ~/.ssh/id_rsa
cp /path/to/my/key/id_rsa.pub ~/.ssh/id_rsa.pub
# change permissions on file
sudo chmod 600 ~/.ssh/id_rsa
sudo chmod 600 ~/.ssh/id_rsa.pub
# start the ssh-agent in the background
eval $(ssh-agent -s)
# make ssh agent to actually use copied key
ssh-add ~/.ssh/id_rsa

Otherwise, you will need to create a new one and add it to your GitHub account https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/. Be sure to remove the old key from GitHub while you're at it.


iptables can do that:

sudo iptables -t nat -A PREROUTING -s 10.10.12.1 -j DNAT --to 82.12.12.1
sudo iptables -t nat -A POSTROUTING -s 10.10.12.1 -d 82.12.12.1 -j MASQUERADE

The first command changes the packet's destination address, redirecting it to the external host. The second command changes the source address, so the external host can send a reply to your server.

Probably you'll want to redirect only the packets destinated to specific ports, e.g. if 10.10.12.1 talks to 82.12.12.1 only via TCP ports 80 and 1234 the first iptables command would be:

sudo iptables -t nat -A PREROUTING -s 10.10.12.1 -p tcp -m multiport --destination-ports 80,1234 -j DNAT --to 82.12.12.1


Lubuntu 18.04 LTS - Is it the case to enable or install a firewall?

Generally, it depends on various factors.

For home purpose, and not many devices around it would be decent choice. I've even ran Raspberries for this purpose on about couple of months, and didn't notice degradation of speed.
When building a firewall, most relevant components are quality Network Interface Card (NIC) and good CPU.

As all packets drive to nic, then to kernel, having lot of rules, means kernel would need slightly more time to process those. Also, since you're planning Ubuntu, I would recommend you to go with learning of iptables , even thou ufw and other iptables frontends are kinda .. simpler for start.

However, for home purpose, it would be barely unnoticeable.
Those are my 2 cents. Good luck.


Adding an existing user to an existing group isn't working with usermod -a -G

Log out and then back in.

Group changes need a fresh login to take.


Ubuntu 18.04 on kernel 4.15.0-34-generic boots to BusyBox

The problem is that /sbin/cryptsetup is not in initramfs file /boot/initrd.img-4.15.0-36-generic.

You need to add CRYPTSETUP=y in /etc/cryptsetup-initramfs/conf-hook.
You also need to add the initramfs option in /etc/crypttab.
Then, you have to run update-initramfs, which solves this problem.

Detailed solution:

In an other Ubuntu machine, use "Startup Disk Creator" to create a bootable Ubuntu 18.04 USB drive
Plug in this USB drive in a USB port of the computer that boots to BusyBox
When the live USB Ubuntu is ready, connect to Internet (WiFi or wired)
Open a terminal

ubuntu@ubuntu:~$ sudo su

Find the encrypted block device.

root@ubuntu:~# blkid|grep LUKS
/dev/nvme0n1p3: UUID="4b206e76-1531-48ae-95be-ae0ed7a244c1" TYPE="crypto_LUKS" PARTUUID="21db499d-b87b-41c6-864f-04d1531cb083"

Decrypt the device

root@ubuntu:~# cryptsetup open UUID="4b206e76-1531-48ae-95be-ae0ed7a244c1" nvme0n1p3_crypt
Enter passphrase for /dev/disk/by-uuid/4b206e76-1531-48ae-95be-ae0ed7a244c1:

List mapped devices. control is a file used to send command to the device mapper. nvme0n1p3_crypt is the decrypted device. ubuntu--vg-root is a LVM logical volume in the LVM ubuntu-vg volume group.

root@ubuntu:~# ls /dev/mapper/*
/dev/mapper/control  /dev/mapper/ubuntu--vg-root  /dev/mapper/nvme0n1p3_crypt

Create mount point. This is where we will mount the / of our system that won't boot.

root@ubuntu:~# mkdir -p /mnt/ubuntu-root

Mount root logical volume

root@ubuntu:~# mount /dev/mapper/ubuntu--vg-root /mnt/ubuntu-root/

Mount pseudo file systems

root@ubuntu:~# mount -o bind /sys /mnt/ubuntu-root/sys
root@ubuntu:~# mount -o bind /proc /mnt/ubuntu-root/proc
root@ubuntu:~# mount -o bind /dev /mnt/ubuntu-root/dev

Copy DNS information

root@ubuntu:~# cp /etc/resolv.conf /mnt/ubuntu-root/etc/

Change root

root@ubuntu:~# chroot /mnt/ubuntu-root/

Mount /boot, which contains the initramfs file. This partition is unencrypted.

root@ubuntu:/# mount /boot/

Install binwalk (to see the content of the init ram file system)

root@ubuntu:~# apt update
root@ubuntu:~# apt install binwalk

Find offset of gzipped initramfs content

root@ubuntu:~# binwalk /boot/initrd.img-4.15.0-36-generic | grep gzip
1605632       0x188000        gzip compressed data, from Unix, last modified: 2018-10-18 13:00:32

The problem is that the initramfs file system does not contain cryptsetup.
So, that is why there is no LUKS password prompt.

root@ubuntu:/# cd /root/
root@ubuntu:~# mkdir initramfs-4.15.0-36-generic
root@ubuntu:~# cd initramfs-4.15.0-36-generic
root@ubuntu:~/initramfs-4.15.0-36-generic# dd if=/boot/initrd.img-4.15.0-36-generic bs=1605632 skip=1 | gunzip | cpio -i
root@ubuntu:~/initramfs-4.15.0-36-generic# ls sbin/cryptsetup
ls: cannot access 'sbin/cryptsetup': No such file or directory

To decrypt root at boot, the initramfs needs to contain:

sbin/cryptsetup
lib/modules/4.15.0-36-generic/kernel/drivers/md/dm-crypt.ko

Add the initramfs option in /etc/crypttab

root@ubuntu:/# cat /etc/crypttab
nvme0n1p3_crypt UUID=4b206e76-1531-48ae-95be-ae0ed7a244c1 none luks,discard,initramfs

Add CRYPTSETUP=y in /etc/cryptsetup-initramfs/conf-hook
Run update-initramfs:

root@ubuntu:~# update-initramfs -k 4.15.0-36-generic -c -v &> update-initramfs-4.15.0-36-generic.cryptsetup.log

Now, we have cryptsetup in initramfs and the Linux kernel module dm-crypt.ko too:

root@ubuntu:~# grep /sbin/cryptsetup update-initramfs-4.15.0-36-generic.cryptsetup.log
Adding binary /sbin/cryptsetup

root@ubuntu:~# grep dm-crypt.ko update-initramfs-4.15.0-36-generic.cryptsetup.log
Adding module /lib/modules/4.15.0-36-generic/kernel/drivers/md/dm-crypt.ko

Now, run update-initramfs, without -c (new) and without -v (verbose):

root@ubuntu:~# update-initramfs -k 4.15.0-36-generic -u

Verify that the initramfs is actually correct

root@ubuntu:~# binwalk /boot/initrd.img-4.15.0-36-generic | grep gzip
1605632       0x188000        gzip compressed data, from Unix, last modified: 2018-10-18 14:26:29

root@ubuntu:~# dd if=/boot/initrd.img-4.15.0-36-generic bs=1605632 skip=1 2> /dev/null | gunzip | cpio -t 2> /dev/null |grep sbin/crypt
sbin/cryptsetup

root@ubuntu:~# dd if=/boot/initrd.img-4.15.0-36-generic bs=1605632 skip=1 2> /dev/null | gunzip | cpio -t 2> /dev/null |grep dm-crypt.ko
lib/modules/4.15.0-36-generic/kernel/drivers/md/dm-crypt.ko

Now, reboot.


What language C++, Python, or Java is most supported in Precise Pangolin for game development?

Python and C++ are the Ubuntu "default" languages, both are more used than java for native development. There is not even one java program in the default install.

Now, choosing between this two is harder. You already have experience with python and pygame, so this is a great choice to get a quick start. You will be productive as soon as possible and your game will be cross-platform. But C++ is way faster than python. If you're game is really into heavy math with complex data structures the performance gain could well worth the extra effort.


Ubuntu LTS 16.04 upgrade removes my packages?

These packages are updated in the new release.

Biber new version : 2.3.1 (old 1.6.x )

Python new version : 3.5 (old  3.4 or less )

Grive: you need to install again.

Pycharm : also need to install again.

And of course xscreensaver is updated in 16.04 LTS.

The other reason of the update maybe that some dependencies are updated with the new release.
Reply what happens.


Remove noise in video created by recordMyDesktop?

Your first approach is good one, you can add mp3 in KDENLIVE or Kino or may be several other video editor like pitivi. You can view the full list here

I hope you can find your solution here also.

Some other helping sources:

http://ubuntuforums.org/showthread.php?t=1692945
http://manpages.ubuntu.com/manpages/natty/man1/esmerge.1.html
http://ubuntuforums.org/showthread.php?t=899168


trying to run a python game with source code in terminal, unbuntu 18.04

You've got (2) problems, neither is easily fixable. The module that your games are complaining about - pygame - is available for python2 on Ubuntu 18 in package python-pygame (which won't work with these games). However, it is available for python3 on Ubuntu 19 in package python3-pygame (which I assume works, but doesn't help you).

The source code for pygame is readily available, so if you're up to it, you could build it yourself.

FYI: the script you need to run is MainGame.py, not Asteroids.py (and it's super buggy).


When accidentally dragging an icon in the taskbar it will always stay in drag mode(18.04)

This still happens. Even when using Dash to Panel.
When it happens, I click the icon and the preview comes up. Without moving mouse off, click again and the right-click/context menu comes up. Without moving mouse off, click again and the window min/maximizes. It then works as normal, until I accidentally drag again.
Has anyone found or filed a bug for this, yet?


xymon-4.3.28/configure.server: 94: .: Can't open build/fping.sh

Really you do not need to compile this application by yourself.

It is packaged as xymon in official Ubuntu repositories (universe pocket):

  (Ubuntu 18.04.1 LTS has 4.3.28-3build1)

You should enable universe pocket

sudo add-apt-repository universe

and then install the application:

sudo apt-get install xymon

If you are trying to compile it just for fun - then enable source code repositories in Software & Update, then get all necessary build dependencies

sudo apt-get build-dep xymon
apt-get source xymon

and so on.


My computer crashed after trying to install wine 1.4

I can't think of how the two are related. This sounds like a graphics driver issue.

Try: Ctrl+Alt+F1 to get to a console.
Assuming this works try re-installing your graphics driver. For example if it's an Nvidia card (I doubt an Eee PC has Nvidia) try:

sudo apt-get install --reinstall nvidia-<driver version here>

If you need need further help, post the video card installed and Eee PC model.
You can determine the card by running:

lspci -v | grep VGA


Software Center not Opening at all Error

The cache files are corrupted. To regenerate it open a terminal and enter the following:

sudo rm -r /var/cache/software-center/xapian
sudo mv /var/lib/dpkg/info/format /var/lib/dpkg/info/format.bak
sudo dpkg --clear-avail
sudo apt-get update
sudo apt-get install --reinstall software-center


In ubuntu there is such tool as alsamixer. Check if you have that in your distro. If you do, see if below the headphones bar there is two M letters , MM. That would mean headphones are muted. pressing m unmutes them. Check if that works. Alternatively, this could be a hardware issue, in which case i'd suggest usb headphones or bluetooth


I've linked scilab to gnome application menu (by creating a *.desktop file) but it's closed immediately when I run it from menu

I found a bug report for the exact same problem.

Looks like it's a bug of scilab more than a problem with Gnome/Ubuntu.

As a workaround, change your Exec command as described:

Exec=env LC_ALL="en_US.UTF-8" xterm -e /home/user/apps/scilab-6.0.1/bin/scilab

EDIT based on comments

Looks like configuring Terminal=true has the same effect and is enough
to keep scilab open.


XAMPP(LAMPP)'s phpmyadmin throwing error #2002

Try to restart MYsql.
check if the LAMP server is configured properly.
For more help please ask your query.


Configure and connect to OpenVPN Client GUI in Ubuntu 16.04

Try installing just network-manager-openvpn:

sudo apt install network-manager-openvpn

also make sure openvpn is installed:

sudo apt install openvpn


Encrypting home folder in advanced installation

After clicking "Install now" I just realized that after couple of screens there is the option of encrypting the home folder when installation asks for admin username and password.

This may solve my own question.


There is no default password for the live user. It is blank. It seems though, that the GUI app you're using doesn't let you leave the password blank.

You can change it by opening a terminal and typing

passwd

It'll also ask you for the current password. Just press enter.


How to make a sound effect play whenever I click?

Hm, quite a hacky solution, but it works! First of all install the following things:

sudo apt-get install xmacro expect mpg321

xmacro is the program that will detect your mouse clicks.
expect is the program that will listen to the output of xmacro for your mouse clicks so as to execute mpg321, which is a command line player!

So, run this script from inside a terminal:

#!/usr/bin/expect -f
spawn xmacrorec2

while { 1 } {
   expect "ButtonRelease 1"
   system mpg321 /home/alex/Music/notification/notification.mp3&
}

When you execute the above script (I repeat, through a terminal) you will be asked for an input key. Give an unusual key (e.g. F7), this will be the key that, no matter when you press it, it will stop this process from going on.

So, just, inside the above script, set mpg321 to a valid mp3 file of yours and test it :)

It works just fine under Ubuntu 12.04 but I have used all of these 3 tools under Oneiric without a problem!

xmacrorec2 may take as argument the expected key (-k argument) as a kei code. This helps you a lot if you want to put the above script to your startup applications, because it will not ask for an input key each time. In order to find the appropriate key code that you want to use, you have to install the tiny program xbindkeys:

sudo apt-get install xbindkeys

Then do:

touch ~/.xbindkeysrc
xbindkeys -k

After the last command, a small window will appear, without doing anything to it, give it a keyboard input, let's say F7. You will see something like this:

You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
m:0x0 + c:73
F7

Notice the line:

    m:0x0 + c:73

The code 73 is the one expected by xmacrorec2. So, you can add to the above script a -k argument, like this: spawn xmacrorec2 -k 73 and it will automatically start. After you have finished editing the script, save it to a stable directory (I mean a directory you will not delete/move to the close future), like ~/Documents and give it executable permissions (right click on it->Properties->Permissions->Allow executing file as program, or, through the terminal, chmod +x script_name.sh). Then, simply add your script to your Startup Applications. Of course, whenever you want this sound to stop, you will have to give the corresponding keyboard input, like F7.

PS: If you don't want to install an extra command line mp3 player (like mpg321), then you may use the pre-installed player canberra-gtk-play, which is used as

canberra-gtk-play -f music.wav

The disadvantage of it is that it can only play certain ogg and wav files.


Can I run KVM virtual servers on Desktop version

First of all, yes you can (you know that from the existing answer). I would still like to add a few aspects. The desktop and server versions only differ by the packages installed by default or set to be installed by default (tasksel), hence you can do it.

Running a production server on a "desktop version" of Ubuntu is therefore possible as there are no fundamental differences such as, say, between Windows XP Pro (32bit) and Windows 2003 Server R3 (32bit) - the latter would accept up to 64 GiB RAM in the more expensive editions. On Ubuntu you can install a kernel that speaks PAE and doesn't set arbitrary limits (like cheaper Server editions of Windows 2003) even on 32bit setups.

The bigger question should be whether you can run production servers on commodity hardware. And the answer is YES. Check out this article over at Wikipedia. Google runs most of their services on this kind of hardware, but redundantly. A few years ago they (Google) published some study about the reliability of desktop hard drives, too.

Therefore after we know commodity hardware isn't the problem your requirements about reliability and the known parameters concerning hardware failures to be expected etc should govern your decision making.

A "cheaper" (or rather: "more lightweight") alternative would be to use LXC (Linux Containers). Imagine them like an intermediate step between chroot (which was never meant to be a jail like the respective concepts on Solaris or BSDs) and KVM. LXC does leverage apparmor to achieve this, btw. The separation isn't perfect, but given the advantages, the tradeoff seems small.

About your rootkit worry, I am not sure because I haven't researched the topic enough. However, KVM guests run as user mode processes and you can even let each guest have its own account, if you like. Now parts of KVM must obviously operate in the kernel of the host, so there is a chance that attack vectors exist, I just wonder whether the attach vector allows code from the guests to break out ...

How you intend to make things more secure by only using the command line is beyond me, however. You have all the possibilities (usually rather more than less) that you have through a GUI (KDE, GNOME, Unity etc). So it doesn't make the job harder to install host or guest as command line only. The reason to leave out X11 should rather be governed by the use (you say "server", so it's not obvious) and the available resources. If X11 doesn't run it also won't take away resources (except for disk space).


Start terminal-based application from Main Menu?

gnome-terminal -e "your command" --geometry=25x77

For example, your command may be "~/Downloads/adom/adom".


Dell 11 3000 - Sound for Ubuntu 14.04 LTS. Audio Drivers?

For what it's worth, I have the same Dell 11 3000 series computer, with the same configuration output you display above.  I had the same problem with speakers not working when I was running Ubuntu Live from the USB (though the headphones did work).  Once I installed Ubuntu (alongside Windows 8.1) the speakers worked fine without me having to do anything.


Gedit 3.6.3 does not exist. You'll have to choose 3.6.2 or 3.8.3. Since 3.8 is a major version, I recommend to install the 3.6.2.

You should be able to build your package using these commands:

wget https://launchpad.net/ubuntu/raring/+source/gedit/3.6.2-0ubuntu1/+files/gedit_3.6.2.orig.tar.xz
tar -xvf gedit_3.6.2.orig.tar.xz
cd gedit-3.6.2/
./configure
make
sudo make install

You have to know that it is not recommended to upgrade your packages, because it may change a lot of packages in your system, possibly breaking it.

You also have to take a close look at the depedencies that Gedit 3.6.2 needs.


I suggest you try to re-download and re-burn your Ubuntu ISO. It seems like it got messed up in the process.

This time, try reading the How To MD5 Sum article to verify that the download was successful.

The expected output for 12.04 32 bit should be:

e235b63c02644e219b7bf3668f479c9e *ubuntu-12.04.1-desktop-i386.iso

Excerpt:

  First open a terminal and go to the correct directory to check a downloaded iso file:

ubuntu@ubuntu-desktop:~$ cd Downloads

  Linux is case sensitive so "Downloads" is NOT "downloads".

  Then run the following command from within the download directory.

md5sum ubuntu-11.10-dvd-i386.iso

  md5sum should then print out a single line after calculating the hash:

8044d756b7f00b695ab8dce07dce43e5 ubuntu-11.10-dvd-i386.iso


Ubuntu in VMware Player Cannot Access Internet for Updates

create a file (it doesn't exist by default):

sudo gedit /etc/apt/apt.conf.d/01proxy

Then add the following: (Replace with yours)

Acquire::http::Proxy  " http://[username]:[password]@[proxy-webaddress]:[port]";

Acquire::https::Proxy  " http://[username]:[password]@[proxy-webaddress]:[port]";

Save the file and then try:

sudo apt-get update


GParted shows "unallocated" on my sda drive (parallel boot with Win XP)

Please follow this link http://ubuntuforums.org/showthread.php?t=1728998
In short just follow this steps:

You need FixParts utility. You can either download the appropriate fixparts Debian file from SourceForge or install the full gptfdisk package for your version of Ubuntu (see the "Downloading GPT fdisk from OBS" section of this page). Then:

Back up your data, or at least your partition table. (Your sfdisk output above backs up your partition table, so save that on another disk.)
Type "sudo fixparts /dev/sda".
In FixParts, type "p" to view your partitions and verify they're all present. The extended partition won't show up, but the logical it contains should.
In FixParts, type "w" to save your partition table.

This procedure should fix the problem.


Generally when there is an issue, you can see an error on the /var/log/syslog.

Otherwise, try to erase by using the right & simple way fdisk:

fdisk /dev/sdb

When you entered, press p to print the partitions , n to create a new partition, t to change the file format of your new partition when it prompt you to tap it. When you finished press w to write the config (do nothing before).


If the issue is not network related, try the following:

sudo apt-get install mysql-server php7.0

Sometimes it can be how the packages are named. if encountered again, use this command to search your configured repositories:

sudo apt search php7

Or name of the package you wish to find.

Hope this helps.


In Linux (and other POSIX-like operating systems), the execute bit has a special meaning for directories:  it means that the given user or group can access the inodes of the files inside the directory.  So chmod g+r on a directory means that group members can list the files, but they can't know anything about them, and chmod g+rx is needed to actually read the files inside.
You probably should be doing chmod -R +755, not 766.


command line input directory read with tab autocomplete doesn't work

Here's the answer of the working function for those who face the same problem

function selectFolder() {
  local dir
  read -ep "Enter the path of the dir : "  dir

  {
    cd "$dir"
  } || {
    exit 0
  }
  local dir=$(pwd)
  cd - > /dev/null 2>&1
  echo "$dir"
}

# invoke function
selectFolder


You're doing it right, but your version of Vifm is very old (it's 0.4, I guess). Look for Debian at Downloads section of the site. If you don't want to build the latest version from sources, you can use package from experimental.


Write $(date) Into File Using Cron and Bash Shell Script

cron can be rather $PATH oblivious at times. Many people simply prefix commands with the command's path. For the date command, locate it's path with and one of these three commands:

$ which date
/bin/date

$ type -a date
date is /bin/date

$ command -v date
/bin/date

So change your script from:

$(date)

to:

$(/bin/date)

You can shorten your script by replacing:

target_file='/home/dan/timestamps'
echo $(/bin/date)  >>  $target_file

with:

/bin/date >> /home/dan/timestamps


According to docker best practices, I should put the update and install in the same RUN line. This way the cache will be updated properly.

After these changes, things are working.


Can't install Ubuntu 18.04 with Windows 10 - the installed does not detect any partitions

I solved it! The problem was the SATA mode option in the BIOS. It was set to RAID, and changing it AHCI made it work.

Hardware information of my pc (just in case you have the same):

LENOVO Ideapad 720s-14IKB
Intel Core I7-8550U Kaby Lake (Quad Core, 1.8GHz - 3.7GHz, 8MB Cache).
RAM: 8GB DDR4 2133MHz
Storage: 512G SSD M.2 PCIE


Generally it is recommended to use the NVIDIA drivers from the official Ubuntu repositories.
But as you have very new graphics hardware, you can install the latest official NVIDIA drivers.

Step 1 : Uninstall every NVIDIA related software that is currently installed.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1 - enter user name and password - execute :

sudo apt-get purge nvidia* bumblebee
sudo reboot

Step 2 : Install the latest official NVIDIA drivers that support the GTX 965M.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On the login screen press Ctrl+Alt+F1 - enter user name and password - execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361 nvidia-prime
sudo reboot

Use NVIDIA X Server Settings (PRIME Profiles) to switch between the Intel and NVIDIA graphics.
Note : Check whether there have settings to be changed in BIOS to manage the NVIDIA graphics.


Permission denied please try again ssh error

By default, logging in as root using password is disabled. You should change the PermitRootLogin setting in /etc/ssh/sshd_config accordingly to allow that, if it is what you want. Alternatively set up public key authentication for the root account. See e. g. How to set up passwordless SSH access for root user for an example. Unfortunately this will be impossible to do without help from your hoster if you really locked yourself out and logging in as john also does not work.

In addition to this, if you do not add root to the AllowUser directive as well, the setting of PermitRootLogin will have no effect anyway.

So to fix your particular problem make those two settings in sshd_config look like this:

PermitRootLogin yes
AllowUsers root john

and then restart sshd or reboot the server. Afterwards you should be able to log in as root using a password.

As for the error message when you are trying to log in as john: This does not look like a normal ssh or Ubuntu error message but rather something your hoster added. You should probably do what it says and contact support.

Safety measures

In general, if you are messing with sshd settings there is an easy way to test things: Simply restart the sshd service using service ssh restart and try things out from another terminal. Do not terminate your existing session. If something goes wrong you still have the running session and can revert the wrong settings.

Rebooting the whole server is never necessary for activating changes to sshd.


Software & updates won't open. Possibly downloaded something for 14.10 on accident somehow

You should check that your distribution did not got changed by mistake in lsb-release.

You can do:

sudo gedit /etc/lsb-release

And it should look like that: (if not change it and save)

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"

Also check the version in /etc/apt/sources.list
Change any utopic appearing in this file into trusty.


How do I copy Command Line Text? System Monitor > Processes > Column "Command Line"

You can use the xclip command. Then you can use the

ps aux | grep 'your specification' | xclip -selection clipboard

to copy the command in to the system clipboard.
Here is the xclip manual


Firefox not prompting me for master password

The master password is not required to launch Firefox, only for specific security-related issues involving your user profile, such as looking up a saved password, or connecting through Firefox Sync (TY, https://askubuntu.com/users/20358/jpaugh , for noting that).


Ignore finger resting on trackpad button (Asus s200e)

This worked for me:

create a file /etc/modprobe.d/psmouse.conf with the following line:

options psmouse proto=exps

and reboot.
This will permit to rest the finger on the "left button" whithout freezing the pointer but you'll lose two finger scrolling and other nice things (may be acceptable until a better fix will be available for the synaptics/multitouch/mtrack xorg input drivers).


If you do not have the original key that you used to encrypt the data, you are not going to be able to decrypt the data and recover  o.

The whole idea of disk encryption is that if you don't have the key, you can't just easily 'recover the data' from the disk or partition. If there were such a way to easily access the data, it would defeat the point of disk encryption, which is to prevent others who do not have the key from easily decrypting the data.

Unfortunately, that concept has a flaw: if you were the one that set up the key, and forgot the key, you no longer have a way to access the data.  That key is required to decrypt the data, and without it there is no way to decrypt the data to recover it.


Slow WiFi connection Ubuntu 18.04 with onboard Intel Wi-Fi 6 AX200

I see nothing alarming in your paste; that is, anything that would obviously hinder speeds.

Does your router have 802.11ax capabilities? If not, let's disable it in the iwlwifi driver as an experiment:

sudo -i
echo "options iwlwifi disable_11ax=Y"  >>  /etc/modprobe.d/iwlwifi.conf
exit

Next, please turn your attention to the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

Next, I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Reboot and let us hear the results.


How to dualboot windows, from Ubuntu 16.10

First, examine the partitions in gparted or other tool. If the Windows partition is gone, you will have to completely reinstall Windows.

My experience has been that it is much easier to install Linux after Windows has been installed, because doing the converse, installing Windows on a Linux distro will likely damage it.

Therefore, do the following:

Back up the HDD before doing anything else. If problems arise, you can revert to a known good installation.
Repartition as needed for Windows.
Install Windows and check that it works.
Create partitions for Linux following a full, step-by-step guide.
Install Linux to dual-boot with Windows. This should take only a few minutes, as opposed to hours needed for a Windows 10 installation, for example.
If your backup of Linux in step 1. is readable, you can restore some files from it. Be careful not to overwrite system files, unless you've got more more experience.


errors where encountered while processing slapd

The issue was that something was already using the address, as you can see from the log files here:

Jun 01 15:16:33 TBG-Magic slapd[7018]: daemon: bind(9) failed errno=98 (Address already in use)

I realized that earlier I had installed samba and smbldap-tools. Removing both of those with sudo apt-get remove --purge samba smbldap-tools results in the following:

serveradmin@TBG-Magic:~$ sudo service slapd status
● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
   Loaded: loaded (/etc/init.d/slapd; bad; vendor preset: enabled)
   Active: active (running) since Fri 2018-06-01 15:21:19 CDT; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8708 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS)
    Tasks: 3
   Memory: 2.5M
      CPU: 18ms
   CGroup: /system.slice/slapd.service
           └─8717 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d

Jun 01 15:21:17 TBG-Magic systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)...
Jun 01 15:21:17 TBG-Magic slapd[8708]:  * Starting OpenLDAP slapd
Jun 01 15:21:17 TBG-Magic slapd[8716]: @(#) $OpenLDAP: slapd  (Ubuntu) (May 30 2017 19:20:53) $
                                               buildd@lgw01-18:/build/openldap-JXEADB/openldap-2.4.42+dfsg/debian/build/servers/slapd
Jun 01 15:21:19 TBG-Magic slapd[8717]: slapd starting
Jun 01 15:21:19 TBG-Magic slapd[8708]:    ...done.
Jun 01 15:21:19 TBG-Magic systemd[1]: Started LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).


amd ryzen 7 4000u processors with integrated radeon graphics isn't supported in the 5.4 linux kernel. upgrading to 5.6 solves the issue. doesn't support auto rotate but keyboard shortcuts can be made to make it work, the brightness of the screen might be too bright after doing this. I suggest using brightness-controller to fix this issue. This solution works on ubuntu 20.04 and popOS 20.04.
check your kernel version with
uname -r

you'll need 5.6 or later
go to https://kernel.ubuntu.com/~kernel-ppa/mainline/
download the header, image, and modules .deb files you need (you probably don't need low latency unless you're doing audio recording)
I suggest copying them into their own folder and then running
sudo dpkg –i *.deb

this should solve the problem. If you also have monitor brightness problems you can install brightness-controller to solve that
sudo add-apt-repository ppa:apandada1/brightness-controller

sudo apt-get update

sudo apt-get install brightness-controller


How to remove GRUB after deleting Ubuntu and repair Windows MBR

You should get rid of it by installing MBR new on the booted Windows.
For example this could work: http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html
(untested cause I love ubuntu :-)


Is it true that there will not be 32-bit Ubuntu Server 12.10 ?

Yep it's true. You can read more here:
http://www.thevarguy.com/2012/08/23/ubuntu-server-plans-to-move-away-from-32-bit-computing/

But it's not a big deal, especially on a Server. It's not like they're completely dumping 32-bit. You can still download Ubuntu 12.04 for 32-bit severs and then you can just update most packages from there. Also, since 12.04 is an LTS you've got at least 3 years of Updates and 7 years of support for it. By then you'll probably have already upgraded your PC/Server to a 64-bit system.


No /var/log/syslog file after moving /var/log to tmpfs

Moving anything in /var to a tmpfs is a bad idea at this point, because neither Ubuntu nor any other major Linux distribution support it at the moment. It also has the disadvantage to occupy main memory and to lose all previous log files, which hampers problem diagnosis. SSD drives really aren't that delicate when it comes to write cycles and a few log files don't result in enough data and write operations to reduce the life span of an SSD significantly. Very few SSDs fail because of write cycle exhaustion.

I suspect that /var/log/syslog still exists, but only on the root file system, because rsyslog starts before /var/log is mounted. When you mount another file system at /var/log, its previous content is hidden underneath.

As a workaround you can bind your root file system somewhere else, which would allow you to inspect its content unshadowed by other mountpoints:

sudo mkdir -p /mnt/root
sudo mount --bind / /mnt/root

You should now see other content in /mnt/root/var/log.

P.S.: If you have an internal hard disk drive in your machine in addition to an SSD, you can mount /var from there. That's what I and many other people do and not mainly because of concerns about write cycles. The main reason was always, that a faulty program may accidentally write heaps of (log) data to /var and nobody would notice until the file system was full, at which point it would be difficult to alleviate the situation, if /var was part of /.


Can my chromebook connect to an external monitor with crouton?

I found a somewhat-satisfactory workaround.

If I log out of crouton and move my chrome window in chromeos to the external monitor, I can log back into crouton and get ubuntu on the external monitor. The problem now is that the laptop screen itself is blank. However, issuing

$ xrandr --output eDP1 --mode 1920x1080 --right-of HDMI2

gives me what I want. Of course, the problem here is that logging out and back into my session is annoying so I'd still be interested in a solution that addresses the original problem.


Can't boot from CD now that Ubuntu is installed?

The settings from BIOS sould not interact with your HDD content. In English it means that if you set the CD as 1st boot device, it should boot from there. In some cases if the CD drive is not functioning properly (dirty lens, scratched disk, etc), then the computer will try to boot from the second device, in your case the HDD.

The GRUB doesn't have an option for booting from CD, by the way.

What I would do is to disable the 2nd boot device in BIOS, leaving just the CD, perhaps after a few attempts will manage to boot.