How to Set Ubuntu 12.04 to it's factory settings like when u first installed it?

Well, If you totally lost root access Ubuntu is not going to allow you, from inside, to get root access. That would be a security issue.

Second, you shouldn't add a root user without a good reason. I recommend you to think why you need a root user.

The recommended way of dealing with that is by using the sudo system. The sudo system allows an user to promote an application or command-line (cdm as you call) program to act as root or other users without having to log in as this user. This adds an extra security layer in many senses.

In ubuntu the first user has the right to act as root. This means that when you use sudo you are going to execute the command given as root. If you are logged in as the first user created and you execute:

sudo dpkg-reconfigure -phigh -a

You are asked for YOUR user password. If you did not mess with that configuration you should be able to execute this command.

But this command will almost for sure not fix your problem. You will need to fix any problem that you made with the users manually by the command line.

It would be probably easier (if your installation is not really old or customized) to reinstall. But that's just a suggestion.

Please, tell us in the comments if you succeed.


Converting PDF doc to image as preserving the PDF quality at image?

1) You should be able to adjust the image quality by adding density option to the convert command as in this Nautilus Script which converts the selected PDF file to 300dpi JPG file(s)

convert -density 300 "$1" "${1%\.pdf}.jpg"

2) You can also open a PDF file with GIMP Image Editor (treating each page as a Layer or Image) which seems to use the PDF file settings as default as well as allowing the user to adjust the image quality setting at the beginning. Then you can Export it to any other image format.


Can I change permissions from the original user to one added later

Probably the most novice friendly solution for browsing files is to start nautilus with root privileges.

gksu nautilus

If you want to change permissions for files you should have a look at chmod. See also here http://www.perlfect.com/articles/chmod.shtml

It might be that you encrypted the home partition of the other user. If that is the case and you don't have the password for the other user, you are however out of luck.


You need to configure monit web interface in file monitrc.

sudo nano /etc/monit/monitrc

There is already configuration for emabling web interface but it is commented bydefault.
You can comment out following lines already present in monitrc file. You can change bydefault username and password for security reasons.

set httpd port 2812
     allow admin:monit      # require user 'admin' with password 'monit'

Reload monit configuration after editing configuration file.

sudo monit reload


you can go to additional drivers (you can find it in applications list) and search for new video driver. You can can choose between proprietary or open source driver. I hope it helps


Can ubuntu 64 bit run ubuntu 32 application?

Yes it can. The only thing you will start seeing is that any 32 Bit app will end with ":386". Here is an image to give you an idea:

As you can see, you ca try to install skype using the 32 bit version skype:i386). Same goes for pidgin and any other app that has a 32 bit version in a 64 bit system. Most apps do. If the 64 bit version is not available, they will most likely fallback to the 32 bit one.


How to copy a huge folder, skipping identical files

Sounds like rsync is tailor made for your use case.

Some options I find useful are

--progress which at least gives you a sense that something is happening
--dry-run which does the compares but doesn't actually copy anything.  I like to do this after setting the command up to make sure I didn't mess something up.


sudo apt upgrade command is not working for ubuntu 16.04 LTS

It looks like an error for some extra repository that is corrupted.  If you added a ppa, you might want to try purging that suru-icon-theme repository, and then the upgrade might work.

Edit...
You could try

  sudo apt update --fix-missing

  That will have the update ignore the missing package.

Or you could do the following to remove the ppa and the apps.  The easiest way to remove a ppa that works for me is to use the graphical interface.  If you are using the default Unity desktop environment on Ubuntu, then search for "Software Sources".  Once Software Sources opens, click on the tab that says "Other Software" and remove the ppa's that are giving you trouble, specifically the suru-icon-theme and whatever ppa (webupd8?) you used for the java installation.  There are other methods using terminal, but they require knowing the exact url address of the ppa.  Here is a more detailed article on all the different ways to purge a ppa https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/

Once you have purged the ppa, then you should purge the application, with terminal.  Then type in this command with the package name which you want to remove, at the end of the command and hit enter.  It will ask for your password, then it should work.

  sudo apt purge (app name goes here without the parenthesis)

for example

  sudo apt purge suru-icon-theme

that should work since the terminal was complaining about that package.  Webup8 usually works, I'm using it now for java 8, but since there is a problem with it not working, all you should need to do is...

  sudo add-apt-repository --remove ppa:webupd8team/java

  sudo apt update

  sudo apt purge oracle-java8*

And if you want to clean up leftover dependency packages then you can use

  sudo apt autoremove


dark theme colors all of a sudden stopped working in atom

Go to Preferences > Color Profile > Use sRGB color profile


Gtk-WARNINGs while installing and/or starting up VMware

The error is self explanatory that required module is not installed.

Try installing the module, that should fix the error.

sudo apt-get install libcanberra-gtk-module

Note: Since VMware provides you a .bundle file which is basically an executable, it will not check the repository and install the required packages. Whenever dealing with .run or .bundle executable its best to read the README for dependencies and install them.


How to reduce font size of the header/footer in Firefox print jobs?

It's not configurable right now, though it would be possible to improve Firefox to make it configurable.

It looks like this is where that font is configured, in the Mozilla source code.  As you can see, it's simply set to be Serif 10pt right now.


What Samba version your are using? Can you show the content of your samba4 configuration file (smb.conf)? To enable windows permission in samba4 you need install acl package and modify your /etc/fstab; you can follow the instructions in the wiki:
https://wiki.samba.org/index.php/Samba_4/OS_Requirements

My recommendation is build samba4 by yourself (clone de git repository or download the latest tarball from the official samba site). Also you can use the SerNet repository or if you plan to use Debian, you can use the debian backports repository.

I very important if you can show the result of the samba-tool testparm command.

Check the above and tell me.


Please take a look at these links:

GitHub issue
Stack Overflow question - No Module Named Leap

Solution posted on GitHub issue:

  You need to download the SDK from this link. In this you can find
  a folder named LeapSDK. Copy it to your $HOME (/home/user where
  user is your username) and do this:

export PYTHONPATH=$PYTHONPATH:$HOME/LeapSDK/lib:$HOME/LeapSDK/lib/x64


Laptop screen dimming after (? random) period 14.04

In Linux, everything is a file, so backlight configurations are saved as a file. You can create a custom settings file for backlight.
This command helps to know what video card is used for the backlight/brightness:

ls /sys/class/backlight/

In my case output is intel_backlight, it might differ for you depending on drivers.
create a configuration file, if it does not exist:

sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf

Add the following lines to this file:

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

Save, exit, log out and log in again and those settings should work and laptop screen should not dim. In your case, you need to restart the system


Change MBR to GPT on external hard drive with data

Note: Like all operations involving partition manipulation, the below procedure carries some risk, and you are strongly advised to backup any critical data beforehand.

If this is a data drive only, I believe the start/end margins are sufficient, and a simple sudo gdisk /dev/sdX (follow steps) should do the job, converting the MBR to a GPT.


Screen Tearing on Kubuntu 16.04 with Intel Drivers?

I also experienced video tearing with Kubuntu 16.04 on my Intel i7-2600K Sandybridge processor with integrated Intel HD 3000 Graphics.

SOLUTION A:  Best solution

Start K -> Settings -> System Settings
Under Hardware section double-click Display and Monitor
Choose Compositor on LHS and ensure:

Enable compositor on startup:  Checked   # was enabled by default
Tearing prevention ("vsync"):  Full screen repaints   # was Automatic

Note:  Ignore message "Full screen repaints" can cause performance problems.

Do not use Re-use screen content on Intel Graphics!
Click Apply

This completely fixed the problem for me.  There was no video tearing in full screen or in a window, and there was no artifacting.

See Bug 321589 - Automatic VSync strategy causes tearing

SOLUTION B:

Edit /etc/environment and add the following lines:

__GL_YIELD="USLEEP"
KWIN_USE_BUFFER_AGE=0

Save the file and reboot.

This fixed the problem for me with full screen videos.  There is; however, occasional tearing with videos in a window.  There was no artifacting with these settings.

BACKGROUND:

I discovered the three variables to try, which were listed as working for NVidia graphics, at the following link:
Screen Tearing After Kubuntu Upgrade 15.10 -> 16.04

__GL_YIELD="USLEEP"
KWIN_TRIPLE_BUFFER=0
KWIN_USE_BUFFER_AGE=0

The above three lines did prevent video tearing, but I experienced some artifacting with some non-video playing activities, such as editing a file with emacs.  Hence I experimented some more and found a better compromise.

For a description of these KDE variables see KWin/Environment Variables.

Later on I discovered the Full screen repaints setting which completely resolved all issues for me.


Allow Maximum Minimize modal window in 18.04

Seems I won't be able to Maximize/Minimize the modal windows, since they are "hard-coded" that way.  Tk to DK Bose for sending me on the trail.

But that is when I am in the windows manager Gnome 3. So I found if I switch to Gnome Flashback (Compiz), or Mate, or Unity; Then I get buttons back that allow me to Max or Min.

And now I use Mate with Pantheon Panel,
and Compiz (Advanced CPU accelerated desktop effects),
and Open CCSM, Go to bottom to Window Management,
Make sure check is on Maximumize, Move Window, Place Window, and Resize Window.
Now all windows are able to be Max or Min or any size.


There is a list here of sellers that supply Ubuntu hardware. As for top seller, you could compare share prices or something, there is an article here that may be of interest.

There is also a list of Certified Hardware.


Dell XPS 9550 - low resolution on external 4k monitor

The issue seems to be with the laptop's HDMI port, which does not support 4K@60Hz.

However, you can get 4K@60Hz over the USB Type-C port if you use an adapter, such as the official Dell one.

I'm not too sure if these work with Linux, however.

Here's some threads online where people discuss the issue:

http://forum.notebookreview.com/threads/xps-9550-trouble-with-external-monitor-4k-60hz.801646/
http://forum.notebookreview.com/threads/xps-15-9550-hdmi-2-0.786509/


Ubuntu Touch - cannot install any apps or updates

I have a temporary soultiuon until Canonical does something.

PROBLEM: apps tries to download click packages in path /Downloads/ (which does not exist and it would be in a non writable partition) instead of /home/phablet/Downloads/.

SOLUTION: lets make a symbolic link pointing to the right directory in that path:

1) make your filesystem writable until next reboot:

sudo mount -o rw,remount /

2) create the symlink:

sudo ln -s /home/phablet/Downloads/ /Downloads

3) reboot your phone/tablet because you don't want your system partition to be writable anymore.

Now you must be able to do your updates and install any app.


Cannot connect to 5GHz band with b43 driver

In kernel 3.17 and above there has been some success in getting 5GHZ to work with the b43 driver, so here are the directions for installing the 3.18 kernel, I can not promise that it might not cause some other kind of issues.

