Why can't I explicitly source a file using su -c?

The file was getting sourced, but execution was stopped when it reached this case statement, which will only continue if it is being sourced in a shell in interactive mode.

case $- in
    *i*) ;;
      *) return;;
esac

The variable $- represents the flags with which the current shell was initialized. If it doesn't see i (the flag for interactive mode), the code will return. Because the shell wasn't being run in interactive mode, source .bashrc stopped when it reached that case statement.

For reference, the output of echo $- when using a normal interactive shell is himBH. The output of su -l -c 'echo $-' ghost, however, I see hBc.

Moving the nvm lines above that statement solved the problem, as did putting them into a clean .profile or .bashrc.


Recovering mysql database from an unbootable hard disk

I think you mounted the root directory with your live cd, but forgot to mount /var where the mysql data lives, and that why you couldn't see the mysql data. Find which partition /var was mount on and mount it, and the mysql data should be there.


Those ppas do not exist

They are not official Ubuntu ppa and you must have manually added them.

To remove them:

Open Update manager, select settings and remove them from  the "Other Software" tab in "Software Sources".


failed find 'ANDROID_HOME' environment variable

This is one stupid mistake.  export $ANDROID_HOME and export $PATH in .bash_profile is the reason why the path environment doesn't work.

I have to put both $ANROID_HOME AND $PATH into .bashrc


Howto auto-mount windows-partitions using /etc/fstab

Assume you are sure about:
- Your created directory is /media/Jonas (with uppercase J)
- Your ntfs partition is /dev/sda3 (you can find this out by issuing sudo blkid)

My fstab uses a simpler form:

/dev/sda3   /media/windows  ntfs    defaults    0   0

You may change your "rw,auto, ...." to "defaults"


Disabling Fast Startup/Hybrid Sleep will resolve your no-access problem.  It will require booting into Windows 10, where you perform

{Win-R} powercfg.cpl {Enter}

Look for selected power plan (bullet in circle) and click its 'Change plan settings' link.
Click on Change advanced power settings
Expand Sleep, then expand Allow hybrid sleep
Set it to Off
On a laptop, likely you will see two options, On battery and Plugged In
Set both of those to Off
Click OK then Save Changes
Shut down Windows completely, power up, choose Ubuntu, and those drives should appear in Nautilus once more.


How to know if my graphic card is working well in Ubuntu 16.04?

There are no proprietary AMD drivers for Ubuntu 16.04 (yet).
AMD is improving support for the open source Radeon and AMDGPU drivers (one or the other will be installed and in use depending on your card).
You won't find any additional drivers in that section due to what I explained above.


What packages are not needed to run Ubuntu-Desktop?

Is there a list of packages which i can uninstall but still have a simple desktop?

No. But it should not be too hard to accomplish.

  I don't need any of the additional packages being usually installed. Just the file manager and that's it.

I see 2 approaches how you can manage this ..

start from a desktop install.

Open Ubuntu Software Center and find and remove the installed software based on categories. That might leave some libraries.
Do not use the advanced feature and uninstall Python and stuff like that; just applications. Also make sure not to delete the device driver.
Start from a system with no desktop.

Use a minimal install version or the server install or your current desktop system where you remove the desktop.

And then install nautilus (I assume you meant Nautilus but you can also pick another file manager or even a command line file manager and skip out on the whole desktop; like midnight commander as dobey suggested). It will install anything that is mandatory for that filemanager to run. Including the parts you need for the desktop to run if needed.


Ubuntu 18.04 Does Not Accept "\" or any other appropriate character in paths

I have solved the problem. Escape characters are not accepted. To insert a space, type "%20".


Ubuntu 20.04 20.10 freezes with artifacts on screen intel uhd 630 graphics

This may not be a complete answer, but the issue could also be related to the SSD in the machine. I've seen a number of Dell Latitude units at work show similar halting/freezing issues over the years and it has often been due to an out-dated SSD/NVMe firmware.
You can check which firmware your device is using with nvme. You will likely need to install it first, though:

Install the necessary software: sudo apt install nvme-cli
List the NVMe devices in the machine: sudo nvme list

For my machine, I see this:
Node             SN                   Model                                    Namespace Usage                      Format           FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1     S359NX0K103156       SAMSUNG MZVLW512HMJP-000L7               1         236.49  GB / 512.11  GB    512   B +  0 B   7L7QCXY7

Compare the FW Rev number with the most recent version from Dell. If it matches, also look for updated firmware on their site. From what I can see, it looks like there's an updated BIOS available. This may have appeared in your "Software Updates" application as something to look at.
You can also check for firmware updates with sudo fwupdmgr update. You should see something like this:
• Thunderbolt Controller has the latest available firmware version
• SAMSUNG MZVLW512HMJP-000L7 has the latest available firmware version
• System Firmware has the latest available firmware version
Upgrade available for UEFI Device Firmware from 184.79.3722 to 184.80.3746
20HQCTO1WW must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]:

Incidentally, it seems my notebook has some updates available. This is a good way to ensure maximum efficiency of your devices.


Gettext in PHP not working anymore after server upgrade 16.04 to 18.04

Adding this fixed it:

putenv("LANGUAGE=it_IT.UTF-8");

This is the result of a full trial and error day, no comment...


Save output of previous command to a text file

No, there isn't a way to save the last command's output to a file, as far as I know. The shell doesn't store that information.

However, you can hit the up arrow ↑ and add the redirection to the end of the last command, so you don't have to type anything new.


E: The package android-studio-4.0 needs to be reinstalled, but I can't find an archive for it in Ubuntu 20.04

In all currently supported versions of Ubuntu open the terminal and type:
sudo apt-add-repository ppa:maarten-fonville/android-studio
sudo apt update
sudo apt purge android-studio-4.0 # completely uninstall Android Studio
sudo apt install android-studio-4.0


disk drive errors during startup - What do they mean?

OK, I've just run fsck /dev/sdb7 and it's fixed


Installing Ubuntu on a laptop with FreeDOS

May be the usb drive not correctly installed on usb. Check in other computer if starts the ubuntu of the pen. If no starts try to use other program (Windisk32, yumy, unebootin) to do de image or change de usb pen.

If starts in other computer. Try to change de usb conector where you plug the pen.


From Launchpad Question #85949:

  Logout

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1

  Reboot

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestReboot

  Shutdown

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown

  If some application is inhibiting logout/reboot/shutdown, no action will be performed and gnome-session will show a confirmation dialog.

So add the command:

dbus-send --session --type=method_call --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.Logout uint32:1

to your script.

UPDATE: The DBus interface for suspend and hibernate has been removed, to suspend and hibernate from the command line, use pmi.

sudo apt-get install powermanagement-interface

Suspend:

pmi action suspend

Hibernate:

pmi action hibernate


MAAS - unable to create vlan interface on node

In order to add alias or vlans to an interface, interface must be first assigned to the proper fabric.

To do so update the interface with proper fabric, untagged interface, if any, and IP Address.

Once this was completed I was able to move forward.


Is there any application for manual logging with timestamps?

Perhaps gtimelog does what you're after:

It is available in Ubuntu as the gtimelog package:

sudo apt-get install gtimelog


What is the meaning of minimal, netinstall and bin iso

Minimal
The Minimal CD will download packages from online archives at installation time instead of providing them on the install CD itself. Downloading packages at install time reduces the size of the install CD to approximately 5 to 30MB depending on architecture (see below), as well as providing only the packages needed for installation. The download time savings achieved by using a Minimal CD can be significant, as only current packages are downloaded, so there is no need to upgrade packages immediately after installation. The Minimal CD uses a text-based installer like the Alternate CD, making the CD image as compact as possible.
https://help.ubuntu.com/community/Installation/MinimalCD

Netinstall
The network installer lets you install Ubuntu over the network. This is useful, for example, if you have an old machine with a non-bootable CD-ROM or a computer that can’t run the graphical interface-based installer, either because they don’t meet the minimum requirements for the live CD/DVD or because they require extra configuration before the graphical desktop can be used, or if you want to install Ubuntu on a large number of computers at once.
http://www.ubuntu.com/download/alternative-downloads

Bin ISO
That would then just be the normal one (as far as I understood it)

I'd just go with the normal iso (:


I suggest that you make sure when you installing you take a very close look at when you partition your drive for installation - Uninstall and try again.  Good Luck


Using sed to print and replace text in the output of the ps command

1. How to print the tty column from ps with sed?
ps | sed 's/ *[^ ]* *\([^ ]*\).*/\1/'

Explanations
I'll use ␣ for the space character.

s/A/B/ – substitute A by B one time per line
␣* – 0 or more spaces
[^␣]* – 0 or more characters that are not (^) a space
\(…\) – a group, everything inside the escaped brackets gets saved as \1 as it's the first group here
.* – 0 or more occurences of any character except newline
\1 – calls the afore saved group

Alternative ways
ps -o tt
ps | awk '{print $2}'

2. How to replace the TTY row with “terminal”?
ps | sed '2,$s/\([^0-9 ][^ ]*\)/terminal/'

Explanations

2,$ – process every line from the second to the last (so leave the first line out) – I assumed you want the TTY heading to stay, if not just omit this.
[^0-9␣] – any one character except one of these: 0123456789␣
terminal – the string terminal

Alternative way
ps | sed '2,$s/\([0-9 ]*\)[^ ]*/\1terminal/'
ps | awk '{$2="terminal";print}' # change every line
ps | awk '{if(NR>1){$2="terminal"};print}' # omit first line


Before create android select "Java module"
In field "Project SDK" select folder with your JDK (e.g /usr/lib/jvm/java-7-oracle)
Click "Next" then "Previous"
Select "Android module" and shoose your folder with Android SDK

After that all my ASDK was found correctly.


Ubuntu 17.10 (and 17.04) nvidia quiet splash hangs on restart or shutdown

I had the same problem with a Lenovo E470 with NVIDIA 940MX.

In my case removing just the "splash" parameter solved the problem.


uvcvideo is loaded but /dev/video0 doesn't exist

For my case, I found there is a file called uvcvideo-blacklist.conf in /etc/modprobe.d. It will prevent uvcvideo module to be loaded automatically when booting. Commented out the only line "blacklist uvcvideo" in this file will get uvcvideo been automatically loaded at start up.


Is there any way of changing the font size of the tabs in Chromium?

Unfortunately, no. The font size is  hardcoded in the Chromium source code. This issue has been reported here, you can "star" it to be notified of any changes.


