HOWTO: Install HP Printers for Beginners
This is a little guide on how to correctly install an HP printer, since so many people seem to have trouble with this. I have also provided a very basic scanner start up guide. Here are the steps:

Printing:

First of all, connect your printer to your computer, and turn it on.

See if your printer gets autodetected by Ubuntu. If it does, something will pop up saying it is configured for use and is ready.

If nothing happens, simply go to System > Administration > Printing > New.

If it doesn't find any or doesn't recognize your printer, try the following:

First check on this website if your printer is compatible with linux.

If it is compatible, then follow the instructions on this page to install and configure the drivers.

Scanning:

For HP all-in-ones (such as the PSC series), after you have followed the above steps, put the paper you want to scan in the scanner and then go to Applications > Graphics > XSane Image scanning program. In XSane, click "scan" and then when it's done, click save as and save it wherever you want.

If you have a sole HP scanner, then you could try to just plug it in, turn it on, and try to scan it with XSane, but I don't gurantee that it will work.

***NOTE: If you want to send a scan that you made on your linux box to a windows computer, it won't open it up. You have to right-click on the image, and go to "open with GIMP Image Editor". Then go to save as and click on "select file type (by extension)". Then scroll down to JPEG format and click ok as many times so that it saves. It'll then be readable in windows.


Install 4.0 Linux Kernel od Ubuntu 14.04 i686

You can find 4.0 kernel image and headers in Ubuntu Kernel PPA

For 32-bit systems you will need i386 packages.

But it is not recommended to install unsupported kernels, if you do not have a really good reason to do it. You can get all kinds of troubles. Some drivers may not build, etc.


How can I install the flash player for Chromium in Ubuntu 16.04?

Be sure to enable the Canonical partners repository then run:

sudo apt update
sudo apt install adobe-flashplugin


The VPN functionality is not currently supported on Linux. They may have plans for it in the future, however.

You may use windows version of Team Viewer via wine for VPN feature.

Install wine :

Execute following commands in terminal.

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7

Then download teamviewer for windows, then run the setup using wine.


Is ther any tool in ubuntu to convert pdf to doc

If to you had trouble with AbiWord and LibreOffice I don't think you will find a way to have a proper conversion.

You can still try to use an online converter such as PdfEscape for example.
Make sure to check their Privacy Policy before sending personal documents.


Ubuntu Server 12.0.4 LTS cannot Load after fresh install but gives a Blinking Cursor Screen

You must install ubuntu desktop, not server. Ubuntu server does not contain X packages (X packages are the windowing system)


How to scratch Android studio / SDK / ADB etc from disk (for reinstallation)

I finally fixed my setup. The steps involve
sudo apt-get remove android-tools-adb android-tools-fastboot

then again delete
/home/user/.android
/home/user/.AndroidStudio4.0

My hunch is that the real culprit was that my android Sdk folder was not installed on my home partition
/home/user/Android

Instead I used a symbolic link to point to some larger partition (This setup used to work fine in the past, however).
Sorry for the unenlightening answer


Accessing SMB share on DNS-323 that requires login

Using a Synology NAS in 20.04.1 I can successfully access my NAS by adding the following to my fstab file:
//192.168.1.117/share_name /media/NAS/share_name cifs username=user_name,password=pass_word,rw,uid=1000,gid=500

and sudo apt-get install cifs-utils
After some experimentation, the OP has found that the following line in his fstab works seamlessly:
//192.168.0.102/Volume_1 /media/NAS cifs vers=1.0,noauto,users,username=User,password=Pass,iocharset=utf8

where instead of the share_name he has included /Volume_1 set at the time of initialising the NAS which Windows did not require to establish the connection under that regime.


To enable wobbly windows, after you have installed CompizConfig Settings Manager, you have to install compiz-plugins, and then enable Wobbly Windows plugin from CompizConfig Settings Manager:


Sound player that will load multiple tracks but won't play each sequentially?

Try Quodlibet. There's a "One track" play order that will play one track then stop.


18.04 No sound - Intel sound card snd_hda_intel not working

You will need to add an option on GRUB.

To edit grub options:

sudo nano /etc/default/grub

Find GRUB_CMDLINE_LINUX_DEFAULT and add snd_hda_intel.dmic_detect=0 to the end of it. It will look something like this:

GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 snd_hda_intel.dmic_detect=0"

Then rebuild grub menu:

sudo grub-mkconfig -o /boot/grub/grub.cfg

After you reboot the system the device should work.


Assigning different directory permission for each different groups

Open terminal Ctrl+Alt+T and run following command :

Use Access Lists :

sudo apt-get install acl

1) Add the option acl to the partition(s) on which you want to enable ACL in /etc/fstab. For example:

 ...
 UUID=07aebd28-24e3-cf19-e37d-1af9a23a45d4    /home    ext4   defaults,acl   0   2
 ...

2) If necessary, remount partition(s) on which ACLs were enabled for them to take effect. For example:

sudo mount -o remount /home

3) Verify that ACLs are enabled on the partition(s):

mount | grep acl

4) Add a group to acl

The utility setfacl is used to add the groups blue and green to the ACL for the directory /var/www.

sudo setfacl -m g:green:rwx /var/www/
sudo setfacl -m g:blue:rwx /var/www/
sudo getfacl /var/www/
getfacl: Removing leading '/' from absolute path names
file: var/www/
owner: root
group: root
user::rwx
group::r-x
group:green:rwx
group:blue:rwx
mask::rwx
other::r-x


Looking at this link

There is no grab method in Gdk 2.

There is a grab method in Gdk 3,though.

Did you read the docs for Gdk 3?


Black screen after hdmi monitor unplugged

To fix the keys not changing the brightness level, modify the file /etc/default/grub as mentioned here in Ask Ubuntu: Brightness fn key shortcut doesn't work on ASUS laptop


Asus zenbook UX303UB does not resume from suspend (ubuntu 14.04) when charging

I had the very same problem with an Inspiron Dell, the solution was to swotch from the Open graphic card drivers to proprietary ones (you can choose them from "additional drivers" from the Bash)


installing my Graphic Card on ubuntu12.04

I successfuly installed the ATI drivers following this answer.

This answer explains:

how to uninstall the driver that failed
install the open source driver (it is a temporary step)
download the last driver on ATI web site
and install it


MySQL Workbench 8.0 - Error 1142 & Error Code: 1370

well. apparently granting the privileges using the root account did not work. however, in MySQL, going under 'administration' > "users and privileges' and then granting all the privileges from there solved the error and now it allows 'user1' to perform any task on the database.


Auto-hiding the dock covers the desktop icons

The current answer is you can't. This is a known bug since 17.10, https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/+bug/1723117

