Windows messed my partitions, is there a way to fix them?

Looks like you're screwed, especially with an encrypted partition. What you can try is:

1) Copy everything as it is now, on an external USB, another DD, w/e. Copy byte-by-byte is dd if=/dev/sdX of=foo/bar, that will create an exact replica of /dev/sdX to a file named bar located in /foo (adapt those of course, like dd if=/dev/sda5 of=/media/files/backup_hdd.bkp

2) Try to recover your partition with a live-session where you'll install testdisk

3) Play with testdisk and try to restore your DD.

Bonus: you could try to recover some data with ext4undelete (if your partition was in ext4 format?) but I never managed to recover much with that tool.


Bold fonts won't show in Telegram messenger

Found the solution by myself after a long time!
Just remove Open Sans fonts using:
sudo apt remove open-sans-fonts fonts-open-sans-elementary


How to update software installed via .deb file

While it can be that installing a program with the .deb package doesn't add the repository to apt for automatic updates, some .deb installations do just that: they add repositories to apt for further updates or make it possible for you to add them manually and then install the software. Example: 'Visual Studio Code'.
https://code.visualstudio.com/docs/setup/linux

I cite from their website:

  Debian and Ubuntu based distributions

  The easiest way to install Visual Studio Code for Debian/Ubuntu based
  distributions is to download and install the .deb package (64-bit),
  either through the graphical software center if it's available, or
  through the command line with:

sudo apt install ./<file>.deb

  Installing the .deb package will automatically install the apt
  repository and signing key to enable auto-updating using the system's
  package manager. Note that 32-bit and .tar.gz binaries are also
  available on the VS Code download page.

  The repository and key can also be installed manually with the
  following script:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

  Then update the package cache and install the package using:

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code # or code-insiders


dual booting Ubuntu 12.04 and windows 7 (partitioning scheme)

It's been a long time since I've done it on my own system, so bear with me. Back up your system first! Also, I'm not super tech-savvy, so if anyone else has suggestions for improvements, go ahead and jump in. I know that I didn't do it in the most optimal way when I partitioned everything...

First, read this: https://help.ubuntu.com/community/DiskSpace

The way that I set up my drive, I wanted a shared partition between Windows and Ubuntu for storing all of my files so that I can access them from either partition.

If you want to set it up with the shared partition, I would suggest moving all your files into external storage for now, so that you can shrink down your Windows partition. (I didn't do this and now my Windows partition is much too large-- I'm going to have to do some juggling to reallocate space...).

I used the Wubi ISO burned to a disc to run the installation. You'll need to change the boot options so that your computer boots from the disc, since you'll use the gParted tool to do the re-partitioning.

In order to have more than 4 primary partitions, you'll need an extended partition. Figure out how much space you want to give to Windows-- if I'd been smart and moved all my files, I would've given it about 75Gb. But that's entirely up to you. I've heard people give it as little as 30Gb, but I don't know how well the system runs with a partition that small... The recovery partition is 4Gb. Everything else will be allocated to Ubuntu.

**Note: I have a 300Gb hard drive on a Windows 7 64-bit system.

/dev/sda1 is the Windows partition. /dev/sda2 is the recovery partition. Shrink down sda1 to the size that you want.

Create an extended partition, /dev/sda3. The first partition within the extended partition will be your swap partition-- I gave it about 10Gb. Next is root, which is ext4 format; I gave it 15Gb. I put the shared partition (ntfs format) next; the path for this one was /mnt/Shared (the size of this one will depend on how much space you allocate to everything else). The last partition is the Ubuntu partition, /home-- I think I gave this one too much space as well (50Gb?)

This article has great information, and I wish I'd read it before I did my own system. I suggest you read it as well:
http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfect-harmony


Undefined Reference to dlopen and friends

Found the problem. The -ldl parameter was specified too early on the command line. Modifying the Makefile.in to put the libraries after all .o files fixed the problem.

The 1.9 release of Scheme48 fixes this as well.


ssh login using ssh keys only works once after on site login

Thanks to @muru comment about encrypted home directories, I was led to this article about how to deal with this.

The TLDR; of that article is as follows and fixed my problem:

Create a directory in /etc/ssh/ with the same name as the login user you are using. In my case: /etc/ssh/joe.
Copy the authorized_keys file to this directory.
Set correct permissions of this file and directory to the user.
Add the following line to the sshd_config file:

AuthorizedKeysFile    /etc/ssh/%u/authorized_keys

Restart SSH.

All fixed!


How to hide the output of apt-get install completely?

To redirect all output, including all error outputs, you need to specify &> to redirect. This redirects both stdout and stderr. For your example, you would do so like this:

sudo apt-get install wireguard -y &> /dev/null

Do note, however, that it is usually not recommended to do this on operations such as installing packages, since it will be harder to debug if something goes wrong (and you won't know if something goes wrong or not). Therefore if you want to hide all output, I would recommend redirecting to a regular file instead, for example &> ~/apt-log.txt. Do it at your own risk :)


No, you cannot have a SSD for caching for both Windows and Linux.
Windows and Linux have caching program; ISRT from Intel for Windows, and bcache for Linux. But these softwares are incompatible; they rely on the fact that after a reboot the partition is at the same way as it was when you shutdown. And dual booting destroys this expectation.
Perhaps, the SSD can be divided in two partitions, with each program using one partition. That, I think (but not sure), can be possible.


20.04 can't connect to 5Ghz wifi after update

I fixed it.  I went into my routers wifi setup and changed the security to wpa2/wpa3-personal


Left mouse on a touch pad stops working after lid is closed

i have same thing - some drivers on ubuntu (like this from mouse/touchpad) are starting AFTER login (when window manager is started)- if your touchpad have also physical keys, they will work cause they're detected as regular mouse buttons. to fix it you'll need to find executable for divers and execute them in terminal with @reboot before their filename. hope it helps =)


screen blacks out after pressing a key on keyboard, specially enter key

This seems to be a bug. Report it here

Maybe it is because your system isn't powerful enough.

It would be nice if you could post the output of uname -a and your system specifications.

Edit: Maybe the Enter key is set to do something else when it's pressed. See if you can go into System Settings and change that.

Edit: To rebind the Enter key, make a new file called .xmodmaprc That file should go into your Home directly (~). In the file, type pointer = default

Edit: You might also try this: System ➜ Preferences ➜ Keyboard Shortcuts

and see if anything's bound to "Enter"


"gpg: invalid key resource URL" or "gpg: keyserver receive failed: No data" following official ROS Melodic installation guide

I had the same issue and fixed it by doing the following in my case:
sudo rm "/etc/apt/trusted.gpg.d/home:manuelschnid3r.asc"

In your case, you can go to /etc/apt/trusted.gpg.d/ check if the file home:hpcoder1 's extension is .asc or .gpg and then delete it by:
suo rm "/etc/apt/trusted.gpg.d/home:hpcoder1.gpg"

or
suo rm "/etc/apt/trusted.gpg.d/home:hpcoder1.asc"

then you try this again and it'll work well:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

I refered to gpg: invalid key resource URL following Docker official guide


Your source file runs with bin/sh not bin/bash

/bin/sh and /bin/bash are not the same thing.  You lose a lot of functionality when you switch to /bin/sh, but it does protect you from some shell expansion concerns.

I would switch the shell from #!/bin/sh to #!/bin/bash and see if that doesn't fix it.


Unity GUI pauses/freezes for less than a few seconds

I've found the solution (and the source of the problem) it seems something to do with the intel driver, and apparently it has been fixed in newer kernels not yet released to 11.04.

the quick fix is to run the following:

echo 1 | sudo tee /sys/module/i915/parameters/semaphores

this temporarily fixed the problem for me, but the setting is reset after reboot.
to set it permanently try the puting this option in /etc/default/grub

replace following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

by

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.semaphores=1"

then update grub:

sudo update-grub


Failed to execute child process (No such file or directory)

I repeated the steps as per my earlier comment, but now in an Ubuntu 16.04 x86 VM in VMplayer. Again I had to sudo apt install libSDL2-2.0 but then I was able to start the game:

So I don't know what you did, cleaned or otherwise removed that now causes the missing libGLU.so.1.

I now proved 2 times that the game starts on a fresh Ubuntu (with the exception of having to install libSDL2-2.0), so I stop further assistance and I end with advising you to do a clean install of Ubuntu on your computer.


When manually installing partitions, one of the steps is to also manually set the boot record...  If you didn't move the boot record to your SSD manually and left it the way it was, it overwrote the boot record on your primary drive.

If that drive contained something else (e.g. Windows 10) Windows won't be able to boot any more.

To solve this look over at SuperUser as Windows is off-topic here.


Google Drive isn't supported by current versions of Deja Dup. It is in the works, but hasn't been released yet.


Is there a way to buy a Dell dekstop/laptop with pre-installed Ubuntu?

Yes you can buy Dell laptop with Ubuntu in it but it is expensive ($1300).

http://www.dell.com/us/business/p/xps-13-linux/pd

I think this is the only model sold by Dell.

May be you should consider vendors like System76, Zareason, Los Alamos computers etc.. if you want to buy a laptop with Ubuntu pre-installed.


On Linux, when a program asks you for password it is normal for the letters you type not to be shown for security reasons. If that is your problem simply type your password and press enter. :)


How to run a one-line bash command with a keyboard shortcut?

Make sure that your script is being run by Bash, since you're using Bash builtins. Try this:

bash -c 'if [[ `banshee --query-current-state | grep playing` ]]; then banshee --pause; else banshee --play; fi'


How to fix when a Wacom touchscreen no longer left-clicks in some programs?

Fixing it

The problem can be fixed with the follwing command:

For a ThinkPad X201 Tablet with Ubuntu 19.04

xsetwacom --set "Serial Wacom Tablet WACf00c touch" Gesture off

For a ThinkPad X201 Tablet with Ubuntu 18.10

xsetwacom --set "Wacom Serial Penabled 2FG Touchscreen Finger touch"
Gesture off

For other touchscreen devices

Find out the product name of your touchscreen with xinput --list and supply it in the command above.

Making the fix permanent

To automatically apply the configuration change of the above command at every start of X11, create a file /etc/X11/xorg.conf.d/81-local-touchscreen-tweaks.conf with the content shown below, and restart your X server afterwards to test the effect.

For a ThinkPad X201 Tablet with Ubuntu 19.04

# Tweaks for the Wacom touchscreen on a ThinkPad X201 Tablet.
Section "InputClass"
    Identifier "local touchscreen tweaks"

    # Product to configure.
    MatchProduct "Serial Wacom Tablet WACf00c"

    # Driver to use for this device.
    # (Identical to the default, so not essential to mention.)
    Driver "wacom"

    # Disable multi-touch gestures to fix tap-to-click issues.
    Option "Gesture" "off"