SSH allows remote connections only after a local login to the server

found the problem, networking issue:
https://ubuntu-mate.community/t/cannot-login-via-ssh-before-performing-a-local-login/12103/3


Which version of Ubuntu have you ?  few weeks ago I bought my new HP Laptop and I tried to install on it Ubuntu 12.04 LTS. I couldn't get an internet connection at all. I had to an external usb wireless adaptor. Then I had the idea to try and install the LATEST version of Ubuntu (13.04) and that pretty much solved my problem. The 13.04 installation automatically detected the realtek drivers and I no longer had to use the wireless adaptor. Try upgrading to the latest version (if you are using any other version but 13.04) and if that also doesn't work, go to System Settings --> Software & Updates --> Additional Drivers Tab.

Please let me know for further details.

Regards,
Anthie G.


how to install rastertospl in my usr/lib/cups/filter?

The archive for the Linux driver contains a uld directory. This directory contains the install.sh file and three directories: arm, i386, and x86_64. These directories contain the rastertospl files for different architectures. You should copy the one for your architecture in the /usr/lib/cups/filter. Make the copy as root user, or you will get a permission error (from shell, use sudo.)


Ubuntu installation failed every time after choosing "install ubuntu alongside window 7"

I believe you want to install Ubuntu alongside your Windows 7. You can try this....

Before you start the installation, create a separate disk partition in Windows. Insert your bootable disc/USB device. Follow the instructions. When you see the disk chooser, select your newly created hard disk partition. Select the Change option from below. Format it to ext4 and select mount point /. Press okay. Below, you'll see option for bootloader device. Click on it and choose the topmost option (It'll have some information about your HDD i.e. its size, manufacturer etc). Click continue when you are asked for swap partition option. If you do want to create a swap partition you'll have to create another partition. You won't need it in normal use anyway.


Although this talks about a different scanner, this may be your problem.  See Device driver for Epson V600 PerfectionDevice driver for Epson V600 Perfection

The key point made there is that there is a dependency on libsane but libsane has been replaced with libsane1

I have not yet gotten my scanner working. I am waiting either for Epson to fix it on their end or to see what happens when I install Ubuntu 18.04


How to use Soundcloud in tor-browser? it need flash-player!

You are not supposed to use flash with tor. It ruins the whole point of using tor. However, if you still want to use it I'll suggest chrome with this command:

chromium-browser --proxy-server="socks://127.0.0.1:9050" --incognito check.torproject.org

If doesn't work do:

killall chromium-browser

Then try again

You must run tor first by

tor&

I assumed that tor and chromium-browser is installed on your system. If not install them from software center. However, I forgot to mention one thing. You need to find out at which port tor is listening to. To do that, simply run this command:

tor

without the "&" sign. It will give a output in terminal. Look for this in the output:

[notice] Opening Socks listener on 127.0.0.1:9050

Those digits might be different on your system. Put that thing in the previous chromium-browser command.


Slow files transfers between pidgin/empathy and msn/wlm

Check in the advanced msn account settings in pidgin, whether the "Allow direct connections" option is enabled. Also make sure that both parties have the latest version of the respective programs installed.


So I got a solution for you that might work!
#First you are gonna need to download the Autopoweroff package
wget https://github.com/deragon/autopoweroff/releases/download/3.0.0/autopoweroff-3.0.0-1.noarch.deb

#Then install it using
sudo dpkg -i autopoweroff-3.0.0-1.noarch.deb
sudo apt-get install -f

Then if you are using GNOME just look up autopoweroff in the activities, else go to /etc/autopoweroff/autopoweroff.conf.dpkg-new and modify the idle time as a sudo user!
If you use the file to modify the idle shutdown settings, here is what I did
[NO_SHUTDOWN_TIME_RANGE]
StartHour=
EndHour=

# StartupDelay parameter (expressed in minutes):
#
#   When the computer is booting up, if all the conditions are met and
#   the computer is in the shutdown time range, as soon as Autopoweroff
#   is started, the computer will shutdown.  Thus, the user will never
#   have the chance to boot into the computer.  This is where the
#   "delay" parameter comes in.  If "delay" is set to 15 for example,
#   Autopoweroff will not poweroff the computer even if all the
#   conditions are met, for a period of 15 minutes after the computer
#   has booted.  This allows the user to login and change Autopoweroff's
#   configuration.
#
#
# IdleTime parameter (expressed in minutes):
#
#   Like a screensaver, Autopoweroff detects keyboard and mouse
#   activity, and if there is any activity on the server, it would not
#   be powered off regardless if all the other conditions are met.  If
#   set to 0, user activity on the server will be ignored.

[TIMEOUTS]
StartupDelay=5
IdleTime=30

#Part of the info was obtained here
https://www.ostechnix.com/auto-shutdown-reboot-suspend-hibernate-linux-system-specific-time/


Is there a file explorer/manager for the command line?

Well there is midnight commander:

To install: sudo apt-get install mc
To run: mc

And also Last File Manager:

To install: sudo apt-get install lfm
To run: lfm


As Garry says, they're applications that install and remove software from Ubuntu's software repositories, amongst other tasks. If you've no idea what that means, let's step back one further:

Software (like Firefox, GIMP, xchat, etc) is compiled and then packaged into *.deb files.
These debs are essentially installers. They contain all the files that get copied into the system as well as scripts that allow it to depend on (or conflict with) other known packages.
If you install Firefox from a package, apt and dpkg (the applications that processes the dependencies) will make sure you have its dependencies installed first and if you haven't, it'll grab those packages too.
Packages are stored in online repositories as big lists.
Apt is the tool (or set of tools) that downloads all these lists from various sources, combines them and allows you to select certain packages for installation.
The benefit to all this is you can install a lot of software without having to hunt for it. More than that, the software in the official Ubuntu repositories is maintained so that if security fixes are released, they're applied and a new package is created. When apt next checks for updates, it sees the new version and you're prompted to download it.

I won't say apt-get/aptitude are useless because they're not, they're both very powerful utilities and like a lot of CLI-vs-GUI comparisons, if you know how to use them, they're a good deal faster than the Software Center.

But punching in random commands without knowing what to expect is a recipe for disaster. It only takes one bad/clumsey person to suggest a destructive command and you'll nuke your system. If you don't know what something's going to do either:

Ask.
Run man <command> (eg man apt-get) to see the manual page for a specific application.

The command line in Linux systems is a good few hundred thousand times more powerful than it's Windows counterpart. You have to treat it with respect or it will bite your legs off.


Can someone explain the default DNS system in Ubuntu 20.04?

I fail to see the productivity of certain replies, but thanks for trying. As I've asked around, it seems the DNS client system of Ubuntu 20.04 is a bit messed up as you cannot set a static DNS server address. It needs to be given by DHCP. Unless, maybe, if you set a static ip all together, I haven't tried that I believe.


I am not able to connect to internet using my Micromax MMX 353G USB 3G Modem in Ubuntu 12.04 LTS

irst open network connection from your dash(hit Super key and search for network connection). Then go to Mobile Broadband tab.

click add.

select device and hit forward

choose country and hit forward

choose provider and hit forward

choose your plan. if not listed select other and give access point name.

hit apply. you have created mobile broadband connection.
if you want to edit then open network connections from dash.
to connect it . click button between bluetooth and sound on top panel. then click name of just created Mobile broadband network.

guide is described here


GTK load module failures for snap-installed app that runs fine otherwise

So let's take this appart as there are many issues here:

Running from prime

When you run from prime straight of from your classic system you will see all the libraries your classic system has so it is not really the best way to do it. When run as a snap the root filesystem that is actually seen is, in this case, ubuntu-core or core.

In order to experience what the environment will feel like, it might be better to hop into a shell for that environment, you can do so by running:

snap run --shell <snap-name>.<app-name>

Read only snap

Snaps when installed for an actual snap are a mount to a squashfs, this filesystem is read only and the reason you cannot write and make modifications to the installed snap.

During development it might be better to do from your project directory:

snap try prime [--devmode]

By doing so, you can make live edits to your prime directory to test out variations of things.

Getting the app to launch

The module load warnings are not that bad, they happen on some snaps as well.
What is bad is that it cannot find a display.
To get started quickly there are desktop launchers that can get you bootstrapped pretty fast.

They are delivered as parts, to get a feel for how this works out with snapcraft, run

snapcraft update
snapcraft search desktop

And to see what one of these parts do, run

snapcraft define <part-name>

There is more information about desktop launchers available on https://insights.ubuntu.com/2016/07/06/ubuntu-app-developer-blog-announcing-new-snap-desktop-launchers/


Installed LXQT but my display manager is shown gdm3 and Desktop Environment as GNOME

I was also stuck in this problem for a quite few days. Here's how I solved this.

After install lubuntu-desktop (or LXQT in your case), you may probably choose lightdm as desktop manager by typing sudo apt install lightdm in the command-line.
Run sudo dpkg-reconfigure lightdm. This command automatically sets the default DM to lightdm.
sudo reboot and you'll see the login screen on your connected monitor. Select the upper right button and switch the default desktop to lubuntu. (If you're using remote access or running RPI4 in headless mode, the following steps can guide you through this)

For those who are also confused by the remote desktop connection when using lubuntu in Raspberry Pi 4B, the following steps may help:

Run sudo apt install x11vnc

Run sudo ps wwaux | grep auth and the outputs are like:
root      1428  5.0  2.2 231000 42288 tty7     Ssl+ 12:47   0:01 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root      1429  0.3  0.5  27496  9964 ?        Ss   12:47   0:00 /usr/bin/x11vnc -forever -display :0 -auth guess
ubuntu    1975  0.0  0.0   5952   552 pts/0    S+   12:48   0:00 grep --color=auto auth

The first line (starts with root) tells Xorg-core is now using display :0 and the -auth parameter is /var/run/lightdm/root/:0

Start X11VNC by running sudo x11vnc -display :0 -auth /var/run/lightdm/root/:0

If your device is running X11VNC for the first time, the program may ask you to provide some security profiles

Open a VNC client on your PC and connect to RPI4 by entering the address <IP>::5901

The previous steps may not be successfully conducted if your RPI4 does not have a physical monitor. In this case, you may first refer to this link to create a virtual display for Xorg.


Finding the ip address of another computer on the network?

you could try nmap, if you don't have it, it can be installed via the following :-

sudo apt-get install nmap

you can then scan your network by issuing :-