So didn't really fall thru the cracks, there isn't atm anyone assigned to fix as the most important thing about the Desktop version of Ubuntu currently is to limit the amount of resources used on it. (i.e money


Not perhaps a direct answer; but I use a .netrc file:

Script:
cp ~/.netrc netrc.bak ; cp sqm-netrc ~/.netrc ; ftp ftp.anoth.er.uk ; cp netrc.bak ~/.netrc

.netrc:
machine ftp.somewebsite.com login username1.com password fgerghjvnfg
machine ftp.anoth.er.uk login gdruug password vfohfgbsluv
machine webhost.anoth.er.uk login vrfkbv password fbgvnfebuhb
macdef init
cd public_html
cd sqm
put sqm.txt

This logs in, performs different actions depending where it's logged in, & quits; leaving the control file safely tucked out of the way afterwards. I haven't simplified this, just obfuscated it a little!


ubuntu server 12.04 and ufw failure on startup, and several module not found errors

As an alternative working solution on OpenVZ (since ufw works from command line but not on init due to modprobe, rsyslog, ipv6, and others) which doesn't require no-oping modprobe and other tweaks, one could enable ufw via /etc/rc.local.

In that case, use ufw --force enable to skip the warning prompt for yes/no .

You can also add your rules (e.g. ufw allow 22) before the enable command to make sure you're not locked out of your system in case the rules were lost or modified somehow.


Seeing the hardware you have (CPU: 1.6 GHz, RAM: 1 GB) I recommend to download Xubuntu or Lubuntu before testing Ubuntu. This is not related to which one is better but I am trying to make sure that the Ubuntu version works OK on your hardware. I also would recommend, like Devesh said, to wait until 14.04 is out (Which will happen next week on April 17, so the wait won't be long).

Here's what each of them would look like once you have them installed:

Lubuntu

Very lightweight Desktop environment (Lightweight meaning that it uses small amounts of RAM, CPU and HDD space). The menu, where all the apps can be found, is located in the same place as you have them in Windows XP.

Xubuntu

Another lightweight Desktop environment. The menu can be found in the top left corner so instead of going down to the bottom right corner, you would go up.

Ubuntu

This is the main Ubuntu distribution. It uses a bit more resources than the other two, but I have tried Ubuntu on computers with 512 MB of RAM and it has ran correctly. You would also need a good video card. Still, you would need to personally test this. From Booting time, to how fast apps opened, to how fast you can work and be productive with each Desktop environment.

You need to know that, independent of what Ubuntu flavor you decide to select, you can install from any of them, the other desktops to try out. What I mean with this is that, if you download Lubuntu, Xubuntu, Ubuntu, Kubuntu, Gnome Ubuntu or any Ubuntu official version, you can install from the Software Center (The application that manages installation of other apps and updates) any other Desktop environment. So you could have installed Xubuntu but you also wanted to try out Lubuntu, so you would go to the Software Center and download the lubuntu-desktop package. This would make your system have both, Xubuntu and Lubuntu. you can choose which one you want to use from the Login Screen.

I would also invite you to read about Start Ubuntu which guides new Ubuntu users into this open source world.

So with everything here said and taking your hardware into consideration my recommendations would be:

Download Xubuntu or Lubuntu first before trying Ubuntu
Download ONLY the 32 Bit version. The 64 Bit needs more RAM in order to perform better.
If you have a low graphics card I recommend staying with Xubuntu or Lubuntu only.
Remember that you can test other Desktop Environments (DE) from any of the other Ubuntu versions just by installing their appropriate package (lubuntu-desktop for Lubuntu, xubuntu-desktop for Xubuntu...)
Run the LiveCD/LiveDVD/LiveUSB which is a Live session of Ubuntu that does not install on your computer but runs directly from CD/DVD/USB. This way you can test out the DE and how it feels to you before even installing it on your system.
Remember that you can install Ubuntu alongside Windows XP. There is no need to eliminate Windows XP completely. At least while you get accustomed to how the DE looks, works and behaves. The Ubuntu installer will give you an option about installing alongside in case you want this or you can be a brave warrior and go straight to Ubuntu FTW!.
Remember to backup anything you want to save in case you want to format the whole system and install Ubuntu only.
Use the SEARCH option in Ask Ubuntu when you find a problem you can't solve. There are more than 3000 questions related to Windows XP and more than 2000 related to Windows XP and the installation procedures. So there is a sure bet you will find most of the issues solved already.

So with all of this said, I applaud you and say: Welcome to Ubuntu my friend.


According to the error message, you have tried to install Ubuntu inside Windows (via the Wubi installer).
Wubi cannot work with preinstalled Windows8 (because Wubi is incompatible with GPT).

Please install Ubuntu the standard way (on its own partition). See this guide for more info.


What are some “must have” Ubuntu programs?

VLC Media Player - the best open source cross platform media player around - plays everything, video/audio files, discs (DVD, CD, VCD), media converter and streamer (the list goes on.....)

Again, so easy to install just install it from the software center.

And... for those using the (dare I say “Best”) Firefox browser, there's even a handy plug in! just install vlc-plugin-* and mozilla-plugin-vlc from the software center.


Is it possible to log in as another user within an already-running session?

It is quite simple. Click on your username on the top Panel and there you can choose the other user to login between the available users, without logging out the first user.
It will also show you the other "connected" users.


How to create group alias mail to send to many users on mail server?

You have two ways of achieving that. You can create postfix aliases, or create a full featured mailing list. This all depends on what you intend to do with such an address.

A group alias would be well suited for automatic notifications to a group of people, while a full mailing list is probably better suited for discussion between a specific group of people.

For postfix aliases (works on most distros): edit /etc/aliases and
add a line like: groupname: user1@mail.com, user2@mail.com, .... Then, run postalias /etc/aliases, and reload the postfix configuration with postfix reload.
For mailing lists: there are various servers out there, the "classic"
being mailman. Simpa works too. How to install one of those probably would take to long to explain. I would advise you to find a good howto online or to refer to the documentation of one of those tools.


Such error occurred to me when installing ubuntu on Intel® Desktop Board DH67BL. What appeared to be a problem was that I was using VGA monitor on DVI port (using adapter from DVI to VGA).

When Installing Ubuntu Server 18.04 it actually helped typing "help" and hitting enter. Then installation menu appeared. However for Ubuntu Server 16.04 this didn't helped. So I changed to monitor with DVI interface using just DVI cable and this problem gone. Eventually I could install 16.04 successfully.

Hope it helps for someone.


This sounds like a hardware problem to be honest. Regardless of any software issue you may have the key here is "I turned it off and could not turn it on again!".

Make sure you check that your power cord is connected securely to the laptop and the individual cables of the power cord are not loose. Laptop power cords often are in multiple segments and sometimes they come loose without you knowing about it. If your laptop has been running a long time and not charging then it would not be able to turn on.

If you can clearly see it boot but it doesnt go into the login screen then you may have a problem with your Linux install. Typically that can be fixed just by reinstalling or if you have a lot of files you cant lose doing something else.

If it is not either of those and you are not getting any power even with the cord attached then you likely have a hardware problem that may need to be addressed by the manufacturer. Call them up and see what they think. Depending on your warranty length you may be able to get it fixed.


mount -t cifs shows no errors at all, but does not end up mounting the network share

SO... this was very frustrating. I had two errors on both nodes that caused this side effect to happen

On the server side (where the target share is located), samba/cifs/nfs was COMPLETELY broken. I was not even able to mount the share on a different device. I have no idea what the hell happened to it. Luckily I had made an image the week before and restored the disk.

On the client side (where I wanted to mount the network share), /media/KeyA (the mountpoint directory) is corrupted. Anything I tried to mount there would always fail to be listed... I tested this theory by setting the CIFS mountpoint to /temp instead of /media/KeyA and it worked just fine.

Out of all the issues I have had, this one definitely was the hardest to detect. Lets just hope this never happens to anyone else. Thank you Terrance for your help!

Update: Client folder is still corrupt/not listing files. fsck did NOT work to correct this folder. Working on diagnosing this as well, but as for now, this question is closed


How to open a file with drag to application?

I don't know what file types GPSprune handles and which, specifically, you are interested in. So for the sake of simplicity let's just say you want to open files with the .foo extension in GPSprune. These files however are recognized as text files or XML files rather than GPSprune specific files. What you will have to do then is to first define a new MIME type that is specific to these files.

To do so you can either use assoGiate, a GUI file type editor, or manually define the new MIME type. In this tutorial I will show how to do this manually.

Create a new text file called foo.xml and open it up in your favorite text editor.

Copy and paste the contents of the following text box:

<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
 <mime-type type="application/foo">
  <glob pattern="*.foo"/>
  <comment>GPSprune GPS dump</comment>
  <comment xml:lang="en">GPSprune GPS dump</comment>
 </mime-type>
</mime-info>

Make sure to replace all instances of .foo with the actual extension and edit the comment/description to your wishes.

Next save the file and move it to ~/.local/share/mime/packages. Update the mime database by typing in a terminal:

update-mime-database ~/.local/share/mime

Your .foo files are now recognized as a separate MIME entity. You can check whether everything worked by right clicking on a .foo file of your choice and looking at the file type listed under Properties.

Let's add an association to GPSprune now:

Open ~/.local/share/applications/mimeapps.list in an editor of your choice. Search for the [Default Applications] entry or create it if it doesn't exist yet. Then add the following line under default applications:

[Default Applications]
application/foo=gpsprune.desktop

You should now be able to immediately open up your .foo files with GPSprune and likely also to drag and drop them on the respective launcher.

Sources and related Q&As:

Add custom command in the open with dialog?

How can I deal with file association in different application(not in Nautilus)?

How to associate file extension (not file type) for a particular application?

https://ubuntugenius.wordpress.com/2009/11/19/create-your-own-file-types-in-ubuntu-with-assogiate/


Think my ubuntu just broke, not sure how to fix it

maybe something wrong with the hard drive? try booting from something else(bootable usb stick or liveCD CD) and check for the disk for "bad sectors"

To make a bootable usb stick:

Download UNetBootin and burn it into a usb stick. https://unetbootin.github.io/ (you can pick what flavor of Linux in the menu)

many tutorials online like this one: http://tecadmin.net/how-to-install-unetbootin-on-ubuntu-linuxmint/ (be careful and pick the correct drive)

Restart the computer and boot with the usb stick. (the order of boot can be set in the BIOS, usually by pressing the del key when it's booting up)
In the start up menu pick Try Ubuntu without installing
Once you're in Ubuntu, you can open the disks(Ubuntu 16.04) to check your hard drive and see if there are any "bad sectors".


Will multiple swap space's be effective?

In general this highly depends on your use case. E.g. if you do not make use of hibernate to disk (which uses swap to hibernate) you do not need that much amount of swap space and 1GB might be sufficient.

To come back to your question. If you are swapping a lot e.g. because you run low on memory all the time and you have one swap partition on a SSD and the other on a HDD, this will impact performance as the HDD will be the bottleneck in this scenario.
If you just want to add some more swap space for some corner cases to prevent the out-of-memory killer, you could add the swap space on your SSD with a higher priority compared to the swap partition on your HDD. That would result in that the swap on the SSD would get filled first, when the swap area on the SSD is exhausted the swap space on the HDD would be used additionally.

From man 2 swapon.

  Swap  pages are allocated from areas in priority order, highest priority first.  For areas with different priorities, a higher-priority area is exhausted before using a lower-priority area.  If two or  more  areas  have the  same  priority,  and  it  is  the  highest priority available, pages are allocated on a round-robin basis between them.

To change the default priority of your swap partitions you would have to add/alter your /etc/fstab.

/dev/<swap-ssd> swap swap defaults,prio=1000    0 0
/dev/<swap-hdd> swap swap defaults              0 0


Is it possible to restrict a program from reading anything outside what they need?

The method to restrict access on Ubuntu is with apparmor.

https://wiki.ubuntu.com/AppArmor

Firefox comes with an apparmor profile for Firefox which has been specifically developed with security in mind.

as pointed out by Rinzwind , ro access is not necessarily a security problem.

Large programs such as firefox is not the best of examples as firefox has rather broad capabilities from network access to hardware access.

As you can see, the firefox apparmor profile is quite large. You can certainly modify the apparmor profile to your specific needs / concerns if you so desire. Just be sure to save a copy of the original profile so you can restore it if you break firefox functionality.

Other browsers, such as chromium, run is a sandbox.

If you are particularly interested in security, you can run Fedora with selinux and run applications in a selinux sandbox.

apparmor profiles are available here

https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/AppArmorProfiles


What is Ubuntu's Definition of a "Registered Application"?

I think you are running into several problems at once with source installations.

update-alternatives will not allow you to set just any program as a preferred application for a given name.  The program will have to be registered first with the --install option.  For example:

sudo update-alternatives --set editor /home/peter/bin/foo
update-alternatives: error: alternative /home/peter/bin/foo for editor not registered, not setting.

If you want to see how the registration is done, check for example /var/lib/dpkg/info/nano.postinst.

Note, however, that it would be quite bogus to define a system-wide alternative that points to some user's home directory.  There are usually environment variables or other settings to set a preference for one user only.

The issue with the desktop file is probably completely separate, but you will need to provide more details about exactly which paths you used.

In general, installing an application from source can be quite difficult to get well integrated with the rest of the system, depending on the particular application.


I tried to install the latest version of gdb(7.8) in ubuntu. But somehow ld (part of binutil) from gdb package is not supported by ubuntu 14.04. So i have to uninstall it. But there is no gdb uninstall script. So i did the following:

Step 1: edit /etc/environment and move /usr/local/bin to then end of the line. I let the system to load /usr/bin first.

Step 2: update path: source /etc/environment

Step 3: remove gdb files: sudo rm -rf /usr/local/bin/gdb* /usr/local/bin/ld

Step 4: re-install binutils: sudo apt-get install --reinstall binutils


Why won't my Dell desktop computer boot with my usb properly?

Download the Ubuntu Minimal Cd. The file size is only less than 30MB.

From here

You won’t be able to create a Usb startup disk with this iso file, so the only way is to burn it into a bootable Cd.

Make sure your PC is connected to a LAN network. Insert the Cd into your Cd-Rom and boot up your computer from the Rom. Then select Install.

Select the language, follow by your location.

Let it detect your keyboard. Optionally, you can select No, you can select from a list of keyboard layout.

Next, the installer will proceed to configure some files for networking.

When it is done, it will prompt you to enter the hostname. This will be what you will see in the terminal later.

Select the mirror for Ubuntu archive that is closest to your location.

Unless you are using a proxy to connect to the outside world, leave the HTTP proxy field blank.

The installer will now retrieve the necessary packages from the mirror site.

Once it is done, it will prompt you to reformat your hard disk.
If you are going to use the whole hard disk,select Guided – use entire disk.

If not, you can select Manual and configure the partitioning accordingly. I suggest three partitions, one primary ext4 /, and two logical /home ext4 and swap.

When prompted, select Yes to confirm the partition setting.

Now, sit back and let the installer do its work.

Once it’s done, it will prompt you to enter your username, password and whether you want to encrypt your Home directory. I suggest not encrypt.

The installer do the final installation on your PC.

When prompted on how you want the security update to be done, select Install Security Update Automatically.

The next part is the important part. Here is where you can choose what to install on this machine. You want to choose what to install on this system, I suggest going to select Xubuntu-desktop or  Ubuntu LXDE desktop

The last thing it will install is the Grub loader. Select this if this is the only OS running in the machine and the Grub loader does not interfere with other bootloader.

Finally. this is what you will see when the installation is completed. Remove the Cd from the Cd-Rom and select Continue to restart the computer.


How do I install a driver for a Kodak esp 3250 printer?

I got this working but it is more than installing a Debian driver.

I downloaded the c2esp26.tar.gz file and the install instructions
Following the instructions I used the synaptic package manager to install the "Optional packages needed" except 1 that was not available - "libcupsdriver1-dev".
I then used archive manager to extract the files in the c2esp26.tar.gz file
Following the installation instructions I used term (right clicking the Tar file allows you to open term in that folder) to "make" the package usable.
Then to install them I used "sudo make install" in the same term window.
I closed the term with "exit" and opened the "system tools - printers" configuration window.
I selected add, network printer, windows printer via SAMBA
I then entered the name of the host computer (the one with the printer connected)
I hit the Browse button and clicked down to hilite the printer.
hit forward and selected the driver from the list for the Kodak 3250 esp printer driver.
The drivers were found and installed and I printed the test page.
There is a 15 - 20 second lag between hitting the "print" command and when it starts to print so under "properties" I adjusted the resolution to 300 x 1200 instead of the default 600 x 1200.

There you go. It was a lot of frustrating doing and redoing trying to find the way to get Lubuntu 12.10 to work the network printer but it will be easier for the next person.


How to run JavaScript in Firefox URL bar?

Firefox 72 and later
Scratchpad is deprecated as of Firefox 70 (bug 1565380), and has been removed in Firefox 72 and later.

Select Settings menu (3 horizontal lines ≡ icon in the upper right corner) -> Web Developer -> Web Console.

Type JavaScript code after the web console prompt » and press Enter.

Firefox 57-71

Select Settings menu (3 horizontal lines ≡ icon in the upper right corner) -> Web Developer -> Scratchpad.

Click the Run button on the Scratchpad toolbar to run your JavaScript code.

Firefox 56 and earlier

Open a new tab in Firefox and in the URL bar, and enter about:blank to display a blank tab so that you can see what you are doing.

From the Firefox menu select Tools -> Web Developer -> Web Console.

A new Web Console window will open. From the Web Console window click the JS button on the toolbar.

From the Web Console window click on the Scratchpad icon in the toolbar. The Scratchpad icon looks like a notepad.

A new Scratchpad window will open. Copy your javascript code: javascript:alert('Hello, World') in the Scratchpad window.

Click the Run button on the Scratchpad toolbar to run your JavaScript code.


In a graphical file browser, what would be a way to search for files by application with which they are compatible?

pcmanfm, the gui file manager default in Lubuntu 18.04 and previous, has an option on the menu View / Sort Files / By File Type that provides this functionality.


Problem After Upgrading to Ubuntu 15.04 ( deal with any system changes..P link was shut down )

Reposting from https://askubuntu.com/a/679889/323093:

You will get more details when running gdm manually in a virtual console (Ctrl + Alt + F1):

sudo gdm

For me, the problem was that gdm wasn't able to find /usr/bin/X, which led me to this bug. Turns out xserver-xorg was not installed somehow. The following line solves this particular problem.

sudo apt-get update && sudo apt-get install xserver-xorg

Hope this helps.


How do I create an shortcut to a folder(not a symlink) in Ubuntu 18.04 like shortcuts in windows

This way of working is not strongly supported in Ubuntu. Still, you can create a launcher to open a folder by creating a .desktop file.

[Desktop Entry]
Name=Publications folder
Comment=Go to publications
Exec=xdg-open /home/user/Documents/Project
Terminal=false
Icon=
Type=Application

Replace the folder path and name after "xdg-open" with the actual path and name of your folder. You can supply an icon after "Icon="

Make the .desktop file executable (right-click the file, select "Properties", on the "Permissions" tab, check "Allow executing file as program")

You can now

Place the file on your desktop
Place the file in a hidden folder .local/share/applications in your home folder. Then, this item will show up in your applications. You can therefore quickly launch it as any other program.
You can pin the icon to the dash for even quicker access.

Another possibility for quick access to that folder is to pin it as a bookmark in "Files". Highlight the folder in "Files" and drag it on the left bar. Drop it where it says "New bookmark". Shorter, go into the folder you want to bookmark, and press Ctrl+d.


How to make Shared Folders between Windows 8.1 and Ubuntu

Running ln -s (insertwindowsminecraftfolderhere) ~/ in Terminal should allow you to do this (You may need to delete ~/.minecraft in order for this to work (BACKUP YOUR DATA!))

Remember to replace (insertwindowsminecraftfolderhere) with the folder of your Windows hard drive's .minecraft folder! (i.e. if my Windows partition was mounted on /mnt/sda1 and my .minecraft folder was located at C:\Users\GrammarGeek\Appdata\LocalLow\Roaming\.minecraft I'd run ln -s /mnt/sda1/Users/GrammarGeek/Appdata/LocalLow/Roaming/.minecraft ~)


How to rename only user on Ubuntu Server 14.04 ?

One possible solution would be to create another user, add him to the sudoers file, log out, and login as the new user. Then, change your username, and delete the temporary user.

EDIT: Whoops, someone already commented that.


Meizu Pro 5 Ubuntu Touch has a locked boot-loader

works like a charm, no more locked bootloader on PRO5.
Here is how to do it, I can confirm it's possible and without much of a trouble.

http://forum.xda-developers.com/meizu-pro-5/how-to/tutorial-unlock-bootloader-meizu-pro-5-t3303127


Wireless Internet not working on Ubuntu 14.04 LTS

Sorry I don't have a solution for this (or enough points to just make a comment).
There is a Launchpad bug report about missing drivers for the Qualcomm chipset in your computer. Let me guess, Lenovo Yoga 3?


You should reconfigure the tzdata package to set /etc/localtime (dpkg-reconfigure tzdata). It used to be the case that /etc/localtime was a symbolic link (before Debian etch, so around 8.04?). It no longer is, and I can't find anything in the changelogs of the last release listed in the Packages index (10.04).


Speed up booting time without losing choosing capability in grub

Yes you can. the timing and other attributes can be edited in the file /etc/default/grub.

Just do the following:

sudo nano /etc/default/grub
Change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=0 for fastest loading without waiting for the Grub menu to appear. Now the thing is, if you want to see the menu again, when the pc is starting press ESC like crazy until the Menu appears. The Grub menu will always appear when you press ESC, does not matter if the time is at 0.
After changing the timeout, save it with the command Ctrl+O and you'll be asked for the file name to be saved. Just hit enter which will replace the grub. You can exit the editor by pressing Ctrl+X
Update grub by running (you guessed it): sudo update-grub so the changes can be active after the next boot up.

For the customized power and reset buttons for what I know is not possible "yet" to assign it to the Grub Menu.


What is the difference between chmod and chattr?

chmod refers to file permissions for users, groups and others:
read
write
execute

chattr refers to attributes regardless users or groups, some of the attributes are:
a → Append only
i → Immutable
c → File automatically compressed in kernel
Take a look at Wikipedia for chattr.


Why did "sudo apt-get install yum*" install 500MB of packages?

The command

sudo apt-get install yum*

installs all packages with a name containing "yu" (assuming you don't have files matching yum* in the folder you run the command). Most likely you don't want that.

Technically yum* is interpreted as as regular expression meaning "yu followed by zero or more instances of m", and that is used to do substring matching.

To revert the changes see /var/log/apt/history.log which packages you  with the command installed and remove them.

It's usually a very bad idea to run commands that you don't understand.


Upgrade RAM from 20GB (1x 4GB, 1x 16GB) to 32GB (2x 16GB)

I believe that was a comment, not an answer, so...

@Terrance "There would be no need to reinstall the OS for a RAM upgrade."

Which is correct...I'll add that it's a good idea to use matched RAM modules. If you can, get the exact 16gig module to what you have installed for best performance and compatibility. If they're not matched or close enough, there's a chance they won't run in dual-channel mode which hinders read/write performance.


Trap the shutdown event of ubuntu system

There is no easy way to do that but you can make this trick.

create a script that test your condition and run it whenever shutdown is run.
If the condition is ok then shutdown
If the condition fails kill shutdown command.

Details:

To execute a script at shutdown:

Put your script in /etc/rc6.d directory

Make it executable:

sudo chmod +x K99_script

Now this script will just execute when you try to shutdown.

Inside the script, if condition fail then run one of thesw commands:

pkill shutdown

OR

killall shutdown


Extract files inside folder in ZIP archive to current folder

You can do it by

unzip archive.zip folder/*; mv folder/* .;rm -r folder

I don't think there is an option in unzip to do it directly.

To make it shorter

f=folder; unzip archive.zip $f; mv $f .;rm -r $f

Or as a script

#!/bin/sh
unzip $1 $2
mv $2 .
rm -r $2

Run as script.sh archive.zip folder.


PHP using different libxml2 version, than the one installed in /usr/lib/

PHP 5.3.5-0.dotdeb.0 indicates that the php packages that you have installed are from dotdeb.org, rather than the main archive. These packages are not compiled for Ubuntu, but for Debian, and it's likely that these were built against an older version of libxml2.

You would be better off using the php5 packages from Ubuntu, or if a more recent version is needed, to use packages from a trusted PPA.


Ubuntu 18.04 running slow on vbox (Gaming PC)

As I said in comments, I guess that the slow behaviour is related with graphics, not I/O or CPU related.

Try to enable 2D and 3D acceleration as both Windows 10 as VirtualBox host and Ubuntu 18.04 as guest work without issues with Nvidia GPUs.

Both options are shown at the bottom of your "Photo 4" menu.

And remember to install the 'guest additions' in the guest OS (Ubuntu) to make those changes working with:


Find IDs in one file that are not in another

If your goal is to find common or uncommon lines, comm would be my go-to command here.

It compares two files and shows —in three columns— lines that are unique to file 1, lines that are unique to file 2 and lines that appear in both files, respectively.  You can pass it flags to suppress any of this output too. Eg comm -1 file1 file2 will suppress the first column, the things unique to file1. comm -12 file1 file2 would only show things in both files.

There's one big caveat: the input must be sorted. We can work around this.

This will show you everything in abc which isn't in mno:

comm -23 <(sort abc.txt) <(sort mno.txt)

And you can pipe that into wc -l to get a count.

The reason I go with comm is that once the files are sorted, side-by-side comparison is computationally really simple. If you're dealing with millions of these, that will make a difference.

This can be demonstrated with a couple of mock files. I have a fairly fast computer so to show the difference between approaches, I need quite a mammoth sample set. I've gone to 10 million 10-char strings per file.

$ cat /dev/urandom | tr -dc '0-9' | fold -w 10 | head -10000000 > abc.txt
$ cat /dev/urandom | tr -dc '0-9' | fold -w 10 | head -10000000 > mno.txt

$ time comm -23 <(sort abc.txt) <(sort mno.txt) | wc -l
... 0m10.653s

$ time grep -Fcxv -f abc.txt mno.txt
... 0m23.920s

$ time grep -Fcwv -f abc.txt mno.txt
... 0m40.313s

$ time awk 'NR==FNR{a[$0]++};NR!=FNR && a[$0]' abc.txt  mno.txt | wc -l
... 0m12.161s

The sorting is what takes most of the time in mine. If we pretend that abc.txt is static, we can pre-sort it and that makes future comparisons much faster:

$ sort abc.txt abc-sorted.txt
$ time comm -23 abc-sorted.txt <(sort mno.txt) | wc -l
... 0m7.426s

You might look at these and consider a few seconds irrelevant but I have to highlight that these are running on a high end machine. If you wanted to do this on a (eg) Raspberry Pi 3, you'll be looking at much slower turnarounds and the difference will increase to a point it actually matters.


How can I download music from YouTube and not the video film?

A shell script called youtube-dl can do this in 1 step. It depends on ffmpeg, so you should install that first.

sudo apt-get install ffmpeg
wget https://github.com/rg3/youtube-dl/raw/2012.02.27/youtube-dl
chmod +x youtube-dl
./youtube-dl -t --extract-audio --audio-format mp3 YOUTUBE_URL_HERE

Extra information on choosing quality of download from YouTube, from the man page:

 -f FMT, --format=FMT
       Specify the video format (quality) in which to download the video.

       For youtube.com, in particular, the meaning of the format codes is given as:

       WebM video at 480p: 43
       WebM video at 720p: 45
       H264 video in MP4 container at 480p: 18
       H264 video in MP4 container at 720p: 22
       H264 video in MP4 container at 1080p: 37
       H264 video in FLV container at 360p: 34
       H264 video in FLV container at 480p: 35
       H263 video at 240p: 5
       3GP video: 17

       Note that not all videos are available in all formats and that other sites supported by youtube-dl may have different conventions for their video formats.

       By default, youtube-dl will download the best available format; if you want to download the worst format to save bandwidth and time, use "-f" worst.

So add -f 18 to get h264 mp4 at 480p


How to set virtual memory allocation (vmalloc) on Linux to avoid kernel driver crash

There is a good answer here: http://thinking-electron.blogspot.com/2015/05/how-to-increase-vmalloc-size-vmalloc.html

Basically, it is required to set the vmalloc value at boot via Grub.

In /etc/default/grub change the following line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vmalloc=512M" this will increase the total vmalloc available to 512MB instead of 128MB (by default)

After the new value is set, do a $sudo update-grub to regenerate the proper Grub configuration file. Reboot the machine and test the driver out again. The problem should be gone and the driver should come up without issues.


Since there are now two related posts on this I'm guessing it's a bug.  A simple workaround would be to turn off repeated key presses.

  Click the icon at the very right of the top panel and select
  System
  Settings.
  In the Hardware section, click Keyboard.
  On the General tab, turn off Key presses repeat when key is held
  down to disable
  repeated keys entirely. Alternatively, adjust the Delay slider to
  control how long you have to hold a key down to begin repeating
  it,
  and adjust the Speed slider to control how quickly key presses
  repeat.

(via Official Ubuntu Help Documentation.)


mythbuntu-control-centre fails to run on Xubuntu 13.04

A simple way to resolve this error is to edit line 40 (or thereabouts) in /usr/bin/mythbuntu-control-centre, removing the now obsolete(!) reference to AptMessageDialog.

Note that you'll still want to keep the other 2 references in the import statement, so just insert a parenthesis at the end of line before, then delete the line containing AptMessageDialog) entirely.


A simple workaround would be to execute the script which toggles the touchpad on / off at a system runlevel low enough before X is up and running, to make sure that the touchpad is working before a GUI is even started. So /etc/rc.local should be ok, but unfortunately I can't say a definitive word on this since I don't have my Ubuntu machine handy right now, and I can't actually test this. It should be fine tough.

Run acpi_listen and hit the fn+F7 keystroke; the output should be similiar to this one:

hotkey ATKD NNNNNNNN 00000000

Where NNNNNNNN is the fn+F7 keystroke's ACPI code;

Run grep NNNNNNNN /etc/acpi/events/*; the filename in the output should be the filename of the file in which the fn+F7 keystroke's ACPI code is handled;
Open the file with a text editor;
Look for a section like this one:

# ...
event=hotkey (ATKD|HOTK) NNNNNNNN
action=/etc/acpi/actions/action.sh
# ...

Where /etc/acpi/actions/action.sh is the script that is executed each time the fn+F7 keystroke is hit;

Now it's just a matter of executing the script in /etc/rc.local:

Open /etc/rc.local with a text editor;
Add this line to the end of the file before the exit 0 line:

# ...
/etc/acpi/actions/action.sh
# ...

That should be it. Reboot and see if the touchpad is enabled upon reboot;

In any case, if not needed, I'd suggest to remove the set -e command at the top of /etc/rc.local, or to modify the way the script is called calling e.g. a wrapper which calls the script itself and which always returns 0, to avoid the script breaking the execution of rc.local due to return values different from 0.


How do I get a BCMWL4306 wireless card working?

I fixed the problem. my wifi card wasn't b43legacy, it was b43. I got it working from there. Thanks, anyway! :) – LinuxLover55 Jan 19 at 0:05


How do I mount an IMG file in Ubuntu for Photorec (beginner at linux)

Photorec doesn't run on mounted filesystems, you should run it on the image itself:

sudo photorec /path/to/disk.img


There are detailed guides on how to install your wifi driver. To let your situation better be known, please specify your laptop company and model, so that your ethernet adapter model may be looked at. If your driver is broadcom BCM43142 then

  sudo apt-get install bcmwl-kernel-source

This will install wifi driver offline. You may also get your answer at this question
Cant enable proprietary driver for broadcom bcm43142
I hope it helps!


I can't Install Ubuntu or any Linux distros on my PC

Your CPU supports only 32-bit(x86/i686). You should install only 32-bit(x86/i686) distributions.


Does RhythmBox have any command line interface or method of interprocess communication?

Basically, the short answer is "Yes" and the complement of such answer will be "Use the rhythmbox-client command from a terminal in order to control your current running Rhythmbox, if it is not already loaded the first instance of your commands will invoke it."

In example: rhythmbox-client --play will make the current Rhythmbox session to start playing the current song (or the first song in the list). If Rhythmbox is closed then it will open it first in order to start playing.

Further information about the rhythmbox-client and its usage can be reached in the rhythmbox-client man page. I place here a portion of the manpage just for reference.

NAME
       rhythmbox-client - controls a running instance of rhythmbox

SYNOPSIS
       rhythmbox-client [option...][file...]

DESCRIPTION
       rhythmbox-client  is a tool for controlling an already running instance
       of  rhythmbox.   It's  useful  for  remote  control  scripting,  adding
       specific  files  to  the library from the shell, or printing details of
       what's playing. It also has an interactive mode, useful for controlling
       playback  remotely  via  ssh.  Any  files  specified  after  the option
       arguments will be added to the library.  If  the  --enqueue  option  is
       given, the files will also be added to the play queue.

OPTIONS
       -?,--help
              Show help options

       --debug
              Enable debug output

       --no-start
              Do not start a new instance of rhythmbox

       --quit Quit rhythmbox

       -i,--interactive
              Start  interactive  mode  --no-present Don't present an existing
              rhythmbox window

       --next Jump to next song

       --previous
              Jump to previous song

       --play Resume playback if currently paused

       --pause
              Pause playback if currently playing

       --play-pause
              Toggle play/pause mode

       --stop Stop playback if currently playing

       --play-uri=URI
              Play a specified URI, importing it if necessary

       --enqueue
              Add specified tracks already in the library to the play queue

       --clear-queue
              Empty the play queue before adding new tracks

       --print-playing
              Print the title and artist of the playing song

       --print-playing-format=format
              Print formatted details of the song (see FORMAT OPTIONS below).

       --set-volume
              Set the playback volume

       --volume-up
              Increase the playback volume

       --volume-down
              Decrease the playback volume

       --print-volume
              Print the current playback volume

       --select-source=URI
              Select the source corresponding to a URI (device or mount point)

       --activate-source=URI
              Select the source corresponding to a URI (device or mount point)
              and start playing from it if not already playing.

       --play-source=URI
              Select the source corresponding to a URI (device or mount point)
              and start playing from it.

FORMAT OPTIONS
       %at    album title

       %aa    album artist

       %aA    album artist (lowercase)

       %as    album artist sortname

       %aS    album artist sortname (lowercase)

       %ay    album year

       %ag    album genre

       %aG    album genre (lowercase)

       %an    album disc number

       %aN    album disc number, zero padded

       %st    stream title

       %tn    track number (i.e 8)

       %tN    track number, zero padded (i.e 08)

       %tt    track title

       %ta    track artist

       %tA    track artist (lowercase)

       %ts    track artist sortname

       %tS    track artist sortname (lowercase)

       %td    track duration

       %te    track elapsed time

       Variables can be combined using quotes. For example "%tn %aa %tt", will
       print  the  track  number  followed  by the artist and the title of the
       track.

AUTHOR
       This manual page was written by Sven Arvidsson  <sa@whiz.se>,  for  the
       Debian system (but may be used by others).

Edit

I got some interest on this subject so I ran a test with the next command:

dbus-send --print-reply --dest=org.mpris.MediaPlayer2.rhythmbox /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Seek int64:60000000

From the original answer posted right here. Which indeed works for the task of seeking on current playing song, (based on the asker's comment).

Good luck!


Get it installed with these steps if the above comments methods doesn;t fly:

# For the soon to be LTS release, 10.x
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

# For the bleeding edge, 11.x
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -

Then install with sudo apt install nodejs.


When you Install BleachBit it creates 2 entries.

BleachBit
BleachBit (as root)

Run the second entry and type your password.


store emails in cifs mounted filesystem for a postfix Maildir mailbox type

As far as I know, there are two ways that postfix will store email. Either in the mbox format which is a single file with delimiters and what not to help separate the messages or, in the Maildir format which keeps each message in a separate file and each virtual directory in the email server is a real directory.

When you specify the home_mailbox with a / at the end then it means that you are telling postfix to use Maildir. Without the / then it uses mbox. The part before that is the name of the mbox or Maildir that you are storing and can be called anything but most people prefer to use the name Maildir/ as it's more accurate of the content.

You can technically use sudo postconf -e 'home_mailbox = put_my_mail_here/' and it will create a Maildir format mailbox labeled "put_my_mail_here" which will be the name of the folder in the home dir where the Maildir data is stored.

Another option would be to use .Maildir/ which will create a "hidden" folder with the content.


How does ls -l format its output so neatly?

The source code of ls is available for browsing online on GNU Savannah. In most cases, the required maximum width is computed (for example, using the mbswidth function for text), and then uses the classic C printf function format specifiers and some manual padding. See, for example, the functions format_user_or_group(), and gobble_file().

TL; DR: there's no "magic", just a lot of grunt computation.

If you want such neat tables for your own output, use column:

$ grep -vE '^#' /etc/fstab
UUID=cdff3742-9d03-4bc1-93e3-ae50708474f2 /               ext4    errors=remount-ro 0       1
/dev/mapper/lvmg-homelvm /home           btrfs   defaults,compress=lzo,space_cache,relatime 0       2
UUID="bb76cd0d-ae1d-4490-85da-1560c32679cd" none    swap sw 0 0
UUID="a264b1b1-cf82-40aa-ab9e-a810cfba169a" /home/muru/arch     btrfs defaults,compress=lzo,space_cache,relatime 0       2

$ grep -vE '^#' /etc/fstab | column -t
UUID=cdff3742-9d03-4bc1-93e3-ae50708474f2    /                ext4   errors=remount-ro                           0  1
/dev/mapper/lvmg-homelvm                     /home            btrfs  defaults,compress=lzo,space_cache,relatime  0  2
UUID="bb76cd0d-ae1d-4490-85da-1560c32679cd"  none             swap   sw                                          0  0
UUID="a264b1b1-cf82-40aa-ab9e-a810cfba169a"  /home/muru/arch  btrfs  defaults,compress=lzo,space_cache,relatime  0  2


What's the minimal compatible Linux kernel version required to run Ubuntu?

QUESTION: What is the policy on compatibility with earlier kernel versions? E.g. no bug reports accepted, must work with all kernel versions back to and including previous LTS, etc.

I'm a member of the Ubuntu BugControl team and I can say that only bugs in non-obsolete Ubuntu packages are considered. If you install your own kernel or if you use a package from a different distribution and report a bug, your bug will be invalidated. See these two stock responses:

About an obsolete version of the software for reporter's release
Packages not provided by Ubuntu

Also, the Ubuntu Kernel team has a FAQ that you might find interesting:

  The Kernel Team provides support (security updates etc) for the Ubuntu kernels on all currently active releases, we do not support any non-Ubuntu kernels. A full list of the currently active releases can be found on the Releases page. For Long Term Support (LTS) releases the desktop kernels drop from support before the server kernels, this is reflected in the Releases page.

However this just says which kernels are supported, not which ones are considered compatible.

  QUESTION: Example case, practically: How likely will I be in trouble when running Lucid's kernel on Precise?

This is a pretty difficult question to answer. Especially because it really depends on what applications/modules you will be using. We can restrict this question to the "standard" Ubuntu Desktop or Server, but even then it would be too difficult to answer: there is not enough documentation and the information available are sparse.

For example, to check whether udev from Quantal is compatible with the Lucid kernel you would have to see the M, N, O, P, Q release notes, kernel changelogs and udev changelogs. And then proceed to an another package, e.g. libc, upstart and so on. All these packages depend on specific kernel versions and all these packages are not controlled directly by Ubuntu (in the sense that it's not the Ubuntu Team that decides the compatibility policies of that packages).

  QUESTION: To what extent is software relatively close to the kernel (udev, gvfs, mdadm etc.) being tested on other than the version provided with the release?

The Ubuntu Testing team and the Ubuntu Quality team do not test kernels not provided by Ubuntu. The proof is that there are no test cases nor test activities for obsolete kernels.

  QUESTION: How does Desktop/Server edition differ in this?

They do not differ in any way. This is partially proven by the fact that both Desktop and Server edition use the same kernel.

  QUESTION: Is Ubuntu simply not bothering about these cases or am I missing a resource on this?

Ubuntu is not bothering about these cases. Not supporting a kernel version, but being compatible with it would be just extra work with few benefits.

Whether one may like it or not, one of the Ubuntu practices is to look forward and try to support the most recent technologies, rather than the most outdated. You can find an example of this when the Ubuntu CD has been dropped in favor of the DVD, or when Unity 2d has been removed from Quantal.

Also, and this is the most important point in my opinion, Ubuntu is not interested in distributing software which works, but software which works and is supported. There are important differences between these two terms.


Well, as it turns out wine 4.0 is released.
I followed the instruction from https://www.omgubuntu.co.uk/2019/01/wine-4-0 and was able to install wine.


Try to open it from terminal.Run the below command on terminal,

cinelerra


chkrootkit does not do full checks for additional files with "Suckit rootkit", so this is almost certainly a false-positive.

A tool which I would instead recommend using is called rkhunter, and this is because it does do additional file checks for Suckit Rootkit, and so does not make the same mistake.

You can install rkhunter with:

sudo apt-get install rkhunter

Read this for more information on chkrootkit detecting Suckit Rootkit's presence on the system, when in fact it is not present on the system: https://askubuntu.com/a/25179/364819


I temporarily solved this problem on Ubuntu 14.04 by running command:

sudo iwconfig wlan0 rate 54M


Is there a way to download a video's audio in mp3 using flashgot without using a youtube-to-mp3 converter?

To convert

I use ffmpeg [1]:

 ffmpeg -i input.webm -acodec libmp3lame -aq 4 output.mp3

-i: input file
-acodec: audio codec

LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL. [2].

aq: audio quality [3]

aq 4 = 128 kb/s
aq 5 = 160 kb/s
aq 6 = 192 kb/s
aq 7 = 224 kb/s
aq 8 = 256 kb/s

To download

I use youtube-dl it support a lot of sites, you can use -F switch to get a list of available formats, if there was an only audio format available you can only download that.

$ youtube-dl --list-extractors | wc -l
1035

Means it support 1035 sites.


In order to be sure no line break you can use other option than c.

split -n #number

split a file by #number chunks so you can thus be sure they are equal and more no break in lines.Example

split -n 4 file.txt

This will split the file.txt into 4 chunks.

OR you can split by number of lines

split -l #number-of-lines

example

split -l 200 file.txt

This will split the file.txt into files each is 200 lines. But this is not accurate that all are of same length since the last file maybe less than that number chosen.

Now with respect to the naming. The default of the command split is to use a default suffix "x" and default prefixes "aa" "ab" "ac" ...

So in order to change those default you have to state a suffix to use.

in your case you can use

split -n #number file1_1.txt file1_1.

The output would be like file1_1.aa file1_1.ab  file1_1.ac

Else you can change the default prefix to be numberic using -d

  split -n #number -d file1_1.txt file1_1.

The output would be like file1_1.00 file1_1.01  file1_1.02

So you can't get the naming you want with default split unless you use some awk or sed with REGEX.

Now to read the set of files from a file lets called files.list

while IFS= read -r file

do split -n #number -d "$file" "$file"

done < files.list

UPDATE: I came to this https://unix.stackexchange.com/questions/32626/split-a-file-by-line-and-have-control-over-resulting-files-extension

According to second answer

  recent versions (≥ 8.16) of gnu split one can use the
  --additional-suffix switch to have control over the resulting extension. From man split:

  --additional-suffix=SUFFIX
                append an additional SUFFIX to file names. so when using that option:

  split -dl 10000 --additional-suffix=.txt words wrd the resulting
  pieces will automatically end in .txt:

  wrd00.txt wrd01.txt

So in your case if your split version is >8.16 then you can do your need like this

split -n #number -d --additional-suffix=.txt file1_1.txt file1_1-

So output would be like

file1_1-00.txt file1_1-01.txt file1_1-02.txt .....


You seem to be using a development version of java : Java 9 has not been released yet.

So, first of all, you should remove this version of java, and install the default one :

sudo apt-get remove openjdk-9-*
sudo apt-get install default-jre

Depending on your version of Ubuntu, it should be a version 7 or 8.
If you're on a development version of Ubuntu, you might need to choose version 8 :
    sudo apt-get install openjdk-8-jre

Then you should be able to run Minecraft.

By the way, the simplest method to install it is to use the PPA instead of trying to run the .jar by hand :

sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update
sudo apt-get install minecraft-installer


thunderbird stuck with 'Status: Creating mail message...'

Yes, it appears to be this bug: #687 Enigmail hanging on send - Thunderbird 52.1.1

Work-around

One suggested work-around (confirmed by multiple bug report commentators) is to kill all GPG processes,

killall gpg gpg2

and try again.

Beta-version with fix

You can also install the pre-release version 1.9.8-a3 of Enigmail that's supposed to contain a fix.


Nginx is downloading file instead of doing MySql query

In Nginx configuration files, located in /etc/nginx/nginx.conf or /etc/nginx/sites-available/, you have the http2 protocol turned on in the configuration files for the port 80. Just replace the listen 80 http2; with listen 80;.


Apache server in Internet and local network, redirection to another ubuntu PC

IP address 128.125.100.124 is registered to the University of Southern California (reported by command whois 128.125.100.124). You will need to talk to the university network administrators and ask them whether they will allow you to run servers on any of these addresses.

I tried accessing that IP address from here but nothing happened. I am not sure whether you can get to your site from anywhere in the world.

If you were hoping to use 128.125.100.124 as some kind of a router that can forward packets to 128.125.100.118 you are out of luck - this is not going to happen. Routing and firewalls are handled by your network admins.


Quickly ubuntu-application + indicator template don't work

The command quickly add indicator creates a file projectname/indicator.py where the indicator is created.

self.indicator = AppIndicator3.Indicator('projectname', '', AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

change this line to:

self.indicator = AppIndicator3.Indicator.new('projectname', '', AppIndicator3.IndicatorCategory.APPLICATION_STATUS)

and it will work.


As the error message says:

sudo dpkg --configure -a

from man dpkg

--configure package...|-a|--pending
        Configure a package which has been unpacked but not yet
        configured.  If -a or --pending is given instead of package, all
        unpacked but unconfigured packages are configured.

        To reconfigure a package which has already been configured, try
        the dpkg-reconfigure(8) command instead.

        Configuring consists of the following steps:

          1. Unpack the conffiles, and at the same time back up the old
             conffiles, so that they can be restored if something goes wrong.

          2. Run postinst script, if provided by the package.


I think you might need to consider UFW, I mean the firewall of Ubuntu. See if the outgoing connection is enabled. Also it could be a problem of your ISP.


Xubuntu 14.04: task bar icon for google chrome is gone?

It seems to be a bug in Chrome / Chromium, see this related reports:
https://code.google.com/p/chromium/issues/detail?id=478714
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1449063

It was fixed in Chrome 43.0.2357.81.


It looks like the fix is to
(1) uninstall pulseaudio (sudo apt-get remove pulseaudio)
(2) reboot the machine.


How to know once a new application gets added into USC

The new applications appear in the "What's New" section:


Hard Drive Partitioning in new Ubuntu studio

The easiest way (with GUI) is to use Gparted.
To do it in CLI use fdisk. Here is tutorial if you don't mind reading linux manual.


Synchronize bookmarks between firefox and opera among many computers

Since you have already set up Xmarks, then actually the easiest way for constant syncing would be using the same Xmarks plugins on each browser and for Opera witch takes care of showing Xmarks.
And if you take into consideration LastPass, then you can see that it works for all browsers (LastPass addon for Opera).
Alternatives
Delicious plugins or google bookmarks plugins on Opera and some other browser that has Xmarks so they sync from one to the other.
Delicious can be imported also in Google Bookmarks website.
Another way would be manually exporting bookmarks from Opera and forgetting about Opera.
If you have Firefox 7, then export bookmarks from Opera bookmarks manager, in Firefox 7 import to bookmarks manager and set up Sync in Edit->Preferences and register and save registration code in gmail draft or some other save place.
Now if other computers have Windows then preferences will be in Tools and there set up using Fireox 7 Sync on registration code received to apply.

How do I install the latest stable version of Firefox?


AX88179 Ethernet adapter not working properly

I had to add a compiler flag to the EXTRA_CFLAGS variable in the Makefile, like so:

EXTRA_CFLAGS = -DEXPORT_SYMTAB -Wno-error=date-time

Possibly there are better ways to do this.  If you want the ethernet to work, look here: https://github.com/geoffreytran/AX88179_178A.


Automatically detect unresponsive processes

You can use top in a terminal. I know it's not graphical and not automatic, but it has very low memory footprint.

Open gnome-terminal
Type top
Press P to sort by CPU usage.
When you see a process eating up all your CPU,
press K and provide the process-id
of the offending app.
If the process is not running as your
current user, for example: root, you
will have to start top as root (be careful with that).


You do not give us anything to go on except for "blank screen". Please update your question with more details if you find anything.

If you data is vital why is this an issue? You can reinstall your system and restore a backup. When data is vital you have several backups and made one before and after each big change to your system, you also periodically restore said backup to know it is restorable. Otherwise "vital" is an insult to how precious your data is.

If you do not have a backup: boot up a live session and make a backup of your data, make sure you can restore it and only then start investigating your problem by looking at log files in /var/log/ to scan for errors, critical errors and notices that are related to your video card.

Next find out how to restore your video card driver (blank screens tend to be related to video card drivers) and see if that fixes it. You can do this from a live session. You did not include what your video card is; if you do know what it is include it into the question. If intel this should work:

sudo apt-get install --reinstall xserver-xorg-video-intel xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

Here is another for nvidia: Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics

Make sure you have internet access while you do this (from the live session you can enter a wireless password for your connection if you need wireless active).

If all fails: reinstall and restore the backup you made.


Ubuntu 16: Change date on file/folder when moved - how?

The trigger you are looking for is the touch command. Simply touch every file that you move to the live archive and it gets the current access and modification date and time.

With the knowledge given by the OP's comment to this answer, another idea for a script:

loop through all files of the active folder:
if the file is also in the archive folder with the same change date, then touch it in the active folder.

By touching only the files who have a counterpart with the same date in the archive folder, you allow the files that have been moved back, to begin aging again after their first discovery. (Each moved file will only be touched once.)

I hope that I have made me clear.


The tool named wipe deletes data permanently on HDD. To install it using terminal

sudo apt-get install wipe

To wipe out all data within a whole HDD type in terminal.

sudo wipe /dev/sdaX

where X is your partition.


You should check your current network settings in Ubuntu. While the laptop is connected to router, the IPv4 connection method must be set to "Automatic (DHCP)".


Is it possible to automatically nofity for update of manually installed packages?

If you add a PPA, rather than just downloading the deb, it will be automatically updated as its within the scope of the package manager.

Manaually added packages (i.e. from debs,) and source downloaded from soureforge are not, however, and the only way I can think of getting these to update in a similar kin is to write a script.


Run gksudo gedit /usr/share/xsessions/firefox.desktop, and paste in the following, then save and exit.

[Desktop Entry]
Name=Firefox
Comment=This session logs you into Terminal
Exec=/usr/bin/firefox -height xxx width xxx
Icon=
Type=Application

You should now have a new session at the login screen, named Firefox, that will autoload Firefox only.


Can not dual boot 15.10 after installation from USB on Laptop Acer Aspire v13-371

First boot into your Windows installation and disable hibernation and Fast Boot.

Disable hibernation by opening command prompt as administrator and execute:

    powercfg /h off

To disable Fast Boot open Control Panel (the old version - not the modern design),
select the Energy Settings, enable show hidden settings and uncheck Fast Boot.

Shut down the machine completely - do NOT reboot !

Reinstall the GRUB boot loader to your Ubuntu installation  in EFI mode.

Boot from the Ubuntu installation media - open a terminal and execute:

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

Note:

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

To identify the partition numbers use GParted - it is included in the Ubuntu install media.

Boot into BIOS and select Ubuntu in UEFI settings as the default operating system to boot.

You now can select which operating system you want to boot from the GRUB boot menu.


On normally configured system the pkg-config does search for the needed *.pc files in the path /usr/lib/x86_64-linux-gnu/pkgconfig/. You can find such files using search on packages.ubuntu.com (really there are more than 19 such packages).
If you want to (or need to) override (or control) it, then define (re-define) the corresponding environmental variable to something like
export PKGCONFIG_DIR=/usr/local/lib/x86_64-linux-gnu/pkgconfig/

and then run your compilation procedure.
In correctly configured system such *.pc-files should be installed and found automatically after installation of build dependencies for the package.
In your case it is done by sudo apt-get build-dep ffmpeg. This command will install many *-dev packages with *.pc files for them.


this MSXML 6.0 package is not supported on the current processor type winetricks ubuntu 18.04

You're trying to install 32-bit msxml on 64-bit system, which is why it throws an error, you could try download it directly from Microsoft server.

Try:

wget -P /tmp https://download.microsoft.com/download/e/a/f/eafb8ee7-667d-4e30-bb39-4694b5b3006f/msxml6_x64.msi
WINEPREFIX="${HOME}/.wine" wine64 msiexec /i /tmp/msxml6_x64.msi

WINEPREFIX point to your current wineprefix, you can changes it to the one you had— though the default location should be at /home/user/.wine


HughesNet Modem - WiFi works but how do I get my browser to work with an ethernet cable to the modem?

From the discussion this problem was solved by:

changing to the correct subnet, so address 192.168.0.15 was changed to address 192.168.42.15 so address 192.168.42.x changing the third "0" to "42" .
Setting dns to 8.8.8.8

dns-nameservers 8.8.8.8


How to backup Ubuntu and programs settings?

For your case, the safest method is to backup all hidden files from your home folder from your reference computer and paste it in your new user,

EXCEPT

.bashrc
.profile
.cache

Please clean up your trash to save space, because trash is stored in .local


How to scroll down terminal output in watch command

I just had to use top for this purpose =)


OK, I understand why you're mounting an NTFS partition in Ubuntu for sharing files. I do the same thing.

The problem is that FAST BOOT and HIBERNATION are incompatible with our dual-boot setup in so far as Windows filesystem is left in an inconsistent state.

Ubuntu notices when it tries to mount the partition so it stops the boot. Any changes that could be made to the NTFS filesystem from Ubuntu would probably be lost when rebooting Windows, as it'll want to restore the last known condition of the filesystem from the hiberfil.sys.

Running ntfsfix from Ubuntu will probably fix the hiberfil.sys problem, but at the risk of losing files, or corrupting, the Windows side.

I'm not aware of any script or extension to prewarn you at Ubuntu boot time that the hiberfil.sys exists and fix the problem for you.

It's just best to disable FAST BOOT and HIBERNATION in Windows.


On your laptop, search for Network Connections.
On the wired tab, select the connection and click "edit"
Go to the IPv4 settings tab, and change the method to "Shared to other computers"
Save all changes, and if appropriate, unplug and reconnect the ethernet cable between your PC and laptop


I use banshee to sync my 1st gen iPod touch. It works fine most of the times.


Connecting Ubuntu 11.10 to Samsung LCD TV over HDMI , gives screen in green and lila

it may be a hardware issue: switch cables or unplug and re-plug again


Screen handling fault with Ubuntu 16.04 LTS

I had the same problem and I tried this solution and it was effective.

This can be written via terminal ( Ctrl + Alt + T )

sudo add-apt-repository ppa:paulo-miguel-dias/pkppa
sudo apt-get update
sudo apt-get upgrade
sudo reboot


How to isolate Python 2.7.X on Ubuntu 12.04 which has default Python 2.7.3?

First, to make sure I started with a clean slate, I took the following steps:

Uninstalled package xlwt (for testing), via sudo apt-get uninstall python-xlwt and pip uninstall xlwt
Uninstalled PIP via sudo apt-get uninstall python-pip
Made clean python source directory (~/src/Python2.7.8) via make clean
Made sure pip was not available via which pip (resulted in nothing)

To build Python 2.7.X and make sure PIP is configured for only that specific installation

(assuming already downloaded and decompressed into home directory, say ~/src/Python2.7.8)
Make two directories for --prefix and --exec-prefix configure options, say ~/bld/python2.7.8_ind and ~/bld/python2.7.8_dep
Go to source directory (e.g. ~/src/Python2.7.8) and type

./configure --prefix=/home/uname/bld/python2.7.8_ind --exec-prefix=/home/uname/bld/python2.7.8_dep

type make && make install

The binary python (or a symbolic link to the binary) for this installation is located in this example in /home/uname/bld/python2.7.8_dep/bin

Use this binary to install pip from https://bootstrap.pypa.io/get-pip.py by typing
~/bld/python2.7.8_dep/bin/python get-pip.py

This creates a (previously non-extant) directory bin in ~/bld/python2.7.8_ind and places the PIP executables there which will be used for this specific installation. The PIP packages are placed in ~/bld/python2.7.8_ind/lib/python2.7/site-packages (which was previously empty save a README file).

Now, to install the first package to this specific python installation,

I verified that the directory ~/bld/python2.7.8_ind/lib/python2.7/site-packages contains only packages added during PIP installation (pip, setuptools, easy_install)

type ~/bld/python2.7.8_dep/bin/pip install xlwt

Now, the directory ~/bld/python2.7.8_ind/lib/python2.7/site-packages contains a new package (xlwt).

Now when I type

~/bld/python2.7.8_dep/bin/python
>>> import xlwt

it works, and typing python and import xlwt produces an error (as expected). Also verify that path searched for packages by new python installation is correct with

~/bld/python2.7.8_dep/bin/python
>>> import site
>>> site.getsitepackages()

This whole process might have been obvious to non-newbies, but I'm a newbie so I've written it all out.


Upgrading to the last version of Git from the source repository or PPA

Install Git via package-management once and you will be always have last updates.

Just run this commands to install/upgrade current version:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

After that you should have this result:

$ git --version
git version 2.0.4


What's the real and correct way to install things in Ubuntu?

Purpose of PATH variable

PATH is meant for your shell - it tells the shell where commands you type in are supposed to live. Good example of that was on OpenSUSE box I once had. On Ubuntu you can type in iconfig command and bash will go " oh, I know where that is - i'll run /sbin/ifconfig". Well, on OpenSUSE default PATH , doesn't have /sbin added to it, so bash will say "sorry, I don't know where ifconfig is , I've no record of such file." So you have to either run /sbin/ifconfig ( i.e. full path ) or do it in a smart way - add /sbin to PATH.

Good example of why you would want to do is when you install custom scripts or binaries. Let's say you have saved something in /opt/my_stuff folder , and you want just to call my_command by name. Well, you will have to add /opt/my_stuff to PATH.

How to properly add directories to PATH

The basic idea is that you want to append or join original $PATH with the new directory. As you may or may not know, items in PATH variable are delimited with :. You also want to export the variable, so that other programs ( children of your shell ) know where to look for stuff. All that stuff must happen at the end of ~/.bashrc, so that when you open shell and it has read your ~/.bashrc config, it knows where everything is located.

Here's the example from my ~/.bashrc :

export PATH=$PATH:"/opt/microchip/xc16/v1.25/bin"

In this case , original $PATH will be expanded to a string of directories. We simply add one more to it, and save it back. Nothing complicated.

What does this have to do with installing software

If you are installing a file from .deb archive or .run script, you shouldn't worry about the PATH part. It's the responsibility of software author to simplify installation process. Typically, they'll configure their installation to save stuff into one of the common directories that already belong to PATH: installation script will say, "hey, install this software into /usr/bin` and you will be able to use it without extra effort.

If software authors install it somewhere that's not typically in PATH, they will have to configure your PATH variable or you have to do it yourself. In the example above, the directory /opt/microchip was created when I was installing Microchip's IDE and compiler. Their installer automatically put that line into my ~/.bashrc. I often write scripts that go into /opt , so I usually mention in the instructions that users have to configure PATH themselves.

The ~/bin directory

You frequently see people recommending to save script and other types of software into ~/bin. This folder belongs to you - your user, so if you don't want to share app with other people on  your machine - that's where you'd put it. Difference with /opt is that as I mentioned already in a few places  , /opt is neutral ground. So if I as system administrator want both my family to also have access to an app with their accounts - that's where I'd put it.

As far as bash shell goes, it already handles ~/bin being added to PATH for you. Other shells, like /bin/sh , or tcsh or ksh won't do it, so keep that in mind if you are working on different system or want to use a different shell in your Ubuntu.

Addressing specific parts of question

  I often see instructions telling me to add the folder of the app in the PATH, but what would happen if I install like, 100 apps with this technique? Wouldn't my PATH variable get big and messy?

Not really - what's supposed to go into path is directories. If you typically install software in single directory ( such as ~/bin or /opt ) it will require adding only /opt. If each software has to live in its own folder under /opt , then yes - you'd have to add each and every single one to PATH. What you can do , however, is write a script to add all directories to PATH. So , let's say:

$ for item in /opt/* ; do
 if [ -d "$item" ]; then
     PATH="$PATH:$item"
     echo "$VAR"
 fi
 done

And this can live perfectly fine as function at the end of your ~/.bashrc , so that each time you open the shell, all directories under /opt are added automatically.

In my example, I write a lot of scripts. They all live in ~/bin since all of them are just single files, and there's no need for them to live in separate directories.

  Also, I'd be passing this PATH to every app I open, I don't see this as the better way to install things in Linux.

That's what the export variable is for. It passes stuff to child processes of your shell. You as user don't have to do anything. Also, as I mentioned, it's not typically done - software authors create packages that go into directories that are already in PATH like /usr/bin.

The directories that are not in /opt are just a neutral ground and sort of a way for developers to say "hey, our app is 3rd party, so it's not something default."

Using GUI apps without PATH variable

Once thing that haven't been covered here is .desktop files. To put simply , these are Linux's version of Windows shortcut , but on steroids. Lets say I've build a GUI app in python, and I want it to live in /opt folder, but I don't want user to call it from command line - I want them to use a nice and neat desktop shortcut. Well, that's where .desktop files come into play. Here's an example:

$ cat /home/xieerqi/.local/share/applications/vivaldi.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=周迅 mv - YouTube
Icon=vivaldi
Path=/home/xieerqi
Exec=/opt/vivaldi/vivaldi-bin --ppapi-flash-path --ppapi-flash-version --always-authorize-plugins --enable-npapi --no-first-run
StartupNotify=false
StartupWMClass=Vivaldi
OnlyShowIn=Unity;
X-UnityGenerated=true

While vivaldi app lives happily in /opt without ever needing to be referenced in PATH , I can use a .desktop shortcut to launch it. Again, you'd need to manually create one for each and every app, but as you can guess  Linux has scripting ways to automate even that.

Conclusion

So what is the real and correct way to install software on Linux ? There is none, just like there isn't a way on Windows or Mac OS X. Your Windows app could be single .exe or a folder with .exe and live perfectly fine in C:\ folder. Same here - on Linux you can have a script or whole suite of software live in /opt, or ~/bin or wherever you choose. The choices , of course, must to some extend be justified. Do you want the app to be available to root only, to you only , or shared ? Do you want it to be accessible via just its name, or do you want to type in full path to the app ?

Additional information

Difference between installation of ubuntu software center and command line


Moving only the first file from any directory to current one

If you want to move only the first file in a directory, to the current working directory, you can use for, because it loops over files in an ordered way. Replace /path/to/ with the real path to your POSCARS directory, and test it first like this with echo:

for file in /path/to/POSCARS/* ; do echo mv -v -- "$file" . ; break ; done

This will find the first file in POSCARS and simulate moving it to the current working directory. If it shows what you want, then re-run the command without echo to actually move the file:

for file in /path/to/POSCARS/* ; do mv -v -- "$file" . ; break ; done

mv -v -- move the file and report the action, then do not accept further options
. is the current working directory
break means break the loop after the first iteration, so it will stop moving files after finding the first one


How can I modify the size of swap with LVM partitions?

I do not like using GParted, partially because most of my servers are without GUI.

Here's how to extend a swap setup as a logical volume:

1) Determine the name of the swap logical volume using the "lvs" command:

$ lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
root_lv volgroup0 -wi-ao 7.00G
swap_lv1 volgroup0 -wi-ao 30.00G
tmp_lv volgroup0 -wi-ao 3.00G
usr_lv volgroup0 -wi-ao 7.00G
var_lv volgroup0 -wi-ao 4.00G

2) Turn off the swap partition:

$ swapoff /dev/volgroup0/swap_lv1

3) Resize the swap partition, adding 15GB more space to it:

$ lvresize -L+15G /dev/volgroup0/swap_lv1
Extending logical volume swap_lv1 to 30.00 GB
Logical volume swap_lv1 successfully resized

4) Format the new swap space to make it usable:

$ mkswap /dev/volgroup0/swap_lv1
Setting up swapspace version 1, size = 41875927 kB

5) Turn the swap volume back on:

$ swapon /dev/volgroup0/swap_lv1

6) Use free command to show your new swap space:

$ free -t | grep -i swap
Swap: 30719 0 30719


It's a memory problem.  the system cannot allocate memory for the unpacking process for libnfsidmap2, likely because there is no extra memory available.  You will need to install more memory on the system or allocate more memory to the vm (if its a VM) to unpack the file you are installing.


PHP7.0 mbstring not working after dist-upgrade 17.10

The problem appeared to be that 17.10 uses php7.1 and not php7.0 as indicated by Videonauth. I resolved it as follows:

sudo apt remove php7.0
sudo apt autoremove
sudo apt install php7.1
sudo service apache2 restart

For some reason it does install php7.1, but somehow not everything php7.1 requires (such as php7.1-cli), so I installed it manually to get the missing dependencies. In my case some other php7.0 packages remained such as php7.0-common and php7.0-cli which I removed after the autoremove.

For me, phpmyadmin itself was removed as well when I removed php7.0, so I did another

sudo apt install phpmyadmin
sudo service apache2 restart

to get everything to work.


Grub is still present on your HDD in MBR. It is the part of disc where system looks on startup to determnine what to start. It shold be rewtitten when you reinstall your system.


How to activate subpixel font hinting for the text inside Firefox, Chrome and evince?

Firefox seems not to read the GTK configuration, but it does will honor your ~/.fonts.conf which basically contains the font configuration, including the sub-pixel order.

This is an example .fonts.conf which comes from a 2005 blog post which may help out, what you most likely want to change is the rgba value (sub-pixel order) to match your LCD and maybe the antialias value.

<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig>
<match target="font">
    <edit mode="assign" name="autohint">
        <bool>false</bool>
    </edit>
</match>
<match target="font">
    <edit mode="assign" name="rgba">
        <const>rgb</const>
    </edit>
</match>
<match target="font">
    <edit mode="assign" name="hinting">
        <bool>true</bool>
    </edit>
</match>
<match target="font">
    <edit mode="assign" name="hintstyle">
        <const>hintfull</const>
    </edit>
</match>
<match target="font">
    <edit mode="assign" name="antialias">
        <bool>true</bool>
    </edit>
</match> </fontconfig>


How to install an old version of google chrome

If you have downloaded the older version of chrome and it's only issue of installing it then disconnect your PC/Laptop from internet and try installing it that way, it'll prevent it from checking for update and if it get's installed, before connecting back to internet don't forget to turn off the setting to check for updates in chrome.

Note - don't download the installer for the chrome cause even if you have installer for older version it'll eventually download the latest chrome from the internet. Download the chrome application of older version and try.


file type options under properties on dolphin does not work. Ubuntu 16.04

sudo apt install kde-cli-tools

Fixed it for me in Xubuntu 18.04.

An explanation of what is happening: Dolphin is part of the KDE environment.  Nothing happened when you clicked the file type options button because Dolphin was trying to action another part of the KDE environment that was not installed.


Print specific dates in a specific format

Print every date between a Time duration

I would grab your date1 and date2 and convert them to timestamps
Then I would investigate: whats 1 hour converted to timestamp.
And write a for-loop from timestamp(date1) to timestamp(date2)

within the loop I would add step by step timestamp(1 hour), convert the new timestamp back in the prefered date/time format and print it out until the loop ends.
#

#!/bin/bash
# by user85321 @ ask ubuntu
# call: ./script.sh 20120205_16 20120205_16 20120305_18

# STEP 1:
# set userdefined Dateformat to normal
d1=$(echo "$1" | sed 's/_/ /g')
d2=$(echo "$2" | sed 's/_/ /g')

# set normalized dates to timestamps
t1=$(date --utc --date "$d1" +%s)
t2=$(date --utc --date "$d2" +%s)

# STEP 2:
# time increment, 1h = 3600 s
h=3600

# STEP 3:
if [ $t2 -gt $t1 ]
then
    for i in $(seq $t1 $h $(($t2-$h)))
    do
        # take this and do what you want to do ;o)
        echo $(date --date="@$i" "+%Y%m%d_%H")
    done
fi

My bash prints out exactly that list , what you described . So, it is done.
I think some cracks would do it shorter/ better, but it works ...

good luck


Higher screen resolution for VirtualBox?

This worked for me and I am running VirtualBox 4.1.8 and Ubuntu 11.10.

sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms

Found it on this site under a slightly different question Higher screen resolution in VirtualBox?


Dual Boot Windows 7 and Ubuntu 14.04 on 512Gb SSD GRUB Error

Step 1:

Try Windows 7 Bootable Disc:

Create one/two partition as required for Windows with required size, leave the remaining hdd un-partitioned(will be used by Linux latter) ----> Install Windos and all it's components  ----> Reboot and verify for consistency.

Step 2:

Try Ubuntu Bootable Disc:

Create manual partition and select swap space as desired on the un-partitioned area ----> Complete Installation ----> Reboot to Windows and verify for consistency ----> Reboot to Linux and verify for consistency

Report Back(If Possible)


Asus AC1200 USB AC53 Nano Wifi adapter does not work on Ubuntu 18.04

I recommend this git repository: https://github.com/cilynx/rtl88x2bu/tree/5.6.1.6_35492.20191025_COEX20180928-6a6a

It compiles with a few possibly harmless warnings on my 5.3.xx system.

The procedure is outlined clearly at the github page but if you get stuck, please post back and I'll help.


This command worked for me (note the extra proto= argument)

sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps


Mix between Gnome 2 menu an Unity possible?

There is no way to get Unity to show programs in categories. If you have only problems putting many programs into the left bar, you can shrink the buttons there (using Unity Tweak Tool).

Otherwise, you can use Cinnamon instead of Unity to have most of the applets and searches and still retain the menu with programs ordered in categories.

Another possibility is using Cairo Dock. It adds a bottom bar that has programs listed in categories, in other features it's mostly similar to Mac.


how to switch from automatic dhcp to manual setting of the wireless network

maybe you mean something like this...

run nm-connection-editor , go to tab wireless, choose network that youre connecting to and then change method from dhcp to manual, click add, type your current IP, netmask and gateway, then add your dns servers. Your can find your current ip, netmask, dns etc if you right click on network-manager applet, then connection information, or by running grep nameserver /etc/resolv.conf for dns and ifconfig for rest

if you have more computers on same network, choose ip adress that isnt in your dhcp server range ( to prevent situations when dhcp server assing same  ip as yours to other computer )


Workaround: Try after insert sd card to slot run as root

echo  1 > /sys/bus/pci/rescan


What does 'set the RESUME variable to override this' after sudo ubuntu-drivers autoinstall mean?

This error means that UUID of your swap partition or file has changed!

For a SWAP Partition vs a SWAP File (Not Recommended)

You can check it's UUID by:

sudo blkid,     and  mine was

  /dev/sda2: UUID="139d357c-829d-408d-bccc-147ec4402da8" TYPE="swap"
  PARTLABEL="HDD_Swap" PARTUUID="0067903b-aed0-48d1-8d59-956784616d48""

Add this line to (and likely an empty file):

  RESUME=UUID=139d357c-829d-408d-bccc-147ec4402da8

To this file:

  /etc/initramfs-tools/conf.d/resume

Using this command should you choose it.

sudo gedit /etc/initramfs-tools/conf.d/resume

∘ Important ... it is very COUNTER INTUITIVE! but set it to the DISCs UUID not the Partitions PARTUUID, and in my case it WAS the one In the error - ODD Message!)

Then reboot or just update what's necesswary with this command:

  sudo update-initramfs -u -k all

I hope it helps, mark


How do I know if an application has been installed and how to uninstall it?

open terminal window and type 'apt show ("application name")' and see if it has been installed... if so type 'apt remove ("appl. name")' to remove it. To reinstall it or to install any other program type 'apt install ("appl. name"). See also 'man apt' or 'apt help'


How to disable "align to grid" on the desktop in Ubuntu 19.04?

For now, there is no option to disable align icons on a grid in Ubuntu 19.04.

Some background: previously, desktop icons were handled by the file manager, nautilus, currently known as "Files". Gnome developers removed the functionality from the file manager for technical reasons, but also because icons on the desktop do not fit in their vision. Currently, this functionality is supported by a Gnome Shell extension "Desktop icons". This is a very new extension. An option to not align the icons would need to be implemented.

If this feature is essential to you, you may want to consider switching to an alternative desktop environment, that fully supports the feature. Alternatively, it is possible to replace the default manager by for example nemo. Then, that file manager can be set to handle icons on the desktop.


I had the same problem with my XPS laptop and I had the same error due to building a kernel.
I've fixed that error by using a method described in this post https://stackoverflow.com/questions/61657707/btf-tmp-vmlinux-btf-pahole-pahole-is-not-available
P.S. unfortunately, I could not find any other solutions for fixing sound problem except building the kernel with a custom configuration.


Anbox sound isnt working, how do I fix it?

I had this problem too and solved it. Apparently there is a problem with latest prebuilt .img file for anbox, which for some reason lacks config files for media codecs, including audio codecs.
You can get the necessary config files here
They must be accessible to Android in the /system/etc directory of the image. To achieve it, you can either use rootfs overlay as described here
or made another image. For the latter, unpack the original image using unsquash android.img (this will unpack it into a file tree with root directory squashfs-root) then put the config files into squashfs-root/system/etc and pack image by command mksquashfs squashfs-root android.img -comp xz Naturally, you should then put the new images to where anbox expects it and restart the system service anbox-container-manager and the user service anbox-session-manager.


This doesn't directly answer your question but kind of meets it halfway. You can install something like OBS Studio to record video. You'd have to browse the forums to find or learn how to create a plugin for the timestamp part (I think, I only use it on Windows for gameplay recording)


It looks like you may have a swap problem. You have BOTH a /var/swapfile AND a swap partition. That's not a problem in as itself, unless the sizes are not correctly set (unknown at this time), or the fstab entries are incorrect (as yours is).

Assuming that /dev/sda5 is at least 4G, as seen by gparted or sudo fdisk -l, we'll modify your swap configuration.

First we'll modify /etc/fstab.

In the terminal app...

sudo -H gedit /etc/fstab # edit fstab

change this...

/var/swapfile none swap defaults 0 0

to this...

/var/swapfile none swap sw 0 0

then to this...

#/var/swapfile none swap sw 0 0

save the file and quit gedit.

reboot

sudo sysctl vm.swappiness # should show a value of 60 after a reboot.

free -h # check swap size


I advise you to install a virtual machine and install Ubuntu 15.10 indide this environment. Wily includes Qt 5.4.2.

Do not try to update your Vivid system with Qt 5.4.2.


"Failed to download repository information" on 16.04

As mentioned in the link posted by Manoj Sawai your problem is related with google chrome and the changed GPG key.

The following command should import Google's updated GPG Key and therefor fix your issue:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

After that re-run your sudo apt update commands and you should be fine again.


When the installation is completed, you must remove the disc when prompted.

Eject the disc and reboot the PC.


Unknown locale UTF-8 when installing MsSQL server on ubuntu

As a workaround I suggest that you open the ~/.profile file for editing and add the line:

unset LC_CTYPE

That ought to compensate for the issue.