EndSection

For a ThinkPad X201 Tablet with Ubuntu 18.10

Use the same file content as shown above, except that you have to change the MatchProduct line to the following:

MatchProduct "Wacom Serial Penabled 2FG Touchscreen Finger"

For other touchscreen devices

Look into your /var/log/Xorg.0.log for a line that mentions your touchscreen's product identifier, such as "Using input driver 'wacom' for '…'". Or simply use the product identifier reported by xinput --list without the "touch" at the end. That suffix is rather the mode of the product and not part of its identifier; modes can be touch, pen, eraser, cursor.

Background information

The fix disables all multi-touch gestures of the xf86-input-wacom driver. Obviously, either this feature of the driver or the programs where disabling it repairs normal tap-to-click behavior have a software bug, because the described problem is no intended consequence of multi-touch gestures. Probably it is a bug in the application software, as I could not find any difference between the events generated with "Gesture on" and "Gesture off" on either of the following levels:

driver level, using a command like sudo libinput debug-events
X event level, as reported with a command like sudo evtest /dev/input/event15

Obviously, you lose the driver's ability to interpret multi-touch events this way. This is not much of a problem though, because multi-touch gestures in this driver are a deprecated feature anyway:

  "The xf86-input-wacom driver supports 2FGT gestures as a legacy feature from linuxwacom grandfathered in. […] [I]t is far more useful to have touch gestures […] supported by a gesture engine that can be used by all drivers and multitouch aware applications. […] [W]hen you disable xf86-input-wacom's default in-driver 2FGT support all the hardware-tracked fingers pass up to the X server. That allows all of the hardware reported touch contacts to be handled by the new multitouch through X Server features […] and supporting drivers." [source]

Indeed, after the change pinch zoom and two-finger scrolling still work in Chrome / Chromium, for example. The only annoying part is that the disabled gestures include the "tap-hold plus tap" two-finger gesture for right-clicking. Under the Ubuntu default desktop environment, right-clicking by touch is still possible with tap-and-hold, but not so in other desktop environments. But that's a different problem to solve.


usbtmc0 device: how to change default behaviour

A comment: you can also specifically target the PM100 power meters.

(/etc/udev/rules.d/usbtmc_thorlabs.rules)

# Thorlabs PM100USB/PM100D
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1313", ATTRS{idProduct}=="8072", GROUP="usbtmc", MODE="0660"
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1313", ATTRS{idProduct}=="8078", GROUP="usbtmc", MODE="0660"


Ubuntu Gnome: Disable second screen by default

xrandr will list your existing outputs. Get the id of the tv, then do xrandr --output $TV --off to turn if off. Or xrandr --output $TV --auto to turn it on. Not sure about toggling, but you might be able to hack something together.


Modelsim is not working after ubuntu 11.10 upgrade?

To  fix this, you have to edit the vsim file with

gksu gedit vsim

in the bin directory. The thing is that if the linux version is 3.x.x.x there a condition that searches in an unexistent directory, so edit the line (204 aprox.)

  *)                vco="linux_rh60" ;;

to:

***)                vco="linux" ;;**

also, you have to change the line 13 (first non-comment line)

  mode=${MTI_VCO_MODE:-""}

to

  **mode=${MTI_VCO_MODE:-"32"}**


Find and replace text within multiple files

Here I use sed to replace every occurrence of the word "cybernetnews" with "cybernet" in every file with the extension, c, in the directory, /home/user/directory/.

find /home/user/directory -name \*.c -exec sed -i "s/cybernetnews/cybernet/g" {} \;

A more generic variation where you search recursively from the directory of execution and operate on only regular, readable, writeable files:

find ./ -type f -readable -writable -exec sed -i "s/cybernetnews/cybernet/g" {} \;


It's not working for me either. I have installed a fresh install of 12.04 and Polly is no longer being shown in the message notification menu. I wish I knew why. I even tried uninstalling Gwibber thinking that maybe that was causing the issue but no dice.


Firefox & OpenOffice don't use Indicator Applet Application Menu

It's "known issue" -- support for OOo and XUL-based application (Firefox, Thunderbird...) is planned but not implemented yet and I think there's no workaround yet.

Related bugs:

Firefox: https://bugs.launchpad.net/indicator-appmenu/+bug/637827
OpenOffice: https://bugs.launchpad.net/ubuntu/+source/indicator-appmenu/+bug/664731


Desktop Flickering after Suspend or Sleep

If you are ready to sacrifice the Effects then install Compiz available here.Disable all the "Effects".I hope your problem will be solved.


Ubuntu hangs on purple screen at startup

Your computer is booting Ubuntu during those 15 seconds. You can see a detailed log of what was happening during boot by viewing the file /var/log/syslog


You're in for a wild ride...

I've downloaded the script and it seems everything is build from source.

From what I have seen, in the folder where you ran the initial command, you should have a handful of files and folder, each for a specific program (rutorrent, nginx, etc.) go in each of them and run

make uninstall

If you are lucky, the uninstall file exist and it will remove all the file that each software make install copied onto the file system.

It also create more files but I'm not sure which. You can use find / -type f -mtime -1 to list all file modified in the last day and locate what the script created.

If you are running a cloud or clean system, I would just re-provision/format it to really remove everything.


Run sudo command with non-root user in Docker container

This is what I would do

FROM ubuntu:17.04

# Must have packages
RUN apt-get update && apt-get install -y vim nano zsh curl git sudo

# Install Oh my Zsh
RUN bash -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
RUN sed -i -- 's/robbyrussell/sonicradish/g' /root/.zshrc

# Add none root user
RUN  useradd admin && echo "admin:admin" | chpasswd && adduser admin sudo
USER admin


How do I access windows folder from ubuntu?

it is located in /host folder.

Go to the 'file system' then you will find host directory. It contains all the files of windows.


You need Synaptic package manager to be installed.
Within Synaptic  type  gnome-search in little quick search window.
Then navigate to gnome-search-tool, select it for installation and install.
That's it.


To answer your question as asked:  Your BIOS is set to boot from the USB drive before the hard drive.  To change the bootable device, go into BIOS and set it to boot the hard drive first.

Note that after you have used the USB to do the installation on the hard drive it tells you to remove the installation media before it reboots into the new system.  So at that point you can just remove the USB install media and it will boot from the hard drive as long as your BIOS has it next in the boot device sequence.


Make Espeak read the words from picture on ubuntu

A very simple image-to-voice conversion can be done from the command line by piping the output of tesseract-ocr  to espeak. This can be done without further coding or conversions directly from an image source:

tesseract image.png stdout | espeak


Best filesystem for Ubuntu/Windows shared drive

Ubuntu has the ntfs-3g package so it can read and write files in NTFS, whereas Windows drivers for ext4 tend to break things. I'd use NTFS for that shared space.


Once mounted using TrueCrypt, cannot unmount

There is some process(es) with file(s) on your encrypted container still opened.

You gave us too few info to help you with detailed instructions.

You should use fuser and lsof to catch the culprit.

EDIT:

if e.g. your TrueCrypt mount point is /media/truecrypt1 you should try:

fuser -mv /media/truecrypt1 or sudo fuser -mv /media/truecrypt1

and

lsof +c0 /media/truecrypt1 or sudo lsof +c0 /media/truecrypt1

Keep note of the offending PID and kill the process trying one of these commands:

kill PID
kill -9 PID
sudo kill PID
sudo kill -9 PID


You can download and install Tor from the official website and execute the program after extracting it.
Link: https://www.torproject.org/download/download


Boot repair: “GRUB is still present. Please try again ” message is displayed while reparing the boot with ubuntu 18.04.5 LTS

you should run gparted and format the boot drive and have the boot-repair reinstall grub. you can backup the drive if you are afraid of losing any info there. Mostly you got nothing to worry about though, I've done it many times and grub can be installed again with boot-repair on that drive.
Note: you may want to go to gparted again after to set the boot flag for the boot drive. you can do it after you format or before you start as well just as an extra step. can't hurt to check it after because sometimes the flag is not added and the system does not boot just because of that even though the repair is done.


You will need to run a DLNA server such as minidlna on the machine with the files you wish to access via DLNA. The FTP server is not necessary.


If the apt-get suggestions do not works, try this command:

sudo dpkg --purge --force-all squid3

From the Man page for dpkg:

  Force or refuse (no-force and refuse mean the same thing)
                to  do  some  things. things is a comma separated list of
                things specified below. --force-help displays  a  message
                describing  them.   Things  marked with (*) are forced by
                default.

          Warning: These options are mostly intended to be used  by
          experts  only.  Using  them  without  fully understanding
          their effects may break your whole system.

          all: Turns on (or off) all force options.


Can I make kdenlive use a different file manager

This helped me... after searching DuckDuckGo:
Solution 1: The hard way:
If you're using the MATE desktop...
sudo apt -y install qt5ct
export QT_QPA_PLATFORMTHEME=qt5ct && kdenlive

Then edit your menu entry: Menu > Sound and Video > [right click] Kdenlive, then select Edit Properties and then in the Command field, replace kdenlive %U with export QT_QPA_PLATFORMTHEME=qt5ct && kdenlive %U
and for good measure, edit the same /usr/share/applications/org.kde.kdenlive.desktop (as root, like with the command sudo nano /usr/share/applications/org.kde.kdenlive.desktop) file, replacing
Exec=kdenlive %U

with
Exec=export QT_QPA_PLATFORMTHEME=qt5ct && kdenlive %U