nmap -sP 192.168.1.0/24

obviously change address range if your network differs


Changing alt gr key to different key to type special caracters

You can install the Latvian language pack:

Go to System Settings -> Language Support and click on the Install / Remove Languages... button.

From here install the "Latvian" language and it will now appear in your language dropdown menu on the right side of your top bar.

Or you can just add Latvian as a text entry method from System Settings -> Text Entry.

Use the + button on the lower left to add Latvian as a text entry option and then you can configure your keyboard shortcut to switch between input types (or just stick with the default of Super + Space).


Is it possible to add things such as internet searches to the default unity search?

Unless you use website lenses and not all websites have them. I will give you an example with this site:

Install the Ask Ubuntu lens:

sudo apt-get install unity-lens-askubuntu

In your Dash, you will get an askubuntu icon. See screenshot below after I have searched for 'ubuntu'.

Here is a list of available unity lenses: What lenses for Unity are available?


Here is the official list of versions currently avaliable.
18.04 is the LTS (Long-term support) release currently being phased-out. It is very stable, but you might want to look at newer options.
I am currently using 19.10, and have not encountered problems.
20.04 LTS just released officially (see the announcement). As this is an LTS release, I assume it is stable, but I have not tried it yet.
"Flavors" = desktop environments...
You have many choices when it comes to this. It pretty much comes down to opinion. The desktop environment provides the "look" of Ubuntu. You can install just about any DE on any version, but GNOME is the default that comes with the current vanilla downloads.
If this is your first time, I would recommend starting with the default option. You can change the DE after you have installed Ubuntu if you want to try something else that you see online.


Installing a Libreoffice extension for all users