cd /tmp/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/linux-headers-3.18.0-031800-generic_3.18.0-031800.201412071935_amd64.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/linux-headers-3.18.0-031800_3.18.0-031800.201412071935_all.deb

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18-vivid/linux-image-3.18.0-031800-generic_3.18.0-031800.201412071935_amd64.deb

sudo dpkg -i linux-headers-3.18.0-*.deb linux-image-3.18.0-*.deb

Reboot

Set the channel manually on the router and in network manager that you want to connect to, make sure it is within the range of your devices channels by looking at the occupancy section in the file you posted. Changing the channel from auto to fixed is your best option.

Also linux connects best to wpa2 AES CCMP Only not mixed mode or TKIP.

Do:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Reboot


Firefox window is distorted/broken after changing from fullscreen

Removing Firefox, deleting the ~/.mozilla directory and reinstalling firefox did the trick, now it works again :)


Backup stops because of claim 'Computer name changed', which is it not true

Using Ubuntu 19.10, deja-dup 40.1, duplicity 0.8.04.

  The questions arise: how comes that deja-dup/duplicity is making up this name?

According to bug reports (ranging as far back as 2010), it's a bug in duplicity affecting deja-dup. Duplicity prefers the fully-qualified domain name (FQDN) for the backup's computer name.

The way the FQDN lookup is performed is affected by both your computer's network  configuration, and the way the network the computer is connected to behaves.
In particular, external network changes can therefore break backups.1 This includes moving the computer from one network to another.

See

https://bugs.launchpad.net/deja-dup/+bug/1268182
https://bugs.launchpad.net/duplicity/+bug/667885

  how to fix this?

The bug reports hints at editing /etc/hosts in various ways. Here's what I changed, with mycomputer being my chosen name. Note that order seems to matter.

/etc/hosts (ipv6 addresses omitted)

Original:

127.0.0.1   localhost
127.0.1.1   mycomputer

Modified:

127.0.0.1   mycomputer localhost
127.0.1.1   mycomputer

As soon as I saved the file, an automatic backup started. It worked as expected.2,3

See

https://bugs.launchpad.net/deja-dup/+bug/1086068
Deja Dup resolves host name incorrectly, adds ISP hostname
What is the use of /etc/hosts?

1 My backups broke around the time when my ISP upgraded their infrastructure in my area to ipv6. Started seeing "hostnamed changed" with hostnames such as dynamic-xxxx-yyyy-zzzz.area-123.example.com.

2 Tried to verify by reverting the file and rebooting, but backup still works so unsure if it actually fixes the problem, or just triggers deja-dup/duplicity "the right way". Might be related to DHCP timeouts (7 days) in the ISP-owned router, or some other setting I changed. Am posting the answer anyways, but might have to revise if it stops working in a week.3

3 It has now been more than one week since writing this answer.2 Both starting a backup and verifying backups succeeded. Also rebooted and started another backup, which also succeeded. It seems the suggested fix works so far, at least for myself on my machine and in my network environment.


Selecting classic mode on login still shows Launcher

Log into Ubuntu Classic,
Open the CompizConfig Settings Manager (ccsm), and
untick the Ubuntu Unity Plugin in the Desktop section.


Why is my GDM at a different TTY than my desktop environment?

A similar issue has been raised in another post.
Answering your questions:

Is this how things are supposed to work? I thought the desktop was supposed to use the same TTY (or whatever you call it) as the display manager.

Well, it was. The GNOME developer responsible for gdm explained here how it worked previously and what they did change:

Previously, we launched one X server as root, and then when you logged in, we "morphed" it into the session X server. If you went to fast user switching, we then launched a second X server on-demand.
For security reasons, and Wayland porting reasons, we now launch the X server and Wayland server within the user's session, instead of starting one as root.
The way that we do this is that we launch two X servers, one for the gdm greeter session, and for the session user.
It would be entirely possible to tear-down the greeter after we've switched to the user session, it just requires a bit more code, but unfortunately it wouldn't be possible to put both the greeter session and the user session on VT1, since we'd have to launch the user session first, and then tear down the greeter session, and we can't be in that intermediate state while there are two X servers on the same VT at the same time.
I just forgot about the resource issues around keeping around two gnome-shell instances. I'll have a chat with Ray to see if we want to tear down the greeter session and then launch it on demand for user switching / logout to save on resources.

Am I using more graphical resources by having things setup this way?

Yes.

Is there a way to have GDM3 pass off the display to Gnome Desktop after I login?

Probably not until a fix is delivered or you revert back to gdm 3.14, but this is probably not the best way out.

Is there any advantage do doing #3?

There have been complaints about memory leaks in gdm3 and several performance issues.
The best thing you could do is to switch your desktop manager from gdm3 to lightdm until this is fixed. The good thing is you are using Ubuntu GNOME, and lightdm is cool and looks just like unity login screen.

Installl lightdm:
 sudo apt install lightdm

Switch to it:
 sudo dpkg-reconfigure lightdm

Reboot and you're good to go with your tty and normal resource consumption and still use GNOME. Or switch to other desktop environment like KDE, XFCE, Mate, etc.


How can I open a Microsoft Word document securely?

The only safe way to handle a document you suspect to be infected with malware is to delete it.


How can you add something in the right click menu in nautilus so that it copies to a certain directory?

As of 16.04 LTS , the Nautilus version 3.14.3 has Copy To and Move To options


Disabling All Keyboard Shortcuts Ubuntu 12.04 LTS

I'm working on the same topic, and here's what I have done.

Prevent Ctrl+C from interrupting boot scripts: edit /etc/profile and add stty intr undef on the top;
Disable all shortcuts based on your Desktop Manager;
Disable kernel shortcuts:

echo "number" >/proc/sys/kernel/sysrq

0 - disable sysrq completely;

1 - enable all functions of sysrq;