Save, quit the editor (nano, with Ctrl+X, Y and Enter) and you won't (hopefully, fingers crossed) have a problem again.
Solution 2: Much easier:
Download the AppImage of Kdenlive from kdenlive.org/download
make it executable (chmod a+x /path/to/your/download/kdenlive-18.04.1-x86_64.AppImage) and then double-click it.
This actually is much easier and actually works. The Kdenlive site says that there is really no PPA for Ubuntu 18.04 and the AppImage is a breeze.
(And it also works on other Linux distros. It's like the PortableApps Platform in Windows.)


Keeping GRUB Intact When Reinstalling Windows 7

The easiest way is to follow the steps described here: https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

So after reinstallation of windows you can restore GRUB with one of the above mentioned ways.


Setting Plex media server on Ubuntu 12.04 Desktop?

Go into the Plex web app and ask it to scan your Music folder


Ubuntu 16.10 upgrade Unity8 fails to login

From what I've read so far the reason behind that is in missing support of features used in Unity by Nvidia drivers.I could try to switch to intel driver just for the sake of the test, but decided it's not worth the effort.

So far it's unclear when NVidia will properly support U8, at least I didn't find any specific date


Unity 2d on multi monitor, Close, Min, Max-Buttons not available on 2nd screen

I solved this problem of not having a close button or minimize/maximize button on the extra monitor by scaling the size of the unity launcher to a little less than default.

Click the gear icon in the top right corner of your window, and choose 'System Settings'

Click on the 'Screen Display' Icon.

Look for a slider bar that says "Scale for menu and title bars:" slide it to the left a bit. Mine is on 0.75


On Samba DCs running on Ubuntu Server 20.04, is DNS resolution handled by by the netplan config or by resolv.conf?

That's not a silly question at all!  On Ubuntu 18.04 and later, /etc/resolv.conf is a symlink to a file managed by systemd-resolved.  One of the ways to provide input to systemd-resolved is via netplan.  So yes, if you want to configure the nameservers for your system, /etc/netplan/00-installer-config.yaml is the simplest way to do it.


How to replace text between two patterns on different lines?

It should work for you:

sed -e '/Security-Start/{ N; s/Security-Start.*Security-End/REDACTED/ }'

/Security-Start/ search for "Security-Start"
If you found it: "N;" means append the next line.
and do the replacements/Security-Start.*Security-End/REDACTED/ at the final result.

For more than of two line use this one:

sed -n '1h; 1!H; ${ g; s/Security-Start.*Security-End/REDACTED/p }'

Read here


Re the overlay scrollbar message, you have 3 options:

Ignore it, as it is harmless; you'll just get normal scrollbars.
Install overlay-scrollbar-gtk2 so you have the overlay scrollbar module for GTK2 applications.
Set the env variable GTK_OVERLAY_SCROLLING=0 to inhibit trying to load the module.


Which Partition do I install alongside Windows on an HP Pavillion dv7?

Let me try to explain this one.

Problem: If you already have four primary partitions, then you won't be able to create another partition on your hard disk.

Solution: Copy all the data from one of your partitions to another and delete that former partition. You can copy it to an external hard disk too. I seriously can't see any workaround for this.

In order to delete a partition, launch Gparted and right-click on the drive that you wish to delete. Refer to the figure below:

After deleting it proceed with inserting a Live CD and your ubuntu installation. When you reach the step that you have shown in the figure, select the "unallocated space" (We will have that since we just deleted a partition) and select "logical" from the small window that pops up.

I think you can complete the rest of the installation steps with your own logic. Do let me know if you need any more information. :)

You can see my logical partition as /dev/sda2. Once you have a logical partition, you can create as many individual partitions in it as you want. As for what's the exact difference between a primary and logical partition, I'm afraid I do not know.


Ubuntu 16.04 Nvidia GeForce 940M black screen after suspend

Welcome to the club. old problem with no solution.

Depend on what you are doing with your laptop, you should consider switching to intel graphic in Nvidia X server settings.

The better solution would be to install bumblebee to be able to run a specific program with dedicated GPU (This is helpful for bumblebee installation).

Again, it really depends what you want to do. If you are going to code CUDA, bumblebee might be useful if you run the IDE with bumblebee. If you want to use any code generator for it, bumblebee is not suitable for you (based on my own experience) and you should bear with suspend issue and screen tearing (and probably over heating).

If you just want to do day-to-day regular jobs and live you life with your laptop happily, forget about your dedicated graphic and switch to intel graphic forever.

Hope this helped.


My Home Wifi SSID is not visible in Ubuntu

First you need to tell the wifi stack in which part of the world you are in. This is to comply with regulation of your country regarding the emission of electromagnetic wave.

If this is not already done, install the crda package with sudo apt install crda. You configure it by changing /etc/default/crda file by setting REGDOMAIN to your country 2 letter iso 3166-1 alpha 2 code. In our example, I guess it is IN

As most of the country outside the US, this enable us to use the channel 12 and 13.

After a reboot, you should be able to see channel 12 and 13 SSID/AP.

You could check that the coutry has been set in the wifi stack by checking the country code with

iw reg get

If you still don't see your SSID, then you might be using broadcom driver and hitting a bug.


Post-install re-start returns to Live USB

You have the following options:

Change the BIOS settings to not boot from USB at all.
Remove the USB during the reboot. You should have a second or two when the power to the computer (and therefore also the USB) is off. Simply unplugging it at this time is safe.
Shut down the computer (if you have that option), then remove the USB, then power the computer back on.


Mythbuntu zooms in on every video since upgrading to 12.04

Check the MythTV Frontend setting

Setup/TV Settings (or Video)/Playback Page 2 of 8/Zoom

to be set to "Auto detect".


BIOS
ASRock A320M-HDV R4.0
You have BIOS version 3.30, from 8/6/2019.
This MAY be the wrong BIOS when used with a Summit Ridge processor (AMD Ryzen 3 1200). Contact ASRock Support for confirmation. See the CPU Support List.
BIOS 2.30 was the last BIOS that supported this processor. See here.
The newest BIOS is version 4.00, dated 7/29/2020... but again, it may not be appropriate for your processor. See here.
memtest
Ryzen processors are notorious for memory compatibility issues.
Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.


Ubuntu 14.04 kernel upgrades not changing default

It turns out that the hosting company I use (Digital Ocean) have a control panel through their website that allows you to set the kernel. It also appears that their site does not in any way respect the OS choices made about which kernel the system will boot.

Resolved by choosing kernel through their control panel. This is only affecting my droplets on their service, not live local machines (tested and confirmed).

According to https://www.digitalocean.com/community/tutorials/how-to-update-a-digitalocean-server-s-kernel this applies only to "old" droplets (I don't know how old :-)). That page also shows the steps to make those droplets respect the OS selected kernel.


Ubuntu simulates keypresses/mouse clicks even after disabling hardware

I was struggling to find a fix and after trying quite a few solutions, found one solution which is effective.

I did the following to fix this issue:

Reinstall Xorg:

sudo apt-get remove --purge xserver-xorg
sudo apt-get install xserver-xorg
sudo dpkg-reconfigure xserver-xorg

Disable the touchpad driver (not external USB mouse):

sudo modprobe -rf psmouse

With the first step itself, keyboard stopped malfunctioning. With the second step, touchpad was disabled and I could use external mouse without any issues.

Still, if anybody could answer how reinstalling xorg might have helped keyevent issues, it will be great.


You're not going to like this answer:

AMD's Dynamic Switchable Graphics needs Xorg support for the discrete videocard assigned for rendering to work. So, rendering on the discrete gpu will not work until the Xorg team adds support for it.

But you've still got three options:

Use the BIOS to disable the discrete card and use only the Intel IGPU / enable the discrete card when you really need it and use only the AMD DGPU (this is how I run, it just takes a reboot and you'll get used to it)
Test and improve some virtualGL based program to make the switch, like the common-amd branch of Bumblebee project. Check the project repository and this useful post.
Use the proprietary driver with powerxpress (a.k.a. pxp) support maintained by Vi0l0 (remember to check for xorg compatibility).

Source


The wine ppa tends to have the latest version and work on the latest Ubuntu versions. If you look at the wine ppa right now in Wine PPA for 12.04 you will noticed the last update for the 1.6.x was the 1.6.1, or to be more precise, the 1:1.6.1-0ubuntu1~ppa1~precise1

You will also noticed that it offers that 1.7.x versions but up to 1.7.18, when on 14.04 it offers the 1.7.27 which is the latest version. I recommend jumping to either a new version of Ubuntu (14.04 or the next 14.10 when it comes out) to have the latest wine version. I also recommend removing 1.6.x and installing 1.7 (or 1.8 when it comes out), since there are more than 500+ enhancements compared to 1.6.x

Of course, in the case you want to have the latest wine. If not you can stay in 12.04 and stick with either the current 1.6.x or jump to 1.7.


plistutil is the command you need to be using in Linux.

Install the package using

sudo apt-get install libplist-utils

Then either replace all plutil to plistutil in your script, or create a symlink (assuming your plistutil was installed at /usr/bin/plistutil) like so:

ln -s /usr/bin/plistutil /usr/bin/plutil

To determine where your plistutil was installed, run which plistutil.


You set static routes in /etc/network/interfaces
An example entry would be

auto eth0
allow-hotplug eth0
iface eth0 inet static
        address 10.70.201.5
        netmask 255.255.255.192
        ### Ubuntu Linux add persistent route command ###
        post-up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.70.201.6

This sets a static address and mask and finally adds a static route.


How do I disable the calendar events section in GNOME Shell's clock applet?

Edit: This is now obsolete, an extension has been written for this: https://extensions.gnome.org/extension/153/nothingtodo/

There's no configuration value for this, it's hard-coded in at the moment, but it's easy enough to change:

gksudo gedit /usr/share/gnome-shell/js/ui/panel.js

Find the line that reads:

this._dateMenu = new DateMenu.DateMenuButton({ showEvents: true });

And simply change true to false

Then restart GNOME Shell by pressing Alt-F2 and entering r

A useful resource for reference (see components section): http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html

Edit: For anyone who's interested, here's the end result:


Yeah, somehow installing it with Flatpak or Snap won't let you access the folder.
Go ahead and remove it and install it with these three lines manually.

sudo add-apt-repository ppa:otto-kesselgulasch/gimp

sudo apt update

sudo apt install gimp

After that you are able to access the folder.


Jaunty is not recommended for a VPS, it's not a LTS release and not supported anymore (which means that there are no security updates!).

Your sources.list contains a reference to Hardy, but your system is Jaunty. Replace hardy by jaunty in your sources.list and run sudo apt-get update after.


Cannot boot to Ubuntu, though installation was successful

Usually when this happens it is because Ubuntu's installer didn't properly install the boot loader.

Assuming you installed Ubuntu by booting from a live CD/DVD or USB flash drive (or from the alternate CD) and running the installer (that is, not from within Windows using Wubi), you can fix this problem by reinstalling GRUB2 to the Master Boot Record using one of these methods.


unable to change and edit my hard-drives partitions

You can actually edit partitions without ubuntu uninstall by, for example, gparted

EDIT: you can also install Gparted from the basic repositary, from Software Center or by sudo apt-get install gparted


How can I enable 3D acceleration for Ubuntu as a VMWare guest?

Before you change your machine to try and have 3D acceleration on a guest, you could try this solution. With VMware and the machine turned off, open the .vmw file that belongs to the machine you want 3D on, probably something like:

gedit $USER/.vmware/machines/windows7.vmx

And add this new line to the end of the file:

mks.gl.allowBlacklistedDrivers = TRUE

Then, try to boot the machine with 3D enabled.


For pasting in the terminal you have to use Ctrl+Shift+V, and for copying, Ctrl+Shift+C.


How can I use Ansible to claim that I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

With ansible:
- name: prepare eula
  debconf:
    name: ttf-mscorefonts-installer
    question: msttcorefonts/accepted-mscorefonts-eula
    value: true

These things get configured with debconf, and you can see all options with

debconf-show package

Of course, then you'll have to install it at least once manually. Please note, debconf does not install the package, it simply prepares debconf for it.


What are the alternatives to Ubuntu One?

The following is a list of the cloud services similar to Ubuntu One that work in Ubuntu (Can be installed with a .DEB file) and may provide support for the Unity Systray:
Dropbox
Website - https://www.dropbox.com/
Starting Free Space - 2 GB
Bonus Space - 25 GB to 50 GB when used on an Smartphone
Characteristics - Sync Files/Folders between devices.
Unity SysTray Support- YES
Open Source - NO
InSync
Website - https://www.insynchq.com/
Characteristics - Sync Files/Folders with Google Drive. Extensive Sharing properties. 15 Day Trial.
Unity SysTray Support - YES
Open Source - NO
OwnCloud
Website - http://owncloud.org/
Characteristics - Sync Files/Folders between Devices on your "Own Cloud".
Support - http://owncloud.org/providers/
Unity SysTray Support - YES
Open Source - YES (GitHub)
SpiderOak
Website - https://spideroak.com/
Starting Free Space - 2 GB
Characteristics - Sync Files/Folders between devices. Advanced GUI System & File History
Unity SysTray Support - YES
Open Source - NO
Wuala
Website - http://www.wuala.com/
Starting Free Space - 0 GB  Paid Only
Characteristics - Sync Files/Folders. GUI System and an easy way to manage files across devices.
Unity SysTray Support - YES
Open Source - NO
Tonido
Website - http://www.tonido.com/
Starting Free Space - 2 GB
Characteristics - Sync Files/Folders between computers.
Unity SysTray Support - YES
Open Source - NO
TeamDrive
Website - http://www.teamdrive.com/
Starting Free Space - 2 GB
Characteristics - Sync Files/Folders between computers. File Collaboration (Multi User Support)
Bonus Space - Up to 10 GB by inviting others.
Unity SysTray Support - YES
Open Source - NO
SeaFile
Website - http://seafile.com/en/home/
Starting Free Space - 1 GB
Characteristics - Sync Files/Folders between computers.
Unity SysTray Support - YES
Open Source - YES (GitHub)
Syncany
Website - http://www.syncany.org/
Starting Free Space - Depends on which cloud service you use
Characteristics - Sync Files/Folders between computers. Can use Picasa, RackSpace, Amazon, Google, Windows Share and even WebDAV as a repository. Nautilus integration. Advanced GUI. Can integrate with other Cloud Services. Very flexible.
Unity SysTray Support - YES
Open Source - YES (GitHub)
Copy (Barracuda)
Website - https://www.copy.com/home/
Starting Free Space - 15 GB
Characteristics - Up to 5 Devices Synced, 5 GB+ for every invite, Can personalized space provided for a single user. Nautilus integration. Advanced GUI. Can integrate with other Cloud Services. Very flexible. Supports soft symlinks.
Unity SysTray Support - YES
Open Source - NO
Others that may be used (Open Source):
 OwnDrive - https://owndrive.com/

Unified Access to multiple Cloud Services
1 GB Free Space

 SparkleShare - http://sparkleshare.org/

Open Source (GitHub)
Version Control & Privacy

Others that may be used (Closed Source):
 Asus Web Storage - https://www.asuswebstorage.com/navigate/

5 GB free space
More free space if you use ASUS Devices

 SugarSync - https://www.sugarsync.com/

30 Day Trial
60 GB Starting Size (Not free)

 BitTorrent Sync - http://www.bittorrent.com/sync/downloads

Offer API to Developers
Direct Transfer between Devices

 BitCasa - https://www.bitcasa.com/

5 GB (Upto 20 GB via inviting others) Free Space
Up to 3 Clients

 GoAruna - http://goaruna.com/

2 GB Free Space
Works on many devices

In my case I stick with Dropbox and InSync. Tried SpiderOak and there was a lack of User-Friendliness that I did not use it after a week. InSync is pretty cool (Saves me a lot of time). Lastly Syncany has pretty cool options to connect to other cloud services and even create your own for privacy.


Running a directory full of .sh files with one command

While you can indeed run all .sh files in a directory with a for loop as suggested by Yaron, this is really an over complex approach to take. Don't write many scripts if the only difference between them is the RL they will download! And there's absolutely no reason to spawn a terminal window for each of them either!

Instead, write your YouTube URLs into a file, one per line:

http://youtube.com/foo
http://youtube.com/bar
http://youtube.com/baz

Then, to download them, use (file is the name of the file with the URLs):

while read url; do
    youtube-dl "$url"
done < file

That will download each video in the file, one after the other. If you want to download them all at the same time (not a good idea if you have too many), you can run each download command in the background by adding &:

while read url; do
    youtube-dl "$url" &
done < file


Virtualbox - this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot

I will update it if need. but I have no virtualbox around here to make a step by step

Do you have a PENTIUM 4? if less then is weird you have successfully running your 64 bits archlinux .

I think you should at least do this :

Try a creating a new VM
Enable VT-x/AMD-V or similar at your bios too
Have a 64 bits host ( archlinux proves you already have it :c )
Give at least two cores to your ubuntu server 64bits VM


Windows 7 and Ubuntu 12.04 Dual boot, Grub not showing!

Temporary Solution
When you start your pc keep Left Shift pressed. it will show you the grub
Permanent solution
If you get to start ubuntu by the temp soln then to make boot permanently show the grub-
Open startup manager(install it if it isnt installed from sofware center)
Change the value for timeout- pref 5 - 10 secs
Default OS - Whatever you want

Rest leave everything as it(you can edit that if you want to)
if that does not work install boot-repair via ppa

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

This worked for me should work for you too


Blank select options on Chrome / Chromium & Ubuntu 14.04

You have to turn off the hardware acceleration!

Check this out for the detailed solution -- I don't feel like copy pasting the whole thing and stealing someone else's answer!

http://www.solveyourtech.com/turn-hardware-acceleration-google-chrome/

The summary is that you need to go to 'settings' then 'advanced settings' in Chrome, then uncheck the hardware acceleration box.


I want one of my users to be able to 'sudo init 5' without being asked for a passwd. How to do it?

Run sudo visudo and add the following line to the end of /etc/sudoers:

pn [hostname] = (root) NOPASSWD: /sbin/init 5

Replace [hostname] with the output of hostname.

After this change, the user pn will be able to execute sudo init 5 without a password.


Should I restart my PC if Unity crashes during upgrade?

The exact same thing happened to me. Here is my story:

During upgrade Unity crashed and I basically had access to nothing; Couldn't even open a terminal with Ctrl+Alt+T. The hard disk was still working, so I figured the update was still running, and I left it.
Eventually the disk activity stopped, so I had to assume the update was complete and forced a log out with Alt+SysReq+K, then a restart.
Upon loading Ubuntu again, I noticed I was getting an incorrect screen resolution so I knew something was up. I managed to log in, then ran Updates and was given an error about the upgrade being interrupted.
I had to open a terminal, first tried: sudo apt-get install -f, but this told me that I needed to run sudo dpkg --configure -a
This seemed to resume the upgrade process where it had left off, so I left it for another while. I got a few console prompts about replacing my desktop defaults file, so I guess when I had restarted previously it was waiting for some such reply (but I had no way of seeing it).
After this completed, seemingly with no errors, I ran sudo apt-get install -f again just to be sure. After that I rebooted and everything seemed dandy. Phew.

Of course if someone else has this problem their results may very, but maybe this will give someone some hope if their Unity crashes during the update (grr).


Make Ubuntu USB Stick boot UEFI without CSM

Mkusb will make a Persistent drive that works on BIOS and UEFI.
You can confirm this on your machine before proceeding.

It is easy to change a mkusb Persistent USB to a Full install USB that also works on BIOS and UEFI.

Use mkusb to make a Live system on a USB (2GB or larger).
Use mkusb to make a Persistent system on a USB 16GB or larger, using default settings with ~12GB persistence.
Remove HDD before proceeding, (optional but recommended).
Insert both USB drives.
Boot Installer drive, select Install.
Select Something else.
Select sdb5, (the target drive), and click Change.
Select Use as: ext4, Format, Mount point /.
Don't touch any other partitions.
Select sdb5 for boot loader installation.
Complete installation.
Cut grub.cfg from sdb5/boot/grub and paste to sdb3/boot/grub, overwriting the existing grub.cfg file.
Delete sdb4, the ISO9660 partition and expand sdb5 into the recovered space.
Boot the target drive and run sudo update-grub, (optional).


Where should I report the bug/feature request for ubuntu-phone to get a better way to position the cursor

The best place to file this would be against the ubuntu sdk:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit


Why is there a user called CouchDB Administrator on my system?

CouchDB is an Apache project.

CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents with your web browser, via HTTP. Query, combine, and transform your documents with JavaScript.

CouchDB works well with modern web and mobile apps. You can even serve web apps directly out of CouchDB. And you can distribute your data, or your apps, efficiently using CouchDB’s incremental replication. CouchDB supports master-master setups with automatic conflict detection.

to remove :

sudo apt-get purge couchdb

If you want to find out what maybe uses couchdb on your system, you can use apt-cache rdepends couchdb:

> apt-cache rdepends couchdb
couchdb
Reverse Depends:
  python-couchdb
  couchdb-bin
> apt-cache rdepends couchdb-bin
couchdb-bin
Reverse Depends:
  …
  desktopcouch

> apt-cache rdepends desktopcouch
desktopcouch
Reverse Depends:
  …
  desktopcouch-ubuntuone
  xdiagnose
  oneconf
  indicator-weather
  …
  evolution-couchdb
  desktopcouch-ubuntuone


Rename multiple files of different name and extensions with parent directory name

I conjured this script that can help to achieve what you want:

#!/usr/bin/env bash
set -e

for i in "$1"/*/*
do
    old="${i##*/}"
    ext="${i##*.}"
    name=$(basename "${i%/*}")
    [ ! -d "$i" ] && [ ! -f "$1/$name/$name.$ext" ] && mv "$1/$name/$old" "$1/$name/$name.$ext"

done

Test:

parentdir
├── subdir1
│   ├── name1.ovc
│   └── name1.txt
└── subdir2
    ├── name2.ovc
    └── name2.txt

Results:

parentdir
├── subdir1
│   ├── subdir1.ovc
│   └── subdir1.txt
└── subdir2
    ├── subdir2.ovc
    └── subdir2.txt

Usage: ./script.sh Parentdir

Information:

old="${i##*/}": returns filename to change (name1.ovc)
ext="${i##*.}": returns file extension (mpeg, txt)
name=$(basename "${i%/*}"): returns immediate parent directory of target
file (subdir1)
[ ! -d "$i" ]: check if not a directory
[ ! -f "$1/$name/$name.$ext" ]: Check if the file already exists and has been renamed already


What do you do, if a system update breaks your Ubuntu graphics ? (Is there a SANDBOX ?)