It seems that this problem is a known bug 100307.
 This bug has been reported almost two years ago. Nobody is working on it :(


How to prevent nautilus from launching in Xubuntu?

Try to remove xfce cache:

$ rm ~/.cache/sessions/*


Alert the user when they unsafely unplug an USB thumb drive

Unfortunately, that's a thing Micro$oft actually got quite right: USB removal... And you'll keep on having this problem until you:

Disable auto-mounting

If users have to mount manually, it'll be easier to train them to dismount as well.
Create a udev rule that turns off all caching on USB disks...


Log on issue for non-qwerty keyboard layout

On 18.04 the layout you want to use on the login screen needs to be set in /etc/default/keyboard. You can fix that from Settings -> Region & Language.

If there is only one user on your system, just add a random layout and delete it again.

If there are multiple users, you should click the Login Screen button to set the layout(s) you want to have available on the login screen.

Then it should be fixed after next reboot.

Reference: https://help.ubuntu.com/stable/ubuntu-help/keyboard-layouts.html

.


Ubuntu 14.04 dual boot system boots to black screen[using ati radeon hd 7340 video card]

I've been having the same issue as well. I have an Hp Pavillion g6 windows 8.1 and it has the same error. What I found as 2 potential fixes is :

Boot into windows 8.1 and then shift click restart so the Boot from manager shows up. Boot from your different partitions (for some reason my computer has 2 separate hard disk partitions, and try to run normally.
Repeat number one, but instead of running normally pick advanced options and select one of the options, it should ask to boot everything in read/write mode but hit no then choose boot normally.
Both of these work for me temporarily.

But if anyone knows a final solution that would be good.


Yup.  You can tell it to take no action when the lid is closed (Settings > Power).  That's as close as you'll get to a "power nap" either on Ubuntu or Windows - the power savings of a "power nap" are negligible at best.

Other than that (really just leaving your laptop on), there's nothing you can do as far as I know.


Most appropriate desktop environment for corporate desktop

If your users are used to Gnome 2 I would recommend opting for Ubuntu and then installing 'gnome-session', this will allow users to choose the Gnome 3 fall-back mode at login which is similar to Gnome 2 in appearance and functions with all Gnome applications.


Can't install VirtualBox extension in ubuntu

The VM VirtualBox Extension Pack you have tired to install does not appear to match the version of VirtualBox you are running.

5.1.2 is latest version of Virtual box

To get USB working I had to un-install and downloaded latest version and corresponding  Extension Pack.


From rsync man pages:

--specials
          This option causes rsync to transfer special files such as named
          sockets and fifos.

So special files may be symbolic links (which are references to other files on the file system, think shortcuts in Windows) but also sockets and fifos (pipes) that are used for inter-process communication.

Device files are another variety of special files that represent devices provided by the kernel.

If you want to know more, look at this Wikipedia entry.


Why does my Linux appear as 'ChromeLinux_C4EA' on my windows 10 laptop?

If I hadn't read the tags for the question, I wouldn't have known what you were referring to. It is good if you edit the question and specify it is related to Bluetooth. I have the same on my computer. It seems to be the default name blueman (Bluetooth manager) gives to the internal bluetooth adapter on the computer. As DK Bose said. You can run:

blueman-applet

Quoting DK Bose:

  In the window that opens, click on Adapter, Preferences and enter the name you want to see under "Friendly Name".


How to move my ext4 partition ahead of my boot partition

Your looking at a tricky and dangerous process.  I warn you beforehand:  BACKUP YOUR DATA!!!
So here are the steps, if I understand what you want correctly.
1. Backup your data.
Backup the data on your entire hard drive to another drive.  If possible, backup the data and make a disk image, so that you can write back to your main drive if something goes wrong.
2. Boot up a live CD
Distro to your choice; I would go for Ubuntu 16.04 personally, but it's your choice.
3. Open GParted
I prefer to start it with sudo privs right away, so go to the terminal and type:
 sudo gparted

4. Delete partition /dev/sda6.
This will erase any data on it, which is one of the many reasons you should back up your data before even beginning this process - see step 1.
5. Move partition /dev/sda7 and /dev/sda8 up on the free space.
Incidentally, this is why you have to do this in live CD: you have to move your root partition, which you cannot do while the partition is live.  To do this, you'll have to go to the Partition menu. Use the Resize/Move option from the menu to move /dev/sda7 over as far to left as it will go and to grow /dev/sda8 over to the left as far as it will go.
6. Expand partition /dev/sda8 to include the free unallocated space at the end.
This will grow your 73 GB partition around 83 GB, which is the sum of the size of your two partitions.
7. Copy the data out of your backup of /dev/sda6 onto the /dev/sda8 partition.
... and you're done, provided you didn't hit any glitches.  :)
8. After that install && boot-repair
as you would have broken the grub(due to boot moving from sda7 to sda6), Installing and running boot-repair should fix it.
DISCLAIMER: Backup your data before running this process.  Whenever you start playing with partitions on your hard drive, you have a risk of losing data.


How can I restart the menu bar in Unity?

You can do this by restarting Unity:

You can press Alt+F2, then type "unity", then click Enter to restart unity.
Or you can run below command in terminal to restart Unity:

setsid unity


HUAWEI E5573 stopped working (Xubuntu 16.10)

I had the same problem with Huawei E1750 on Ubuntu 16.10 (worked fine on Ubuntu 16.04). I solved it by installing the latest version of usb-modeswitch and usb-modeswitch-data from Debian unstable. I also had to install the libjim0.76 package (from the Ubuntu archive).

The issue will be fixed via bug #1639607.


I'd suggest contacting the publisher of the Linux driver, Ronald, linked from this web page to see if he has a fix for the driver for SECAM use on modern versions of Ubuntu.


Fixing my interface file fixed the problem.

I had it set up as

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
     address 192.168.1.34
     netmask 255.255.255.0
     network 192.168.1.1
     broadcast 192.168.1.255
     gateway 192.168.1.1

The problem was fixed by adding eth0 to the end of the first line.


Well I use the following script for my backup:

#! /bin/bash

# Gets date of most recent backup.
newestfile=$(cd /home/<USERNAME>/.Backups && find . -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" ")
budate=`echo $newestfile| cut -c10-19`

# Gets current date

cdate=$(date --iso)

# If the cureent date is the same as the date of the most recent backup, don't run the backup, just give a notification that says it has already been done today.

if [ $cdate = $budate ]; then
    echo "Backup Complete"
    notify-send -i /home/<USERNAME>/Pictures/Logos/safe.png "Backup Status" "Already started/finished backup for today."

# If the dates are different, start the backup.

else
    echo "Starting backup"
    notify-send -i /home/<USERNAME>/Pictures/Logos/safe.png "Backup Status" "Starting backup for today."
# Compresses the files into .tar.gz format

    tar -cvpzf /home/<USERNAME>/.Backups/backup-$(date +%Y-%m-%d-%H:%M).tar.gz "/home/<USERNAME>/folder/to/back/up" --exclude=.Backups && notify-send --expire-time=60000 -i /home/tim/Pictures/Home/Logos/safe.png 'Backup Status' 'Finished backup for today.'
fi

This will save a backup file that looks like this:

backup-2014-07-26-13:13.tar.gz

In the hidden folder /home/<USERNAME>/.Backups

The safe.png file that it used for the notifications can be downloaded from here.

Save the script in /home/<USERNAME>/Scripts as backup.sh
Run the following commands:

chmod +x Scripts/backup.sh
mkdir .Backups
touch .Backups/backup-2000-01-01-00:00.tar.gz
Then add the command Scripts/./backup.sh to the start at login applications. Even if you login more than one time in a day, you only get 1 backup.

OR

You could also use cron to run the script regularly. Edit it using crontab -e and add this line to the end:

0 15 * * *    bash /path/to/script/backup.sh

My pronouns are He / Him


In the login screen there's a little gear icon next to your name.  Click on it, and in the popup menu that appears, select "Unity" as your session type.  Then enter your password to log in.


I know this is an old thread but support for this card is now in the latest version of Ubuntu.

I just installed Ubuntu server 19.04 and the card worked out of the box.

Beware it did not work at all with the new installer which crashes on boot and I could not get to work, so use the alternative installer instead.


How to use google search instead of OpenDNS search in Firefox

There is no way to do this but you can somewhat get around it by

go to www.google.com

Then right click in the search bar and select make a keyword for this searchbar

set the keyword to something like gg

Now you can start your searches with gg and search. .

I hate that there is no way to fix firefox to work WITH opendns because I love firefox and I love opendns. Why does Google Chrome work and firefox doesn't - ridiculous.


The answer is going to vary depending on the version (14.04, 16.04, 18.04, or 18.10 are the currently supported versions) and "flavor" -- Kubuntu will generally use slightly more than Lubuntu because it has more complex visual toys.

That said, you can make a very functional Ubuntu (even Kubuntu 14.04) install with 14.04 or 16.04 (this is from my experience) in 20 GB, including some limited storage space for documents and additional installed software.  With a little care, you can trim the installation down a bit (though doing this after install requires having room to install and then getting some of it back) -- probably smaller than 16 GB if you replace larger tools with smaller ones (or start with Lubuntu, which uses the smaller tools by default).

There are other Linux versions that take up much less space than this; some of the ones that can run in 1 GB RAM or less can install in less than 8 GB of storage.


I experienced a similar problem. I am running ubuntu 16.04.1 with Kernel 4.10.0-30-generic.

I replicated the bug on another distro using a different kernel 4.9 -- debian stable lxde running from a live usb.

After reading many fora and going through several logs, I realised this is nothing but the c-state kernel bug, or at least it has the same solution.

The steps described by Doug solved my problem.


How do I enable audio on a Lenovo Yoga Slim 714ARE05 using Ubuntu 20.10?

I have same machine. But Intel CPU. I fix the problem installing firmware intel.
Can you post the result to this command?
dmesg | grep -C1 -E 'ALSA|HDA|sof|HDMI|snd[_-]|sound|hda.codec|hda.intel'


How can I reset Compiz settings to default?

Execute the following command and then re-login:

rm  -rf ~/.compiz-1 ~/.config/compiz-1


Is it possible to sync a folder from NAS drive to Ubuntu One Cloud?

Currently Ubuntu One doesn't support syncing from a NAS. Also, keep in mind that it's not a backup tool, because it preserves no history, and accidental deletion on your device will cause deletion on our servers!

The suggested mechanism is doing a backup, and then syncing the backup, just like you are doing.


404 Not Found for do-release-upgrade in Ubuntu

If you look at old-releases.ubuntu.com you can see that Wily is not yet there.

http://old-releases.ubuntu.com/

You'll want to switch from old-releases to archive.ubuntu.com.


Terminal multiple countdown timer app for Bash / Zsh

From terminal use the "at" command to set your timer, "at" is very flexible for it can be used with both absolute and relative time (for more info: man at):

at now + 1 minute <<<'notify-send ALARM'

"notify-send" will place a notification on your desktop
(feel free to replace it with i.e. "aplay" to make a sound instead of a notification).


I have a lot confusing boot options on startup

Some program (like Boot Repair or GRUB Customizer) installed the extra GRUB items by adding an additional file in the /etc/grub.d folder.

Here's what mine looks like:

$ ls -al /etc/grub.d
total 100
drwxr-xr-x   2 root root  4096 Oct 31 14:42 .
drwxr-xr-x 201 root root 12288 Jan 14 16:08 ..
-rwxr-xr-x   1 root root  9791 Oct 14  2015 00_header
-rwxr-xr-x   1 root root  6250 Apr 22  2016 05_debian_theme
-rwxr-xr-x   1 root root 12261 Apr  6  2015 10_linux
-rwxr-xr-x   1 root root 11082 Apr  6  2015 20_linux_xen
-rwxr-xr-x   1 root root  1992 Mar 12  2014 20_memtest86+
-rwxr-xr-x   1 root root 11692 Apr 11  2014 30_os-prober
-rwxr-xr-x   1 root root  1418 Oct 14  2015 30_uefi-firmware
-rwxr-xr-x   1 root root   214 Sep 22  2014 40_custom
-rwxr-xr-x   1 root root   216 Apr 11  2014 41_custom
-rw-r--r--   1 root root   483 Apr 11  2014 README

Using the terminal...

cd /etc/grub.d # change to the appropriate directory
ls -al # look for an additional filenames that I don't have in my list (like 50_custom)
sudo grep EFI * # search for any "EFI" text that you recognize from your GRUB menu
sudo mv nn_filename ~/Documents # then move that file out to your Documents folder (don't move any files with names like I've shown above)
sudo update-grub # update the GRUB menu
reboot # reboot the computer
verify that GRUB looks normal


I am Unable to find WIFI Driver for Ubuntu?

You need to connect to the internet by wire and update your system by these commands:

sudo apt update
sudo apt upgrade

Reboot. The firmware issue should be fixed.


How can I add more space to my non adjacent Linux partitions?

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
start gparted
move /dev/nvme0n1p5 partition all the way left
move /dev/nvme0n1p6 partition all the way left
resize the right side of /dev/nvme0n1p6 to the right to make the partition ~50G
move /dev/nvme0n1p7 partition all the way left
resize the right side of /dev/nvme0n1p7 all the way right
click the Apply icon


Aptly: package in repo but can't be installed

Such a nice tool to know about thank you. Well, could you compare these:

  sources.list on on x86-64 machine:

deb [arch=amd64] http://[ip address of server]:8080/ xenial universe

  ...

  On the repo machine,

~/.aptly/public/dists/xenial/main/binary-amd64

See the component, it is not the same, so your sources.list should have something like:

deb [arch=amd64] http://[ip address of server]:8080/ xenial main


Ubuntu 13.04 boots to busybox exit doesn't work

Boot with Ubuntu live CD or live USB, assuming you have one, and see if you can even mount the main Ubuntu partition on your hard drive. If you can, unmount it.

Now install GSmartControl on the live CD/live USB. Start up GSmartControl after install and look at the S.M.A.R.T. attributes of your hard drive.

If nothing highlighted in pink for your HDD, that's good. The drive probably isn't failing.

Next, you can run e2fsck on the / partition of your hard drive. Maybe there's some corruption you can clean up. You want the partition not mounted before running this. Go into a terminal and run sudo fdisk -l to find out which partition it is if you aren't sure. Then (let's assume it's /dev/sda1) type:

sudo e2fsck /dev/sda1

and see if it's not clean - and maybe it will fix some stuff. If there is serious corruption, you may be asked to fix a lot of stuff. There's an option in e2fsck to say 'yes to everything' - but if you get that many problems, you probably won't be booting this thing again, anyway.

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


Execution continues regardless of errors within commands (exit status isn't 0) unless you explicitly specify to stop execution in the event of an error (set -e). However, in the case of a syntax error, execution stops.

As a general note, if the subsequent commands depend on any of the previous commands being run correctly, then those won't work correctly.


How to create Guest User Account in Ubuntu without Password?

The built in guest account seems exactly what you need, from the documentation :

  A guest cannot view the home folders of other users, and by default
  any saved data or changed settings will be removed/reset at logout. It
  means that each session starts with a fresh environment, unaffected by
  what previous guests did.

From from the customization documentation on removing a password :

  To begin, create a new user to serve as your guest account. You will
  be required to enter a password. Enter anything you like, as you will
  be deleting the password shortly. Be sure to revoke any privileges
  (such as Administering the system) that you do not want your guests to
  have.

  Once the new account is created, open a terminal and enter the
  following command:

sudo passwd -d guest

  Once this is complete, the guest account will have no password. Users
  will be able to log in from the login screen by merely clicking on the
  guest account.


Is there a standard REST API for DBus communication?

My recommendation would be to use the HTML5 Quickly template. It is not yet released, and I will ask mhall to post where the code is, but the template combines together the power of HTML5 and Python.

This means you can talk to DBUS via Python, and trigger those methods using HTML5, which it seems you want to do.

The quickly HTML template is on launchpad here.
reference


How do I increase MATE volume beyond normal range in PP?

If you just want to increase your system's volume, you can right-click on the sound icon in the taskbar and choose "Sound Preferences". The "Output Volume" slider at the top of the window should allow you to boost the output volume well beyond 100% (to about 150% or so)

If your videos are standalone files, you could play them in VLC; turning VLC's volume up (it goes up to 200%), in combination with turning Ubuntu MATE's own volume control up, should give you a considerable boost in volume.


apport and apport-gtk are both marked as dependencies by ubuntu-mate-desktop. If you remove one of the former, the latter will also be removed.

ubuntu-mate-desktop is a meta-package, enclosing the set of packages that make up the Mate DE. apport and apport-gtk are part of this set, meaning they are deemed core components of this DE. If you remove one of them, then you no longer have the complete Ubuntu Mate DE installed and the meta-package is removed. However, all the other packages remain installed and the DE should function as before.

Finally, note that on stable releases Apport is disabled by default.


Deleted Ubuntu partition, stuck at GRUB command line

Type the following:

insmod ntfs
insmod part_msdos
set root=(hd0,msdos1)
chainloader +1
boot

If you succeed to get to Windows, you must rewrite the bootloader using something like EasyBCD if you don't have a Windows installation media (DVD or USB).


ERROR: This recovery media only functions on Dell and Alienware systems

Got the solution :)

Here are the steps that we need to change under boot menu

Select Legacy option in Boot List Option
Under Boot Sequence uncheck Diskette Drive option.

Disable Secure Boot

To disable it, Go to Secure Boot > Secure Boot Enable > Select Disabled radio

Now reboot the computer, and boot from your bootable device with Try Ubuntu without installation option
Install GParted application and delete first partition from it
Now you can able to install Ubuntu without any error


Correct settings for nVidia current driver to make work dual monitor setup as extended desktop (not twinview)

Somehow, I experience the same. But using "Twinview" option does the opposite (extended).

Give this a try and if this is the case, then nVidia has something to do with this. Or is it an Ubuntu related issue?

Here you can see my nvidia-settings monitors arrangement with the "Twinview" configured but as you can notice in the screenshot, my desktop is extended.

BTW: I don't know how can this be fixed or if possible. But it works this way and it is good for me.

Good luck!


USB Installed Ubuntu server fails to load without USB

Okay, after some trial and error, I found out that Universal USB Installer does not properly install the Ubuntu Server, of all options. Therefore, I had to use Rufus to create my bootable USB. After that, everything went perfectly. If anyone has an idea of why this is the case, I would be very interested to know.

After all, I've used UUI for many other installs and it worked perfectly. Why wouldn't it work with the Ubuntu Server option?


As explained here, skype will no longer support old versions of skype(including 4.2), so you will have to upgrade to version 4.3. Version 4.3 IS AVAILABLE from the software center. Make sure you checked "Canonical partners" in sources list.


Are Linux Headers installed by default? How to check if they're installed?

The linux headers are installed by default (See the 14.04 manifest file for example)

The linux-headers-generic package will always depend on the latest generic kernel headers available.

To check the current version, open a Terminal and type:

$ dpkg-query -s linux-headers-generic
Package: linux-headers-generic
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 33
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: amd64
Source: linux-meta
Version: 3.11.0.20.21
Depends: linux-headers-3.11.0-20-generic
Description: Generic Linux kernel headers
 This package will always depend on the latest generic kernel headers
 available.


BCM4313 wireless card keeps disconnecting

There are two drivers for this chip AFAIK.

Try lsmod | grep cfg80211 and see if it outputs wl or brcmsmac.

brcmsmac

This is open-source driver which comes in the kernel so it should work out of the box. But in some case you may need to blacklist bcma module first. If you are not using it by default in order to give it a try do

sudo modprobe -r wl && sudo modprobe brcmsmac

OR if the above command doesnot give you anything

sudo modprobe -r bcma ssb wl && sudo modprobe brcmsmac

wl

This is the additional driver you are talking about provided by the package broadcom-sta-common. You can test it the same way as above just do.

sudo modprobe -r brcmsmac bcma b43 && sudo modprobe wl

The opensourcedriver doesnot have a LED support so your wireless LED won't turn on. Apart from that the open source driver doesnot have powersave option as well which is enabled during battery laptop usage. But my internet connection lagged during powersave option of wl driver.

If you find your internet connection lagging during battery try How can I prevent iwconfig power management from being turned on?

See which works for you.

In order to make things permanent just add

blacklist MODULE_NAME in /etc/modprobe.d/blacklist.conf and inorder to load the module add it in /etc/modules. So if you would like to  use say wl you would add

blacklist brcmsmac
blacklist bcma
blacklist ssb
blacklist b43

in /etc/modprobe.d/blacklist.conf and add wl in /etc/modules

This is a pretty good documentation on broadcom drivers.


Another question about Hibernate in 18.04 (not a duplicate)

Take a look at:
ubuntu 18 hibernation using the power button

and
https://medium.com/@lzcoder/enable-hibernate-on-ubuntu-using-uswsusp-s2disk-ae0b71862eb5

In summary:

# [terminal] initial basic steps
sudo apt install uswsusp                  # working hibernate
sudo apt-get install chrome-gnome-shell   # for button

# [chrome] to activate in chrome
https://extensions.gnome.org/extension/755/hibernate-status-button/#

# [terminal] modify this file
cd /lib/systemd/system
sudo gedit systemd-hibernate.service

# to copy and add to file, leaving only this service
[Service]
ExecStart=
ExecStartPre=-/bin/run-parts -v -a pre /lib/systemd/system-sleep
ExecStart=/usr/sbin/s2disk
ExecStartPost=-/bin/run-parts -v --reverse -a post /lib/systemd/system-sleep

Source: http://ubuntuhandbook.org/index.php/2018/05/add-hibernate-option-ubuntu-18-04/

# [terminal] create file to allow button in menu

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

#add to file
[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

# [terminal] reload services
sudo systemctl daemon-reload


The nohup means it will continue to run when you exit the shell.

The > means redirect the standard output to a file

The file it is being redirected to is $HOME/jenkins.log. You can find the value of $HOME by running echo $HOME

2>&1 means redirect standard errors to standard output, so in this example will also go into $HOME/jenkins.log.

The < /dev/null means read data in from /dev/null. So if the script is expecting input it will read that instead of waiting for user input.

And the & means run as a background task, and return you to the command line.

If you want more detail, ask in the comments.


I did two things that, together, fixed the issue: I decreased the allocated CPUs from 4 to 2, and I maximized the video RAM.


Installing Ubuntu with Win7 in Dual booting mode

Boot ubuntu live-disk,select try ubuntu and install gparted by running the below command on terminal,

sudo apt-get update
sudo apt-get install gparted

Then open gparted,rightclick on the unallocated space and select new option to create new ext4 partition.After that a create new partition window will appear.
In that window change the filesystem to ext4 and then select Add option(leave the other option as it is).After that click on Apply.

Now run the ubuntu installer and select the something else option.Choose the created ext4 partition to install ubuntu.If the installer asks to create swap partition,give the swap partition size as double the RAM size.


Bash case match trouble with mixed numbers and letters

First of all, case uses shell globs - which are different from regular expressions. In particular, * (and ?) are wildcard matches in themselves rather than quantifiers that affect the previous atom. So for example:

basic regex:

[0-9]? means 0 or 1 decimal digit
[0-9]* means 0 or more decimal digits

simple glob

[0-9]? means a decimal digit followed by any single character
[0-9]* means a decimal digit followed by any number of characters (including none)

As far as I know, there is no way to specify an arbitrary number of repeats in a simple shell glob. You have a number of options:

using simple shell globs, match each sequence explicitly and OR them together. For 1-3 digits for example,

case $1 in
  [0-9][mMgG]|[0-9][0-9][mMgG]|[0-9][0-9][0-9][mMgG])
    echo "simple glob match"
  ;;
  *)
    echo "no simple glob match"
  ;;
esac

use a bash extended glob, either [0-9]*([0-9]) (one digit followed by zero or more digits - similar to your regular expression) or +([0-9]) (one or more digits). Note that unlike regexes, the quantifier comes before the atom, rather than after.

shopt -s extglob

case $1 in
  +([0-9])[mMgG])
    echo "extended glob match"
  ;;
  *)
    echo "no extended glob match"
  ;;
esac

use a bash regular expression, but within a if ... then conditional

if [[ $1 =~ [0-9][0-9]*[mMgG] ]]; then
  echo "regex match"
else
  echo "no regex match"
fi

In the last case, you could also use short-circuit logic:

[[ $1 =~ [0-9][0-9]*[mMgG] ]] && echo "regex match" || echo "no regex match"

Also note that in both globs and regexes, [...] is a set of characters not an expression so [m|M|g|G] is no different from [mMgG|] and matches the literal characters m, M, g, G and | (probably not what you want).


How to get the hostname from /etc/hostname & DNS domain name?

When you type

hostname

it will show you the value that is stored in

/etc/hostname

See hostname --help for a lot of options. From the help ...

-s, --short            short host name
-a, --alias            alias names
-i, --ip-address       addresses for the host name
-I, --all-ip-addresses all addresses for the host
-f, --fqdn, --long     long host name (FQDN)
-A, --all-fqdns        all long host names (FQDNs)
-d, --domain           DNS domain name
-y, --yp, --nis        NIS/YP domain name
-b, --boot             set default hostname if none available
-F, --file             read host name or NIS domain name from given file

  This command can get or set the host name or the NIS domain name. You can  also get the DNS domain or the FQDN (fully qualified domain name). Unless you are using bind or NIS for host lookups you can change the FQDN (Fully Qualified Domain Name) and the DNS domain name (which is part of the FQDN) in the /etc/hosts file.

So

hostname -f

for the long host name (FQDN).


Why did lolcat stop working after installing rvm?

because lolcat is a part of ruby, by default before you install rvm, your system use the system ruby.
first, remove lolcat

sudo apt-get purge lolcat -y

then install it again by:

gem install lolcat

this working for me!


Switching from nautilus to nemo not working 18.04

Update June 8, 2019
There is a tutorial on installing nemo in Ubuntu:

How to Install Nemo in Ubuntu Without Cinnamon Dependencies

First install nemo:
sudo add-apt-repository ppa:webupd8team/nemo3
sudo apt update
sudo apt install nemo

Then set nemo as the preference over nautilus:
gsettings set org.gnome.desktop.background show-desktop-icons false
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search

If you change your mind or find nemo lacking in some way:
gsettings set org.gnome.desktop.background show-desktop-icons true
xdg-mime default nautilus.desktop inode/directory application/x-gnome-saved-search
sudo apt remove nemo

Original answer
There is currently a bug report filed on exo-utils here.
You can try this:
sudo apt install exo-utils

Then run:
exo-preferred-applications

then switch to Utilities tab and select File Manager you prefer.


Hide Windows hidden files and folders that are on Windows network share

See samba.org/samba/docs/man/manpages-3/smb.conf.5.html

There are multiple flags/options which help to hide selected files through Samba share:

# hide files start with a dot (.)
hide dot files = yes

# hide selected files. example files start with ($)
hide files = /$*/

# hide pipes, sockets, devices ...
hide special files = yes

# hide files with no read permissions
hide unreadable = yes

# hide files with no write permissions
hide unwriteable files = yes

In most distributions, The configuration could be found at  /etc/samba/smb.conf

As a new user run this in terminal (advise: make a backup):

sudo gedit /etc/samba/smb.conf

Then restart samba service

sudo service samba restart

If you want Global share options insert those lines before the sections with ([]).
Otherwise with specific options for a shared path, put lines under the needed section or create new one. Example:

[foo]
path = /home/bar
read only = yes
hide dot files = yes


Can I disable Ubuntu One syncing for open documents?

You can use the Ubuntu One Quicklist to temporary disable the Ubuntu One syncdaemon while you are working on a document. It is not exactly the solution you were searching for but it might make your life easier.


When logging into i3 WM with GWM login loop

Press ctrl+alt+f2 then type your user name, press enter; then type your password and press enter.

Now you should be loged into your account in the console.  Now type nano .xinitrc and press enter. You are now in the nano text editor editing the new file .xinitrc. Now type this line:

exec i3

Press ctrl+x, press y and type:

startx

This will now start i3. To use i3 again, press ctrl+alt+f2 then type your user name, press enter; then type your password and press enter: and lastly type startx.

I recommend reading this first before using i3:

http://i3wm.org/docs/userguide.html

Hope that helps. :-)


