Unable to remove jdk from my Ubuntu System

so far you have removed JDK, try to remove JRE as well.

sudo apt-get remove openjdk-9-jre default-jre default-jre-headless

Try also this command: which java
it will show you java home directory, you could simply delete it.


Update manager can not open due to missing /var/lib/dpkg/status

sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status

And then try to update.


How do I connect my external hard drive to Ubuntu?

Update:

The partitions are NTFS, the disk is shown as /dev/sda, the drive is an external drive connected by USB, and it cannot be seen in gParted.

I went into Windows 10 and reformatted the drive from exFAT to NTFS and then when I went back into Ubuntu it was magically working...I'm not sure why but it does.

I hope someone can explain this because I can't.


1. You need to acquire a domain name (or maybe just FQDN) from some DNS provider.

2. Once you have registered the domain name, you will gain access to an administrative panel (like this one shown below), where you will be able (via A records), to redirect the domain name (and all *. or certain sub domains / FQDNs) to your server's IP address.

Please note that the provider's administrative panel shall looks different, and the provider will give you exact instructions how to use it.
Sometimes the redirection can take up-to 24 hours. You can check if it's successful by the command whois example.com.
If the server is behind NAT, you must setup port forwarding.

3. Edit your Virtual Host configuration file and add relevant ServerName and maybe ServerAlias directives. Let's assume the configuration file is 000-default.conf that should look as this:

<VirtualHost *:80>

        ServerName example.com
        ServerAlias www.example.com localhost

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        <Directory /var/www/html>
                # etc ...
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

This step can be omitted, but it is absolutely necessary when you have more than one Virtual Hosts.
Don't forgot to:

sudo a2ensite 000-default.conf
sudo systemctl reload apache2.service

4. In addition for local needs:

You can bind a FQDN to the loopback interface of the server. For this purpose, edit the file /etc/hosts in a way like this:

127.0.0.1    localhost example.com www.example.com

It is not possible to enter *.example.com here. You can add an entry also for the IP address of another (local) server's network interface - for example 77.77.77.70.
If you want to access the FQDN by another computer through the LAN (or by a private computer through Internet), edit its host file in a way like this:

77.77.77.70    example.com www.example.com

Further reading:

Creating additional virtual host Ubuntu Server 16.04.3
Connect via ssh to one of the multiple clients on same network


Strange invisible window causing 'dead zone' in Unity

Never had it myself, but I think that this is a reasonably famous Natty bug :

http://www.omgubuntu.co.uk/2011/06/help-compiz-rockstar-sam-spilsbury-squash-a-bug/

Perhaps you can help squash the bug, as per the article.


Cannot install viber on Ubuntu 14.04 and 18.04

Silly mistake. I tried to install the deb package simply with

./viber.deb

but the correct way is

sudo dpkg -i viber.deb

And it worked.


Install Ubuntu including all drivers from the USB-Live system

I've encountered similar problems in the past.  As ever in these situations, the details matter.  One solution that has worked for me is to boot the live image, "change root" into the not-working installed image, and use the live-setup's networking to allow the normal update procedure to properly install things.  The precise procedure below:

Boot the live image (e.g., USB, CD)
Install Ubuntu to the HDD/SSD as per usual.  Two details:

As an aside, consider making multiple partitions, at least one for / and one for /home.  This will make future updates or installations much easier.  However, unless you know what you're doing, I might suggest sticking with the ext4 filesystem on each partition (unlike the link).
I've generally had better luck not installing updates during this part of the process.  You're choice of course, but we'll be doing the updates below, and the whole process at least feels faster if done later.

When the installation finishes "Continue Testing" and don't reboot.
Mount the newly minted root (/) partition by clicking the icon (one of the new gray platter/HDD looking items on the vertical bar to the left)
Open a terminal ("Ack!  I know!") via Ctrl+Alt+t -> A purple-looking window will appear

By clicking on the icon in step 2, Ubuntu Live mounted the hard drive to a directory in /media/ubuntu/.  It will potentially be a weird directory name (technically a GUID), like 2801b1ba-d7d4-22e1-a6e3-0abcab51f05a.  Task: "Change Root" into that directory with:

sudo chroot /media/ubuntu/<directory_name>

At this point, the shell (terminal) will run all commands as if on the new system, but with access to the working networking of the running kernel (the Live image).  So, try a simple update and dist-upgrade (the command line equivalent to what the GUI does when updating your packages) and with luck, the correct packages will install themselves  It doesn't always work, but this has been a surprisingly "simple" fix to a number of Live-boot vs installed-boot issues I've encountered:

apt-get update
apt-get dist-upgrade

I may have missed a step in terms of getting networking setup; if so, please leave a comment, and I'll update this answer when I can more thoroughly confirm each step of this procedure ("I'm not at my desk right now."  :-) ).


If the partitioning tool does not work from the installer, then yes, you will have to do manual partitioning.

Boot into windows, defragement your hard drive. Next resize your windows C: drive, leave the remaining space as free space.

Then boot the Ubuntu live CD and install Ubuntu into the free space. At that point, the installer should automatically make the partitions needed. If not, make a swap partition the size of your RAM + 512 Mb. The rest would be for Ubuntu root, also called /

For details and an extended discussion see:

How do I install Windows 7 alongside a pre-existing Ubuntu installation?


Why can I boot Xubuntu 12.04 from usb on one computer but not the other?

OK, this isn't my idea, but here's what I've found via Google:

Dell Inspiron 530 and 545 Ubuntu 13.04 Live DVD won't Run

Having spent all morning solving this problem, I thought I'd share the solution in case it helps someone else out there...

Problem:
Inspiron 530 and 545 PCs won't boot Ubuntu 13.04 live DVD. Boot error message shows. DVD works fine on other PCs

Attempted Solution:
Use USB image. USB stick works on other PCs, not on the Dells

Actual Solution:

1) Burn plop boatloader onto a CD http://www.plop.at/en/bootmanager/index.html

2) Make USB image of 13.04

3) Run plop from CD

4) Choose USB and boot into 13.04


ubuntu freeze when I plugged the power cable

Do you have Jupiter installed on your system?
If you do, I advise you to uninstall it. I faced the same problem in 12.10 but removing Jupiter fixed it.
Additionally, according to their official website, "Jupiter Applet has been retired and is no longer supported software." This might go some way to explain why it's now causing problems.

Note from a moderator: This answer was shown to fix things in the comments.:

@Mukund : Yeah I had Jupiter installed in my system and now I had removed it and my system works perfectly. No more freezing, So thanks a lot.

Please vote for it..


I would resize /dev/sda3, and use the newly created partition.  Make sure that you boot from the Ubuntu live/Bootable media, and use gparted to resize that partition.

Now from the image I can see that you have labeled /dev/sda3 as Data.  If you like to use the whole partition, I would backup that data, and then use the whole partition.

Warning:  When dealing with partitions anything can go wrong, so make sure that you have a current backup of all your data.


well lets start with this, there's a bunch. You just have to Google to find more games. If you want to install your Need For Speed games on Ubuntu I would install wine and/or play On Linux where you can install windows based games.

If you would like racing games written for Ubuntu I would try:

Racer, which is a racing simulator. The latest version is for Ubuntu 7.10 so I would use the Windows version.
Super Tux Kart which is like Mario Cart. It's available via the software center, or by terminal, sudo apt-get install supertuxkart
Musclear Online it's a 2D/3D racing game where you can race your
friends via there recorded times. So you play a game, post your time
and then your friends can compete against that.
vDrift is a racing simulator. to install click here.
Rigs of Rods which is more of a vehicle simulator, where you can
try a lot of different vehicles, like trucks, boats, planes, and a
lot more! Unfortianlly you have to compile the game from source, check this link for more info. There is a more modern Windows version.

Steam
I would install Steam for Linux and see what games are available there, there are better chances for finding up-to-date games, and games that you've seen before.

Adding more when I find more...


Yes, Drag and Drop is an issue most people find in Ubuntu. The reason behind the drag and drop not working is the experimental view of the Nautilus File Manager.

To fix this, all you have to do is to disable the experimental view again.

Open the Nautilus file manager and click on the top left Files and go to Preferences. Clear the “Use the new views” option under Experimental.

You can also refer to already published questions here.


You could simplify your command to

rsync -az --stats 69.46.18.236:/var/www/phrogz.net/public /var/www/phrogz.net/

or alternatively

rsync -az --stats 69.46.18.236:/var/www/phrogz.net/public/ /var/www/phrogz.net/public

As you see, rsync interprets differently a source with or without a trailing /.

Also, -a is equivalent to -rtplogD, (with respect to your command line, the -a also adds -o, preserve owner, -g, preserve group and -D, preserve devices and special files).

Finally, the --rsh option is redundant when the source or the destination is in the form host:/path, with a single :.


Which packages write /etc/lsb-release and /etc/issue?

Install apt-file, and run:

apt-file update
apt-file search /etc/lsb-release

And..

apt-file search /etc/issue

This returns the list of packages that provide the specified file.

Here, we see that both of the files are provided by the base-files package.


Getting error while installing android studio for linux 64 bit machine

Android Studio doesn't require separate installation of Java Development Kit. I don't think so you have followed same procedure as stated on Android Studio website https://developer.android.com/studio/install

Download the android studio android-studio-ide-192.6392135-linux.tar.gz and extract it and move it to /opt directory.
Install these dependencies sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
Navigate to /opt/android-studio/ and execute studio.sh.
The installation wizard will be started. When installation will be finished you can create a Shortcut to it by clicking Tools > Create Desktop Entry


The basic control structure in any sort of programming language that requires indefinite looping is while loop.

while true ; do /path/to/script.sh ; if [ $? -ne 0    ] ; then continue ; else break ; fi ; done

More readable formating would be :

while true
do
   /path/to/script.sh  # Ensure your script actually outputs exit status
   if [ $? -ne 0    ] ; then
      continue  # if exit status not 0 ( not success ) , repeat
   else
       break    # if successful - exit
   fi
done

Of course you need to ensure that your script actually does have return status that equals to 0 on success. You may or may not want to use full path, or ./ operator to run script in current directory , or specify interpreter such as python /my/python/script.py

If necessary you can add delay before next iteration starts. To do that, you can place sleep 0.250 right after fi but before done


Where do I find Ubuntu User Magazine purchase from Ubuntu Software Center?

I did a search in Unity and the magazine shows up in the Applications area. I expected it to be somewhere under my home directory, but it is placed in:

/opt/lnm/magazines/ubuntu-user


after installing Ubuntu unable to access as keyboard shift key not working so unable to enter pw

Even if it's the smallest change, the layout MUST be on U.S. (idk why)

So, the only way to fix it is...

Reinstall Ubuntu

Keep the layout on U.S. for now in the setup...

After decryption on first boot, you may change the keyboard layout


Where do I save my preseed file on installation media? Ubuntu 14.04.4 Server 64 bit

The root of the CD is /cdrom so for a preseed.cfg in the root must be:

file=/cdrom/preseed.cfg

Of course, you can create a folder for preseeds and change the path (ex. folder /responses  will be file=/cdrom/responses/preseed.cfg)

For example I put a preseed file named xubuntu.cfg in the root of the CD and changed the 'append' option in txt.cfg with:

label live-install
  menu label ^Install Xubuntu
  kernel /casper/vmlinuz.efi
  append auto file=/cdrom/xubuntu.cfg keyboard-configuration/layoutcode=us and console-setup/ask_detect=false boot=casper automatic-ubiquity noprompt initrd=/casper/initrd.lz ---


Swap roles of 'Super_R' and 'ISO_Level3_Shift' keys of Apple keyboard on Ubuntu 14.04

Xmodmap will not work; it has been obsoleted.

In gnome, I think that you can do what you want with gnome-tweak-tool (I think there is an equivalent unity-tweak-tool or similar for Unity):