If you hold left-shift immediately after BIOS you should see a menu asking you what you want to boot to. This is the grub bootloader which usually just selects the latest kernel.

If you then select the latest "recovery mode", that should present you with another menu which should allow you to pick faisafeX which again, presents another menu which lets you use the most bog-standard drivers possible. This might let you temporarily get back into a graphical setting. There are also options for resetting configurations in this deepest menu which might also be worth a go.

If that doesn't hail any success, the update that broke things may have been a new kernel version. In grub try selecting the second non-recovery item. If that boots through, you might just need to select this manually each boot, and of course, file a bug report on Launchpad against the Linux project so people know there's an issue.

Either way, actually, what you're doing needs to end in a bug report or nothing is going to get fixed.

As for protecting yourself against these issues in the future the only viable methods for major system things (like graphics) is to keep some sort of backup from before you update. This either means:

Taking a full disk image with a tool like Clonezilla, or
Using a filesystem like btrfs (which is now fairly stable) that will let you take live snapshots of the system, and roll back to the old system.

I freely admit that neither is a convenient solution. The first requires booting into a live-CD environment before you can take the image and the second requires reinstallation and reformatting the disk to btrfs (I don't think there is a nice conversion tool) besides having to learn the process for taking and restoring snapshots.


Windows not shown in Grub after installing 12.10

Well the error says it all, you have GPT standard so you must also add a BIOS-Boot or an EFI partition depending on the boot mode of your BIOS.

You can read about here..https://help.ubuntu.com/community/DiskSpace


Can someone explain to me what the CPIO flags are doing in this command: gzip -cd /boot/initrd-xxxxxxxxx.img | cpio -imd --quiet find . | cpio -co

-i and -o are essentially cpio commands for extracting files from (copy-in), and adding files to (copy-out), an archive.

The options are:

-c

Use the old portable (ASCII) archive format.

-d, --make-directories

Create leading directories where needed.

If your archive contains a/b/c/d/f, and the folder you are extracting to only contains a/b, then the a/b/c and a/b/c/d directories will be automatically created by cpio.
-m, --preserve-modification-time

Retain previous file modification times when creating files.

The -c option is presumably added for compatibility. The -m option means that the modification time of the file when it was archived is used instead of the current time. This may or may not be useful depending on the task. (For example, backups maybe expected to retain it, but it may not be needed if all you care is that you have a copy of the contents of the file.)

Have look at this somewhat-old Linux Journal article on cpio.


I waited for 10 - 20 seconds on that "cannot display this video mode" screen and then Ubuntu 12.04 desktop came up. this is because the default OS will be selected for booting after timeout if we do not disturb anything. (hands away from keyboard)

After logging in, I edited /etc/default/grub

In terminal:

sudo gedit /etc/default/grub

Uncomment the line (removed the #) for GRUB_GFXMODE=640x480 and save the file.

Again in terminal, I ran update-grub:

sudo update-grub

rebooted then and I could see grub!


How to install BSD ethernet driver in Linux?

I discovered a problem that is not related to the driver. I didn't have a router in my network, only a modem. So my ISP was probably limiting my IP addresses (not giving my Dell one). I am going to look into getting a router.


This is really lame, guys.
The problem was that I was plugged into a USB 1.1 in stead of a USB 2.0 connection. After making that correction and about 2 hours of fighting (violently) with Jackd, I am up and running!


WSJT software on 12.04 verses version 10

Not sure if it dropped out of the official repositories or you had a special PPA at the time, but I located what I believe is the program you're referring to.

https://launchpad.net/%7Ejnogatch/+archive/wsjtx

There is a release for 12.04 Precise there that you can download, and also instructions for adding their PPA to your apt list.


How to install additional language pack on Ubuntu GNOME 15.10

Yes, starting with Ubuntu GNOME 15.10 3.16+ there is now the option to install language packs through the UI rather than by having to install a third-party application.

For instance, if you wanted to install Korean (Korea, Republic of) you would open the gnome-control-center and go to Region & Language:

Which should take you to:

Then click Language:

Which should open:

After that click on the dots:

Then search for Korean, click on it in the results list and then click Done:

After that you should get several different dialogs which will allow you to see what will be installed and how much room it will take etc, just select the Install and Continue buttons and then enter your password in the password prompt, this will install all the things necessary for the Korean language pack on your machine.


VirtualBox under Ubuntu 12.04 has a problem in mounting an external USB-drive

Things you can try:

Ensure the drive isn't using OS-specific firmware that requires the execution of an application for mounting. This is a common feature on flash drive and Western Digital hard drives. In such a case, you should be able to disable this using the provided utilities.
Reduce the number of CPUs on the guest machine to one. As per one of the messages on the link at the bottom, this has helped some people access their USB devices on their virtual guests.
Check "Enable USB 2.0 (EHCI) controller" in the guest's settings. This has fixed quite a few problems for me personally, and is quite easy to miss in my opinion.
Add a USB filter for your storage device in your guests's settings. This will ensure only your guest can access that connection to your storage device. I've used this when performing app debugging on my Android phone.

USB Device not recognized


"Here tom got access to the folder test harry had since he is having the same uid of the old user."

That's precisely how the file system is supposed to work, if you've got the same UID as the old user then you are effectively the same as the old user.


First export your data as .csv file format like below:

F001,IC500
F003,IC501
F006,IC502
F008,IC503

Then run the below script to rename those directories to their new names:

while IFS=, read -a dirName; do
    echo mv -v "/singleFolder/${dirName[0]}" "/singleFolder/${dirName[1]}";
done < /path/to/file.csv

mv -v /singleFolder/F001 /singleFolder/IC500
mv -v /singleFolder/F003 /singleFolder/IC501
mv -v /singleFolder/F006 /singleFolder/IC502
mv -v /singleFolder/F008 /singleFolder/IC503

read -a used for splitting each line read into array based from IFS which I redefined that to comma,.
Each line reads into dirName variable.
With ${dirName[0]} we are getting the first part of the line(column A).
With ${dirName[1]} we are getting the last part of the line(column B).
mv command used for rename there.
So with mv -v "/singleFolder/${dirName[0]}" "/singleFolder/${dirName[1]}", we are renaming the name of directories from columnA to new-name in columnB which are located in singleFolder directory.
-v option shows what is being done during running the command.

Also you can use the command without making the content of line as an array like this:

while IFS=, read -r oldName newName;do
    echo mv -v "/singleFolder/${oldName}" "/singleFolder/${newName}";
done < /path/to/file.csv

Note: remove echo command to performing rename on your real directories.


Dynamically add new Terminator section for new program

You could use tmux. Here I describe how to start tmux with four panels.

In your case, you could use and adapt this script.

#!/bin/bash

session="mysession"

if tmux has-session -t "$session"; then
  "Session $SESSION already exists."
  exit 0
fi

# start ./startProgram1 here
tmux new-session -d -s "$session" mc

# start all other applications
# use -v for vertical split and -h for horizontal

tmux select-window -t "$session":0

# start ./startProgram2 here
tmux split-window -v nano

tmux select-window -t "$session":0

# start ./startProgram3 here
tmux split-window -h vi

tmux attach -t "$session"

The current behavior is


Get to recovery mode...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt,type sudo mount -o rw,remount / # to remount the disk r/w
now go and undo the changes that you made

Update #1:

The user restored the previously deleted /usr/share/gnome-shell directory, using a copy from the Ubuntu Live USB. User should check that the directory/file ownership is correct on the restored directory.


First of all check if the system can see your disk with the lsblk command. if it does you need to gather the volume name from the command in your case its sdb. And the partition you want is sdb2.

Then if the system does not see it, it means that you have to mount it.

Create a mounting point:

sudo mkdir /media/sdb2

Mount the drive:

sudo mount /dev/sdb2 /media/sdb2

Repeat for any other partitions you care to mount (examples: sdb1, sdb3)

To make these permanent edit your /etc/fstab file


What is Conky, it's uses, and how is it implemented?

Conky is a lightweight system monitor.  It sits wherever you put it in your desktop and tells you a bunch of system info like RAM usage, CPU, etc.  It can work in both Unity and GNOME Classic (not sure about GNOME3) and any Environment for that matter.

To install Conky, simply type sudo apt-get install conky in the terminal.  After the installation had completed, type conky in the terminal to launch it.

This is Conky with the Conky-Lua theme.

To make Conky start immediately after you turn on your computer, search for "Startup Applications" in the Dash, then type/usr/bin/conky in the Command Area.  Type Conky is Awesome for the Description.


If running sudo apt-get install -f didn't work then try just installing the dependency it complains about manually:

sudo apt-get install kde-runtime

For the second dependency error you can just do the same as it recommends and:

sudo apt-get install wine1.6

That should solve the issue. You can use apt instead of the apt-get part but they really do the same thing, apt might just have nicer colour-coding whereas apt-get is just plain.


(Ubuntu 16.04 LTS) "Try Ubuntu" menu is invisible, "Force UEFI Installation", and "grub-efi-amd64-signed failed installation /target/"

Ironically, I myself have discovered the way to fix the first problem about the invisible menu: Instead of using the F12 (The button for Acer laptops to choose boot device), change the boot device order via the BIOS menu. Now the menu will show, but in the black-and-white style instead of the one that has the Ubuntu logo graphics. I have yet to try and actually install Ubuntu, but it still gives me the "Force UEFI Installation" after the "install third party software" window.


"Soon" is a strange concept in something with supported releases, like Ubuntu.
16.04 is supported into 2020 so apt-get will be around as a primary tool at least until then.

As pure conjecture, it might be relegated to an alias (or something like that) one day but getting rid of it completely could cause significant scripting issues. A complete change of package manager seems just as likely.

So at this point in time, I'd be asking anybody spouting "omg it's deprecated" to cite their source. Or explain what they mean by deprecated.


EDIT 2019: Now it's much more easy to use Web Apple Music Players (see answers below)

EDIT 2018: I've installed it and it works (Ubuntu 16.04 and wine 2.16).

Install iTunes with Apple Music on Ubuntu :

Download iTunes 32-bits (Apple Music require a version >= 12.3) : https://secure-appldnld.apple.com/itunes12/031-24468-20150916-D642FEDC-5C68-11E5-8BC9-CC5C6DA99CB1/iTunesSetup.exe (source : https://discussions.apple.com/thread/7270928?start=0&tstart=0)
Follow iTunes setup installation (https://appdb.winehq.org/objectManager.php?sClass=version&iId=31322) :

  Installation:

  1) Setup wineprefix with WINEARCH=win32

  2) Leave configuration in Windows XP (for now)

  3) Install with winetricks: gdiplus, msls31 ie8, ie8_kb2936068 .

  If your winetricks is not able to install msls31 because of hash mismatch, just download .dll (it should be around 157 kilobytes) from any website (like filewatcher) and replace the existing one in windows/system32.
  ie8_kb2936068 is not necessary but it seems iTunes Store is not crashing every time with it.