slowmoVideo is able to speed up and slow down video

  slowmoVideo is an OpenSource program that creates slow-motion videos
  from your footage.

  But it does not simply make your videos play at 0.01× speed. You can
  smoothly slow down and speed up your footage, optionally with motion
  blur.

  How does slow motion work? slowmoVideo tries to find out where pixels
  move in the video (this information is called Optical Flow), and then
  uses this information to calculate the additional frames.

First download and install the program. When it is loaded go to File > New and select your video file.

With your video loaded draw you curves (by clicking on an empty area) to describe how the video should speed up and slow down.

When you have finished go to File > Render (Ctrl + R) and choose a directory to save your video


How to resize a LUKS partition by moving its start?

Safe way:

Back up everything somewhere, then copy data back in the way you want (like the comment suggest).

Tricky way:

Move your LUKS partition left, then reisize it "in the correct direction".

Wise way:

Go back in time and set up LVM to avoid such problems.


awk - comparing 2 columns of 2 files and print common lines

One way to do it would be like this:

awk '   BEGIN { while ((getline <"file2.txt") > 0) {REC[$1]=$0}}
    {print REC[$1]}' <file1.txt

The getline at the start reads file2.txt and stores it in an array REC, indexed by the first record.

The "main" section of the code then reads the content of file1.txt, and simply uses the first word on the line to look up the appropriate line from file2.txt, now stored in REC.