You can type exit. You can type ctrl-d. Or (if you're on a virtual terminal), you use ctrl-alt-F8.


Ubuntu terminal grep escape all the special characters in the search term literal

The -F option makes grep to interpret the pattern as a fixed string instead of a regex, and -r tells it to search recursively. But you still have to protect the $ from the shell:

grep -F -r "\$this->helper('catalog/image')->init(\$product, 'image')->resize(200)->keepFrame(false);" /var/www/html/


Can I run my script using inputbox to appear my menu-box before login?

You don't have any chance to run such a script during booting or before login screen. The reason: you must to be authorized/authentified to run commands like vi. If you wish, you can run that script on/at (immediately after) login. See How do I start applications automatically on login? in this sense.

Files in /etc/init are configuration files telling Upstart how and when to start, stop, reload the configuration, or query the status of a service.


You dont't have to re-formatting your hard-drive. If you have unpacking the img file of Windows 7 on a USB drive you can decide to delete the whole hard-drive by installing windows 7.

Make sure you have change the boot order and your bios have aktivated removable divise.
The other methode is to aktivate the boot menu while the computer is booting.


How to create live usb with persistent partition for Ubuntu 16.04?

You can try mkusb. It is made to work with all current Ubuntu versions and flavours. It will create a casper-rw partition automatically.

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

mkusb/persistent


Install the 2nd driver, as I believe the post release updates aren't supported anymore. If that doesn't work, manually install them:
sudo apt-get remove --purge fglrx fglrx-amdcccle
sudo apt-get remove --purge fglrx-updates fglrx-amdcccle-upadtes
Restart. Then:
sudo apt-get update
sudo apt-get install fglrx* fglrx-amdcccle fglrx-dev
sudo aticonfig --initial
Restart, and the drivers should be installed.
Double check:
fglrxinfo
...And if it outputs something like:
display: :0  screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6300M Series
OpenGL version string: 4.2.11733 Compatibility Profile Context


Set .JAR default action to run with Java?

Right click on any .jar files and select properties. Click on the 'Open With' tab (usually the 4th tab). select Sun 'Java 6 Runtime'(if you are using sun Java otherwise select appropriate Java from the list). And click close to save the settings.


Installation of Ubuntu 19.10 from USB on Dell Vostro 1500 Laptop 2Ghz Intel 2Gb Ram (2008 laptop)

OK, I am not sure what happened, but after letting it sit for about 45 minutes on the hanged up purple screen, then it started to install, wow, really strange that it would take so long to get to the first install pages, so now I am going through with the install of the minimal version of Ubuntu, not the full version.


Bridge connection: Ubuntu keeps modifying routing table

Ok, in case anyone else has the same problem, here is how I solved it: I simply disabled the network manager by typing following command:

$ stop network-manager

Note that the network manager clears the routing table and brings down all connections before it exits, so you have to bring back up all interfaces that you need.

I had to additionally type following commands for my bridge to work again:

$ ifconfig usb0 up
$ ifconfig eth0 up

Further I needed to edit /etc/resolv.conf to get address resolution back to work. I added following lines, which sets the Google DNS servers as nameservers:

nameserver 8.8.8.8
nameserver 8.8.4.4

Now everything works as expected, both computers have internet connection.


Well I have found the solution.
I had autokey installed and it was conflicting with the system. I was sure that I had disable it before to test this but it looks like it was not disabled at all.

swift, your response has helped me understand the problem, so i will give the bounty to you. Thanks.


A repository of extensions for GIMP, the FREE and Open Source image manipulation program.

This is the statement from the web site:
"If you'd like to upload plug-ins, please create an account below. You do not need one for download. Enjoy :-)"


Unable to add key for signal-desktop on Ubuntu 20.10

I went down a very long rabbit hole on this same issue, and found that I needed to eliminate a bad key file:
sudo rm /etc/apt/trusted.gpg.d/home:manuelschneid3r.asc
.. then run the steps again; worked like a champ.


Unable to install gnome extensions due to 'undefined' error in extensions.gnome.org on firefox

I don’t know what did you do, but I backup up all my extensions (copied the ~/.local/share/gnome-shell/extensions folder), reinstall OS (Fedora 30), removed ~/.local/share/gnome-shell/extensions folder, created a symlink to the backed up folder (link being in ~/.local/share/gnome-shell/extensions. Then I’ve got the error.

I believe that the Firefox extension checks if ~/.local/share/gnome-shell/extesions is a folder, but a symlink is not a folder (not even when it links to a folder), therefore a variable in the Firefox extension is left undefined.

Solution

The folder ~/.local/share/gnome-shell/extensions must be a folder, not a symlink. In my case, I symlink ~/.local/share/gnome-shell and it works again. If you don’t want/need to use a symlink, use regular folders and the issue disappears.


g++ (4.6.1) does not recognize -std=c++11

Your program might be able to compile when compiled with the flag set to -std=c++0x, which was the other name for C++11 before the standard was released.


How can I configure multiple deployment environments for juju?

You can have as many environments as you want in .juju/environments.yaml , and then set one as the default. Here is my sanitised environments.yaml with ec2, a private openstack cloud, and my local machine:

default: sample
environments:
  sample:
    type: ec2
    control-bucket: juju-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    admin-secret: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    secret-key: ZZZZZZZZZZZZZZZZZZZZZZZZZZ/2222222222
    access-key: 0123456789ABCDEF
    default-series: precise
  openstack:
    type: ec2
    default-instance-type: m1.small
    control-bucket: juju-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    admin-secret: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    ec2-uri: http://my.private.cloud:8773/services/Cloud
    s3-uri: http://my.private.s3:3333
    default-image-id: ami-000000ab
    access-key: random-uuid-follows-1fc1f05e-1c37-4594-8e5e:me_project
    secret-key: 4a75192b-2478-4acf-a6e8-aa60bbaf1e28
    default-series: precise
  local:
    type: local
    default-series: precise
    data-dir: /home/clint/.juju/data
    admin-secret: 3d909951d4984b92963f1186c4b6cb16
    control-bucket: foo
  customer-one:
    type: ec2
    control-bucket: juju-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    admin-secret: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    secret-key: ZZZZZZZZZZZZZZZZZZZZZZZZZZ/2222222222
    access-key: 0123456789ABCDEF
    default-series: precise
  customer-two:
    type: ec2
    control-bucket: juju-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    admin-secret: YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    secret-key: ZZZZZZZZZZZZZZZZZZZZZZZZZZ/2222222222
    access-key: 0123456789ABCDEF
    default-series: precise

I can select the environment by appending the '--environment' or '-e' argument to any juju command, so

juju status -e customer-one

Returns different things than just

juju status

Also each environment has different configuration options depending on the provider, see the following sections of the juju documentation:

https://juju.ubuntu.com/docs/provider-configuration-ec2.html
https://juju.ubuntu.com/docs/provider-configuration-local.html
https://juju.ubuntu.com/docs/provider-configuration-openstack.html


In the OpenStore there are two unofficial apps for proton mail.

Proton-mail from Jose M Reyes
ProtonMail from Jaume Angrill

I don't know if it is safe to use them with your ProtonMail. I asked ProtonMail so if I get an answer I'll post it here.


Bluetooth not working on Ubuntu 20 Rapsberry PI

I found an answer for this on the raspberry pi forum - very simple:
Install the pi-bluetooth package:

sudo apt install pi-bluetooth
sudo reboot


How can I combine file listings using sed?

You're barking at the moon. Just use the append redirector >> instead of the write redirector >:

touch AllDirectoriesFileInfo.txt
ls -r /home/tony/Desktop/jpgfolder >> AllDirectoriesFileInfo.txt
ls -r /home/tony/Desktop/giffolder >> AllDirectoriesFileInfo.txt
ls -r /home/tony/Desktop/docxfolder >> AllDirectoriesFileInfo.txt
ls -r /home/tony/Desktop/dregsfolder >> AllDirectoriesFileInfo.txt

Or forget about appending, and just give ls multiple arguments:

ls -r /home/tony/Desktop/jpgfolder /home/tony/Desktop/giffolder /home/tony/Desktop/docxfolder /home/tony/Desktop/dregsfolder >> AllDirectoriesFileInfo.txt

Simplified:

ls -r ~tony/Desktop/{jpgfolder,giffolder,docxfolder,dregsfolder} >> AllDirectoriesFileInfo.txt

Even shorter, assuming tony is your username:

ls -r ~/Desktop/{jpg,gif,docx,dregs}folder >> AllDirectoriesFileInfo.txt

Although, if you're going to be doing any processing on the data in the file, you'll want to use find instead of ls, since in general, ls gives output for humans to read, and find gives output for computers to read. Specifically in this case, find lists the file and its path together.

Here's a quick example:

$ mkdir dir1 dir2
$ touch {dir1,dir2}/file1
$ ls -r dir1 dir2 > ls_r_out.txt

Now say I want to search for "file1":

$ grep 'file1$' ls_r_out.txt
file1
file1

OK, that's not very helpful, cause it doesn't tell me where the files are. I'll try the same process with find. Now, find doesn't support sorting, so I'll have to pipe through sort:

$ find dir1 dir2 | sort -r > find_reverse_out.txt
$ grep 'file1$' find_reverse_out.txt
dir2/file1
dir1/file1

Voila. Note that this gets more complicated if the filenames contain any special characters like newlines.


PDF files made using inkscape does not show everything when opened in windows

Rest assured that you absolutely can use Inkscape in a professional graphics workflow - now to fix your issues...

There are a load of potential explanations for your observations. Can you upload the .svg file so we can take a look?

Martin is right to question what pdf viewer you're using. I've had files rendered with glitches by Evince but the files have viewed and printed fine elsewhere.

A top reason would be the stroke style for the affected lines - are they dashed or using end markers? I've had issues with these not outputting reliably in the past.

I'd also try opening the .svg file in Scribus and outputting to pdf from there.  You've got more output settings, can handle bleed and add printers' marks etc.  Scribus opens svg files natively or you can 'Import Vector' into an existing Scribus document.

This is the version of Scribus I use to produce my print-ready artwork:

or command line:

sudo apt-get install scribus-ng


Every time I open the Software Center it hangs then closes it self. I got this error log from the terminal

Try with re-installing the software center.

Open your terminal and type as

sudo apt-get install --reinstall software-center

Then try again.


Assuming you are using Nautilus (the standard file manager in Ubuntu), read the help files on Nautilus views. To change the default option, you can do the following:

  In any file manager window, click Edit ▸ Preferences and select the
  Views tab.

In that tab you can unselect show hidden and backup files. By default,

  The file manager does not display hidden files or folders.

You can also toggle showing/hiding hidden files by using CTRL+h.


Xubuntu: Choosing "Shut down" via GUI logs me out instead

I had the same problem, it disappeared after switching off Secure Boot.


the system spontaneously reboots once every day

This seems to be a kernel bug. https://bugzilla.kernel.org/show_bug.cgi?id=109691#c2 suggests to turn off AER by adding pci=noaer to the kernel command line in grub.
You could for example add it to /etc/default/grub around line 12:

GRUB_CMDLINE_LINUX="pci=noaer"

Does this solve these issues?


I think you're not receiving any updates because you're already on the latest version of kdenlive that was packaged for Xenial.

I looked at the kdenlive-stable repository and it looks like they're only packaging updates for Cosmic (now EOL), Disco, and Eoan.

However, I also saw on the developers' website that they publish a daily AppImage.

So, if you want the latest and greatest, you can upgrade to Disco or Eoan, or alternatively, install kdenlive via their AppImage.


You will need to install all of the following packages and dependencies:

eclipse
eclipse-jdt
eclipse-pde
eclipse-platform
eclipse-rcp

Once that was done I was able to install Android SDK without any issues through Eclipse.  I am running on openjdk.


OwnCloud Missing after installation on ubuntu server

I guess you are accessing the wrong path or it is installed in the wrong directory. Please look into the /var/www/html folder.
By the way. Please use Nextcloud instead of Owncloud. Nextcloud is the successor project which is more secure and fully open source and has more features. A working tutorial how to install it can be found here. https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-nextcloud-on-ubuntu-16-04


install ubuntu on dell xps 8500 with preinstalled windows 8

This is a bit of a shot in the dark, but my suspicion is that you're running into problems because of a Windows feature called "fast boot" or "hybrid boot." This system basically involves a suspend-to-disk rather than a shutdown. This is known to cause problems on dual-boot systems, and IIRC, it can even corrupt the EFI System Partition (ESP), which can lead to the symptoms you report. A quick Google turned up some sites with instructions on shutting off this feature:

http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html

http://nvidia.custhelp.com/app/answers/detail/a_id/3152/~/disable-windows-8-fast-startup-%28hibernate-file%29

Note that I don't have a Windows 8 installation, so I can't offer any firsthand advice about this; I'm just passing on what I've read elsewhere.

Edit: If Windows is "taking over" the boot process, you can fix the problem by using the Windows bcdedit command:

Boot Windows.
Launch a Command Shell prompt with Administrator privileges. (You do this by right-clicking the shell icon and selecting the option to "Run as Administrator.")
Type bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi to register GRUB as the desired default boot program. (Note, however, that if you haven't disabled Secure Boot, you may need to specify shim.efi instead of grubx64.efi. If you're using something other than GRUB, or if it's not in the specified location, you'll need to adjust the command appropriately.) Note that {bootmgr} should be typed exactly that way, including the curly braces; that's not an attempt to denote a variable.

Thereafter, Windows should settle down and stop disabling GRUB as the default boot program.


How to install fspy(camera matching software) on Ubuntu 18.04

Here are the steps:

Download the fspy from github via this link
Make the program executable by running this command in your terminal (you have to open your terminal in the folder containing the the downloaded file): chmod +x ./*.AppImage
Or you can do it as showed in the GIF:
Right click on the downloaded file, go to Properties>Permissions, then check Allow executing file as program.

Now fspy is ready to be used, just double click on it and it will work.


Cannot move file to trash warning when trying to delete a file in Nautilus

(About removable media, not the case from the user since it was a bug solved with an update)

This behaviour happens because when the drive is mounted you are not considered the owner so a trash bin cannot be created. No uid or gid was assigned and since a trash bin folder cannot be created in the drive you are only offered the choice to delete the files automatically.

In that case you have 2 options: cut the files in to your Linux file system and delete them there (which defeats the purpose of press delete and the files are deleted) or make sure you are assigned the correct permissions when mounting the drive.

Create a new rule for your auto-mounted drives with these lines, use your favorite text editor for that

  gksudo gedit /etc/udev/rules.d/10-my-media-automount.rules

# vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=udevrules:
#
# /etc/udev/rules.d/10-my-media-automount.rules

# start at sdb to ignore the system hard drive
KERNEL!="sd[b-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end"

# import some useful filesystem info as variables
IMPORT{program}="/sbin/blkid -o udev -p %N"

# get the label if present, otherwise assign one based on device/partition
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# create the dir in /media and symlink it to /mnt
ACTION=="add", RUN+="/bin/mkdir -p '/media/%E{dir_name}'"

# global mount options
ACTION=="add", ENV{mount_options}="relatime"
# filesystem-specific mount options (777/666 dir/file perms for ntfs/vfat)
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},gid=46,dmask=000,fmask=111,utf8"

# automount ntfs filesystems using ntfs-3g driver
ACTION=="add", ENV{ID_FS_TYPE}=="ntfs", RUN+="/bin/mount -t ntfs-3g -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"
# automount all other filesystems
ACTION=="add", ENV{ID_FS_TYPE}!="ntfs", RUN+="/bin/mount -t auto -o %E{mount_options} /dev/%k '/media/%E{dir_name}'"

# clean up after device removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l '/media/%E{dir_name}'", RUN+="/bin/rmdir '/media/%E{dir_name}'"

# exit
LABEL="my_media_automount_end"

Reboot your computer and your ntfs drives will be mounted using this custom rule, to change the permissions for the mounted drive have a look at the line $env{mount_options},gid=46,dmask=000,fmask=111,utf8", the option gid=46 should mount the ntfs drive with group privileges (46(plugdev) is the group that allows a user to mount a drive in Ubuntu), fmask and dmask settings to write, create, delete files/folders on the  drive.

Change it according to needs. You will need to sort out other file systems by yourself according to to each type but this should get your started.

(Source for the udev rule)


Number of files shown via Properties and when copying are different?

When you open the folder properties, the displayed number will not contain hidden files.

In Unix/Linux dotfiles refers to files/directories with a dot (.) prepended to their name (i.e. .bashrc). The leading dot is used as an indicator to not list these files normally but only when they are specifically requested like pressing Ctrl+H in Nautilus or typing ls -a on a terminal. This is because, generally, dotfiles are generally used to store configurations for different applications, for example Mozilla creates a .mozilla folder on your home directory which contains their configuration files as well as browser cache.

When you copy a folder you'll copy it with dotfiles included.

It's recommended to backup dotfiles, as they stores some important data (as your Firefox bookmarks, your Thunderbird downloaded mail, the emblems of foldes and files... and so on.


Cron job to set screen brightness not working in ubuntu 14.04

I was also trying something similar and came across this thread. And I solved it. The problem is that you didn't set the DISPLAY variable first to set the brightness value.

Try:

26 21 * * * DISPLAY=:0 /usr/bin/xbacklight -set 80

You may check the DISPLAY variable on the terminal using:

echo $DISPLAY

Happy Croning!

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


I've messed up my internet. How do I reset all network settings to default on ubuntu 17.10?

Network Manager stores its system-wide configuration in /etc/NetworkManager. You can remove it (or, better yet, back it up) and then restore its default.
Reboot Ubuntu or restart Network Manager (systemctl network-manager restart).


Failed to open a session for the virtual machine on genymotion

It is a problem of virtualization. You can solve this by enabling the virtualization option in your BIOS menu.
Notice: Your processor should support virtualization.

Restart your computer.
Open the BIOS menu (normally by pressing F2 or F12 -depending on your PC- before your PC boots on Ubuntu).
Go to security section, you will find the Virtualization
option.
Enable the virtualization option.
Save and exit.

After restarting your PC, the virtualization should be enabled.


Re-install
Is this a brand new or recent install? The simplest thing would be to backup your user data from terminal and install ubuntu from scratch.
I think the installer would also detect that there is an older version and offer to keep user data (only the home directories) when doing a reinstall from a disk, an image(for virtual machines) or USB.
This would be the simplest solution.
Download libstdC++.so.6 Debian Package
As explained here, you could possibly download the Debian package and do a manual install:
wget http://launchpadlibrarian.net/270880798/libstdc++6_5.4.0-6ubuntu1~16.04.1_i386.deb
sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.1_i386.deb

Then reboot. The apt command should be working and you could reinstall ubuntu-desktop package.
Copy the library from another Ubuntu install
This is what I would have done as I always have multiple systems with Ubuntu runing in my house. I will let you read on the details here.
Hope you find a solution!


How do I get my Sony Cybershot W510 to connect?

The Sony Cybershot looks like it operates in MTP mode by default. To fix this easily, try changing the settings in your camera to operate as a "Mass Storage Device" instead.

As per this article, choose Menu, Settings, Main Settings, USB Connect, then choose Mass Storage.

Alternatively you can try to get MTP working in Ubuntu, which is a little trickier.

This article worked for me and my Nexus 7 which only really works with MTP. Basically, do

sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
sudo apt-get upgrade

Then try plugging in your Cybershot (make sure you change the camera settings back to MTP if you tried my first suggestion).


Is there a GUI application for adjusting monitor color?

Your card is supported by nvidia legacy drivers and the gui for color works fine there.


Can I manually load drivers for a particular device? I have a "Next Engine" 3d model scanner.

If the manufacturer doesn't provide Linux drivers, and no alternative drivers exist, then you cannot use the device on Ubuntu. Wine cannot install drivers, because they are too system-level, rather than user-level objects.

If this is a USB device, you can use the device in VirtualBox with USB passthrough. You will need to download the package from https://www.virtualbox.org/wiki/Linux_Downloads, and not the version of VirtualBox in the Software Center, since OSE does not include USB passthrough.

More inforation on USB passthrough can be found in the VirtualBox manual: http://www.virtualbox.org/manual/ch03.html#idp13237504


mount multiple hard drives to one folder as one drive

@Ståle Gulbrandsen you can use raid concept. Raid  is a data storage virtualization technology that combines multiple disk drive components into a logical unit for the purposes of data redundancy or performance improvement.I Hope that raid will do your needful


Possible is more or less everything - but is it recommended to even give it a try in this very special case ? No, not - absolutely not ! You most probably will break the whole operating system and not only because of missing dependencies. Every Unity version is deeply integrated into the matching Ubuntu operating system and the repositories are tied to the edition which is installed and in use.

Just as an example : Unity 7.2 is a part of Ubuntu 14.04 (Ubuntu 15.10 is not supported anymore), these packages are not included in the Ubuntu 16.04 repositories ... which means that everything would have to be done manually. What could be possible though is downgrading packages within the Ubuntu Unity version 7.4 : Unity packages from xenial-updates to Unity packages from xenial

You are using Ubuntu 16.04 LTS and it is highly recommended to stick with the originally included Ubuntu Unity desktop version which comes  pre-installed. But just in case you want to downgrade Unity nevertheless, here's a list of dependent packages which would have to be downgraded, it's up to you to decide if it's worth the effort - especially when you probably could end up in a mess.


Yubikey Two-factor Authentication Full-disk Encryption via LUKS

A group called PrivacyIdea have created a little package to add a HMAC-SHA1 challenge-response routine to the initramfs, which means that Ubuntu can query you for a challenge to pass to the Yubikey and then use the response to unlock the LUKS volume. For the most part, I'm following these instructions, with some added comments. The process is actually very easy to do.

I've tested this on Ubuntu 14.04, 16.04 and 18.04; using a Yubikey Neo. It should work with any recent Yubikey, with firmware 2.0+, and with any version of Ubuntu after 14.04. I've also tested Ubuntu 19.04 with a Yubikey 5C, some additional work was needed but it can be made to work. There could also be other hardware HMAC-SHA1 challenge-response devices that this works with, but I'm not aware of any that exist. As always, make sure you have a backup of your data before proceeding - there shouldn't be any issues here, but there's always the chance this will destroy everything on your computer. These instructions come with no warranty.

Update: Since Ubuntu 16.04, the needed packages are in the main repositories and no PPA is needed.

Update: Since Ubuntu 19.04 the software in the main repository seems to be broken after an update to cryptsetup. See my other answer for details on how to work around the problem..

Add a comment if you have questions!

0. Prerequisites

For this to work, you will already have to have LUKS full-disk encryption set up and working. You can do this by selecting the appropriate option when installing Ubuntu. For maximum security, you should have a chosen very strong passphrase during the install. If your passphrase isn't up to scratch, you should change it to a better one before continuing (more detailed instructions here).

The method below will not replace any existing passphrases, but will instead add another passphrase to one of the LUKS slots. Hence if you lose your Yubikey you can still unlock your computer using any existing passphrase - I suggest you make a note of it and hide it away somewhere safe - you will also need it a few times during this procedure. Your new Yubikey challenge passphrase should still be reasonably strong, but doesn't have to be as long as the passphrase you used when installing Ubuntu.

1. Add PrivacyIdea PPA and install package

On Ubuntu 14.04

Open a terminal, and run the following command:

sudo add-apt-repository ppa:privacyidea/privacyidea

Press Enter when prompted, then run:

sudo apt-get update

Then install the package with:

sudo apt-get install yubikey-luks

On Ubuntu 16.04, 18.04

There is no need for a PPA, you can install the package with:

sudo apt-get install yubikey-luks

On Ubuntu 19.04

See this answer for how to build the yubikey-luks package from source for Ubuntu 19.04.

2. Install Yubikey software

If you are using the HMAC-SHA1 functionality of the Yubikey for something else, you can skip this section. It will erase any configuration in the second Yubikey slot, so don't perform this step if you use HMAC-SHA1 for other purposes with this Yubikey.

You'll need to set up your Yubikey to work with Ubuntu by installing the required software, either from the Yubico PPA on Ubuntu 14.04 or from the main Ubuntu repository on 16.04 and later.

On Ubuntu 14.04

If you have not done so before, add the PPA and install the package with:

sudo add-apt-repository ppa:yubico/stable
sudo apt-get update
sudo apt-get install yubikey-personalization

On Ubuntu 16.04, 18.04 (and later)

sudo apt-get install yubikey-personalization

3. Initialise Yubikey Slot for HMAC-SHA1

Now we need to program the second slot of the Yubikey with a HMAC-SHA1 configuration. This will erase your previous slot configuration, which is empty by default. Again, if you are using HMAC-SHA1 for something else do not issue this command - it will erase your configuration. You can safely use the same secret key inside the Yubikey for this LUKS setup as for your other uses.  (For example, with another computer using LUKS+Yubikey).

ykpersonalize -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible

The terminal will display some information about the changes made. You don't need to note this down, but it will show the secret key used by the Yubikey in the HMAC-SHA1 algorithm to calculate the response when given a challenge.

4. Enroll Yubikey to LUKS Slot

Now we will edit the LUKS configuration to append the response from the Yubikey as one of the decryption keys.

The partition that we need to specify depends on whether you are using BIOS or UEFI to boot your machine. For BIOS, the encrypted volume is at /dev/sda5 by default, for UEFI it is at /dev/sda3. You can check this by opening the disks utility and confirming the path of the partition - it should either be sda3 or sda5. NOTE: On newer computers with NVMe disks, the path will be something like /dev/nvme0n1p3.

Run this in a terminal:

sudo yubikey-luks-enroll -d /dev/sda3 -s 7

This will write to slot 7 of the LUKS configuration, follow the prompts in the installer (they vary slightly depending on which version you're running).

Then you're all done! You should be able to reboot your computer, and if your Yubikey is inserted then you can type in your challenge password and use the Yubikey as a second factor to unlock the LUKS partition and boot the system. Once you've decrypted the hard drive you can remove the Yubikey.

If you lose your Yubikey you can still enter your original (hopefully very long) passphrase to decrypt the hard drive, and then you can follow this procedure again to register a new Yubikey.

Changing the encryption challenge passphrase

Changing the password at a later date is quite simple, just use this command to reset the secret key. It is not entirely necessary to reset the secret key, but it won't hurt. Bear in mind that this will destroy the previous secret key, do not do this if you use HMAC-SHA1 for something else with this Yubikey. (For example, with another computer using LUKS+Yubikey).

 ykpersonalize -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible

Then, similar to Step 4, above, to enroll a new password into the LUKS key slot, except opt to clear Slot 7 with this command:

sudo yubikey-luks-enroll -d /dev/sda3 -s 7 -c

When prompted to Enter any remaining passphrase, use your backup passphrase - not the Yubikey challenge passphrase. Then enter a new Yubikey challenge passphrase, twice, then finally you will need to enter the backup passphrase one last time.

Now your old Yubikey challenge passphrase has been removed and only your new one will decrypt the hard drive. Your previous backup passphrase will still be the same. You can change that passphrase by following the links in Step 0.

Note on security implications

Adding a Yubikey will add a certain level of security to your system - someone has to know both the challenge passphrase and have your Yubikey to be able to unlock your hard drive (or find your initial passphrase, which you are now using as a backup). However, it is technically feasible for an attacker to decrypt the hard drive if they know your challenge passphrase (for example, by "shoulder surfing" you while you type it in) and can gain access to your Yubikey for only a short time. Using the challenge passphrase they could get the response from the Yubikey and store it, and then use it to decrypt the hard drive at any time without the Yubikey. Or, again if an attacker or a piece of malware knew your passphrase and was able to run code on a machine connected to your Yubikey they could also issue the challenge and store the response. It is therefore still extremely important to be vigilant when entering your challenge passphrase, and to ensure that you always have the Yubikey in a safe location. You should also only ever plug it into a machine that you trust. If you lose track of your Yubikey and suspect someone may have been using it to try to learn the decryption key, perform steps 2 and 3 again to reset the secret key inside the Yubikey and choose a new challenge passphrase. Note that if an adversary has managed to learn one of your passphrases (either the HMAC-SHA1 response from the Yubikey, or your backup) they could make a backup of the LUKS master key, and then use that to decrypt your hard drive even if you change the passphrase in the future. The man page for cryptsetup explains this, look at the luksHeaderBackup section. If you suspect this has happened then you must make an entirely new LUKS volume to protect your  data.


Is there a way to disable/prevent custom title bar buttons?

No, there is not. There's absolutely nothing requiring an app developer to use the GNOME libraries to build applications, nor anything preventing them from using low-level graphics calls to build their own windows, buttons, title bars, etc.


How to change the DNS server across network interfaces?

You can use resolvconf if it isn't already installed use: sudo apt-get install resolvconf.

Then edit the config file: sudo nano /etc/resolvconf/resolv.conf.d/base.
Enter your nameserves (one per line) with: nameserver xxx.xxx.xxx.xxx
Update resolvconf with sudo resolvconf -u

Changes should be permanent and for all interfaces.


Ubuntu won't boot after upgrade from 15.04 to 15.10

Maybe something went wrong when it came to installing the boot loader.

Reinstall the GRUB bootloader to your Ubuntu installation  in UEFI mode.

Boot from the Ubuntu install media - execute the following commands :

sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*
update-grub

Note : sd* = disk | sd** = efi partition | sd*** = system partition

To identify disks and partitions you can use any Linux Live (DVD/USB) media containing (g)parted.


Why did this fix for openVZ Ubuntu 12.04 work and how?

The changes in the configuration file changes the conditions for starting the getty(8) service., which is a "driver" for the tty terminal login.

The syntaxis respond to upstart for job/services, in this case tty1.

The lines removed changed the conditions for starting the getty on the tty1 terminal, which is in proxmox the Console access via the Java applet (I don't have so much information since in only know Proxmox 3 interface).

The proxmox ubuntu template has no login in the console because the instance is a container and is not a lxc container as requires the default tty1.conf file.

You may check the presence of Console login with and wothout the modifications.

I don't know Postgres, but it probably requires console login or agetty in therminal tty1.


Why is this in my fstab /dev/mapper/cryptswap1?

Already answered: How to disable cryptswap?

Also that line is commented out, so it's not actually doing anything right now, you have no swap, if that's the only swap line.


Renaming hundreds of files at once for proper sorting

Ubuntu comes with a script called rename. It's just a little Perl script that features a number of powerful bulk-renaming features but the best (in this case) is the ability for it to run Perl during the replacement. The result is a truly compact solution:

rename 's/\d+/sprintf("%05d", $&)/e' *.jpg

This is similar to the other printf-style answers here but it's all handled for us. The code above is for a 5-digit number (including a variable number of leading zeros).

It will search and replace the first number-string it finds with a zero-padded version and leave the rest of the filename alone. This means you don't have to worry too much about carrying any extension or prefix over.

Note: this is not completely portable. Many distributions use rename.ul from the util-linux package as their default rename binary. This is a significantly stunted alternative (see man rename.ul) which won't understand the above. If you'd like this on a platform that isn't using Perl's rename, find out how to install that first.

And here's a test harness:

$ touch {1..19}.jpg

$ ls
10.jpg  12.jpg  14.jpg  16.jpg  18.jpg  1.jpg  3.jpg  5.jpg  7.jpg  9.jpg
11.jpg  13.jpg  15.jpg  17.jpg  19.jpg  2.jpg  4.jpg  6.jpg  8.jpg

$ rename 's/\d+/sprintf("%05d", $&)/e' *.jpg

$ ls
00001.jpg  00005.jpg  00009.jpg  00013.jpg  00017.jpg
00002.jpg  00006.jpg  00010.jpg  00014.jpg  00018.jpg
00003.jpg  00007.jpg  00011.jpg  00015.jpg  00019.jpg
00004.jpg  00008.jpg  00012.jpg  00016.jpg

And an example prefixes (we aren't doing anything different):

$ touch track_{9..11}.mp3 && ls
track_10.mp3  track_11.mp3  track_9.mp3

$ rename 's/\d+/sprintf("%02d", $&)/e' *.mp3 && ls
track_09.mp3  track_10.mp3  track_11.mp3


install windows on a second hardrive (first one on ubuntu)

Ok that worked for me:

unplug linux hard drive
plug new hard drive
install windows 10
go to control pannel of windows 10 and turn off "fast boot option" (really important because ubuntu will think some partition of the hard drive are broken otherwise)
replug and boot on linux, update grub

I think step 1 is not mandatory.

Thanks Terrance for the help.


Rename files incrementally in a specific directory?

You can use this in terminal to rename files as you wished,

j=1;for i in *.txt; do mv "$i" file"$j".txt; let j=j+1;done

It will do the job.

Explanation:

Set a counter j, initially set it to 1
Initiate a for loop and use a shell glob *.txt to obtain all txt files.
for each file rename it using mv and increase the counter by 1.


How to upgrade gcc-5 to gcc-7 in Ubuntu 16.04?

To answer my own question after much trial and error, it seems not safe to remove/replace the older gcc (gcc-5), because it will break a lot of dependencies to the extent of wiping out the entire tool chain.

For example, when trying to remove/replace gcc-5 as said in the comments with

  Run update-alternatives to set gcc-7 as the default gcc version and
  the type sudo dpkg -r gcc-5

This generates an error:

dpkg: dependency problems prevent removal of gcc-5:
 g++-5 depends on gcc-5 (= 5.4.1-2ubuntu1~16.04).
 g++ depends on gcc-5 (>= 5.3.1-3~).
 gcc depends on gcc-5 (>= 5.3.1-3~).
 gfortran-5 depends on gcc-5 (= 5.4.1-2ubuntu1~16.04).

When adding these dependencies to the list of sudo dpkg -r items, an increasing number of packages need to be removed. e.g.

 ...
 r-base-dev depends on g++.
 build-essential depends on g++ (>= 4:5.2).

I haven't tried to find the largest set of packages that will be removed as described in How to uninstall a .deb package? . But it's pretty clear that most of the useful packages in the Ubuntu will be gone by then.


I cant make my wireless work on my new version 16.04 for Laptop HP Pavillion dv4

Make me understand better.
I suppose your wireless card don't showing the wireless networks near you.
Try open Terminal and:

NetworkManager


Self-compiled FFmpeg, checkinstall and APT dependencies

I'm not familiar with checkinstall, not sure why --provides didn't work.

Here another option using equivs to create dummy packages for those packages:

Install equivs:

sudo apt-get install equivs

Generate control file from template:

equivs-control libavcodec54

Open libavcodec54 file for edit. Change name and version if needed:

...
Package: libavcodec54
Version: 6:9.18-1dummy0
...

Build then install it:

equivs-build libavcodec54
sudo dpkg -i libavcodec54*.deb

Much work to do same for all required packages, but it can solve it.


What does the call sign of the uptime mean (output of htop)?

It is just an indicator which appears when your system has been up for more than 100 days.


You have to create a local offline repository

And then add it to the top of /etc/apt/sources.list

Click here!
This link will help to create signed Local Repository, which will enable you to install packages Offline.


Setting up domains in a virtual machine running Apache

Have you enable the vhost_alias module in apache? You can enable it by running the command below as root:

a2enmod vhost_alias

Then restart apache with (again as root):

service apache2 restart


How do I create the "Gnome-Desktop-Item-Edit" program's launch icon with root privileges and more?

You need to create a custom "Create Launcher"..open the terminal and type sudo "gnome-desktop-item-edit /usr/share/applications --create-new"

in the launcher creation put some name like Custom Launcher Creation and in the command put

gksudo "gnome-desktop-item-edit /usr/share/applications --create-new"

now search this launcher and add it to favorites on your left bar

every time you will launch it it will ask you the sudo password like gparted for example. In this way you won't need the terminal any more


SSD (windows 10) not recognized when installing xubuntu 16.04, UEFI

I had the same problem with my 320s just a few days ago, and what I did was:
- enter BIOS by pressing F2 when the Lenovo logo appears after powering up
- go to Configuration tab
- go to SATA Controller Mode and change it from "Intel RST mode" to "AHCI".

RST is seen as "RAID" and it doesn't work in this scenario.


wkhtmltopdf wkhtmltoimage: cannot connect to X server

I think you need to install xvfb (Virtual Framebuffer 'fake' X server):

apt-get install xvfb

Then in the terminal:

xvfb-run wkhtmltoimage --format png --quality 100 --no-debug-javascript --height 800 http://facebook.com/ fb.png


How do I back up network and printer settings?

Taken from Ubuntu man pages

  The  printers.conf  file defines the local printers that are available.
         It is normally located in the  /etc/cups  directory  and  is  generated
         automatically  by  the  cupsd(8)  program  when  printers  are added or
         deleted.

/etc/NetworkManager is the directory where network settings are stored.

Knowing the above places you will be able to copy both settings files to a safe place. Keep in mind that settings files may or may not change in future releases of the Distro so it is wise to keep them as a guide and not paste them back blindly.

An example with all the steps and files involved in backing up 1 printer setup in Ubuntu 15.04

sudo service cups stop
sudo cp /etc/cups/printers.conf /etc/cups/printers.conf.bup
sudo cp my_backup/printers.conf /etc/cups
sudo cp my_backup/printers.conf.O /etc/cups
sudo cp /etc/cups/subscriptions.conf /etc/cups/subscriptions.conf.bup
sudo cp my_backup/subscriptions.conf /etc/cups
sudo cp my_backup/subscriptions.conf.O /etc/cups
sudo cp my_backup/ppd/Kyocera-FS-C5400DN-KPDL.ppd /etc/cups/ppd
sudo service cups start


You have to shrink the 2nd partition and extend the 1st one.

Backup your data
Burn a Live CD
Boot from the Live CD
Install gparted sudo apt-get install gparted
Start gparted sudo gparted
Shrink your 2nd partition.
Expand your 1st partition.
Eject the disk, restart and boot your normal Ubuntu

I hope this helped you,

Daniel


How to tell git not to use rsa key but username + password

Check your ~/.ssh/config. If you want to use password authentication, you can set it up just there like this:

Host myRemoteComputerIP
  PubkeyAuthentication no

It will never try public key authentication against this host.

  How about when I have to connect with two different usernames once using a rsa key and an username / passwd authentification for the other?

You can use aliases in the ssh_config:

Host alias1
  Hostname myRemoteComputerIP
  PubkeyAuthentication no
  User user1
Host alias2
  Hostname myRemoteComputerIP
  # PubkeyAuthentication yes # is default
  User user2

and then connect using ssh alias1 and ssh alias2.


grub bootloader failed to install error when trying to install Ubuntu or Lubuntu - tried to reinstall grub but didn't work

You first need to find out which device your harddisk is.
Assuming that you have only one harddisk in your machine, then
your harddisk is /dev/sda  - but for safety look after in - for example -
gparted program. Start gparted and there you can see, if your harddisk is
/dev/sda or /dev/sdb (normally the DVD-drive is /dev/sda - if you have one).

In case of sda as harddisk - you then can type in terminal :

  sudo grub-install --force /dev/your-harddisk

This can look like:

  sudo grub-install --force /dev/sda

  sudo update-grub2

This should work. Please let me know, if this worked out for you.


Phantom Partition ... how do I correct this?

My guess is that you had a Debian image on your hard disk (either in a file or written "raw" to a partition) and that it just happens to have been stored where your /dev/sda2 now begins. Because /dev/sda2 is basically just a placeholder for your /dev/sda5, which is swap space, it could be that enough of the original disc image remains on the disk to confuse the auto-mounter.

If I'm right, the fix is to overwrite whatever data the auto-mounter is seeing that's making it think the Debian image is on /dev/sda2. The trouble with this solution is that anything you might do is potentially risky; you might accidentally trash some or all of your data. Thus, if you intend to follow my suggestions, you must do so at your own risk, and I STRONGLY advise you to back up your important user data first!

Those caveats out of the way, the simplest and easiest thing to do is to ensure that /dev/sda2's first sector is clear of unnecessary data:

sudo dd if=/dev/zero of=/dev/sda2 bs=440 count=1

Type this command exactly as shown here. A mistake with any of the options could result in serious data loss. After you type this command, reboot and see if things have improved. If they haven't, you could try a longer and riskier procedure:

In a Terminal window, type sudo swapoff to disable your use of swap space.
Using GParted, parted, or fdisk, delete /dev/sda5 and /dev/sda2.
Create a new /dev/sda2, but make it a regular primary partition, not an extended partition. If you use fdisk, give it a type code of 0x82 (Linux swap). If you use parted, give it a "file system type" of linux-swap.
Reboot. This ensures that you'll be using the new partition table.
Type sudo dd if=/dev/zero of=/dev/sda2. Be extra extra super careful with this command. Pay particular attention to the of= value -- it should be /dev/sda2, not /dev/sda or any other value. The point of this command is to completely erase the disk space occupied by /dev/sda2. If you accidentally specify the wrong target, you'll wipe out whatever it holds.
Create new swap space on /dev/sda2.

If you used fdisk or parted for partitioning, type sudo mkswap /dev/sda2. Again, be very careful with the disk device.
If you used GParted for partitioning, it's easiest to go back in to GParted to set /dev/sda2 up as swap space.

Type sudo blkid /dev/sda2. This will show you the UUID value associated with the swap space.
Edit /etc/fstab and change the UUID value associated with swap from the old value to the new one.
Reboot and test. The problem should be gone.

As you can see by all the caveats and warnings, this procedure is far from risk-free. I recommend you try it only if you're already familiar with low-level tools like dd and fdisk.

It's conceivable that a tiny resize operation on your partition will clear up the problem; for instance, you could shrink /dev/sda1 by 1MiB and resize /dev/sda2 and /dev/sda5 to fill that space. I can't promise this would work, though; it's conceivable that the move/resize will move the errant disc image data along with everything else.


See man bash, and you can do things like:

   -a file
          True if file exists.
   -d file
          True if file exists and is a directory.
   -e file
          True if file exists.
   -f file
          True if file exists and is a regular file.
   -u file
          True if file exists and its set-user-id bit is set.
   -x file
          True if file exists and is executable.
    -L file
          True if file exists and is a symbolic link.

and many, many more.

You can also look "inside" the file with the file command (see man file) to gain more information.

Rather than parsing the output of ls (which always leads to eventual confusion), one should use /usr/bin/stat -c "%a %n" filename:

$ stat -c "%a %n" .bashrc
700 .bashrc


Cannot load Ubuntu after loading Windows

Depends on grub installation method. Did you install it UEFI or legacy boot mode?

Seems than you have now mixed UEFI and legacy type bootloaders on your different OS:es.


Apt-get issues removing redmine from ubuntu 16.04

I had the same problem in "gimp". If you had changed the symbolic link of python (/usr/bin/python), it would be a factor. My problem was fixed by reverting this change.


ssh permission denied in terminal but not inNautilus

Logging in from the terminal by default tries to log into the remote machine with your username on the local machine. In Nautilus you have to explicitly type in your username on the remote machine. I am guessing that your local and remote usernames do not match.

Use ssh user@server to log in with a different username.


Support for the 'hard debugger' is no longer included in the runtime, so the mono-debugger package was removed from Debian & Ubuntu. The interface that monodevelop uses is called the soft debugger, and there is the start of a command-line client for that at https://github.com/alexrp/sdb-cli


I don't normally suggest alternatives in questions like this, but try using Virtual Box instead. Parallels is a nice bit of software, but Virtual Box works better with Linux as far as I know.


There seems to be a bug. I'm running ubuntu release 11.10 and this problem occurred regulary. I solved this issue by un-checking the setting to disable the touchpad while typing in the Mouse and Touchpad setting application.

Regards


lshw -C display shows UNCLAIMED for GT840M graphics card

Secure Boot does not let the nvidia module load.

Disable Secure boot in BIOS and it should be solved.

You can see this question for more information.


How can I disable the "Connect your online accounts" dialog, from the command line?

Workaround - Tested in Ubuntu 19.04

with the help of this post.. https://askubuntu.com/a/1123001/739431

the command that executes the initial setup for Ubuntu 19.04 is /usr/libexec/gnome-initial-setup --existing-user

If your question is only to disable "the dialog that asks them to "Connect your online accounts". this post is not suitable..

the initial setup is from the package gnome-initial-setup

pratap@i7-6550U:~$ apt show gnome-initial-setup
Package: gnome-initial-setup
Version: 3.32.1-1ubuntu3
Priority: optional
Section: gnome
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,966 kB
Depends: libaccountsservice0 (>= 0.6.24), libc6 (>= 2.29), libcairo2 (>= 1.2.4), libcheese-gtk25 (>= 3.18.0), libcheese8 (>= 3.18.0), libfontconfig1 (>= 2.12.6), libgdk-pixbuf2.0-0 (>= 2.25.2), libgdm1 (>= 3.8.3), libgeoclue-2-0 (>= 2.4.0), libglib2.0-0 (>= 2.46.0), libgnome-desktop-3-17 (>= 3.17.92), libgoa-1.0-0b (>= 3.5.90), libgoa-backend-1.0-1 (>= 3.10.0), libgtk-3-0 (>= 3.22.29), libgweather-3-15 (>= 3.13.91), libibus-1.0-5 (>= 1.5.2), libjson-glib-1.0-0 (>= 0.12.0), libkrb5-3 (>= 1.8+dfsg), libnm0 (>= 1.0.0), libnma0 (>= 1.1.90), libpango-1.0-0 (>= 1.32.5), libpangocairo-1.0-0 (>= 1.32.5), libpolkit-gobject-1-0 (>= 0.99), libpwquality1 (>= 1.1.0), librest-0.7-0 (>= 0.7), libsecret-1-0 (>= 0.18), libsnapd-glib1 (>= 1.42), libsoup2.4-1 (>= 2.41.90), libsysmetrics1 (>= 1.0.5), libwebkit2gtk-4.0-37 (>= 2.5.3), policykit-1 (>= 0.103), adduser, gnome-settings-daemon (>= 3.24), gnome-control-center-data
Recommends: gnome-getting-started-docs
Suggests: gdm3
Homepage: https://git.gnome.org/browse/gnome-initial-setup/
Task: ubuntu-desktop-minimal, ubuntu-desktop
Supported: 9m
Download-Size: 1,166 kB
APT-Manual-Installed: yes
APT-Sources: http://in.archive.ubuntu.com/ubuntu disco/main amd64 Packages
Description: Initial GNOME system setup helper
 After acquiring or installing a new system there are a few essential things
 to set up before use. GNOME Initial Setup aims to provide a simple, easy,
 and safe way to prepare a new system.
 .
 GNOME Initial Setup runs the first time you log in to the GNOME desktop
 and lets you easily configure your language, keyboard layout, online accounts
 integration, and more.
 .
 If you want to configure these things at any other time, run the Settings app.

pratap@i7-6550U:~$

So it is not possible to disable only the online accounts dialogue unless one can edit the source files..

Option 1: remove the package - sudo apt purge gnome-initial-setup

Option 2: Comment the 5th line which starts with Exec= from the file /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

to comment the line, since you mentioned that you want automation, save the below command in your script..

sudo sed -i 5d /etc/xdg/autostart/gnome-initial-setup-first-login.desktop && sudo sed -i '5i#Exec=/usr/libexec/gnome-initial-setup --existing-user' /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

to revert the changes at any time run the below command

sudo sed -i 5d /etc/xdg/autostart/gnome-initial-setup-first-login.desktop && sudo sed -i '5iExec=/usr/libexec/gnome-initial-setup --existing-user' /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

Output of  nano /etc/xdg/autostart/gnome-initial-setup-first-login.desktop

[Desktop Entry]
Name=Initial Setup
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=preferences-system
Exec=/usr/libexec/gnome-initial-setup --existing-user
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;
OnlyShowIn=GNOME;Unity;
NoDisplay=true
AutostartCondition=unless-exists gnome-initial-setup-done
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-initial-setup
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=unknown
X-Ubuntu-Gettext-Domain=gnome-initial-setup

Please note that, when the user is newly created and at his first login if the Exec= line is commented.. the user will not see gnome-initial-setup, however.. If at later stage when the Exec line is uncommented.. the user will be shown the gnome-initial-setup at his next login for one and only once..


Trying to make a backup drive hot swappable

Solved the problem.

I've included in the crontab prior to any backup the following

sudo umount /media/drivebay
sudo mount -a


sudo apt-get install php7.0-cli

if its already installed run ...

ls -al /usr/bin | grep php

you may find php is linked to /etc/alternatives

lrwxrwxrwx  1 root root          21 Jan 12  2017 php -> /etc/alternatives/php

for me /etc/alternatives points to the ver...

lrwxrwxrwx   1 root root    15 Mar 26 09:48 php -> /usr/bin/php7.1


The output from ifconfig indicates that eth0, your Ethernet interface, does not have an IPv4 address. It has not been configured properly.


Please can you file a bug, and assign it to me? This shouldn't happen.

You can remove the second bookmark by opening Nautilus, and removing the bookmark from the "Places" sidepane:


Follow this link and download Boot Repair disk. And follow instructions.
 After that use following commands

sudo grub-mkconfig -o /boot/grub/grub.cfg,  if your grub.cfg is at
some other location then replace the path in the command with your
file location.
Type sudo grub-install /dev/sda where sda is my primary HDD
having Windows and Linux installed.
You can run boot repair with your Ubuntu live CD Just type bellow command and follow above grub configuration and installation commands.

  sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get
  update sudo apt-get install -y boot-repair && boot-repair

 Source :- PC does not boot into Windows, but Ubuntu still works well; how to recover?


How to compile my first C++ program (geany)?

AlainD,

Geany actually has the options that you're looking for built in.
At the top of the screen towards the middle there is a button that looks like a little gear, as well as a button that looks like a brick wall. These are your options for compile and run. Once you've written your code to your satisfaction, you simply click the compile button, and at the bottom of your screen you'll see the output, and if there are any compile time errors. Once complete (assuming no errors) clicking run will cause Geany to open your system's default terminal and execute the program. The terminal will show exit status code when complete and will remain open until you close it.

As for compilers, most major distributions of linux have a pre-packaged collection of compilers and linkers. For ubuntu I believe you would go to the terminal and type the following:

sudo apt-get update
sudo apt-get install build-essential

These two commands will update the list of packages on your system, and then install the essential libraries, headers, and compilers needed for C, C++, and other common programming languages.

Best of luck in your endeavors.


You can use avconv for converting audio/video files

avconv -i your_x265file -qscale 1 -c:v libx264 -c:a copy output_x264file.mp4

Explanation:

-qscale 1 - range from 1 to 31 where 1 is the best quality
-c:v - codec video convert to x264
-c:a - codec audio copy as is

You can check what encoders are present with avconv -encoders and you can use something different from x264

You have to be prepared it can take a long time according to your hardware


What happen if I copy data from a Full Disk Encrypted to another computer?

When you login to Ubuntu your disks are automaticly decrypted. So when you copy files on external storage they are decrypted.


How do I enable two finger right click in Kubuntu + GNOME?

Install GNOME Tweaks. In GNOME Tweaks > Keyboard & Mouse, make sure under "Mouse Click Emulation" you select 'Fingers'.

Then open Settings > Mouse/Touchpad, and then tick the check box "Tap to Click" and then tap to click and two finger tap to right click is working again.


Is there a way to backup and restore basic file / folder permissions on Ubuntu the way that there is using icacls in Windows?

Yes, using the stat command (See man stat, man find, man xargs), but why would it be needed? In normal Linux life, wholesale permission changes/restores are rarely needed.

sudo find / \(-type f -o -type d \) -print0 | \
    xargs -0 stat <stat parameters>


Should I install firmware update from the Ubuntu Software Center?

Actually if it came from the Ubuntu Software Center it usually had passed some minimal security tests before it was included. So I would not be too worried on the safety. But these tests may be incomplete or somebody had overlooked something. Nobody is without fail, so cautiousness always pays off in the end.

It is perfectly fine to hesitate and to be careful in what you install, or not install. A firmware update in the best case solves issues you have, in the worst case introduces issues you didn't have before. So in case you are happy with you system there is little need to risk anything.

General sources of concerns are not so much version numbers (many long established applications still are version 0.x) but

Applications from a "testing" or "alpha" source. Be prepared for many bugs!
Any update where it is unclear if you need it at all
An obscure or missing change log (adding "Moo" and "bar" would exactly be such a thing)
Unexpected updates
Updates from a PPA or another risky external repository
Proprietary software updates where nobody (nobody!) knows what comes with it

If you are faced with such an update it is good advice to perform an internet search for issues other people may have had. Even if nothing turns up then nothing would be lost if you waited a bit with the update. Sometimes bugs need their time to be published, and even longer to be fixed.

So my general advice is: if you are worried: wait !


gtk-recordmydesktop Set FPS Higher than 50?

The good news is that it is easy enough to modify the Python installed source to gain 60 fps for your generated files. I have successfully tested the following technique under both Trusty Tahr and Xenial Xerus:

Modify the installed Python source with the following 2 commands performed one after the other:

sudo sed -i_bak 's#lower=1, upper=50,#lower=1, upper=60,#' \
/usr/lib/python2.7/dist-packages/recordMyDesktop/rmdPrefsWidget.py

sudo sed -i_bak 's#lower=1, upper=50,#lower=1, upper=60,#' \
/usr/share/pyshared/recordMyDesktop/rmdPrefsWidget.py

If you wish to revert these changes simply run the following 2 commands performed one after the other:

sudo mv -v /usr/lib/python2.7/dist-packages/recordMyDesktop/rmdPrefsWidget.py_bak \
/usr/lib/python2.7/dist-packages/recordMyDesktop/rmdPrefsWidget.py

sudo mv -v /usr/share/pyshared/recordMyDesktop/rmdPrefsWidget.py_bak \
/usr/share/pyshared/recordMyDesktop/rmdPrefsWidget.py

Screenshot:

And below is a screenshot showing the successful changes on my own system:


I use it too, and it's great! Just run these in your terminal.

sudo add-apt-repository ppa:elementary-os/daily

sudo apt-get update

sudo apt-get install noise


SMB auto mount doesn't work after upgrading to ubuntu 18.04

You have noauto option enabled, meaning that you don't want it to be mounted automatically.
Remove that option:

//192.168.1.5/Media /mnt/smb cifs vers=1.0,guest,uid=1000,iocharset=utf8 0 0


By default the command useradd doesn't create home directories, but for a daemon I recommend you to use the system option and change the shell to a non-existent one so no one can login with said account (in ssh for example):

sudo useradd -r -s /bin/false USERNAME

You can see all the options with man useradd and man groupadd if you want to create a group for the user too.


How secure is an encrypted LUKS filesystem?

Yes, it is secure. Ubuntu uses AES-256 to encrypt the disk volume and has a cypher feedback to help protect it from frequency attacks and others attacks that target statically encrypted data.

As an algorithm, AES is secure and this has been proved by crypt-analysis testing. The weakness actually lies within the cypher and the software to pass it the keys. Specifically lies in the keystore (which is stored in the header of the volume), the keystore is secured by a passphrase. Passphrases are of course open to some attacks such as dictionary/brute force (if this was successful, it would decrypt the keystore). Using long "complex" non-word passwords would reduce the chance of this happening.

The only other possibility to decrypt is using recording devices or social engineering to determine your passphrase.

In short, your computer is reasonably safe unless you are subject to serious organised cyber crime or Government investigation!


How to install driver of HL-5450DN in Ubuntu 18.04

perhaps you let the Brother Installer Tool see if it can sort things for you; if you go here http://support.brother.com/g/b/downloadend.aspx?c=us&lang=en&prod=hl5450dn_all&os=128&dlid=dlf006893_000&flang=4&type3=625 and click to download and SAVE what will be linux-brprinter-installer-2.2.0-1.gz

If you open a terminal; copy each command in line by line; paste each line into the terminal; (hit the ENTER key after each paste;) then on to the next command;

cd Downloads

gunzip linux-brprinter-installer-2.2.0-1.gz

sudo bash linux-brprinter-installer-2.2.0-1 HL-5450DN

and see if that does any better


partition showing on "sudo fdisk -l" but not on ubuntu or windows

Nevermind guys , running Gparted , i figured it out , this is what i get running gparted


How to safely switch to python3 as default after upgrade to Ubuntu 18.04

This post is a bit old, but I believe a better alternative exists: enter update-alternatives. The following will set your /usr/bin/python to default to 2.7 but have 3.6 available when you want:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10

The highest priority here is used as the "automatic" choice for /usr/bin/python but you can easily switch by running sudo update-alternatives --config python.


The fact that your printer is not working has nothing to do with the statusui. The Status UI is not necessary for printing, and works eventhough it gives this Gtk-WARNINGs.

The problem you have is that pstocapt doesn't work. Now you have not given much information about your system, but in my experience this happens on 64-bit machines.

In the case of 64-bit machines, the common installation procedure does something wrong. It makes symlinks in /usr/lib/cups/filter to files in /usr/lib64/cups/filter. This does not work. Therefore, you should do the following:

rm /usr/lib/cups/filter/pstocapt /usr/lib/cups/filter/pstocapt2 /usr/lib/cups/filter/pstocapt3 /usr/lib/cups/backend/ccp
cp /usr/lib64/filter/pstocapt* /usr/lib/cups/filter/
cp /usr/lib64/backend/ccp /usr/lib/cups/backend/

Off course, do this only if that files really exist in the lib64 folder.


terminal - Remove background color of text in ls (with oh-my-zsh arrow theme)

The problem is not with the .zshrc but with dircolors. The easiest way to come out of this is by installing another plugin for ohmyzsh. Follow the steps in readme and for the dark theme, I am not finding any issues.

Hope this helps.


you need to edit your grub2 menu to boot into a console rather than auto-start the GUI.

I haven't fooled with 11.04 yet, but I think you need to edit /etc/default/grub as root to give you a terminal upon booting.

Try the instructions here: http://ubuntuguide.net/boot-into-consolecommand-line-when-startup-ubuntu-9-10 It's for an earlier version, but I think it uses grub2 also.

If you need to get to a command prompt so you can edit grub, download and burn the "ultimate boot CD", which has tomsrtbt on it.


How to identify programically in QML app, where is located my sqlite database file

Databases created from QML LocalStorage are saved in ~/.local/share/<appid>/Databases/, where <appid> is the applicationName in your MainView.  The databases have hexadecimal names and the extension .sqlite.  Each has an associated .ini file with the name and description from the first and third arguments to openDatabaseSync.

If you only create one database via LocalStorage, there will of course be only one database in this directory.  If you create more, you may have to parse the .ini files to find the right one.  However, in my limited testing, the database files seem to get deterministic file names, so you may be able to figure out the filename on your device and then hardcode that value into your C++ code.


When I create a new directory, create a markdown file with the same name in it

I would use inotify API provided by the kernel to monitor filesystem events. There is no need for an indefinite while loop, you can use a tool that uses the interface provided by the kernel to check for any changes on any file.

One of the tools that uses inotify is inotifywait. From man inotifywait :

inotifywait efficiently waits for changes to files using Linux's inotify interface.

It is not installed by default, it is a part of inotify-tools package. You can install it by :

sudo apt-get install inotify-tools

The script i am taking about can take the form :

#!/bin/bash
while IFS= read -r line; do
    parent="${line%% *}"
    child="${line##* }"
    new="${parent}${child}"
    [[ -d $new ]] && touch "$new"/"$child".md
done < <(inotifywait --quiet --monitor --event CREATE,ISDIR /home/tim/test)

You can send it to the background :

./dir_event.sh &

Or perhaps use nohup or disown if you want :

nohup ./dir_event.sh &

inotifywait --quiet --monitor --event CREATE,ISDIR /home/tim/test is the command to monitor the file system events on directory /home/tim/test, we are only interested in CREATE and ISDIR events. We are saving (as line) and then manipulating every new line indicating a relevant event as they happen. Please check man inotifywait to get more idea.
parent will contain the directory we are monitoring /home/tim/test in this case and child will contain the newly created directory/file. Both are achieved by using bash parameter expansion.
new is addition of the two to get the absolute path to the newly created entry. As CREATE event will result in creating a file too we need to make sure that new is a directory.
[[ -d $new ]] checks if new is a directory, if so then we have created the required file inside it.


Xampp htdocs folder, sub folders and all files permission

You need to change permissions or ownership of htdocs directory. To change the permissions use the chmod command, for example:

$sudo chmod -R 755 /opt/lampp/htdocs

To see who is currently logged user, run:

$whoami

To change the owner use the chown command:

$sudo chown -R username:username /opt/lampp/htdocs

Also, you can use find command to change the permissions only on specific files. For example, to change the permissions on all css files in htdocs directory run the following command:

sudo find /opt/lampp/htdocs -type f -name "*.css"  -exec chmod 755 {} \;


Certain apps like supertux no loner exist after upgrading from 15.10 to 16.04

There is no supertux-stable in 16.04. There's just supertux. From the package index:

  Package supertux

  xenial (games): Classic 2D jump 'n run sidescroller with Tux [universe]
  0.4.0-1: amd64 arm64 armhf i386 powerpc ppc64el s390x


How to access to Recovery Mode in Ubuntu 19.10 (so I can modify Grub)?

Right when you press the power button, hold shift.  you will automatically go to grub.  Select the image you want, and select recovery mode.


Those items you mentioned (aix, amiga, bsd, etc) are partition table types. The 2 most common for a linux installation are MSDOS and GPT.

Don't confuse them with partition types.

One way to format a partition is to right-click on the partition, choose format, and a lot of options will come up, including FAT32.


Have you tried to do reinstall of gcc (together with g++) ?

As far as I know these both packages are always together ?

sudo apt-get install --reinstall gcc


Is there any way to get rid of restrictions?

Got my answer!
The permissions in my home folder was completely messed up!
I used sudo chown $USER:$USER -R /home to reset the settings!
And I used the complete instructions on this link for Arduino installation and problem regarding serial permissions solved! "umake" did the work!

Special thanks to @N0rbert


I've selected to auto install updates but I am still seeing updates available

Updates come from different sources. By default, only the '-security' source is selected for unattended upgrades. Only packages from that source will be automatically upgraded.

Non-security upgrades come from other sources (like '-upgrades') and won't be upgraded automatically in a default install of Ubuntu.

Users of current Ubuntu Desktop and Server systems can change the sources used by unattended upgrades: Configure the file /etc/apt/apt.conf.d/50unattended-upgrades in a text editor (vim, nano, not a word processor). Use sudo to launch the text editor. At the top of the file, you will see the entries for other sources.

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "${distro_id}:${distro_codename}-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};

Simply uncomment (remove the '//') from lines you wish to enable, or add other repositories if you wish. The file must be edited by root. Enabling '-proposed' is strongly discouraged.

Users of desktop Snaps instead of .deb packages won't get updates through unattended-upgrades nor through Software Updater. Those come through the 'snap refresh' command. An unattended upgrade mechanism for them has not yet been created.


Icon theme doesn't apply to Nautilus at all!

I am not to sure if I understand this part right:

  But apart from system icons , Nautilus icons fail to change I have restarted my computer, and tried to keep the extracted folder in /usr/share/icons/ by sudo nautilus but still it doesn't work.

Did you actually put the Simple-icon-theme-folder into /usr/share/icons/ ?!

If not move it there, using sudo mv [ root privileges | move/rename] command.

Put the icon-theme-folder (I name it simple-icon) on your Desktop (~/Desktop) and then use this command (replace USERNAME with yours):

sudo mv '/home/USERNAME/Desktop/simple-icon' '/usr/share/icons/'

and apply the icon-theme again, using Gnome Tweak Tool`

If it doesn't work, please report back.


The behavior you describe will occur if the user in question is in the nopasswdlogin group (assuming it's enabled in PAM, which it sounds like it is). You can remove the user from that group with the command sudo gpasswd -d USERNAME nopasswdlogin, replacing USERNAME with their actual username.


Why Network Manager Can't Detect My ZTE USB 3G Modem!

[Answering My Own Question]

[First of all Apology! I am not an expert here. But I think may be I can share what I have learned through experience]

My first problem was when I was connecting the modem through driver software provided with the modem I was unable to use some network services like VPN, Ubuntu Software Centre etc. It was happening because though I was connected to the internet Network Manager couldn't detect it.

Problem: Network Manager can't detect internet connection.

Reason: The driver provided with the modem was using WvDial to connect to the internet. But because of this bug in wvdial package, Network Manager couldn't detect network connection.

Solution: If your driver software use wvdial don't use it. Connect the modem as a mobile broadband connection instead.

Now I have mentioned in my question that I had also tried to connect my modem through mobile broadband connection. But failed as I couldn't find my modem in the mobile broadband option.

Problem: Mobile Broadband can't detect my modem

Reason: First of all lets take a look how these modems work. When these modems are plugged for the first time, operating system detect them as a storage medium / CD-ROM rather than a modem. So that the driver software provided with the modem can be delivered. After installing the driver, driver sends a special message to the modem. After getting that message modem switches to modem mode. And now its ready to use. This feature of these modems is called ZeroCD(TM) feature. This mechanism is used so that drivers can be delivered with the modem without the need of any additional CD/DVD.

In my question I have mentioned that when I would plug my modem my driver software couldn't detect it and I would get a set of vendor and product id(in my case 19d2 and 0154) in lsusb command. After some sequence of plugging & unplugging product id would switch to 2003 and now the driver could detect the modem. This was happening because of this ZeroCD feature of the modem. First the modem is detected as a storage medium and the product id becomes 0154. Then the modem switches to modem mode and product id becomes 2003. This mechanism is called modem switching.

For the same reason mobile broadband couldn't detect my modem. So to solve this problem I have to switch the modem to modem mode somehow. And to switch I need some configuration information like that special message I have mentioned earlier, vendor id, product id etc.

Actually there is a nice software package named usb_modeswitch which handle this switching thing automatically. And Ubuntu by default comes with this software package. Now how usb_modeswitch does this is, it reads a file(called data file) named configPack.tar.gz located in /usr/share/usb_modeswitch directory which contains configuration information needed to switch this kind of modems. If your modem's configuration information is present in that file your modem should switch automatically by usb_modeswitch without any problem. But if not you are in trouble.

Solution: Download usb_modeswitch(If its not already installed in your system) and latest data file from this site. Now it may happen that your modem's data file is not present in the latest data file. In that case you can wait until someone includes it there for you or you can find those information by yourself and inform the developers of usb_modeswitch. May be they will include your modem's configuration information in their later release. After all someone has to do it! You will find information regarding this in the above site.


I can confirm that it is package libgfortran3 that is needed.
This has been working for me on Ubuntu Lucid (32bit):

apt-get install libgfortran3

cheers.


You can use gparted, depending what you want to do. It has a gui, so it is very easy to use


For the most part you can configure a new Printer through the Printer menu and New Printer wizard.

Basic steps to set up a printer using those can be found in Chapter 3 of The Official Ubuntu Book.

Plug the printer in to your laptop or to the network (however you want to connect to it), and turn it on.

Click the Gear icon in the upper right corner and select Printers.

In  the Printer configuration window click Add.

The New Printer window will automatically start searching for any connected printers. If directly connected it should show up in the Devices list on the left. If it is a networked printer connected to a router you can expand the Network Printer and it may be listed there. If not listed then you can try the Find Network Printer listing to see if it can be detected.

Once you find the appropriate printer in the Device menu click Forward.

In the next screen, you are asked to choose the printer's make and model and a driver. The default driver should work, and you can always change it later.

Sometimes you may not find the exact make and model or driver for your printer, generally you can try the closest one. You can search for what others have experienced by looking for drivers at http://www.openprinting.org/printers.

Once a driver has been selected, click Forward.

Finally, enter a description and a location of the printer.

You should be able to print a test page from the Printer properties for the printer you just added. If the test page works you are good. If it doesn't you may need to revisit the device driver, or make / model settings which is the beyond the scope of this answer.