I was not able to install ie8_kb2936068, it works well without.

  I do not recommend touching IE after installation at all, iTunes Store doesn't seem to work properly after that.

  4) After you've finished installing components, switch to Windows 7 and run the installer. Make use it's 32-bit.

Then run iTunes (you can find it on your dash now) and it should work =)

ORIGINAL 2017: Update, it is now supported : https://appdb.winehq.org/objectManager.php?sClass=version&iId=31322


Problems with Adobe Flash Player and Software Center

You can remove any package from the command line with

sudo apt-get remove [package name...]

Bash even completes the package names for you, when you press Tab. :-]

However, I don't think Adobe Flash has any influence on the Software Center. There seems to be another problem.

Also, Flash v9 is incredibly old and insecure. Use Flash 11 from the repositories instead.


Ubuntu installation with window 7 (no windows 7 shown)

To dual boot Ubuntu with windows 7, 8, 8.1 or 10;
Follow the following steps:

Download mini tool partition.( its free of cost and better than the disk management system of windows OS)
open Mini tool partition and create a 25-30 GB of allocated partition.i suggest you to take 25 GB of partition space.
Download Universal USB installer(this software is also free of cost)
Connect your USB drive to your computer and format it.
open Universal USB installer and select the Linux family and mount the Ubuntu.ISO image to the CD or USB drive.
restart your computer.
ass soon as you restart the device you will get a message on the screen
example: a) press enter to interrupt normal setup,
    b) press Del to enter into boot menu,
    c) or some other similar message.
after entering into the boot menu select the 'mass storage device from the list and hit enter'
Your Ubuntu setup screen will prompt select "install Ubuntu" from the list or "graphic install (if available)"
Immediately nothing will happen and take patience as this will take 2-5 minutes to start the setup after selecting the install option so please wait for the setup to run and do not eject the the USB drive from the computer. Many people think that their system did hang but actually it is not like what they think because setup take 2-5 approx minutes to run so don't worry and wait for a while it will definitely run after some time.
after all setup will start and follow the instructions.
the setup will ask you to select a choice out of two/three
a) erase disk and install Ubuntu,
b) Something else.
select b) something else and the setup will take you to the disk selection menu.

14.If you took the the partition of 25 GB double-click on the free space and then select "swap area" option from the list and enter the size: 3072 MB and press continue.

Now again double click the  free space partition and select the "ext4" and in the second box select the "/" option from the list and enter the size: 7168 MB
follow the same procedure again and make two more partition of "/boot" and "/home" both or each should have the size: 7168 MB
Press continue. If you are asked to provide a host name the just type "ubuntu" and proceed further.

The installation process of Ubuntu is much easy as compared to other distributions of Linux. But if still you you have any doubt or error while installing you can contact me or send me a mail at: mailrizvi786rediffmail.com


Not able to sign in Ubuntu One with "org.freedesktop.Secret.Collection" error

This is a bug in gnome-keyring. The fix is already in upstream, and I have initiated a backport process. The fixed package is also available in the PPA.


Search command in history from drop down list

Interesting question. It does not exist as far as I know,

BUT...

like always, it can be made.

The solution, what it is

If you run e.g. (on my system):

$ search_history aap

~/.bash_history is searched for matches:

[1] printf aap
[2] echo aap
[3] du -sh '/home/jacob/Bureaublad/aap'
[4] echo "een aap op een fiets" | awk '{ print $1 }'
[5] sudo chown root '/home/jacob/Bureaublad/aap'
[6] yad --entry-text=aap
[7] python3 -c "[print(round(float(n)), end=' ') for n in open('test2').read().split()]" > aap
[8] python '/home/jacob/Bureaublad/aap'

press the number of the line + ENTER to execute, or x to exit:

As the text sais, press the number to execute the corresponding command in the current terminal, or x to exit.

The setup

The script(s) need xdotool to "type" the commands into the terminal:

sudo apt-get install xdotool

Create, if it does not exist, the directory ~/bin
Copy script 1 into an empty file, save it as search_history (no extension) in ~/bin
Copy script 2 into an empty file, save it as type_command.sh (with extension)
Make both scripts executable
To "activate" the directory ~/bin in $PATH, either:

log out/in, or
run source ~/.bashrc

The script(s)

script 1
searches ~/.bash_history for lines, matching (containing) the searched string, creates a numbered list in the terminal

#!/usr/bin/env python3
import os
import subprocess
import sys

s = sys.argv[1]
lines = [l for l in open(os.environ["HOME"]+"/.bash_history").read().splitlines() if s in l]
if len(lines) == 0:
    print("no matches")
else:
    for i, l in enumerate(lines):
        print("["+str(i+1)+"]", l)
    nextact = input("\npress the number of the line + ENTER to execute, or x to exit: ")
    if nextact == "x":
        pass
    else:
        # not using try/except because if an error occurs, you might want to know the cause
        subprocess.Popen(["type_command.sh", lines[int(nextact)-1]])

script 2
types the corresponding command. This has to be another (second) script, since we need to exit the first script to be able to run the command inside the terminal, just like a typed command.

#!/bin/bash
sleep 0.2
xdotool type "$1"
xdotool key KP_Enter

Note

in case you'd prefer to skip duplicate- lines, change in script 1 the line:

lines = [l for l in open(os.environ["HOME"]+"/.bash_history").read().splitlines() if s in l]

into:

lines = [l for l in set(open(os.environ["HOME"]+"/.bash_history").read().splitlines()) if s in l]


Which paths are valid in a .desktop file?

It turns out, as one first commenter pointed, I can't use $HOME (or any environment variable) in a .desktop file. I have to use the literal path or a more elaborate command. And having copied the icon to /usr/share/pixmaps/eclipse.xpm, just writing Icon=eclipse is enough to create an icon. Therefore, my eclipse.desktop looks like this:

    [Desktop Entry]
    Name=Eclipse
    Type=Application
    Exec=/home/[my username]/opt/eclipse/eclipse
    Comment=Launches eclipse IDE
    Icon=eclipse

And it works!
Thanks to all who helped.


How can I customize a full-screen console background (TTY)?

I'm pretty sure that the Linux console driver does not have this ability built in, however there is an application called fbterm which can do this.  In order to make background images work, you will also need a utility which can display an image on the framebuffer such as fbi:

sudo apt-get install fbterm fbi

fbterm does not actually read or display background images itself, it expects some other program to set up the background image on the screen before it starts. There are instructions in the fbterm man page on how to do this using fbv, an absolutely antiquated and unsupported utility I couldn't even get to compile on a modern Ubuntu system. fbi is a much cleaner and nicer image viewer for the framebuffer, but unfortunately does not have the "set it and exit" functionality of the simpler fbv, and thus interferes with fbterm if you try to use it directly.  However, I was able to come up with an alternative which works:

First, you will need to use fbi and cat to display the image you want and then dump it to a "framebuffer raw format" image file.  As root, in a framebuffer console, run:

( sleep 1; cat /dev/fb0 > nifty-background.fbimg ) & fbi -t 2 -1 --noverbose -a nifty-background.png

(This will display the image for a couple of seconds and then exit, having saved the result in the file nifty-background.fbimg.  Replace nifty-background.fbimg and nifty-background.png with whatever filenames you wish, of course.)

The first part of the command waits for 1 second before catting the framebuffer contents to a file. At the same time, the second part (after the &) launches fbi to display the image on the framebuffer, so that when the cat command gets around to executing (1 second later), there's an image there to dump. The reason they're in that order is because I found that fbi had issues if it wasn't running in the foreground, which means it has to be the last command in the list.

From then on, whenever you want to run fbterm, you can start it like so (you may want to create a little wrapper script):

export FBTERM_BACKGROUND_IMAGE=1
cat nifty-background.fbimg > /dev/fb0; fbterm


The only Tex stuff that is Canonical supported is TeX Live...an as far as I can see there are no editors here...just libraries to allow working with stuff.  These libraries are the stable versions and not the latest version so are out of date.  Even TeX group recommend using their more up-to-date stuff.

However to answer your question no directly installable binaries...the closest you can get is to install TexLive, Install GnuEmacs, and then extend Emacs with AUC Tex

For a native WYSIWIG editor however you need to go outside Canonical and explore the multiverse, and in addition to those two you have mentioned you can get Winefish is simple to use, LatexZilla is associated with Gnome, TexStudio is derived from TextMaker, TexWorks is an editor that is included in some Mac and Windows versions of Tex Live, but not in their Linux packaging.


change switch windows shortcut failed. + Tab

For alternative, you can try using Ring Switcher which is CompizConfig plugin, the plugin offer switching windows with Alt + Tab key as default shortcut.

Make sure you have install CompizConfig first, to install, press Ctrl+Alt+T to go to a terminal and type:

sudo apt-get install compizconfig-settings-manager

Open CompizConfig, then select Window Management section on left pane. Search for Ring Switcher and enable it by ticking the checkbox.

NOTE: You might want to disable Super key (the Windows icon) on your keyboard, as the key will trigger unity dash to pop up.

How do I prevent the "Super" button from opening the dash?


If you don't insist on the workspace context specifically, there are Add-ons for Firefox that offer other methods to organize tabs.
One of them is Tree Style Tab. This Add-on offers a sidebar with a tree of your tabs. In that tree, you can organize your tabs in different sub trees, for example one sub tree per topic. The sidebar is offered in addition to Firefox' standard tab bar. You can hide the standard tab bar in your userChrome.css file (Add-ons don't have access to those things, so TST can't do that itself). But there are some disadvantages of this solution, so use it at your discretion. Additionally, there are a number of additional Add-ons that extend TST, so you can customize the functionality more.
Another concept are "tab groups". Some years ago, tab groups were quite a big thing in Firefox. But with the change to the WebExtension format for Add-ons the things that Add-ons can do have been stripped down quite a bit, so many tab group Add-ons can't offer the same functionality they used to offer. Nevertheless, there are still some around, like (arbitrarily chosen) Simple Tab Groups. Those may be worth a look as well. But I personally found it too easy to forget about the tabs I "hid away" in groups, so I like to keep them visible in TST's tree.


Compaq 6510b can't connect to wireless network on Ubuntu 14.04.1

Please obtain a temporary internet connection and open a terminal:

sudo apt-get update
sudo apt-get purge bcmwl-kernel-source
sudo apt-get install firmware-b43-installer

Reboot and tell us if the wireless is working as expected.

If the wireless switch is not working, please try:

sudo modprobe -r hp-wmi
rfkill unblock all
rfkill list all

Any improvement? If so, we will blacklist the module.

Please see this bug report about the same laptop and the same problem: https://answers.launchpad.net/ubuntu/+source/gnome-nettool/+question/183548

  Thanks Erin,the reset to default bios settings worked for me too!