Example output:

apple    5.21      Noun
great    2         Adjective
see      7.43      Verb
tree     3         Noun


Why does Wubi fail to boot after removing the NTFS package?

Sorry, but uninstalling and reinstalling Wubi from within Windows XP is the easiest way to fix
this.

  Note: Uninstall/reinstall will delete your Wubi, including any user data (documents, etc.). One way to prevent that is to move/copy the root.disk file to another directory on the NTFS (C:) drive from Windows. After you reinstall Wubi, you can then mount root.disk and copy user data off of it.

Alternately, you would have to boot from a LiveCD, loop-mount Wubi's root.disk, chroot into it and then reinstall the NTFS packages. Hopefully that should work, but giving you step by step advice is beyond the scope of this answer.


How can I run Ubuntu if it's not on my main drive?

From your question, this is what I can summarize about your Disk Layout

SSD : Windows 8
HDD : Wnidows 7, Ubuntu

Also, you have configured your BIOS settings to automatically from SSD.

Assuming the above assertions are right, this is how you solve your problem:

Since your default Boot Media is your SSD, you are not able to see the option for Ubuntu at all.
So, you can enter your BIOS settings and change your HDD to the default bootable media and the next time you boot, you will be booting from your HDD, and you should be able to see the option for Ubuntu.
Or, as an alternative, you can enable the option to choose the Boot Media during boot time. This is mostly done by activating the F12 key from the BIOS Options. Now, every time you boot, you press F12, and you will asked for the Boot Media. Choose the HDD, and you will be able to see the Ubuntu Option.


i am not sure weather it will work or not but may be you can try this script

1st of all your terminal should give you

$ ls /dev/video*
/dev/video0

where video0 is your current webcam

then

sudo apt-get install fswebcam

then

fswebcam --device /dev/video0 --input 0 --resolution 352x288 --save /var/www/public/webcam/webcam.jpg --skip 20 -v

or

fswebcam -r 640x480 -d /dev/video0 -v ./webcam.jpg

or simply use software center and install

Darktable Photo Workflow Software

Found one and not anywhere, inside Software Center. Darktable:


Running a script with higher permissions as the user?

You mean something like this ?

sudo pm-sleep-hybrid

You would only then have to add this user to the sudoers group first.

E.g.

sudo vi /etc/group

and then append the user id at the end of the line where the user sudo is mentioned:

sudo:x:27:my_special_user

However this user has to enter his password when invoking the script...


Slow volume fade-in when playing audio tracks

I think this is due to pulseaudio suspending the respective audio interface, presumably for power saving reasons.

Try editing your pulse audio config (for me /etc/pulse/default.pa) and comment out this line to disable this feature:

load-module module-suspend-on-idle

Then restart Pulseaudio:

pulseaudio -k


I accidentally stumbled on the fix. I reinstalled Ubuntu 14.04 and it works. I'm not using the NVidia proprietary drivers (I was before).

I'm happy to provide more information upon request.


How to switch tabs Terminal using Ctrl + Tab?

This has been known for years. Referring to this bug report from 2007 it says:

  comment from upstream:

  "There are a couple of keys which are not candidates to be keyboard
  accelerators, independently of the modifiers. Tab is one of those
  keys, as it (with various combinations of modifiers) are reserved by
  gtk for its own use and the window manager.

In other words, for gnome-terminal Tab is a special key and you cannot use it as part of a shortcut.

The alternative I can suggest is to assign Ctrl + Tab to the xdotool key Ctrl+Page_Down command.  xdotool is a program that allows simulating mouse behavior,key presses, and window controlling functions (very very versatile tool). I have used it quite a lot, so by this point  if it's installed by default, so you will need to install it with sudo apt-get install xdotool. Basically you will be pressing Ctrl + Tab but xdotool will simulate the Ctrl + Pg_Down. Same idea with the reverse cycling shorcut.

The big disadvantage is that this is a global action, meaning that if some other program has Ctrl + Tab shortcut that isn't for tab switching, it will definitely conflict with that program. Another disadvantage is that you cannot hold Ctrl and keep on pressing Tab repeatedly. Only the whole shortcut works and once at a time.


X will not start after upgrade. Number of monitors does not match number detected

WinEunuuch2Unix had it. Turned out I was running an old driver install script. Downloaded the latest from the nvidia website and the script ran correctly.

In the process of messing around I had also installed nouveau along the way that caused some conflicts. This needed to be uninstalled and disabled which I did as per this question.

Install Nvidia driver instead nouveau


If i remove hdd with Ubuntu from one notebook and plug in it to another, will it be fully functional?

Yes it will. Possibly it will function without a problem. Why ?

Because Ubuntu(Linux) has the most of the drivers (if not all of them) integrated.

You cannot do the same thing with Windows OS. Why ?

Because Windows OS has not the drivers integrated.When you install Windows for the first time at the first (or second maybe) update it will install automatically all the necessary drivers for your system. So if you load the specific OS to another system drivers will conflict with the different hardware.

In Ubuntu(Linux) during boot the Linux kernel searches and loads the appropriate drivers.As I said before , the drivers are integrated to the kernel.

If you have any proprietary (additional) drivers installed it will be good to remove them before make the switch. I upvoted the  Rinzwind's comment and edited my answer to add this info.

So, go for it.


convert from jpg to png and back several times (quality loss?)

JPEG is a lossy compression format, and PNG isn't.  Each time you re-compress using JPEG you will suffer further quality loss.

To prevent this, always perform editing on an original copy of the image that has never been compressed using JPEG, and then compress to JPEG only the copy that you will be outputting/sending.  Keep the original if you want to do further modifications later.


Run a .sh file depending on the content of a file

sure you can do it, in your script you can grep for some unique keyword from the content of file, if the content exists then ok else exit.

grep -F "$word1" "$filename"

If output success then the script run else not


What is the ubuntu version you installed? If it is a prior version to 13.04, you can install jupitor to solve your issue somewhat. Though this won't help you much, its worth trying.

sudo add-apt-repository ppa:webupd8team/jupiter
sudo apt-get update
sudo apt-get install pyjupiter
sudo apt-get install jupiter-support-eee

Overheat problem is very common among ubuntu users and many people use different solutions such as turning off dedicated graphics cards if hybrid graphics is used etc. Since you have only share VGA, that method is not applicable.


Gnome extensions stay in the list after being removed

How to remove one or all Gnome-shell extension(s) completely

Open terminal: (from app menu or by pressing Ctrl+Alt+T)

Then type: sudo su -
and type your password and press enter

then type this command:

cd /home/"your user account"/.local/share/gnome-shell/extensions/

then type this command to see all your installed extensions: ls

then type this command to remove each or extension you really want to remove it completely:

rm -r name-of-extention

for example : rm -r dash-to-dock@yyy.gmail.com/

and press : Alt+F2 then type “r” yes simple just one r

Ok it done.

You can check extensions.gnome.org to be sure about this.


Ubuntu 15.04 Second monitor detected but cannot enable it on one account only

You can try pressing the SUPER key at the same time as you press the letter P.

The SUPER button is the Windows key, usually right next to Alt or space bar. Good luck.


how do I delete a file that goes into root?

From what I can tell, you have not "downloaded the file to the root directory" at all.  I guess you're confusing two issues.  The "root directory" is the location /.  The "root user" is the system administrator, whose folder is /root/.  (i.e., in the directory "root", below /).
What you have done is that you're logged in as the root user.  I am not familiar with the Windows Subsystem for Ubuntu and I'm unsure if you can create another user and log in as that.  That's the first thing you should find out.  (And I can't help you with that since that is specific to the Windows Subsystem; an actual Ubuntu system would set up a default user that isn't root.)
The second thing that is happening is that you're downloading a file with curl and immediately running it with bash.  I downloaded that file myself and noticed that it's installing it in ${HOME}/.nvm.  For ${HOME}, it's substituting in "root".  Hence, you get the message "nvm is already installed in /root/.nvm".
To undo what you have done,

Go to /root by doing cd /root.
Remove what you've installed:  rm -f -r .nvm.

Then, create an account.  For example, see these instructions.
Then, as that user, do what you're trying to do.
Also, note that the command you're typing is doing two things:  (1) downloading a file and (2) immediately running it.  You can do it in two steps as:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh >install.sh
bash ./install.sh

I hope this helps...


python 3.x execute script with linked scripts ubuntu

Your script.py probably can't access the config.py, because the directory configetl is not in script.py's PYTHONPATH.

You could test that by printing the sys.path list in your script.py when called from the process.sh script.

# Inside your script.py before calling any config functions
import sys
print(sys.path)

The output should be similar to this:

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/lib/python3.6/site-packages']

To include the configetl directory to your PYTHONPATH and make it visible to the script.py, you have to append the path to the configetl to the sys.path list:

# Inside your script.py before calling any config functions
import sys
sys.path.append('../')

This will append the entire upper level directory to your PYTHONPATH.

If you'd like to add only the configetl directory to your PYTHONPATH, you could do:

# Inside your script.py before calling any config functions
import sys
sys.path.append('../configetl')

This will require small changes in the way you import the config.py module.
You will have to import it directly, without its parent directory name e.g.

from config import *

P.S. Using the star symbol to import everything from a python module is considered a bad practice. You should either import the entire module import config or list the objects you'd like to import from that module e.g. from config import function_one, function_two


How to resize a non root partition into its parent device space

Ok, I've found a solution for myself. In case someone has the same problem as me, here is the solution:

Original Solution from Amazon Docs (root partitions included): http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html