...should be one of those options. To read the complete definition, due to a bug, you need to dig into the files /usr/share/X11/xkb/rules/*.lst --- i think the one interesting to you would be

  altwin:ctrl_alt_win  Ctrl is mapped to Alt keys, Alt is mapped to Win keys

from xorg.lst, which I suppose is the fourth one in the list.

I cannot check it, but maybe

setxkbmap -option altwin:ctrl_alt_win

can work... from the usually useful arch page.

(and yes, xkb or at least its current status is a PITA. Complex, undocumented system which I am sure noone knows in detail. See the first quote here. ).


Use DD to clone only Linux partition to external USB drive?

As first you need to find out data about your HDD, you can do this by typing in terminal:

sudo fdisk -l

You should get an output like this:

Disk /dev/sda: 149,1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x06bd4abe

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 230055935 230053888 109,7G 83 Linux
/dev/sda2       292970494 312580095  19609602   9,4G  5 Extended
/dev/sda3       230055936 292968447  62912512    30G 83 Linux
/dev/sda5       292970496 312580095  19609600   9,4G 82 Linux swap / Solaris

Partition table entries are not in disk order.

So lets say /dev/sda3 is the drive you want to clone, then you can do:

dd bs=512 if=/dev/sda of=/dev/sdb1/partition.ddfile seek=230055936 count=$(expr 292968447 - 230055936)

Remind this here are only examples you would need to fit that to your situation.


How to download video format 1 or format 2 using youtube-dl?

"22" is always better, its resolutions is 1280x720 and for "18" it is 640x360. So:

 youtube-dl  -f '22/18'  [link]/[playlist]

It will going to download "22" if it was available, if not it's going for "18" and if neither were available it will complain that no suitable formats are available for download.

Have a look at man youtube-dl, "format selection" section.


You have a RTL8822CE wireless device, that is not supported by Ubuntu kernel yet. So you need to install a driver.
Connect to the internet using a cable or a phone and run in a terminal.
sudo apt update
sudo apt install git dkms
git clone https://github.com/lwfinger/rtw88.git
sudo dkms add ./rtw88
sudo dkms install rtlwifi-new/0.6

Reboot and disable Secure Boot in BIOS.
Wifi should start working.


Why does`sudo su -` still try to execute terminator?

You have /usr/bin/terminator set as the default shell for root (see comments). You can change it back to whatever shell you like with the following command:

sudo chsh -s /bin/bash root

Should sudo not work either, you can follow this procedure to fix it (assuming you are using GRUB):

Reboot
If the boot menu doesn't show up automatically, reboot and repeatedly hit ↑ Shift until it appears.
In the boot menu, press e to edit the entry.
Navigate to the end of the line similar to

linux /boot/vmlinuz-... quiet splash

Replace quiet splash by init=/bin/bash and hit Ctrl+X to boot the modified entry. You will be dropped to a root shell.
Remount your root filesystem writable with mount -o rw,remount /.
Change the default shell of root back to e.g. BASH with chsh -s /bin/bash root.
Reboot with reboot.


In 12.04, you can go to System Settings > Appearance > Behavior and turn on autohide, then turn the sensitivity all the way down. Now the launcher will only show when you press Super.


Error trying to install NVIDIA OPTIMUS in Recovery Mode

The file systems are mounted read-only in Recovery Mode. Try this to remount as read/write:

mount -o rw,remount /

Then re-run the installation program.


You will have to add usbcore.autosuspend=-1 to the kernel boot parameters.
You can do this by typing modprobe usbcore autosuspend=-1 into the terminal. Then reboot.


Be careful when you remove system's software. I can think 2 solutions:

Use the command pkexec apt install sudo in order to install sudo.
Reboot and choose "Advanced Options" in the grub menu in order to boot in a root shell and run apt install sudo command in order to install sudo.

After you install sudo look at the apt logs in order to see what other packages which depended on sudo package got removed and install them again.


Could not retrieve the required installation files

01-08 18:30 ERROR  CommonBackend: Invalid md5 for ISO C:\ubuntu\install\installation.iso (dccff28314d9ae4ed262cfc6f35e5153 != 119cb63b48c9a18f31f417f09655efbd)
None

The line above suggests that the ISO image you're using is corrupted. Try downloading it again.


Installing WLAN driver to laptop w/ no internet

Try ip command.

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff

if wlan0 appear, you can continue.

$ ip link set wlan0 up
RTNETLINK answers: Operation not permitted
$ sudo ip link set wlan0 up
[sudo] password for user:
$ whatis ip
ip (8)               - show / manipulate routing, devices, policy routing and tunnels
ip (7)               - Linux IPv4 protocol implementation
$ ifconfig wlan0
bash: ifconfig: command not found
$ sudo ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

  XX:XX:XX:XX:XX:XX : your hardware mac


How to chroot into persistent installation?

The persistant usb drive uses a compressed read-only filesystem (squashfs) and overlays a writable filesystem layer on top that stores changed files. The writable filesystem is stored in a single file (like a zip file, but without the compression - it is actually ext3, but that is unimportant)

To put everything 'back together':

Create the locations where things will go.
Make the filesystems look like whole filesystems and not files (like they do at the moment.
Join the filesystems together.
Play around with the filesystem, like like chrooting
Clean-up

I am assuming the usb drive is mounted on

 /media/usb/

Change this to the directory that contains your persistant installation when you follow these instructions.

You need to be root, or prepend sudo to every command

1. Creating stuff

Some directories need to be created:

/media/rootfs - Location where we will put the read-only filesystem
/media/cow - The location of the writable overlay
/media/persist_usb - The location where the two filesystems will be joined

this can be done with

mkdir /media/{rootfs,cow,persist_usb}

2. Make files look like filesystems

First the compressed filesystem

mount -t squashfs -o loop,ro /media/usb/casper/filesystem.squashfs /media/rootfs

(Description: Mount the filesystem.squashfs file on /media/rootfs using squashfs)

Next the writable filesystem

mount -o loop,rw /media/usb/casper-rw /media/cow

(Description: Mount the file casper-rw' on '/media/cow using a loop device)

3. Join the filesystems together

Now we are ready to join the two directories together

mount -t aufs -o dirs=/media/cow=rw:/media/rootfs=ro unionfs /media/persist_usb

(Description: Mount the union of the two directories using aufs (see unionfs) onto /media/persist_usb with /media/cow as writable and /media/rootfs as readonly)

4. Play around

I'll leave that step up to you.

5. Cleanup

Once you have finished having fun with the installation (like chrooting) you need to get rid of the stuff that was created.

First to undo step 3:

 umount /media/persist_usb

Next to undo step 2. We can do both filesystem together:

 umount /media/{rootfs,cow}

(Description: unmount /media/rootfs and /media/cow)

Finally, to undo step 1:

 rmdir /media/{rootfs,cow,persist_usb}

The changes you have made to the filesystem have been kept and you can now unmount the USB drive (if you want to).


installation - Can't install Shotwell on Ubuntu 19.04, dconf-tools is missing

The problem was solved when I removed the unofficial repository from where Shotwell was tried to be installed. After removing it and trying to install it with sudo apt-get install shotwell, I didn't encounter the same problem.


Wasted screen space due to multiple horizontal bars at the top when an application is open in GNOME desktop

You may try one of following GNOME Shell extensions to get rid of the title-bar of a maximised window:

No Title Bar (an actively maintained fork of Pixel Saver with customisation options)

  No Title Bar removes the title bar, moves the window title and buttons to the top panel.

Pixel Saver

  Pixel Saver is designed to save pixel by fusing activity bar and title bar in a natural way.

Note that Pixel Saver is not actively maintained anymore, therefore has a lot of unresolved issues like this one and doesn't offer any customisation options.

Other similar extensions (including forks):

No Title Bar - Forked
GTK Title Bar
Pixel Saver fork

You can even go further and hide the top bar following this answer by solsTiCe from this Q&A: Auto hiding top panel in 17.10 GNOME 3.26.1.

Also, you may move the menu bar from an application window to the top-bar ("Activities bar") following this Q&A: Ubuntu 17.10 windows' menu in panel.


How to get a *.desktop file to launch the app, and to display the Name and app icon, on the Desktop and in /usr/share/applications/?

After even more research, I found out about the CLI command desktop-file-validate, which checks the syntax and structure of *.desktop files.

.../usr/share/applications$ desktop-file-validate free42dec.desktop
free42dec.desktop: error: file contains line "?[Desktop Entry]", which is not a comment, a group or an entry

Look at "?[Desktop Entry]". That ? indicates that there is hidden character preceding [, which turns out to be a byte-order mark (BOM) which indicates how this UTF-8 file is to be read by BigEndian and LittleEndian systems. More searching yields dos2unix, a utility that converts Windows text files to UNIX format, which you can get with

$ sudo apt install dos2unix

Now do this:

.../usr/share/applications$dos2unix free42dec.desktop
dos2unix: converting file free42dec.desktop to Unix format...

Yay! Now the free42dec.desktop file appears in Nautilus in /usr/share/applications with the Name key Free42 Decimal instead of the filename, and the text icon changes to the Free42 Decimal icon. This shortcut now appears in the Launcher Dash and in the Applications Dash (Overview). Copying it to the Desktop means you can click it there too to launch the Free42 Decimal app.

The format, structure, and syntax of *,desktop (launcher, shortcut) files is documented at Desktop Entry Specification.


Windows 7 running on a Virtual Machine on Ubuntu 18.10

Installing Windows 7 through Virtual machine to run within Ubuntu system is completely possible, I can't see a reason why it wouldn't.

If you unable to do so, it's either a problem with Ubuntu side or VM program side.

Windows 7 installation screen on Virtualbox, running from 18.04 64Bit

Get a Windows 7 .iso file.
Run through the setup installation of new VMs, in Virtualbox I had to set.

Virtual Machine names
Amount of RAM
(Virtual) Hard Disk space

Load the .iso to your newly created VM.
You're all set.


ubuntu does not boot after installing anaconda and pyinstaller

SOLVED:
I went on the "drop to root shell" and I managed to delete the .conf file I created and updated the config cache. After that I could do a fsck. No errors. After that I could enter the dpkg option in the recovery menu. dpkg upgraded the system adn allowed me to log into the system again.


The idea that the current version of Splunk create a user in your system named splunk with home directory is /opt/splunk

Thus :

1. Log-in as splunk :

sudo su - splunk;

2. Check the current directory after log-in :

  pwd;
  # must be : /opt/splunk , if so , proceed

3. Start the daemon :

   bin/splunk start
   # you will asked to agree the license =>  agree if you want to start daemon

4. Waiting for the following message :

  Waiting for web server at http://127.0.0.1:8000 to be available.. Done

  The Splunk web interface is at http://localhost:8000


Second hard drive seems to randomly freeze or unmount

"Any thoughts on where to look for other clues?"

This is likely not the case for you but I once had an XP VM that randomly had an nvram error, and restoring it from a backup I had made just lead to a repeat occurrence. The problem turned out not be the host system but just a bad set of vm files. Cloning the virtual hard drive in a non-sector based manner and restoring it to the hard drive of a new blank vm solved the problem for me. Are you having this problem with a single vm or multiple, as that will tell you whether it's related to host storage problem.


Here is a solution that worked for me.

For example:

avconv -ss 0 -i x.mp4 -t 180  -vcodec copy -acodec copy -metadata track="1" "Part I.mp4"
avconv -ss 180 -i x.mp4 -t 164  -vcodec copy -acodec copy -metadata track="2" "Part II.mp4"
avconv -ss 344 -i x.mp4 -t 185  -vcodec copy -acodec copy -metadata track="3" "Part III.mp4"

I had 50 entries and I put them in a script together. I first put skeletons like

avconv -ss  -i x.mp4 -t   -vcodec copy -acodec copy -metadata track="  " ".mp4"

Then I filled out the -ss and put the titles. After that, I used libreoffice Calc with space as a delimiter. I got the values for -t and track with a formula and dragging.


How do get the surface pro 3 to type and click

You need kernel 3.19.0 or later ... upgrade to latest (or wait until 15.04 comes out)


OPus Audio codec install on Lubuntu 14.04

Do you mean how to install this:
https://launchpad.net/ubuntu/+source/opus

Then, the solution would be:

sudo apt-get install libopus0

If you mean something else, try rephrasing your answer.


Ethernet connection drops frequently and randomly

Finally I solved it by changing IP. I just set up a dynamic IP and that fixed the problem, don't know why, but that fixed the problem.


First, run sudo apt update and retry installing texlive-xetex.
If that does not work, switch to a different mirror.


Can't get fresh Ubuntu server to update/upgrade

Ubuntu 17.04, released in 2017-April (hence 17.04) came with nine months of support; 2017-04 + 9 months = 13-Jan-2018 EOL (End-Of-Life).

Sometime after EOL (no length-of-time is defined) the repos get moved from archives.ubuntu.com (where Ubuntu versions look for updates) to old-releases.ubuntu.com, so your 17.04 is looking for updates where they were.

Given it's a clean install - just use 17.10, or an LTS (long term support; five years of support) version if you don't want to upgrade often.

If you looked (eg. opened-in-a-browser) the address you specified http://security.ubuntu.com/ubuntu has artful (17.10), xenial (16.04), trusty (14.04) & other supported releases (inc. 'in-test' 18.04), but will discover the 'zesty' (17.04) & other post-EOL release folders are gone.


Not able to change network settings on Kubuntu 20.10

In order to completely remove all previous network settings, open a terminal and do:
sudo rm -r /etc/NetworkMananager/system-connections/*

Restart Network Manager:
sudo service NetworkManager restart

You should be all set.
EDIT: Your interfaces file doesn't appear to be correct. Please change it to read:
source-directory /etc/network/interfaces.d

Reboot and tell us if there is any improvement.


Albert hotkey (shortcut) didn't work in Gnome Terminal or Gnome Terminator

The problem is Wayland. Wayland does not support Xlib keygrabs.  Without xlib installed Albert would even crash. However if it is installed it results in this weird behavior. If an X window is focused the hotkey works, if not it doesnt.
Wayland does not allow keygrabs by design.
Let your desktop environment (compositor in Wayland terms) handle the hotkey and run albert toggle


Based on when you posted your question (June 19, 2018), I suspect you have the Mixxx PPA installed.

RJ Skerry-Ryan (@rustyryan) released Mixxx 2.1.1 on June 13, 2018 which appears to cause this conflict.

An old bug that relates to this has begun to get attention starting June 25, 2018 as this conflict has recurred.

Until this conflict is resolved in the Mixxx PPA, I recommend you exclude mixxx from upgrades by running

sudo apt-mark hold mixxx

Once you do that, your sudo apt upgrade should work. Later when this is fixed you can run

sudo apt-mark unhold mixxx

to re-enable updates for mixxx


How can I tell how a panel item was set up

Right-click the panel, choose Panel preferences. In tab Elements, you'll see the list of items in the panel.

On my system, the panels are described in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml, however I found launcher-related information under ~/.config/xfce4/panel/launcher-*.


Changing GPUs from AMD to Nvidia: driver question

First you want to uninstall the AMD Drivers.

Swap your cards then reboot.

For best results with Nvidia you will want to boot into your oldest kernel and install.  If you don't, you may have a hard time booting into older kernels if you ever need to.  Nvidia driver will only install into the kernel you boot and newer kernels, by booting into your old kernels the drivers will install into all kernels.

You may need to set the nomodeset option to boot successfully for the first time. This is only necessary if you can only boot to a black screen. If so:

use the arrow keys to highlight the kernel you want to boot into
Press e to edit the boot setting
In the long lines of text you will see "quiet splash" about half down, use the down arrow keys to get to the start of the line then the right arrow key to move past it.
enter nomodeset just behind "quiet splash"
press F10 to boot into the kernel using the modified settings(this will only affect this boot the settings will return to normal on next boot.

Note: according to this answer you should use nouveau.modeset=0 instead of nomodeset on 15.10, no mention is made of 14.04 but 14.04.04 uses the 15.10 graphics stack so you may need to use that setting if nomodeset fails

I borrowed the following from the linked answer as a copy and paste rather than type it out as it would apply to your card.

Generally it is recommended to use the NVIDIA drivers from the official Ubuntu repositories.
But as you have very new graphics hardware, you can install the latest official NVIDIA drivers.
The xorg-edgers PPA does not provide the drivers anymore and was replaced by GPU Drivers.

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

If you wish to use the above ppa, install it before installing the Nvidia drivers to prevent a re-install.

The driver team is excellent at getting the new builds uploaded within days of release.  The only thing you may need to be cautious of is that the ppa will recommend the newest versions, even if they are betas, in the "additional drivers" window so I always keep an eye on the Nvidia page I linked above to see what the current stable release is. I personally tend to avoid beta versions unless I'm trying to fix a bug, however Nvidia's betas tend to be pretty stable so you may wish to use them.

One final thought, if you use Steam Source games, Nvidia 361 drivers had a regression that prevented source games from starting.  There is a workaround but it is easier to just stick with the 352 drivers or install the 364 drivers, the ppa currently has 364.12 which is a beta but Nvidia released 364.42 a couple of days ago that are not beta and will be uploaded to the ppa soon(I have noticed no issues with the beta version) see Nvidia's site for more

As an aside, some people get tempted to use the drivers directly from Nvidia's website when the run into issues rather than wait for the ppa to be updated, that is strongly advised against, the ppa repacks them so that new kernels do not crash the Nvidia drivers and require a reinstall every time a kernel is updated, it also prevents other possible conflicts as well.


Mouse Pointer Icon on VGA screen changes by itself

The solution is to move the mouse pointer between the two monitors repeatedly till this weird looking pointer is gone . Usually, within 2-6 quick transitions of mouse pointer between the monitor fixes it. And, no need to restart the computer.  It is in fact related to the buggy AMD driver.

PS- Some nVidia drivers also have shown such behavior.
This behavior has also been observed in Windows platform and other OSs.


Read man top, especially about the -b Batch mode and -n Number of iterations. Redirect the top output to a file (I'd do one per top invocation, to facilitate comparison)


Is there any quick previewer for .doc/.docx files?

Gloobus Preview should do the job for you. Just search for it in the Ubuntu Software Centre, you can get all the information about it from their Launchpad page


Does exiting X server kill ongoing processes? (Ubuntu 16.04)

The answer to your question is yes. If you stop/exit/kill a process, all of its child process going to be stopped.

If you stop the lightdm, you stopped the X, the terminal will be stopped as it's a child of X also the shell and running applications in that shell.

You can use pstree to find out if your desired process is a child of X:

pstree -s $(pidof process-name -s)

or:

pstree $(pidof lightdm)

to see all lightdm childs.

How to keep your process ongoing? run it in an other tty.

Start a process on a different tty


At first you need to enable all deb-src (Source Code) repositories using Software & Updates (software-properties-gtk). Then confirm refreshing package lists or run sudo apt-get update manually.

Then get the source code and compile it for 32-bit with command below

# get build tools
sudo apt-get install devscripts gcc-i686-linux-gnu
# get build dependencies for 32-bit (i386) architecture
sudo apt-get build-dep -a i386 libpangox-1.0-0

# get source
cd ~/Downloads
apt-get source libpangox-1.0-0
cd pangox-compat-0.0.2

# compile source for i386
debuild -a i386

and finally install compiled packages with

sudo apt-get install ../libpangox-1.0-0_0.0.2-5ubuntu1_i386.deb  ../libpangox-1.0-dev_0.0.2-5ubuntu1_i386.deb


If you click on the Launcher, and click on Recently Used, you will see your most recently used/closed applications on the top.


How to use the usb monitor AOC e1649wu running on Ubuntu 14.04 LTS?

On Aug 3, 2015, Displaylink finally released the USB Monitor driver for Ubuntu.

Link: http://www.displaylink.com/downloads/ubuntu.php

I have an AOC usb monitor and Ubuntu 14.04. After installing the driver, my usb Monitor start working.

If the driver works for your monitor, please let other people know by posting it. Many people waiting for this driver. I've been waiting for 2 years. :-)


Why USB sticks automatically mounted only under root?

What are the permissions on the mount point? If you run ls -l /media What permissions do you see on the directory?


I need to change out my Bios in my Asus g75vw

Usualy you don't do this with linux, because the most flash-tools just run on Windows (as far as i know). You should get the tools at the asus website.
They mustly also run under some dos-like live-systems.


Set volume to 150% permanently and map volume keys from 0-150%

You should have a setting called Over-Amplification in Settings > Sound. Turning it on and adjusting the volume slider above it will only get you to 100%, but you can still adjust beyond 100% by using either your keyboard's volume buttons if available, or adjusting the volume slider in the corner of your screen.


Upgrade option unavailable when upgrading from 11.10 to 12.04 from a USB stick

If are trying that upgrade with a "live USB" then you can't. Though if you have the alternate iso, then you could avoid wasting a CD by mounting the ISO as a drive with a command like:

sudo mkdir -p /media/cdrom
sudo mount -o loop ~/Desktop/ubuntu-11.10-alternate-i386.iso /media/cdrom

Then to start the upgrade enter:

gksu "sh /media/cdrom/cdromupgrade"


"Open in terminal" not working on nautilus as root

Putting aside any possible damage you've done via sudo nautilus command you could just install & use the nautilus extension nautilus-admin, requires restarting nautilus after install

sudo apt-get install nautilus-admin

It provides

* Open as Administrator: opens a folder in a new Nautilus window
    running with administrator (root) privileges.
 * Edit as Administrator: opens a file in a Gedit window running
    with administrator (root) privileges.

Does so thru a policykit policy.


The best option I know is to reproduce the http get apt generates, by hand, and grep it for packages; something like

Check the deb line of the repository,

$ cat /etc/apt/sources.list.d/<name>.list
deb <url> <dist> <name>

Build a request like:
(this can be tricky)

$ curl -H 'User-Agent: Debian APT-HTTP/1.3' <url>/dists/<dist>/Release
# or $ curl -H 'User-Agent: Debian APT-HTTP/1.3' <url>/dists/<dist>/Release.gz | gunzip
Codename: <dist>
Architectures: amd64
Components: <name>
MD5Sum:
 ......66b4456ffdb000e8208d5d8ee5           287832 <name>/binary-amd64/Packages
 ......b4b8e5fe8d2d53588e745a3d20            47099 <name>/binary-amd64/Packages.gz
 ......d98f00b204e9800998ecf8427e                0 <name>/binary-i386/Packages
 ......9941158dbf2ac8332307610a5b               20 <name>/binary-i386/Packages.gz
...

That will tell you about the releases on this repository server
Build a second request:

$ curl -H 'User-Agent: Debian APT-HTTP/1.3' <url>/dists/<dist>/<name>/binary-amd64/Packages | grep Package: | uniq
# or $ curl -H 'User-Agent: Debian APT-HTTP/1.3' <url>/dists/<dist>/<name>/binary-amd64/Packages.gz | gunzip | grep Package: | uniq
Package: mypacakge
Package: myotherpacakge

Change your arch as necessary, the previous release file should describe the paths and architectures well.

this is pretty tedious and heavy lifted, I hope someone can recommended a better option for this kind of check.


Where do I set the Caps Lock key behaviour?

For 16.04 LTS and newer:
Unfortunately disabling CapsLock can no longer be done from the keyboard system settings as depicted below. We will have to install and run dconf-editor to add 'caps:none' to or.gnome.desktop.input-
sources.xkb-options.
sudo apt install dconf-editor

This can also be done from a terminal with the following command:
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:none']"

For 14.04 and older:
Click on the Ubuntu button and search for "Keyboard Layout" and select "Options..." or from System Settings... open the "Keyboard Layout" and select "Options...".
Look for the Caps Lock key behaviour entry and unfold the list of options to give you this:


Ubuntu Didn't Gave The Option To Reinstall Without Erasing The Previous Version

Well you should always make a (off-site) backup of your personal files. Regardless. Hardware can always break or get stolen.

And that backup then also serves as a restore option that you can use after re-installing with an erase.

It is up to you what option to pick. One thing though: the "something else"  lets you do it all manually. If you mount your /home and do NOT pick "format" it will keep your /home as is except for the config files. That is basically the option of re-installing while keeping your documents. Again: making a backup first would be advisable.


Xfce4 Alt F2 - xfrun4 command impotent in 14.04 Trusty

Press Alt+F2 then press the green arrow (Toggle view mode)
Open the Preferences and add a new pattern, the command should be:

  xfce4-terminal -x bash -ic "%s ; bash"

(-ic to run interactive shell, what will you allow to use the aliases from .bashrc)
Try a command like the example shows

If you want that the Terminal close immediately after running the command you can just use the standard pattern "!".


Nginx is a light weight and fast web server also you can use nginx fastcgi cache options to   speedup your websites.

To configure nginx first you have to add set no of option in nginx like server_name and root path

You can try easyengine which install and configure nginx and all the dependency on one go.

Sample Config For Your Nginx is: https://github.com/rtCamp/easyengine/blob/master/usr/share/easyengine/nginx/php/basic.conf


According to Ubuntu Friendly (beta) the core components of the laptop including the ATI graphics and Realtek wireless are 100% compatible with Ubuntu 11.10.


sh script difference between kubuntu 14.04 and 16.04

@glenn jackman provided the relevant clue.  It turns out that at some point in my old system 'dtc' had been copied to '/usr/bin'.  In my old system, type -a dtc yielded dtc is /usr/bin/dtc while on my new system it yielded bash: type: dtc: not found.

This is all part of an insanely complex build system with all sorts of setup steps and that has morphed several times.  In spite of following a set of work instructions, I must have skipped a step.  I didn't occur to me try 'type' myself because obviously that couldn't be the problem ;-)

Thanks to all that commented!!!


I installed Xubuntu yesterday and it was like that, too.
Update and reboot solved the problem.

To Update:

sudo apt-get update

sudo apt-get dist-upgrade


Ok, so for some reason my image contains some backported packages from newer distros. I solved the problem by installing the conflicting wayland package:

aptitude install libwayland-egl1-mesa-lts-wily

Then I was able to install kubuntu-desktop normally.


Create bash-script to execute multiple bash scripts

Try this Leon

#!/bin/bash
mate-terminal --working-directory="/home/user/Documents/kafka_2.11-2.0.0/bin"  --command "/home/user/Documents/kafka_2.11-2.0.0/bin/zookeeper-server-start.sh config/zookeeper.properties"
mate-terminal --working-directory="/home/user/Documents/kafka_2.11-2.0.0/bin"  --command "/home/user/Documents/kafka_2.11-2.0.0/bin/kafka-server-start.sh config/server.properties"

The error is saying already that it cannot find the two scripts so you need to set full path of the scripts. I am not sure about the path of the config/ properties files but these also need to be set to full path.


Font smoothing not working for Windows fonts

LibreOffice doesn't use anything but the freeware font engine so all MS and Monotype fonts will look bad as they are hinted or prepped for the Windows font engine.

Also, LibreOffice doesn't license any fonts from monotype so it's not the best solution if you create a document in Times New Roman in MS office, then open it up in LibreOffice - it will default to some random opensouce (typically poor quality) font.

Update:

If the bug is only with a single font:
You can find the fonts in /usr/share/fonts/truetype and edit them with any application you like.
Remember that in the Ubuntu repository you can find alternative versions of almost any character; often, open versions are better than proprietary ones.
If the bug is with many fonts:
A temporary solution is to use substitution table in character styles options to substitute the bad font with the good ones. You can also set the default fonts in the Writer options.
Another solution can be to tweak the characters options for the page: right click -> characters -> position -> distance. And make it fixed by disabling the default, it should be better.
If you can't solve, please consider of downgrading your libreoffice with Synaptics package manager (Menu -> Package -> Force version).
Hope you solve, my eyes would implode with a similar bug. :)

EDIT: if one of the following solutions works try to tweak the font rendering configuration by editing the files in /etc/fonts/conf.d/; use sudo nano /etc/fonts/conf.d/FILENAME on a terminal to do it.
For example try to disable font antialiasing by editing 10-antialias.conf (replace true with false); the same for 10-hinting.conf. If nothing changes symply re-replace false with true.
Please note that you will disable these features for the whole system, so revert the changes if they doesn't help.
The last possible cause of your problem can be the graphic rendering of the driver itself. You can try to execute sudo nano /etc/libreoffice/soffice.sh and ENABLE/DISABLE the OpenGL support. Restart Libreoffice after each edit.
If you can't solve downgrade or use OpenOffice or an equivalent suite, for your eyes (I'm not kidding).
I'm sorry if I wasn't of great help, but I don't know the source code of LibreOffice, I'm only trying various possibilities. :-)
Let us know if you solve or if you discover interesting things.

PS: I copied it from Ugly LibreOffice font


Before posting this issue I tried several reboots without any improvements. However, my Bluetooth device strangely reappeared in the bottom panel this morning and works properly again. This is very strange since I don't think I have changed anything in the settings, but the problem is finally solved anyway.

The problem left the way he came.


How to pull packages from a git repository without Internet connection?

You'll (obviously) have to have access to his repository. You could copy his entire repository to a USB stick (make sure you copy all the hidden .git* files!) and access it that way. You can also set up network share and get access that way...

Once you have access to his repository its very easy to pull his changes into your repository (using a terminal):

cd "<your repo directory>"
git pull "<his repo directory>" "<branch>"

Where <your repo directory> is the path of your location git repository, <his repo directory> is the file path of his repository and <branch> is the branch you are trying to pull (you can see a list of branches using git branch; the branch marked with the star is your current branch).

In practice it could look like this:

cd "${HOME}/project"
git pull "/media/john/USB/repo" "master"

In other words: You can check out a repository from an offline source just as you would when using a server!


udisks2 (udisksd) errors in syslog: how to investigate?

I finally solved it: in my case it was in fact Docker related. I stated in my question that I stopped Docker and the problem persisted. This is still true. The problem was due to booting with Docker auto start enabled while it tried to start a container which had a volume on a LUKS device that wasn't present at boot. After stopping Docker the udisksd log spam persisted.
I solved it by disabling auto start for the container which has its volume on a disk that is not present at boot time.
After that no more errors appeared and I was able to manually start the container.
Thanks for the input.


Wow, 1 year and 8 months ago I asked a stupid question. I suppose for the integrity of the site I'll give my stupid answer..

First of all, to remove the old boot entries in your BIOS load screen, (I haven't figured out how to do this using Windows, I usually use a live image of Ubuntu) open a terminal and enter:

sudo apt-get install efibootmgr
 sudo efibootmgr
 sudo efibootmgr -b (bootcode) B

Be careful not to delete the wrong one!

Next, I had 3 hard drives with 3 different OS' on them. I installed a bunch of Linux distros and later installed Win 10 on the drives.

So the issue I had was with Grub and Windows Boot Manager. The problem here happened because I installed Windows on a another drive AFTER the other distros. To avoid this I wiped clean and started with Windows 10, ensured it had boot priority in my motherboard's BIOS settings. Then I installed the other distros after. This way Windows Boot Manager didn't end up in Grub (which was forcing me to go through multiple boot selection screens every time I powered on).

I hope this proves useful to at least 1 person :)


I am running Knoppix on my desktop. How do I switch to Ubuntu?

Just do a fresh install of Ubuntu on the same machine.

http://www.ubuntu.com/download/desktop/install-desktop-long-term-support

(You may want to back up /home first, if you have files there you want to keep.)


Simplest way to "isolate" apache virtual hosts

If you're looking for decent compartmentalisation, then Docker or a Virtual Machine would be the way to go, as this would ensure that the Apache processes could only write to their own confined area and not to other locations writable by the Apache user. However, as the relatively powerful home server would still need to route traffic to those instances, there is always the possibility of an external entity compromising the entry point to the system.


You need to open the terminal window using this command:
CTRL + ALT + T
Then, you need to type in the following command:

sudo service network-manager restart

OR

sudo service NetworkManager restart

This way, you are restarting the connection instead of restarting the whole machine.


System doesn't boot due to a "[drm: drm_crtc_helper_set_config] * error * "

I am having the same issue using 12.10 on a Lenovo ThinkPad T430 on a docking station. The analog monitor works fine, but when the DVI-D monitor is attached, the drm error occurs. Remove the DVI cable, and the system boots again (although I need to dpkg-reconfigure gdm to reset the display manager)


Transition from single node to multi node hadoop same

If the two machines are connected, just check their IP addresses and modify your /etc/hosts file on both the machines so as to make one machine the master and the other slave.

Say the IP addresses of the two machines are 10.25.5.114 and 10.25.5.115
and you want to make the 1st machine the master then update your /etc/hosts file on both the machines with the following lines:

10.25.5.114 master
10.25.5.115 slave

This assigns the IP address 10.25.5.114 to the master machine and 10.25.5.115 to the slave machine.


Error while running make to install drivers

It seems your kernel header files are missing :

Try sudo apt-get install linux-headers-YOUR-KERNEL-VERSION. Then try make again or sudo make


laptop keyboard does not work ubuntu 13.10

Could you run lshw, dmesg & lsmod? It sounds like the drivers are not loading

Note: This should be a comment but I have no kudos so update your original post with the outputs


Running command periodically and save output to a CSV file

Disclaimer: I don't know a thing about python, I just combine what's said in the below given sources. I'm not able to test it and there is a change that this is terribly wrong.

Write a while loop with a sleep command that regularly calls your command: source

import time; while True: ap1.params['frequency']; time.sleep(2)

This will in fact not call the command every two seconds but rather wait  two seconds between every run – you might want to tweak the sleep time.
Run the loop and redirect the output to a file appending it: source

py 'import time; while True: ap1.params['frequency']; time.sleep(2)' >> output.csv

There are other ways to redirect the output, of course python itself is also totally capable of doing this – see the source for alternative approaches.


kill popup or dialog box using command line

You can run xkill and then click on a window to kill the PID associated with it. This will probably kill all the popups, since they are very likely not forked from the original program.


restoring permission i have accidently given using chmod

There isn't any way to revert it as far as I know, but to fix your problem, you can use this command to give directories 755 and folders 644 chmod:

sudo find /home/ -type d -exec chmod 755 {} \;
sudo find /home/ -type f -exec chmod 644 {} \;


How to integrate google calendar in kubuntu?

Install Chromium (or Google Chrome) if you haven't already with sudo apt-get install chromium-browser
Unfortunately, the offical Google Calendar extension doesn't support notifications, but this one does. Sign in and install the extension.
Go to Chrome's settings with chrome://settings/. Click advanced options check "Continue runnning background apps when Chromium is closed"
Go to the settings for the extension by going to chrome://extensions/ and clicking "Options" under "Checker Plus for Google Calendar". Check "Run in the background when browser is closed". You can also customize notification settings (default is 30 minutes before).
Go to "Startup and Shutdown" -> "Autostart" and add /usr/bin/chromium-browser --no-startup-window to automatically start Chromium when your computer turns on.

I've tested this on Xubuntu 16.04 and it was able to produce a notification with Chromium windows closed. It should also work on other systems.


can't download file of which size is bigger than 2GB

I have had many problems in the past with trying to download larger files through browsers. You can open up a terminal and use wget.... with -c option. If it stops downloading at the 2 GB limit you have been reaching, just up arrow to the last command you just entered, and hit enter again. Your download will resume.

wget -c <download url goes here>

Here I am downloading a small DVD as an example. (I know it's not larger than 2 GB's but this will work regardless of file size, as long as you have remaining disk space to download it to).

I hit CTRL + C to stop the download.

I up arrowed to the previous command, and after hitting enter, the download resumes!

Hope this helps!!


watch -n x your command

will repeat every x seconds. if your command last 10 minutes and you use
watch -n 3600 your command you'll only get 50 minutes between 2 commands. Each command will start exactly one hour after the previous one.

You may use sleep, and a loop, if you want to wait a given amount of time between 2 run. Sleep uses seconds. my example sleeps one hour, 3600 seconds.

while : ; do
  your command
  sleep 3600
done


You can manually change the contents of /etc/passwd, /etc/shadow and /etc/group.  Or you can use usermod command. Check the manual page for information on how to use them.

Then you need to search and change the name in some configuration files under /etc/, I usually uses grep to do that, see manual page about how to use it. Don't forget to check and possible change the mail directory name in /var/spool/mail/.

Notice that Linux only identify users and groups on the number values. Linux uses /etc/{passwd,shadow,group} to map between names and id numbers. So if you have two users with same uid value, the kernel will not be able to make any difference between them. For the kernel the user have two login names. Don't use this, as that is not supposed to work.

Most applications store the user name and not uid. That is why you might need to change some configuration files with the old login name to use the new login name.


You need to install the qtdeclarative5-models-plugin package, the Qt 5 Models QML plugin.

sudo apt-get install qtdeclarative5-models-plugin


Does HDMI 5.1 surround sound work on Ubuntu 16.04?

I think it depends on your hardware.  My understanding is that some changes in the innards of 16 broke the AMD supplied drivers (fglrx).  The open source driver only supports 2 channels over HDMI.  There is a new AMD sourced driver but it supposedly onlyl works with the very latest Radeon hardware.

Chat/discussion on nVidia makes it sound like it has the same problem.  I suypposed this may leave only Intel or non-integrated sound as options for multi-channel over HDMI in Ubuntu 16.

(I'm fighting the same battle with an AMD/Radeon system)

Good luck!


How do I install Google Translate Desktop?

Recently I've made a super simple script that opens a new browser tab with the google translator page showing information for the currently highlighted text on any app in Ubuntu.

It can be used as an alternative. One way to use it is to link the command to a keyboard shortcut; then, any time you press the key, a new tab will open automatically.

I took this approach because frequently I'm looking not only for the translation but also for the pronunciation as well.

In addition, you might want to check translate-shell out, it is a command-line utility that interfaces with many translation engines.


CIFS mount get dropped Ubuntu VM using VMWare

Depending on what version of Samba you're trying to connect to, it can be specified when mounting the cifs share by adding it to /etc/fstab, like:

//your-server   /your/mount   cifs   vers=2.1

Or by specifying it with -o vers=3.0 if mounting from the command line.

This can prevent some compatibility issues which results in a suddenly dropped connection. The mount.cifs manpage says about vers=:

1.0 - The classic CIFS/SMBv1 protocol. This is the default.
2.0 - The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server 2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is not supported.
2.1 - The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.
3.0 - The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.

Also, if the mount becomes unresponsive and “hangs” as you say, try to unmount it with the -l / --lazy option (e.g. umount -l /your/mount). From the manpage:

Lazy  unmount.  Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore.  (Requires kernel 2.4.11 or later.)


Preinstalled Windows 8 Not showing up on Grub 2, Ubuntu 12.10

Launch a terminal by pressing Ctrl+Alt+T and type
sudo os-prober and check if it detects your windows 8.
IF it detects windows 8 then do sudo update-grub.

To install os prober do sudo apt-get install os-prober


If I understand well your question, you can use:

For example, if your default location for your web server is /var/www and the pictures are in /var/www/pictures:


How to link a custom keyboard shortcut to a bash script in Ubuntu 13.04?

First of all, aliases are not expanded in non-interactive shells. Read the ALIASES section from man bash in this sense. So, you can't use an alias in 'Command' field when you add/edit a custom shortcut.

Second, as geirha said in this comment, if you changed PATH in .bashrc file, that change will not be available in non-interactive shells. So, you need to change the PATH in ~/.profile file instead.

Third, if you still want to use only bldn in 'Command' field when you add/edit a custom shortcut, you can rename your script with this name and add the script path to the PATH in ~/.profile file, as I said above.


Can't change root password, passwd doesn't do anything

By default in Ubuntu the /etc/ssh/sshd_config file of the openssh-server has the following line:
PermitRootLogin without-password

this prevents to login into the ssh-server as root using password which is for security reasons, you can use key based authentication (and any other not using password) mechanism to login as root directly.
So you have two options:

First the bad option, avoid this one. Make the line of /etc/ssh/sshd_config as:
  PermitRootLogin password

The good option is to login as another user who has access to the server, then switch to the root account by:
  su - root  ## Will need root's password.

or
    sudo su -  ## Will need calling user's password. The calling user needs to be able to use sudo.


Haskell has to be started with ghci command.

Visit HaskellWiki and see.

Also refer this Stackoverflow question.

You can run a Haskell by:

runhaskell [FILENAME].hs

Or

ghc [FILENAME].hs


Cinnamon Settings appears as Bluetooth in Docky

Open /home/*user*/.cache/docky or /app/docky-2/Docky/Interface/DockPreferences/Dock1/Launchers with gedit and replace the line