How do I to create a live-USB with Unity 2D by default?

Steps taken from my more expansive answer on customizing a 12.04 LiveCD

Creating a custom 12.04 CD with Ubuntu-2D as the default using Ubuntu-Builder
1. Get Ubuntu Builder and your source ISO
Ubuntu Builder automates many of the preliminary steps that had to be done by hand (mount ISO, extract squashfs, create chroot, etc.)  It gives you Synaptic and a "graphical" chroot as well (Unity UI).
Download the latest version deb from here, and install with Software Centre or dpkg -i.
Also download the Ubuntu Desktop ISO you're planning to work with.
2. Ubuntu Builder Basics

Start Ubuntu Builder from the Launcher. I recommend you set all three fields to "Ubuntu" (like the actual LiveCD), because setting custom fields led to Software Center crashing. When you install, you can choose your own username, machine name, etc. as always.

Load your ISO; I loaded the 64-bit with the Local Disk option, although Ubuntu Builder should be able to download the ISO if you want it to.

The buttons on the right are self-explanatory. Console gives you a CLI chroot, while Desktop gives you a graphical one!, i.e. a LiveCD session itself (this one may take a while to load). Note that the Select DE/WM does an incomplete job sometimes, so it's better to install via apt-get/Synaptic.

3. Updating and setting Ubuntu 2D as the default

Note: All this can also be done from Synaptic if you are more comfortable with that.

You can edit the sources.list with the button (or via the console) to add your own mirrors, ppas, etc; you can then update all packages with sudo apt-get update and sudo apt-get (dist)upgrade

Set ubuntu-2d as the default shell: from the CLI chroot, run:
/usr/lib/lightdm/lightdm-set-defaults -s ubuntu-2d

4. Build, test and install!

Press the Build button in Ubuntu Builder to begin building the custom Live-CD ISO. UB automatically handles the cleanup, etc. that previously had to be done manually.

The ISO can be found in /home/ubuntu-builder; you can test it using the built-in QEMU, or in another virtual machine.

It can be "burned" to USB like the normal ISO, using Unetbootin (recommended), or dd.


problem installing dotnet cli on Ubuntu - can't remove old version of dotnet core

As is typical, I discover the solution not long after posting a request for help!

I found the solution here: https://github.com/dotnet/cli/issues/4088

To remove an older version of .NET Core, simply remove the folder you had added named "dotnet" on disk.  But then you must restart your computer.

From there, you can use the instructions listed here to install the latest .NET Core https://www.microsoft.com/net/learn/get-started/linuxubuntu


Check your download's authenticity/validity

md5sum amd-catalyst-13.12-linux-x86.x86_64.zip

2418a94b699fe8fdec01ccd32f684c90  amd-catalyst-13.12-linux-x86.x86_64.zip

If your sum doesn't match, you need to re-download the driver (which is what I suspect).

Download your driver

wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip

Unzip Driver

unzip amd-catalyst-13.12-linux-x86.x86_64.zip

Install Driver

sudo bash amd-catalyst-13.12-linux-x86.x86_64.run


How to allow a "standard user" (no sudo) make IP config changes without requiring admin password