Identify the device that contains the partition that you want to expand. Use the lsblk command to list all devices and partitions attached to the instance.
Unmount the partition if it is mounted. Run the umount command with the value of MOUNTPOINT from the lsblk command.
Run the parted command on the device (and not the partition on the device). Remember to add the /dev/ prefix to the name that lsblk outputs.
Change the parted units of measure to sectors with unit s.
If you recieve strange error messages you can type ignore.
Examine the output for the total size of the disk, the partition table type, the number of the partition, the start point of the partition, and any flags, such as boot. For gpt partition tables, note the name of the partition; for msdos partition tables, note the Type field (primary or extended). These values are used in the upcoming steps. You can print all these informations through the print command.
Delete the partition entry for the partition using the number from the previous step. For example: rm partitionNumber.
Create a new partition that extends to the end of the volume. (For the msdos partition table example) Note the start point and the partition type of partition 1 above. For the msdos example, there is a start point of 2048s and a partition type of primary. Run the mkpart command with a primary partition type, the start point of partition 1, and 100% to use all of the available space. Example: mkpart primary 2048s 100%.
Run the print command again to verify your partition.
Check to see that any flags that were present earlier are still present for the partition that you expanded. In some cases the boot flag may be lost. If a flag was dropped from the partition when it was expanded, add the flag with the following command, substituting your partition number and the flag name. For example, the following command adds the boot flag to partition 1. E.g : set 1 boot on.
Run the quit command to exit parted.
Check the file system to make sure there are no errors (this is required before you may extend the file system). Note the file system type from the previous print commands. Choose one of the commands below based on your file system type; if you are using a different file system, consult the documentation for that file system to determine the correct check command.

For ext3 or ext4 file systems: sudo e2fsck -f /dev/partitionName

For xfs file systems: sudo xfs_repair /dev/partitionName

If you have a non root partition just remount it and everything should work.

Regards, Megajin


How do I find all files that end with a dot

The following cmd will do:

find . -type f -name '*.' -exec rm -i {} \;

cmd explanation:

find: the utility we used to search for files and perform actions on them.
-type f:that makes sure that we find files only
-name '*.': that tells find to pick up files with names that match the pattern, which has a wildcard *, that matches any number of characters, followed by the dot we're looking for.
note that we quoted the pattern, this is important to avoid the expansion of the wildcard by the shell.
-exec: that tells find to perform the following action on the files that have been found.
rm -i {}: the cmd rm -i removes files interactively, which means that it will ask you any time, it wants to delete a file, that's a good option if you want to check your files one by one before deletion, otherwise you can omit the option -i.
the curly braces are placeholders for the files found by find.
finally we end the command executed by find with an escaped semicolon \;


Ubuntu 12.04 virtual machine Windows 7 networking

Interface eth0 is not configured in Ubuntu.

Did you install Ubuntu Server or Ubuntu Desktop?

If Ubuntu Server then /etc/network/interfaces should include the following stanza.

auto eth0
iface eth0 inet dhcp

After adding this, run sudo ifup eth0.

If Ubuntu Desktop then use "network-indicator | Edit Connections..." to configure a Wired Connection.


Perhaps building it from the minimal build upwards would be a better option.

https://help.ubuntu.com/community/Installation/MinimalCD

This way you only have the dependencies that are necessary and don't have to keep track of the dependencies that some packages may rely on when removing other packages.

Something similar would be to start with the core and build it up as needed.

https://wiki.ubuntu.com/Core/InstallationExample

Just a thought.


Here's the steps provided by the Calibre Ineptepub plugin's Readme

DRM tool available here: http://apprenticealf.wordpress.com/2012/09/10/drm-removal-tools-for-ebooks/

Linux and Adobe Digital Editions ePubs

Here are the instructions for using the tools with ePub books and Adobe Digital Editions on Linux under Wine. (Thank you mclien and Fadel!)

download the most recent version of wine from winehq.org (1.3.29 in my case)
properly install Wine (see the Wine site for details)
python 2.7 should already be installed on your system but you may need the following additional python package

apt-get install python-tk

all programms need to be installed as normal user. The .exe files are installed using ‘wine ’ but .msi files must be installed using ‘wine start ’
we need:

a) Adobe Digital Edition 1.7.2(from: http://kb2.adobe.com/cps/403/kb403051.html)
(there is a “can’t install ADE” site, where the setup.exe hides)

b) ActivePython-2.7.2.5-win32-x86.msi (from: http://www.activestate.com/activepython/downloads)

c) Win32OpenSSL_Light-0_9_8r.exe (from: http://www.slproweb.com/)

d) pycrypto-2.3.win32-py2.7.msi (from: http://www.voidspace.org.uk/python/modules.shtml)
now get and unpack the very latest tools_vX.X (from Apprentice Alf) in the users drive_c of wine
(~/.wine/drive_c/)
start ADE with:
wine digitaleditions.exe or from the Unity Dash search "Adobe Digital Editions"
register this instance of ADE with your adobeID and close it, open terminal and change to the tools_vX.X dir:

cd ~/.wine/drive_c/tools_vX.X/Other_Tools/

create the adeptkey.der with:
wine python ineptkey.py (only need once!)
(key will be here: ~/.wine/drive_c/tools_vX.X/Other_Tools/adeptkey.der)
Use ADE running under Wine to dowload all of your purchased ePub ebooks
install the ineptepub and ineptpdf plugins from the tools as discribed in the readmes.
copy the adeptkey.der into the config dir of calibre (~/.config/calibre in debian/ubuntu). Your ADE books imported to calibre will automatically be freed from DRM.


/etc/cron.daily/aide script uses all space in /run

I had done a default installation and found the same problem.
Reason for the issue
=
/etc/cron.daily/aide takes the temporary location /run/aide
TMPBASE="/run/aide"
$ grep -n TMPBASE /etc/cron.daily/aide
41:TMPBASE="/run/aide"
42:LOCKFILE="$TMPBASE/cron.daily.lock"
43:TMPDIRIN="$TMPBASE/cron.daily"
55:# make sure $TMPBASE exists
57:if ! [ -d "$TMPBASE" ]; then
58:  mkdir -p $TMPBASE
59:  chown root:root $TMPBASE
60:  chmod 600 $TMPBASE
617:    if ! NEWNAME="$(mktemp -d $TMPBASE/cron.daily.old.XXXXXXXXXX)"; then

Solution
To stop /run getting full
#Step 1: Remove the execute permission
chmod a-x /etc/cron.daily/aide

Step 2: Make the script permission immutable (so that updates to aide does not affect the script permission)
chattr +i /etc/cron.daily/aide

To continue using aide as a cron
Step 3: Add below command into your cron:
aide --config=/etc/aide/aide.conf --check

Step Bonus:
Remove /run and its child directories and files from your config file (/etc/aide/aide.conf) so that dynamic files are not scanned to save your CPU


Have u checked your resolution is correct and also make sure you revert back any changes you made to the system maybe the driver has conflicted with unity causing the incorrect display


Upgrading from 12.10 now that it's end of lifed?

have you tried "sudo apt-get dist-upgrade"? I know it might not be the best thing to skip releases so much but since it is so close to 12.04 fundamentally I don't think it would be a problem. Try that and if that fails then just do a normal install with a new 14.04 disk and use the same username and password and it should copy over files and installed packages just fine


Kubuntu 16.04 network-manager failed to edit connection with crued log

This bug has been reported to KDE and they have provided a patch to the networkmanager-qt package.  I am looking for people to test it.  If you can install one of the following packages (one is for amd64 and the second is i386)

https://launchpad.net/~clivejo/+archive/ubuntu/xenial/+files/libkf5networkmanagerqt6_5.18.0-0ubuntu2~ubuntu16.04~ppa1_amd64.deb

https://launchpad.net/~clivejo/+archive/ubuntu/xenial/+files/libkf5networkmanagerqt6-dbg_5.18.0-0ubuntu2~ubuntu16.04~ppa1_i386.deb

Please let me know if the patched package solves your problem.


Ubuntu 16.04.2 Installing GTX 1080Ti, nvidia-378 driver login loop

Some ideas to begin :

Check if the HWE kernel and xorg are installed : https://wiki.ubuntu.com/Kernel/LTSEnablementStack
Install another driver version instead and see what happens


Login using:

$ psql -U joe

List databases using:

joe=>\l

Connect to desired database using:

joe=>\c <database_name>


[    0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

The line above tell us that the kernel detected a 16550 UART chip in your PC, which provides a serial port (ttyS0), and there's some resources allocated to it (0x3f8 I/O address, IRQ 4).

The default permissions for serial devices are the following:

crw-rw---- 1 root dialout ... /dev/ttyS0

So, if you are a member of the dialout group, you'll be able to access (read from/write to) the serial port devices. Add yourself to the dialout group by running:

sudo adduser $USER dialout

Or:

sudo adduser <username> dialout

Then log out and log in again. Now you should have access to the serial port. Of course, you must also input the correct settings (speed, data bits, parity, stop bits, flow control) in the program you're using to access the device.


Sending email with postfix mailserver results in address resolver failure

It's resolved. It was following line and I disable it.

#sender_dependent_default_transport_maps = hash:/etc/postfix/dependent

It was looking for things which are not there


Can I dualboot Iphone/Ipod Touch with Ubuntu?


To get remote access to a server it needs to know about your key. Therefor you have a private key and the server has the public key in its ~/.ssh/authorized_keys
The reason why your friend gets access is probably because he has uploaded his public key to the server.

But your friend probably doesnt want you to have his private key - because then you could authenticate as him on all servers he has uploaded his public key to.

So to get access - you need to upload your public key into the account that you are using.

If this is a plain ssh server - then you can scp it over and append the key to the '~/.ssh/authorized_keys'. In which case the content of the file now will contain two keys.


Stuck in grub rescue after I tried to upgrade to Windows 8

Boot into live window USB.

Next>Repair your computer>Troubleshoot.>Advanced options.>Command Prompt
and type these commands

Bootrec /fixMbr

Bootrec /fixBoot

exit

And you are done!

To repair your grub menu form live USB.
This will help you.

How can I repair grub? (How to get Ubuntu back after installing Windows?)


Ubuntu 18.04.3 LTS Update breaks Wireless Adapter : Qualcomm Atheros QCA9377

This happend to me too, with Dell Wireless WLAN 1530 Half MiniCard (with proprietary drivers tick mark set during installation). After the update, it stopped working.

Booting with grub selecting older kernel 5.0.0-23 made it work again.


Ubuntu 18.04 shortcut keys not saving screenshots

Here's a screenshot taken from the Ubuntu docs using shift+printscreen.
The point is, if you want the screenshot to be saved to ~/Pictures, don't use ctrl.


Transfering files from Mac to Ubuntu 18.04

A. Copy the files up to iCloud or another cloud service, then access them from the Ubuntu PC: No easier way.

B. Create an exFAT partition on an external USB flashdrive, SSD, or HDD with the MacOS Disk Utility. Copy the files you wish to migrate onto the exFAT partition. Unmount the exFAT drive, attach it to the Ubuntu machine, mount it, and copy the files onto your /home or data partition.


Graphics Drivers

I would say that your drivers for your graphics card were not properly installed. To fix this just login to the command line (without desktop environment) and do this:

If nvidia, choose a drivers from this list and install it with apt:

First you must uninstall the old drivers that are not working:

sudo apt-get --purge remove xserver-xorg-video-nouveau

Otherwise use the open source Nouveau drivers that ubuntu provides, try reinstalling them:

sudo apt-get install xserver-xorg-video-nouveau

  You can find out which one to install by going to the nvidia drivers website and putting in your system and card information

If you have a radeon/AMD card then I would follow this

  NOTE: Because you haven't posted any logs of your system I can't do any
  debugging and this answer may not work.

Other possible problems

It could be as simple as switching to another terminal using alt-<f7>
Grub might need to be reinstalled on your system: grub-install /dev/sda
Try restarting the xserver systemctl restart lightdm

  If none of this works your going to have to post the logs somehow or just post the error message.


How do I make my new plustek opticbook 3800 work *sanely* on 14.04 LTS?

I was trying to get a different scanner to work recently so I should be able to help. Thanks for your clear post. The documentation says that it MIGHT just work once you plug it it, not that it definitely will.

According to the SANE website link, a backend is a driver. SANE is merely a collection of scanner drivers. You need a driver for your scanner so that your computer can 'talk' to it, SANE might give you that driver (automatically) so make sure it's installed and then give connecting the scanner another go:

If you don't know if you've got SANE, try installing it. Use sudo apt install sane  and maybe sudo apt install xsane for its user interface.

[Comment with any problems and I'll try to edit the answer as appropriate when I'm around.]


@steeldriver: thanks, I'd just got around to figuring that myself. "cpp" is the Gnu pre-processor. It outputs pre-processed source-code.

I'd been confused by cpp --help producing exactly the same text as c++ --help — indicating that cpp was a full compiler, but it's not. Also I'd thought that the Gnu pre-processor was "gpp".

It turns out that "cpp" is the Gnu pre-processor — and "gpp" stands for general-purpose pre-processor, which seems to be something rather different.


Over 60 Ubuntu noob dual booter seeks Win10 Ubuntu reallocation, long walks on short pier

Adding the 16G on the right of the current  20G Ubuntu partition (and expanding the filesystem into the new space -- easy with gparted, even on a running system.

Moving every partition to the left, including the Windows partition, just to gain 500M, probably not worth the trouble and risk.  If you really want to use that space, just put a 500Mpartition there and make it someone's home directory or just some data storage space.  This partition may be mounted and will appear to just add usable space -- low risk.


On restart server Ethernet went down saying not configured!

This question was solved by the OP:

  i tried this command sudo killall NetworkManger And it started working again


Desktop login sound doesn't play after login

Rather than deleting the whole .dconf folder, just open dconf-editor and navigate to:

org.gnome.desktop.sound

Change the value of "theme-name" to "ubuntu"

Also check to make sure that "GNOME Login Sound" is checked in "Startup Applications".

I've also filed a bug about this:

http://pad.lv/883677


Can't install 3rd party software after 16.04

go to ubuntu software center and search for "gdebi" or you can do sudo apt-get install gdebi
after installing it, find the .deb package you wish to install, right click it, choose properties, and find the tab that says something like "open with"
after finding it, choose gdbi and select "set as default". you may then close the menus and double click the .deb file and install it with gdebi


Stop network manager modifying resolve.conf in Ubuntu 18.04

There are various ways to configure NM not to touch /etc/resolv.conf:

[main]
dns=none

or (better)

[main]
rc-manager=unmanaged

in NetworkManager.conf. See man NetworkManager.conf.

You can also set rc-manager=symlink, and make /etc/resolv.conf a symlink pointing to a file (like systemd-resolved's stub resolve.conf). Well, you said, you tried this. Unclear, why that wouldn't work for you.

Or, you make the file immutable, with chattr +i /etc/resolv.conf.


Use can install skype from your terminal via

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

sudo apt-get update

sudo apt-get install skype


HDMI audio not working in Xubuntu 18.04, audio device found but not listed by aplay

I came to your post while searching same problem for Xubuntu 18.04 but worked without any issue in mint xface or other mint and ubuntu. I have dell inspiron 3420 i5 3210 laptop with nvidia 620M graphic card. I too was unable to find port configuration option under volume control  menu. Solution worked for me,

Search 'pulseaudio volume' in 'Software'.
find 'PulseAudio Volume Control'..
First option Installed by default for "PulseAudio Volume Control (pavucontrol) is a simple GTK+ based volume control tool (mixer) for the PulseAudio sound server" (in which I was unable to find configuration option initially.
Second Option Not Installed by default "Qt port of volume control pavucontrol of sound server PulseAudio." (in this section it is clearly mentioned for applicability for desktop environment.
Installed second option alongside. Launched directly by launch button in the option (they appear same in menu search). Voila ! there was option for configuration for sound output. (connect HDMI Display (or TV) to laptop otherwise option may not come)
Remark:
I did not changed option to hdmi audio output from here. I went back to volume control option from task bar Icon--- audio mixer. Configuration Option was there.
Just to crosscheck, go to audio mixer before installation of new volume control and search for configuration option next to input by clicking arrow. If it is not there then new installation of volume control (Qt based) replaced old one or revoked in old one. You may confirm.
I am new to Linux and leaning to use.


How do I enable automatic login in Mythbuntu 11.10

I played with the lightdm.conf (the one located at /etc/lightdm/lightdm.conf not the one in /etc/init/) and got the auto login working for me:

[SeatDefaults]
user-session=mythbuntu
allow-guest=false
autologin-user=your username
greeter-session=mythbuntu-lightdm-gtk-greeter

Think that the greeter-session needed to be updated for mythbuntu.


Difference between "./" and ". " for running a script/application?

When you do ./script.sh the script is run in a subshell. So any operation/change that the script is meant to do is taken place at the subshell, hence the parent shell i.e. from the shell the script was called from remains unaffected of the changes.

On the other hand, when you do . script.sh (. is the same as shell builtin source), the script is source meaning all the commands are executed in this instance of shell (from which it is called). Hence any changes in attributes such as variables, functions declaration affects the shell.

Normally source is used for user configuration files e.g. ~/.bashrc after making any modification to it e.g. adding a new path to PATH, so that the change is applied from the current shell session.

Perhaps an example will make you more clear :

$ cat script.sh  ##Our test script, containing just a variable (spam) declaration
#!/bin/bash
spam=foobar

$ ./script.sh  ## Execute using ./script.sh

$ echo "$spam"  ## Prints nothing

$ . script.sh  ## Lets source it

$ echo "$spam"  ## Now we get it
foobar


Recognize SD card as /dev/sdX rather than /dev/mmcblkX

As a workaround, you can probably just create a hard link from /dev/mmcblkX to /dev/sdX.

A hard link is just another file descriptor that you link with the device. Hard links can not be distinguished from the original file descriptors.

The command to create such a hard link is:

sudo ln /dev/mmcblkX /dev/sdX

If you use an already existing descriptor as link name, it will print an error message and abort instead of overwriting the old descriptor, so make sure you use an unoccupied name. As Ubuntu uses the sd? names in alphabetical order, you maybe want to link it to sdz, which will probably never get occupied by the system.

You will have to create the link probably only once if the source descriptor /dev/mmcblkX is persistent and does not go away when you pull the card out of its slot.
Otherwise it might be better to create the link every time after inserting the card and removing it after pulling it out again...


Trouble getting TightVNC to display screen

you properly have ubuntu installed with gnome, gnome does not work well with tightvnc, install xfce4 and load xfce4 with tightvnc

# apt-get install gnome-core xfce4 firefox nano -y --force-yes

and edit your xstartup

$ nano ~/.vnc/xstartup

with the content

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &


avidemux works very well for converting various formats. It is not the easiest program out there, but it does the trick very well. Just open your MP4 file, adjust the output settings to the format you want and click save.


Cannot login (GUI or ttyX) to Ubuntu 14.04 after update

This is a computer that has no data on it, it seems. Just the installation of Ubuntu plus some software. Best solution is to reinstall using 16.04. If it's an older computer or if it has little RAM, make sure you install Ubuntu Mate, and avoid anything with 3D desktops like Gnome3 and Unity. The Mate desktop makes a big difference in speed. You can make this change later if needed.

After installation, make sure you enable the SSH server, so you can login from another computer. You should enable UFW as well, the default firewall for Ubuntu. Enable port 22 to allow incoming SSH traffic. Then test this, so you know it works.

Reinstalling has another bonus. It increases your experience with Ubuntu, and makes sure the system is back to a fresh state. You have more control over what happened to it.

You can choose to use LVM during the installation process. This makes it possible to create snapshots of the system, making it possible to go back to a previous state if things go wrong.

NB: My solution doesn't give a solution to this specific problem. But to me you want your computer to work. Finding a solution that takes hours without any guarantee while reinstalling takes less than an hour - for me it's a no-brainer.

Unless of course the computer has data on it that is important and not backed up. In that case, use an Ubuntu live stick, and copy the data to an external disk and then reinstall.

Of course the same problem could appear after reinstallation. So make sure that SSH server works, and then you can work from there.


To be able to mount that folder as a normal user, include the mount options for the cifs folder in the configuration file /etc/fstab, and add the options noauto,user, similar to:

//nas-server/cifsShare /media/user/cifsShare cifs -o username=<username>,noauto,user 0 0

The option noauto will make sure the drive is not mounted during startup, but will nevertheless register all parameters necessary to mount the drive. The option user will allow any user to mount the drive.

With this setup, any user is able to mount the share with the mount command, followed by the path that was specified in fstab where the folder is to be mounted, e.g.

mount /media/user/cifsShare

or followed by the share, as in

mount //nas-server/cifsShare

Easier, probably, will be to mount the share using the file manager (Files in standard Ubuntu 18.04). In standard Files, one mounts a drive by providing the URI, in the form of

smb://server/share

A dialog will pop up to ask login, domain and password. Optionally, these settings can be remembered. You can subsequently make a bookmark for easy one-click access in the future.

This works out of the box in several editions of Ubuntu (stock Ubuntu, but also Kubuntu, Xubuntu, ...) and avoids the need to change system configuration files.