/usr/share/applications/cinnamon-bluetooth-properties.desktop

by

/usr/share/applications/cinnamon-settings.desktop

If anyone need it (I'm french):

Icon=preferences-system
Name[fr]=Paramètres systèmes
Comment[fr]=Configurer les paramètres systèmes

You have to restart Docky after that !
https://bugs.launchpad.net/linuxmint/+bug/1222225


Is there Ubuntu software for architectural drafting

DraftSight

DraftSight by Dassault is a free, but not opensource, 2D CAD drafting program.
It is nearly identical in operation to Autodesk AutoCAD and uses native DWG format.
There should be no learning curve for a regular AutoCAD user.

https://www.3ds.com/products-services/draftsight-cad-software/free-download/

DraftSight does have many 3D capabilities such as 3D Orbit, 3D Polyline and 3D Mesh. However it can nor create or modify 3D ACIS solids.


Not a perfect solution, but as a stop-gap, you can manually trim on-demand via a command like sudo /sbin/fstrim -av See below before running this; you want to make sure you get the right command!

systemctl cat fstrim.service will show you the fstrim service file.

Look at the bottom and see what's being executed. You'll see this after the line ExecStart=. It will probably, for Ubuntu 18.04, be calling /sbin/fstrim -av.

With this in mind, run sudo /sbin/fstrim -av and you'll see something like

/boot: 0 B (0 bytes) trimmed
/: 6 GiB (6384705536 bytes) trimmed

Boom, trimmed!

And, yes, it doesn't ask the question you're really after, which is the same question I have after seeing this question. I'll look into this myself on my laptop and post back here--it'll help us both!


I have installed ubuntu alongside windows 8 but now i am not getting multi boot option

When you install Ubuntu, it also installs GRUB. GRUB is pretty much a boot-loader you will use to boot Windows. All you have to do is hold Shift while your PC is booting up which will bring up a menu. It should show Ubuntu and Windows.

Use the arrow keys to navigate to Windows and press Enter. Windows should now boot up.

If this doesn't work then GRUB may have not installed with Ubuntu. In Ubuntu, type in this down in Terminal.

sudo grub-install /dev/sda

Once that is done, redo the steps. Hope this helps!


How to bring back minimize and maximize buttons in Gnome 3

The command line way

add the values at the left side of : for buttons on the left side

close,minimize,maximize:

gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:"

add the values at the right side of : for buttons on the right side

:minimize,maximize,close

gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"

or mix them

close:minimize,maximize

gsettings set org.gnome.desktop.wm.preferences button-layout "close:minimize,maximize"

The GUI way

Start the gnome-tweak-tool, open the Windows tab and switch the buttons for Titlebar Buttons in the right panel


Add this to the top of your 000-default file:

WSGIDaemonProcess mysite python-path=/var/www/html/mysite:/usr/local/lib/python2.7/site/site-packages
WSGIScriptAlias / /var/www/html/mysite/wsgi.py
WSGIProcessGroup mysite

Configure the file paths to where your files are stored.


Stop internet service provider website from loading automatically every time I connect to internet for the first time

Some ways to find this software:

Look at the output of ps -ewfH -- does anything in there look like the brand name of the dongle or the service provider?

In a terminal, run grep -Ri <brand-name> /etc/ , where <brand-name> is some distinctive part of the brand name of the service provider or dongle. If you get any matches, that might tell you how the script is auto-starting.

If you remember the date when you first installed the software that came with the dongle, you can try to find the files it modified by doing:

find / -newermt <1 day before dongle> ! -newermt <1 day after dongle>

for instance, if you did the dongle software install on December 21st of last year:

find / -newermt "2014-12-20" ! -newermt "2014-12-22"

Very slow, but might work:

grep -Rli "<distinctive part of url the software takes you to>" /

This searches every file on the system for that URL. If you have 1 TB of files, this will take approximately 3-4 hours to complete. You can speed it up by first trying with /usr /etc /*b* /var /opt in place of the last /, but if the script is hiding in your home directory, that won't catch it.

Extreme measures:

On a different computer (one that you don't mind reformatting), take a full backup of every file. Then, connect the dongle to it and install the software. Now compare the entire machine to the full backup, and see what changed.


I use this ppa: https://launchpad.net/~mc3man/+archive/mplayer-test

The daily svn builds are stable and bug free for me (archlinux stable repo contains such version), while the repo version contains some bug that I cannot stand.


Installing monodevelop from PPA on Ubuntu 14.04 (trusty)

It seems there's been a problem with the repository. Now, after one week, it is resolved without me doing anything new.


How to make my package updatable via update manager?

  How I can make my software installable via apt-get? I want to keep source on my server.

For both of these things, you'll need to create a repository to host your package, so that it can be downloaded. The easiest way to do this is to create a PPA on Launchpad. You will then have a PPA / repository, trough which you can distribute your software. See How do I create a PPA?

  Is it a correct if I will run this command in postinstall script?

No, don't do this. If you create a repository, users should add it (on the computer where they want to install your package) first, using the command sudo add-apt-repository ppa:your-repo/ppa, and then install your package with sudo apt-get install yourpackage.

If you do not want to use a PPA, but want to submit your package to the main Ubuntu repository, see https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages.

  What is a signature and how I can sign my software.

A "Signature" is a way for users to ensure that the package they get was not tampered with or modified, so that they can be sure that the package was created by you and not by someone else. This is for security. If you use Launchpad PPAs, this will be done for you. If you only want to sign the debian package, see how do you create a "signed" deb package

  What should be a structure of files?

There is a good guide here, otherwise, you need to make sure that the files for your program are in the right place ("/opt/, /bin/, /lib/, and so on.)


when I start my computer I can see my flash drive. But when I click it...it goes away

Open terminal by pressing ctrl+alt+T and enter sudo fdisk -l.

To mount the partition, find the flash drive and memorize its name, something like /dev/sdb2.

Then create a mount point with

sudo mkdir /media/nameyoulikehere

Finally, mount your flash drive with

sudo mount /dev/sdb2 /media/nameyoulikehere

(replace /dev/sdb2 with actual name of your flash drive partition)


You can add it by using Compiz >> General Options, Right?


I did the following:
1) backup the files in my home directory
2) delete my user
3) add same new user
4) restore files to my home directory
Why login now works is, however, a mystery


Can I add external device or other icons to the desktop?

You should be able to use

gsettings set org.gnome.nautilus.desktop volumes-visible true

to get all the mounted volumes on your desktop.

Alternatively, you can install dconf tools with

sudo apt-get install dconf-tools

and navigate to org > nautilus > desktop. Then change volumes-visible to checked.

If you'd like to remove the icons from your launcher now that you have them on your desktop, you can install CompizConfig-Settings Manager (CCSM) and change the "Show Devices" option in the "Experimental" tab under "Unity".


How do I set up TPM 2.0 on Ubuntu 18.04?

Searching for similar question, I found a well documented guide, only for fresh install case with LUKS, using libs from https://github.com/tpm2-software/ which are made/supported by Intel (and others), and officially distributed on Ubuntu.

https://github.com/vchatterji/tpm2-luks

However, I didn't find any information at all to setup TPM 2.0 with an already existing LUKS/LVM volume...


a terminal emulator w/key-customization on par with iTerm?

Konsole has this section in its Edit profile settings:

I haven't experimented with it, but it looks like it might fit your needs.


x-executable does not run correctly on Nautilus

In fact the file is executed, but running a program from Nautilus doesn't open it in a terminal. The best way to run a software is create a shell desktop entry within /usr/share/applications or ~/.local/share/applications. Desktop with be named something like helloworld.desktop and should contain the following example:

[Desktop Entry]

# The type as listed above
Type=Application

# The version of the desktop entry specification to which this file complies
Version=1.0

# The name of the application
Name=HelloWorld

# A comment which can/will be used as a tooltip
Comment=This is just a sample

# The path to the folder in which the executable is run
Path=/opt/helloworld/

# The executable of the application, possibly with arguments.
Exec=/opt/helloworld/helloworld

# The name of the icon that will be used to display this entry
Icon=/path/to/an/icon.svg

# Describes whether this application needs to be run in a terminal or not
Terminal=true

# Describes the categories in which this entry should be shown
Categories=Misc;Languages;Python;

Source of the information : https://wiki.archlinux.org/index.php/desktop_entries


That is called CIDR notation where the first part is your IP address like 192.168.1.100 and the second part is your netmask like /24.

Together they would look like:

192.168.1.100/24

The /24 CIDR is actually for the netmask like the following:

CIDR | MASK
/24  | 255.255.255.0
/25  | 255.255.255.128
/26  | 255.255.255.192
/27  | 255.255.255.224
/28  | 255.255.255.240
/29  | 255.255.255.248
/30  | 255.255.255.252
/31  | 255.255.255.254
/32  | 255.255.255.255

/24 is the most common in home networks.  Linksys and other such routers will assign on IPv4 DHCP records that will look like 192.168.1.100 where the gateway or router IP address is 192.168.1.1.  And with a subnet mask of /24 or 255.255.255.0 that means that the IP address octets have to match from 192.168.1.xxx where the last 3 digits can be anything from 1-254 to be in the same subnet.

One tool that I use on a daily basis especially with my job is the Online IP Subnet Calculator.  Just to give you something along what your IP might be.  I am not sure what your IP is.  I am assuming it is a Public Static IP.  So, I am going to use a made up IP as 74.172.65.26 with your mask of 255.255.255.252.

Just on the quick image there we can see that the Mask Bits is 30, so the notation would be 74.172.65.26/30  Which would mean that our gateway should be 74.172.65.25 which has to be in the same subnet as our IP address.  Clicking on the CIDR just above switches to a slightly different calculator, but I input the same information and received about the same in return.

There we can see that our route would be 74.172.65.24 as our network and our network CIDR Notation would be 74.172.65.24/30 but that is not our IP address.  Our broadcast on that network is 74.172.65.27 as that is the highest IP.  This is the equivalent of an IP of 192.168.1.15 mask 255.255.255.0 network where our network CIDR Notation would be 192.168.1.0/24 and our broadcast would be 192.168.1.255 and our gateway IP would be more than likely at 192.168.1.1.

Hope this helps!


r-cran-matrix packages cannot be authenticated

You actually have two separate issues, and they are not related to each other, they're individually different issues.

The first is the r-cran-matrix issue, designated by the E:... line in your output.  The GPG key used for the signatures of that repository are no longer valid and expired.  You need to refer to the location of how you installed that repository to readd it and update the keys.

The second is you have two entries for Dropbox, denoted by the two W:... lines in the output.  Check all your sources.list file and your files in /etc/apt/sources.list.d/*.list for duplicate entries for Dropbox.  It looks like you have two entries that match based on that error.


You need separate server {} sections in your configuration for each site you want to serve, and given that you want different behaviour based on whether the user arrives at http: or https: these must be defined as separate server {} sections.

In one, you would listen on port 80, and the other, you'd listen on port 443 and enable ssl and http2.

In the one that listens on port 80, the only thing you want to declare in that section is a redirect to the same URL but with https:.

On my site these redirect stubs look like:

server {
        listen 80;
        listen [::]:80;

        server_name some.example.com;

        return 301 https://some.example.com$request_uri;
}


"/bin/rm: cannot remove files .. No such file or directory " though they exist

Did you check that the file exists, other than by using locate? Locate uses a database, so you may be looking at stale information.

Three solutions:

Use the --existing option for locate
Run sudo updatedb before running locate
Try again tomorrow, after the daily cron jobs have run


Onboard keyboard call from bash - inconsistent behaviour

Note: Following answer has been tested in Ubuntu 18.04 LTS
Not sure if this is the exact answer to your question, since you are calling Onboard with code, but I found the configuration at the following link to work for me with making Onboard show over top of full-screen applications.
https://bugs.launchpad.net/onboard/+bug/1722271
Specifically this section:

Disable "Dock to screen edge"
Enable "Force window to top" (this seems to have no effect when screen edge docking is enabled)
Now, go to firefox, fullscreen, and make onboard show and it will show.

I've tested this with both Firefox and a program of my own, and with both apps Onboard will show over top of the apps when they are full-screen.


I am unable to create a live pen drive in my OS

Use dd command from terminal. Ubuntu startup disk creator didn't work in my machine as well.

dd if=/dev/sr0 of=/home/hope/exampleCD.iso bs=512

Replace /dev/sr0 with the address of your pen drive. Use fdisk command. "of" is the path of iso image stored in your machine.


Will Ubuntu one sync if I update files in my local directory?

Ubuntu One allows synchronization of files across machines and does this by synchronizing any file you put in the ~/Ubuntu One folder.


Monitoring inbound and outbound internet traffic


Cannot use "./" to execute a shell script

The errors you see may be caused by trying to run an executable on a media mounted with the "noexe" property.  Type mount, and examine the properties of the device which contains the script.  Change the /etc/fstab properties of the mount if necessary.


How can I set up virtual serial ports (Linux null modem emulator) using tty0tty

Installation

Download the tty0tty package from one of these sources:

http://sourceforge.net/projects/tty0tty/files/

clone the repo https://github.com/freemed/tty0tty:
git clone https://github.com/freemed/tty0tty

Extract it:
tar xf tty0tty-1.2.tgz

Build the kernel module from provided source:
 cd tty0tty-1.2/module
 make

Copy the new kernel module into the kernel modules directory:
 sudo cp tty0tty.ko /lib/modules/$(uname -r)/kernel/drivers/misc/

Load the module:
 sudo depmod
 sudo modprobe tty0tty

You should see new serial ports in /dev/ (ls /dev/tnt*)

Give appropriate permissions to the new serial ports:
 sudo chmod 666 /dev/tnt*

You can now access the serial ports as /dev/tnt0 (1,2,3,4 etc)
Note that the consecutive ports are interconnected. For example, /dev/tnt0 and /dev/tnt1 are connected as if using a direct cable.
Persisting across boots
Edit the file /etc/modules (Debian) or /etc/modules.conf
sudo nano /etc/modules.conf

and add the following line:
tty0tty

Warning
Note that this method will not make the module persist over kernel updates so if you ever update your kernel, make sure you build tty0tty again repeat the process.
If you don't move the module on every kernel update systemctl --failed will return that service systemd-modules-load.service ended "failed". Also on journalctl -xe | grep "Failed to find".


Where are theme and Compiz settings stored?

OK, solved by reading manuals. .gconf, .config and .locale needed to copy to /etc/skel/


So without monitor RPI boots up and network works fine, You able to ssh to RPI. With HDMI connected RPI unable to boot up. It looks like it's power supply issue. If You have multi-meter, check voltage, if it drops lower then 4.9V, just change power supply.

Did You connect something else to USB ports except keyboard and mouse? If yes, for example USB Hard Drive without external power supply, then it's definitely power supply issue. My RPI2 runs with two HDD, but!  I used soldering-iron and made my own USB cables. Power +5V and Ground goes to HDD and RPI with separate wires from Power supply. HDD and RPI only conneted with data+ data- and Ground (USB pinout). I bought 5A Power Supply just because my RPI runs 24for7 and I want to keep it cool and safe. Perhaps 3A should be enough to.


I have compiled a complete list of commandline and other lightweight tools for linux. It also have list of music players too, check it out Command Line Tools.

Here is my personal favorite CMUS


the deb package you downloaded has programs that are included in a different package supplied by the ubuntu  repo.

You  have to stay with the packages in Ubuntu's repo. or download and replace all of the gstreamer-plugin packages.


There are different menus for changing keyboard shortcut settings in KDE. You can find them by searching for "shortcut" in the Kickoff menu.

For example, to change the hotkey for the Mute action, you go to Global Keyboard Shortcuts and select KMix (which responds for sound).

To add your own shortcuts, you can go to Custom Shortcuts. Let's make a shortcut for KCalc – KDE's default calculator. Right-click on the box to the left, select New → Global Shortcut → Command/URL. Give your new shortcut some name, go to Trigger tab, pick a key, then go to Action tab and write kcalc there. You can launch different applications, open web pages or perform other command line actions, that depends on what you write here.

Also note that there are per-application shortcut settings in each application's Settings → Configure Shortcuts... menu.


You can convert them to PDF using the command line program chm2pdf (install chm2pdf here). Once installed you can run the command from a terminal like this:

chm2pdf --book in.chm out.pdf

In case you didn't know, there are several chm readers available - just search chm in the Software Centre.

You can also extract chm files to html using the command line tool 7-Zip (install p7zip-full here):

7z x file.chm


Terminal session message: unable to find PtrFeedbackClass -- Ubuntu Mate 15.04

Found a stray line in the .bashrc file referencing a recently decommissioned mouse. Thanks to the Ubuntu Mate clan over on Google Plus.


Upgrade and new software installation fails

You have a package that was not installed correctly or is broken. You have to remove linux-image-extra-3.8.0-19-generic.
I would suggest that you use the following code:
gksudo nautilus /var/lib/dpkg/info
Now find all files starting with names linux-headers-3.8.0-19 and delete them. Then:

sudo apt-get -f install
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install linux

Your system should work fine then.
Solution #2
An easier way of doing this using the GUI would be to use a tool called Ubuntu Tweak. It's a great tool, that removes old kernel related files. You can install it using the guide given here.
Inside Ubuntu Tweak you can use the Janitor option to completely clean your system, after which you can run an update.Hope this answers your question.


How are applications automatically launched at boot if they are not registered as services

Your desktop environment automatically launches an application once you log in if the application's .desktop file is in one of the Autostart directories (viz. /etc/xdg/autostart/, ~/.config/autostart/).

I believe you'll find jetbrains in ~/.config/autostart/ (but there's big chance I'll be wrong).

If the attribute X-GNOME-Autostart-enabled= in a particular .desktop file in ~/.config/autostart/ is set to true then the application starts at login. You may disable this by changing it to false.

The method above should not to be tried with the .desktop files of system applications in /etc/xdg/autostart/. Instead go to /etc/xdg/autostart/ and change the NoDisplay=true line in the .desktop file of interest to NoDisplay=false. Then the application should appear in the list of Startup Applications. You can disable it from there.

See this for details.


Is there a way to detect which workspace you are currently in from the command line?

If you aren't using Compiz, you can use xdotool .

Example:

xdotool get_desktop

This will return 0 if run from the first workspace, 1 if run from the second etc.


Trouble shooting an install with no display is always very difficult.

However what we realistically need to determine is if the machine is booting or not.

If at all possible can you connect this machine to a local network once it's booted, then find some way of polling the network to see if anything new shows up.  You can do this with another linux based machine and tools such as Nmap.

Alternatively, if you have access to another machine, and it has a serial port on, and you can get hold of a serial to serial cable try connecting the two machines and see if anything appears on the serial port.

Most *nix based Operating Systems (Ubuntu included) will in most cases make a terminal available on serial port if one is detected at boot up.

If you fire up a serial terminal on the working machine and get a login prompt from the other machine you know your booting ok, and the issue is likely a graphics driver and / or display resolution out of range problem.

Another thing you can also try is pressing various combinations of ctrl+fkey or ctrl+alt+fkey  In most cases this will drop you to a command line and providing your install is not trying to set a strange console resolution from the boot you may actually get something usable.

UPDATE FOLLOWING OP's addition of comment stating removal of hard drive

I can only assume that you booted from a Live distro CD, in which case it sounds to me like the primary partition on your first hard drive is not marked as bootable.

If this is the case, you need to do 2 things as follows:

1) Put the internal hard drive back in, then using the laptops BIOS configuration, set the boot priority of the machine to boot first from CD/DVD then from the first hard disk.  To get into your BIOS there will be some message on your post screen that states press XXXX to enter setup.  XXXX is often the del key, or F1, F2 so on.

2) Use the disk partitioning tools on the live CD (You'll most likely need to be in rescue mode) and set the first partition on your hard disk to be bootable.

IF all is ok and there is a working OS on that drive, then you should hopefully see it start to boot, if it tries to start from CD/DVD then remove the disk from the drive and try again, or use your BIOS as previously described to change the boot order back to hard drive first.

IF the primary hard drive partition is already marked bootable, then chances are your hard drive has a damaged first few sectors.  Now this is not as bad as it sounds, you can sometimes if your lucky manage to partition around it, but you need to start getting very creative with your partitioning tool if your going to do this, it's not a job for the feint of heart.


Just a guess, but a very likely one. Your SAMSUNG is formatted using the Microsoft Windows ntfs file system. If the file system is not "clean", Ubuntu will not mount it in order to prevent further damage to the file system.

Connect the external drive to a Windows system. Use the Windows drive checking tools to check the drive. Then properly remove the drive from the Windows system (use the tray icon to remove the drive before physically plugging the drive out), or fully shut down Windows (fast start should be disabled). The "clean" file system will mount next time you use it under Linux.

If you do not have Windows, then consider reformatting the drive to a file system that is fully supported by Linux. Typically, you would format in ext4.


How to make nautilus use file-roller in 17.10 like in 17.04?

Install nautilus-actions:

sudo apt install nautilus-actions

Context Label: Compress with FR
Create new action; path: file-roller
Parameters: -d %F
Working diretory: %d

For installing nautilus-actions in 18.04, see Nautilus-actions in 18.04.


How do I get the good ol' timezone world map back?

Try the Mate desktop, the only thing I'm aware of that still supports it.  I recommend Ubuntu Mate.

Available at https://ubuntu-mate.org/

Of course you can install Mate on other flavors/versions with:

sudo apt-get install ubuntu-mate-desktop

Although it will be missing a few niceties such as a searchable menu and dark theme.


Error messages on shutdown after upgrading to ubuntu 17.10

Open terminal, and run the following command:

dmesg

You should see the boot error messages.


How can I check for apt-get errors in a bash script?

The simplest approach is to have your script continue only if apt-get exits correctly. For example:

sudo apt-get install BadPackageName &&
## Rest of the script goes here, it will only run
## if the previous command was succesful

Alternatively, exit if any steps failed:

sudo apt-get install BadPackageName || echo "Installation failed" && exit

This would give the following output:

terdon@oregano ~ $ foo.sh
[sudo] password for terdon:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package BadPackageName
Installation failed

This is taking advantage of a basic feature of bash and most (if not all) shells:

&& : continue only if the previous command succeeded (had an exit status of 0)
||: continue only if the previous command failed (had an exit status of not 0)

It is the equivalent of writing something like this:

#!/usr/bin/env bash

sudo apt-get install at

## The exit status of the last command run is
## saved automatically in the special variable $?.
## Therefore, testing if its value is 0, is testing
## whether the last command ran correctly.
if [[ $? > 0 ]]
then
    echo "The command failed, exiting."
    exit
else
    echo "The command ran succesfuly, continuing with script."
fi

Note that if a package is already installed, apt-get will run successfully, and the exit status will be 0.


sudo -H gedit /etc/default/grub # edit this file

You should see both of these lines near the top of this file. Figure out which one is partially missing text, and correct it.

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Save the file and quit gedit.

sudo update-grub # update grub


How do I disable the auto-mounting of internal drives in Ubuntu or Kubuntu 18.04

The Auto-mounting of disks in Debian-based Linux distros (and perhaps others) comes from a service called udisks2.
Disabling this service will prevent any disk from automatically being mounted, while still allowing manual mounting.
Disable the service - No automatic or manual starts
systemctl mask udisks2

Unmask the service - Will need to either manually run it or restart the computer
systemctl unmask udisks2
systemctl unmask udisks2.service

Stop the service temporarily - This will not persist across restarts
systemctl stop udisks2.service

Get the status
systemctl status udisks2

Credit to @maxschlepzig for answering a similar question about OpenSUSE.


pdftk snap in 18.04 not accepting commands

As steeldriver suggested, I ended up with removing the symlink, removing the pdftk-smoser snap, then installing the pdftk snap and finally creating a new symlink for /usr/local/bin/pdftk to /snap/bin/pdftk

now a call to pdftk on the commandline brings up the pdftk usage hint, not something snap related

a caveat: I still can't access my pdf files, but at least I get pdftk error messages now. I'm not sure if it is a snap problem, an apparmor problem or a general rights problem...but if I can't find a solution that will be a new question


Lubuntu 15.04 installation problem (Installation CD + UEFI mode)

If you've done an EFI-mode installation, then 99.9% of the software you need is installed; the only thing left is a boot loader. Ordinarily, using Boot Repair might help; but with an existing Windows installation, you really need to run Boot Repair in EFI mode, which isn't working for you (from the installation medium, anyhow). Therefore, I suggest you try this:

If you haven't done so already, disable Secure Boot in your firmware.
Download the USB flash drive or CD-R version of my rEFInd boot manager.
Create a USB flash drive or CD-R that holds rEFInd.
Boot to the rEFInd medium. It should show you entries for both Windows and Ubuntu. Test both of them. If they both work, proceed. If the Ubuntu entry doesn't work, you may want to put off the rest of this procedure until you can fix the problem.
Boot to Ubuntu.
Install an EFI boot loader. Two options are likely to be relatively easy:

Install the rEFInd Debian package or PPA. Since rEFInd works from the USB drive, it's almost certain to work when installed to your hard disk.
Install the grub-efi package, which will replace the grub-pc package. You'll then need to run sudo grub-install and probably sudo update-grub to get a working configuration. Note that this is a bit of a gamble, though; because you didn't boot with GRUB, you can't really be sure it will work. You might run into the same video problems you experienced with the installation medium, or something else. OTOH, it might be fine.

If desired, re-enable Secure Boot in the firmware. (Depending on how you installed, you might need to install Shim before re-enabling Secure Boot. If you re-enable Secure Boot and the system stops booting, disable it and install Shim.)
You may need to adjust your firmware options to disable the BIOS/CSM/legacy boot support.

If you run into the same video problems with rEFInd that you have with the Ubuntu installation disc, you can try playing with kernel options. If you see a clear GRUB menu in the installer, you can hit e to edit the entry and change kernel options. In rEFInd, highlight the kernel you want to boot and hit F2 or Insert twice. The result will be a text editor with which you can edit the kernel options. In either case, try nomodeset as an added option. There are probably other options you can try, but they're mostly chipset-specific. Your laptop has an Intel video chipset, according to Lenovo's Web site, but I don't know offhand what options you might try with it. (Video problems such as the one you're having seem to be more common with Nvidia and AMD/ATI chipsets.)


I'm not sure it will help, but there's no need to go through recovery console.
You can boot up to login screen, SSH to your computer and run systemctl isolate multi-user.target; systemctl isolate graphical.target to get the same result.
Yes, it is not a solution, but maybe it will help you narrowing possible ways of debugging.


It is simply displaying the message "/blah/blah/: Is directory" to stderr. Also known as Standard Error which is denoted by &2.

Without the &2 messages are displayed on stdout. Also known as Standard Output which is denoted by &1.

More details on displaying messages to &>2 can be found here:

Bash command that prints a message on stderr
echo >&2 “some text” what does it mean in shell scripting

In your command posted, both messages for stdout and stderr will appear on your terminal screen. However some applications will separate the stderr messages and perform special processing.

Most people don't bother redirecting echo error messages to >&2 but it is technically the correct way of doing things.

For more reading on stdin, stdout and stderr from user or system administrator perspective see:

Confused about stdin, stdout and stderr?

For a programmers perspective of stdin, stdout, stderr which are &0, &1 and &2 respectively see:

Linux Programmer's Manual


Configuring DKIM over Postfix (iRedMail-1.3.1) in Ubuntu 18.04

There are 2 places where the listener is specified.
In /etc/default/opendkim you need to add:
SOCKET="inet:8891@localhost".
Comment out the other sockets.
In /etc/postfix/main.cf you will need to add:
milter_default_action = accept

milter_protocol = 2

smtpd_milters = inet:localhost:8891

non_smtpd_milters = inet:localhost:8891

I also have SOCKET inet:8891@localhost in my /etc/opendkim.conf but I'm not sure it is necessary.
I just got my server going again after an update crash. For some reason opendkim will not start if another user has rights to the keys. I fixed that buy copying the key to a folder owned by the opendkim user and group. The error description did not show up in systemctl status opendkim until I reinstalled opendkim. Before that it just show an error code but no explanation. The server has been running for 4 years without incident.


Filter only path of files (without directories path) from output using pipe |

Well that was horrible. Provided the output is sorted like this though, we can look at it backwards:

Take the last line
Lop off anything after the last / and store it, and move on to the next line up
If the line doesn't equal the last directory name, print
Move up the output and go back to step 2.

To keep the order, we also need to re-reverse the output. Thankfully there's a little command called tac (the reverse of cat) to make this simple. We just call it before and after our Bash scripting:

... | tac | while read p; do [ "$l" != "$p" ] && echo "$p"; l="$(dirname "$p")"; done | tac

Note that this will only ever work if we can rely on the file order. I think we probably can; I've only ever seen package files sorted like this so I assume it's standard.

When trying to answer this, I started using a different method with awk. I seem to give most of my answers in awk-form these days so here's the above as seen by awk:

... | tac | awk 'l!=$0{print}{sub(/\/[^\/]*$/,"",$1);l=$0}' | tac

It's a little shorter but I doubt it's any faster.


KVM is in Official Ubuntu repository. you can install it by simple commands without difficult compilation methods.

sudo apt-get install kvm qemu-kvm


Set display to a higher resolution than 720p?

It is possible to set higher resolution with xrandr than what your monitor supports but your monitor would have no way of displaying it and would display nothing at all. You need a monitor that can display higher resolution if you also want to see it.


You can use nmap.

If you don't know the exact IP-address:

sudo nmap -sP 192.168.1.0/24

This will scan your entire network. Change 192.168.1.0/24 with your network and CIDR.

You can also specify a IP-address:

sudo nmap -sP 192.168.1.50


After 14.04 update video/totem won't play midi

Solution for Ubuntu 14:04 LTS

open Synaptic Package Manager;
type in search: fluidsynth;
install plugin vlc-plugin-fluidsynth;
enjoy.

There is no need to install VLC, because the totem alone works perfectly.


Try Boot repair by a ubuntu live cd.

Procedures:

Insert the disk and select try ubuntu
Then press CTRL+ALT+T to open terminal.
Then copy+paste this command  sudo add-apt-repository -y ppa:yannubuntu/boot-repair && sudo apt-get update
Press Enter.
Then again copy+paste this command sudo apt-get install -y boot-repair && boot-repair.
remove the disk and reboot your system.

`