You would have to be careful with this (especially if you specify the "NOPASSWD:" option.

access the sudoers file:

sudo visudo

Add the following line to the sudoer file:

user ALL = (root) {path/to/command}

I believe you could use this to specify a user (or users) that could run a specific command.

Source - http://www.unix.com/unix-dummies-questions-answers/127273-allow-user-use-specific-root-command.html

Full Disclosure - I have used this before (for other purposes). But I haven't tried to specify multiple users, or commands dealing with making changes to network interfaces.

Hope this helps


Yes, via SSH. Set up openssh-server on your computer to proceed. Next, have a look at this page to find the appropriate command to invoke the suspend. You could simply use sudo pm-suspend, however, this requires root priviliges.

Now, turn the suspend command into a Bash alias by adding the following to your .bashrc:

alias suspendnow='dbus-send --print-reply --system --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend'

Save, log out and back in again.

Now, if everything is set up correctly, you could run:

ssh user@computer -f 'suspendnow'

to initiate the suspend of your computer. Note, this might not work on a server, you'll have to use sudo pm-suspend instead of the fancy dbus method.


Try selecting back then going forward again?

Not sure if this would work but this happened to me with Ubuntu 13.10 and it worked for me.


Force ntpd to have offset from time server

You can create your own time standard on an isolated network that you control. This is a little kludgy. In order for this to work you must have all of your machines configured to only synch with the time servers you control. I have provided four possibilities. I think your best bet is the first or second depending on how strict your time constraints.

Remember for all of the following options you need to ensure that the server does not have a leap file and that none of the computers ask the outside world for the time.

ntpd reference implementation with Undiciplined Local Clock (Recommended/Easiest):

If you want to have an ntp server serve a time different from UTC this is pretty easy. Set the hardware/kernel clock to whatever faketime you need. Then configure ntpd to use the  Undisciplined Local Clock driver (127.127.1.x) and no external clocks. The ntp server will happily chug along and serve the local clock. The one problem is that since you are using the local clock driver the time will not be stable and will drift milliseconds one way or the other because that quartz crystal is no rubidium reference. If you need the faketime and stability; you need to use the option #2.
ntpd reference implementation w/ ULC and PPS source (Recommended/Stability):

Use the ULC described above and add a PPS source. Once you add the PPS source you will need to add the prefer keyword for the ULC entry in ntp.conf. This will mean that the server's clock is kept stable because the PPS source ticks off each second for you.
ntpd reference implementation with External Clock Discipline and the Local Clock Driver (Complicated):

This is still a solution that relies on using the ntpd reference implementation but I am not very familiar with it. All I can do is give you the link to more details:  http://www.eecis.udel.edu/~mills/ntp/html/extern.html
Jans - third party ntp testing tool (easier than #3 but unknown entity)

I have no experience with this product but I know of it from the ntp mailing list. It will allow you to server faketime but it does none of the clock discipline like the reference implementation. More info: http://www.vanheusden.com/time/jans/


Alt/Win key behavior not working on MacBookPro keyboard (for mapping ctrl to win keys and the usual ctrl keys)

Figured it out! The default of having the Dash set to the Mod4 key (Command key) apparently causes several problems (aside from annoying me).

I solved this problem by changing the key that triggers the Dash from the Command (Mod4) key to something else. In my example I used the F1 key but I think any single key should be fine.

Simply type the following in a terminal to change the Dash from Mod4 to F1.

 gconftool --set /apps/compiz-1/plugins/unityshell/screen0/options/show_launcher --type=string "F1"

Now when you select "map ctrl to the win keys (and the usual ctrl keys)" it should work as expected! And if you need access to the dash you can activate it by hitting the F1 key, 4-finger tapping the trackpad (on devices that support it), or clicking the ubuntu logo in the top left.

(Note: I am using Unity 3D)


Ubuntu security with services running from /opt

Ok, here's some security 101:

regarding the root account, Ubuntu is very much like any other Debian-based system, in that root has no password set, so you can't log in as root directly and have to use sudo instead. If you need to use su, you can start it with sudo su. More details on sudo
the fact that an executable is owned by root does not mean that it has to be run with sudo, any user with read and execute privileges is able to run such program. In fact, most programs in Ubuntu are owned by root, yet you can run gedit and stuff. The "effective user" of the running process will match the user who started the program, not who owns the executable. So, technically, you can run Apache and everything as your non-admin user, but there's one "if"...
as a security measure, in Linux systems a process can not bind to ports below 1024 unless its effective user is root. So if you want Apache to listen on port 80, it has to be started as root. Which is an obvious security issue. But you can run it on, say, port 8080.
To avoid security issues of running with root privileges, Apache and some other network services drop their privileges after binding to network ports, so it performs absolute minimum of work as root and then switches its effective user id to some pre-configured user with very minimal privileges (no password, no login shell etc.) Effective user and group are set in the application's configuration files (User and Group directives in httpd.conf in case of Apache)
some other services can't drop their privileges so they have to be started as a non-privileged user from the boot scripts.
When you install packages from Ubuntu repositories, they usually create restricted user accounts for each service (mysql, postgres etc.) and configure the services to each run with their own effective user. This is considerably safer than running services as the user you log in with.


How to increase Scrollback lines in Ubuntu(14.04.2) server edition?

The best option would be to use a terminal multiplexer like screen or tmux, which are easier to configure.

The other way would be to configure the framebuffer console, by editing /etc/default/grub and changing GRUB_CMDLINE_LINUX to include fbcon=scrollback:<value>[k], where <value> is the size in kilobytes you want to assign for the buffer. From the kernel docs:

C. Boot options

         The framebuffer console has several, largely unknown, boot options
         that can change its behavior.

1. fbcon=font:<name>

        Select the initial font to use. The value 'name' can be any of the
        compiled-in fonts: VGA8x16, 7x14, 10x18, VGA8x8, MINI4x6, RomanLarge,
        SUN8x16, SUN12x22, ProFont6x11, Acorn8x8, PEARL8x8.

    Note, not all drivers can handle font with widths not divisible by 8,
        such as vga16fb.

2. fbcon=scrollback:<value>[k]

        The scrollback buffer is memory that is used to preserve display
        contents that has already scrolled past your view.  This is accessed
        by using the Shift-PageUp key combination.  The value 'value' is any
        integer. It defaults to 32KB.  The 'k' suffix is optional, and will
        multiply the 'value' by 1024.

If 32KB isn't sufficient, try 256k. Or some other value. Trial and error, I guess.


Shellscript creating directories in wrong direcroy when running from crontab

When you are in the directory ~/test/basic_unix and invoke your script, your mkdir "$createdep" command creates that folder in ~/test/basic_unix because that's the current directory, that's where you ran the script from. However, when you run that script from cron, the directory you start with is your home directory, ~, so your mkdir command creates the folder there.

Your confusion might be because you think that since your script is under ~/test/basic_unix/createfiles.sh, then the folders will always be created there, but that's incorrect. It's not about where the script is located, it's about where you run the script from. To give you an example, make a directory ~/testing2, then cd ~/testing2, then call your script using sh ~/test/basic_unix_createfiles.sh. You'll find that your folders are being created under ~/testing2, not ~/test/basic_unix. Why? Because that's where you ran the script from, and since your mkdir command is using a relative path, i.e. since your mkdir command is like this: mkdir foldername, it creates it in working directory.

To fix your problem, the easiest way is to cd to where you want to create the folders at the very beginning, so your script would look like this:

#THIS CODE WILL CREATE A DIRECTORY WITH TIME OF CREATION AS PART OF DIRECTORY NAME
 cd /home/adhikarisubir/test/basic_unix #this is the new line added, the rest is the same
 echo "The time is $(date +%H_%M_%S)"
 now=$(date +%H_%M_%S)
 echo $now
 echo $(pwd)
 createdep=nowt_$now
 echo "$createdep"
 mkdir "$createdep"
 cd nowt_$now
 echo "Current directory is $(pwd)"
 echo "This is a text file which will contain the createtime" > Newtxt.txt
 sed -i "s/createtime/$(date '+%H:%M:%S')/g" Newtxt.txt

Another way to fix your problem is to change your mkdir command to use an absolute path. So your script would look like this:

#THIS CODE WILL CREATE A DIRECTORY WITH TIME OF CREATION AS PART OF DIRECTORY NAME
 echo "The time is $(date +%H_%M_%S)"
 now=$(date +%H_%M_%S)
 echo $now
 echo $(pwd)
 #createdep=nowt_$now
 createdep=/home/adhikarisubir/test/basic_unix/nowt_$now  #createdep is now an absolute path
 echo "$createdep"
 mkdir "$createdep"
 #cd nowt_$now
 cd $createdep #this cd command now cds to $createdep
 echo "Current directory is $(pwd)"
 echo "This is a text file which will contain the createtime" > Newtxt.txt
 sed -i "s/createtime/$(date '+%H:%M:%S')/g" Newtxt.txt

It's better to always use absolute paths, so always use /home/adhikarisubir/test/basic_unix instead of saying test/basic_unix.

Note: I'm assuming your home directory is /home/adhikarisubir.


Try this

sudo apt-get update && sudo apt-get upgrade

Finally, you can run

 sudo apt-get install *packagename*

Make sure you are connected to the Internet first.


First, make sure yours are set into pairing mode. Read the headset manual to find how to do so.

To open a terminal, press Ctrl + Alt + T
Now, type bluetoothctl in terminal, you should see the available bluetooth devices

[NEW] Device a1:b2:c3:d4:55:f6

To pair with the headset, type

pair 00:12:D0:01:F4:E5

Once paired, connect to the headset

connect 00:12:D0:01:F4:E5

Open Settings > Sound and check sound options to see if you are using the correct output device(headset).


I tried to install Netflix on Ubuntu 20.04 and now it gives me some errors

Ign:1 http://ppa.launchpad.net/ehoover/compholio/ubuntu focal InRelease

Was Ign(Ignored) Because this repository does not have a Release file.

thare is no isue with Netflix.

You need to remove repository. Follow below commands to remove.

sudo add-apt-repository --remove ppa:ehoover/compholio
sudo apt auto-remove
sudo apt update

Now, You don't face that error again :)


There is no direct upgrade from 13.04 to 14.04, but you can always upgrade to the last version by upgrade to all the intermediate versions.

This can be a long process, certainly if you were at a lower version than 13.04. But what you have to do, this to first upgrade to 13.10 and then upgrade to 14.04.

Note that if you have had a LTS version, like 10.04, 12.04 or 14.04 you can do the upgrade directly to the next LTS version (so upgrading directly from 12.04 to 14.04 would be possible, from 12.10 to 14.04 would not be possible directly).


Can't run Minecraft with Ubuntu or Wine since update to 14.04

I followed the instructions from this YouTube Video: How to get Minecraft on Ubuntu 14.04

To update Java:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

To install Minecraft:

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

But the kernel issue is still a mystery.


Zend Studio-5_5_0 not open in ubuntu 13.04

You'll need to make it executable. This is just a simple permission flag. Either:

chmod +x filename
Right click it, Properties, Permission tab, check the executable box.


Remove titlebar from maximized terminal window

This should do what you want:

Copy and paste this into your favourite text editor:

#! /usr/bin/python
from gtk.gdk import *

w=window_foreign_new((get_default_root_window().property_get("_NET_ACTIVE_WINDOW")[2][0]))
state = w.property_get("_NET_WM_STATE")[2]
maximized='_NET_WM_STATE_MAXIMIZED_HORZ' in state and '_NET_WM_STATE_MAXIMIZED_VERT' in state
if maximized: w.unmaximize()
if w.get_decorations() == 0 :
    w.set_decorations(DECOR_ALL)
else:
    w.set_decorations(0)

if maximized: w.maximize()
window_process_all_updates()

save in your home folder with the name decoration.py

Add execute permissions:

chmod +x ~/decoration.py

Create a keyboard shortcut:

For the shortcut in the picture - maximize your terminal and type ALT+y to remove the window decoration in the terminal.


Solved by uninstalling amdgpu via ./amdgpu-uninstall in the file directory. Which I do not remember but it can be found by searching for "amdgpu" in files.


How can i set exceptions for Metacity/GNOME window-styles?

This has already been answered here.

Shortly: Its actually the other way round. You don't tell gnome to skip firefox, you tell firefox to skip gnome.


Bridging eth0 and vboxnet0 and using ISC DHCP server to provide dynamic IPs

This is fixed. For anyone interested please see the details below.

Install bridge-utils.
sudo leafpad /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
dns-nameservers 10.228.129.113 10.228.129.114

sudo leafpad /etc/rc.d/rc.local

vboxmanage hostonlyif ipconfig vboxnet0 --ip 192.168.0.3 --netmask 255.255.255.0

brctl addbr br0

ifconfig eth0 0.0.0.0 down
ifconfig vboxnet0 0.0.0.0 down

brctl addif br0 eth0
brctl addif br0 vboxnet0

ifconfig eth0 up
ifconfig vboxnet0 up
ifconfig br0 192.168.0.1 netmask 255.255.255.0 up

/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables --append FORWARD --in-interface br0 -j ACCEPT
/sbin/iptables --table nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE

restart isc-dhcp-server

exit 0

sudo leafpad /etc/default/isc-dhcp-server

INTERFACES="br0 eth0"

Restart your computer


I solved the same issue.
First, to go your PWgui folder installation,
mine
cd PWgui-6.1
then type a command
./pwgui to launch.
Good luck!
ss pwgui


I have found the solution on my own.

In /etc/apt just create the following directories:

apt.conf.d, preferences.d, sources.list.d, trusted.gpg.d
or sudo mkdir apt.conf.d sources.list.d trusted.gpg.d

It will do the job.

Regards


Ubuntu corrupted when apt-get install and remove python 3.5.0

Because bash uses spaces to divide the command line into arguments (read man bash), you really did:

 sudo "apt-get" "remove" "python" "3.5.0"

that is, remove two packages "python" and "3.5.0". Many packages (see list below) depend on python, and can not work without it. Therefore, if you are removing python, you must also remove (See list).

Please read man apt-get, and Understand commands, especially commands using sudo, Before you execute them.

If you don't understand the command, some one else could tell you (in unexplained computer jargon) "Aim at foot. Fire!", and you, not understanding, would do it. Many people do.


Maybe this happened because you were running it from a terminal emulator, if you want to delete all your history (be wary), you can try to delete directly the file which log it:

rm ~/.bash_history


Can't change brightness after disconnecting second monitor

Intel graphics? Thent this is probably a known bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1308674

I found that updating the kernel helped to resolve that particular issue, but it comes at the expense of the screen not being able to be fully black, anymore.


My Thinkpad X201 battery is draining extra fast. What can I do?

You could try installing powertop, it is a console application.

sudo apt-get install powertop
sudo powertop

It will monitor your machine for a few seconds, then tell you what is likely causing the power drain.  You can then use it to try and make your machine more efficient.

Hope this helps.


Fullscreen Hulu in Firefox minimizes when I browse on another window

Leaving full screen mode when focus changes is a feature of the Flash plugin under Linux.  There is no setting to change this behaviour, and it seems likely that it won't ever get fixed given that Adobe is pulling back on development of the plugin.


Do "package" and "application/software/program" mean the same thing?

Note: This answer is restricted to Ubuntu/Debian.

In general, no, they do not mean the same. A "package" is like an installer; it's a DEB file, much like MSI files in Windows.

Unless the application is relatively small, it will usually be assembled from multiple packages, with each package containing one (sometimes more) components of the program. These components can be binaries (executables), libraries, help files (man pages) and even source code.

Conversely, some packages will install multiple small programs (binaries), and others will "collect" multiple related programs under one umbrella for ease of installation (meta-packages), but these are the exception rather than the rule.

In short: since most programs are made up from more than one package, they are not the same. :-)


Strange characters (^[[A) on Cygwin command line when I SSH into a Ubuntu VM

You appear to be running the dash shell (/bin/sh is a symbolic link to dash in the standard Ubuntu install). The default dash shell does not include support for inline editing or command history, so the arrow keys are not bound to the familiar edit/history functions and just appear in the terminal as raw keycodes.

Try changing your Ubuntu user's login shell to bash

chsh -s /bin/bash

and then starting a new SSH session.


Can't boot using 5.3.0 kernel after upgrading to 19.10

I've just updated to 19.10 and had similar issue. It didn't started successfully after the automatical revoot triggered by the system update.

I restarted, chose advanced options in grub and continued with the previous kernel version (was something like 5.0.0....)
When it started I run:

sudo apt-get upgrade

It failed and asked me to run:

sudo dpkg --configure -a

manually, because of unfinished configuration.

That is what I have done and after:

sudo apt-get upgrade

finished successfully I was able to restart normally.

Hope this can help somebody else who faces the same problem.


The problem here is that Thunderbold apparently can only be successfully updated when a Thunderbold device is connected to the computer. Thus, connect a Thunderbold device and try again.

No Thunderbold device available and annoyed by the pop-up? Then disable the service that checks for firmware updates:

sudo systemctl disable fwupd

To reverse the change, enable the service again:

sudo systemctl enable fwupd


How to Install Logisim on Ubuntu (version Ubuntu 20.04 )

Logisim runs on JDK/Java run time environment. Logisim should run on any platform supporting Java, version 5 or later. Logisim requires Java 5 or later.
Just follow these steps:
So firstly install Java by using these commands:
sudo apt update
sudo apt install default-jdk

Then check your java version:
java -version

Output :
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

Then download Logisim from whatever you want.
Again follow these steps -

Right-click on Logisim Jar file.
You will see "Open With OpenJDK Java 11 Runtime". Click on it.
Logisim will run.


There is gThumb app which has a simple and modern UI like your example.
You can install it with apt basically:
sudo apt install gthumb


How do you change udev rules without restarting (e.g. to change eth1 to eth0)?

I ended up going with option #1 (dynamically rewriting the various config files that needed ethX). This was easy to do with a simple Ruby script.

If the script doing the dynamic rewrite is startup.rb, I created a wrapper called startup-wrapper.rb that calls the actual script with exec 'sudo startup.rb' so that startup.rb runs with root permissions.

I then created an entry in Startup Applications with the following command: gnome-terminal -e /path/to/startup-wrapper.rb. This will prompt the user for their password for the sudo on boot.