Repairing Windows 8 Installation via Ubuntu

That is not a Partition problem. It just means that Windows 8 was closed in a unsafe way (Power down while using Windows, You hibernated or suspended the Windows 8 session or any other option than shutting down Windows the normal way).

In Windows 8, Microsoft introduced a "new" feature when shutting down that it actually not shutdown the PC but hibernated it. The feature is called "Fast Start Up" which is fancy words for "You are not actually shutting down but hibernating".

What Hibernating does when related to a Linux system is that it tells Linux, in this case Ubuntu that the partition is not save to write to. So to avoid problems, Ubuntu does not let you mount the partition until it has been properly shutdown. Hibernating creates a "state" of how Windows was the moment you tried to turn it off.

So any change you make will be erased as soon as you start Windows again (Because of the hibernation)

If you are experiencing one of the following issues:

Loosing Data when copying from Ubuntu to Windows 8 after shutting down Windows 8
Can not access your Windows partitions from Ubuntu getting a Disk contains an unclean file system

This is most likely the cause of an option in Windows 8 called Fast Startup which behaves similar to hibernation and keeps a snapshot of the system so when you boot up, it will load faster. Since it keeps a snapshot, anything you copy or change in Windows 8 from Ubuntu after doing the fake shutdown will be lost (Apart from other issues found [HERE][12]).

As taken from Installing Ubuntu Alongside a Pre-Installed Windows with UEFI

The solution in Windows 8 is to go to:

Control Panel --> Power Options --> Choose what the power button does

In here click on "Change settings that are currently unavailable" where you should see something like this:

Uncheck the option that says "Turn on fast startup"

After this, you can shutdown Windows correctly and this will set the bit that tells linux that it was properly shutdown. Since hibernating was not done this time, you will be able to mount and read/write the partition between both systems.

NOTE: Forcing to mount the Windows system might create more problems with your Windows system.

Forcing Windows 8 Partition to Mount (Warning: You will loose hibernated Data)

There is an option I normally try to avoid which forces mounting Windows 8 but with the problem that you will loose all hibernated data. If you don't care what you hibernated, then keep on going.

We use the remove_hiberfile with the ntfs-3g command.

eg: sudo ntfs-3g /dev/sda1 /mnt -o remove_hiberfile

eg: sudo mount -t ntfs-3g -o remove_hiberfile /dev/sda1 /mnt

The remove_hiberfile will remove any hibernated data (The hibernate file) from Windows. So be warned.


How can I partition a usb flashdrive in Win7

Normally you can't create two or more partitions on one single USB, however if you use unetbootin to install the Ubuntu image, there should be a persistance option, allowing you to store things in that persistance partition. Henceforth if you boot the live USB again you won't lose your data.


How to creat a symbolic link to all files with a specific extension from a specific directory using a shell script?

did you mean:

for conf in /etc/*.conf
do
    ln -s "$conf" /root/links/
done

?


I would have to say there are errors between the different version files. There may be other possibilities, but I would say a reinstall of the preferred version. Hope you had backups. Good Luck


How to remove a deb without removing its dependencies

Use dpkg directly, not apt-get or aptitude:

sudo dpkg -r --force-depends "packagename-version"

or

sudo dpkg -r --force-depends "packagename"


Is it possible to find drivers for Intel Cedarview graphics controller to work with Ubuntu 11.04?

CedarView driver is only available for Ubuntu 12.04.
It's also worth mentioning that 11.04 has reached End of Life last month (Oct 2012). Thus, I'd recommend installing 12.04 both for the driver and for support.


I solved my problem by these sites.
Problems with Chrome browser after suspending the computer on Ubuntu 20.04
Chrome causing weird flickering since upgrade to 85.0.4183.83
chrome://gpu/


Any command to set/update static IP address (no hack)?

Use nmcli.

Show the available connections:

nmcli connection show

Show the current settings for connection with UUID 9fe88459-efaf-45bd-8958-ca1e202d04fd:

nmcli connection show uuid 9fe88459-efaf-45bd-8958-ca1e202d04fd

Set the IPv4 address for this connection:

nmcli connection modify uuid 9fe88459-efaf-45bd-8958-ca1e202d04fd ipv4.addresses 192.168.1.5


With Adminer.php I get a Access denied for user 'root'@'localhost' error. Ubuntu 18.04

This solved my problem - can't login as mysql user root from normal user account in ubuntu 16.04

I'm using Ubuntu 18.04 and so these instructions work for me.


Execute the following command in a Terminal:

glxinfo | grep '^direct rendering:'

If in the result shows Yes, then you have 3D acceleration, and hence OpenGL.

If glxinfo is not installed in your system, then install it first by executing the following command on a Terminal:

sudo apt install mesa-utils

Here is the output of my terminal installing mesa-utils and executing the command I told you before:

galoget@hackem:~$ sudo apt install mesa-utils
[sudo] password for galoget:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mesa-utils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 31,9 kB of archives.
After this operation, 125 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu artful/universe amd64 mesa-utils amd64 8.3.0-5 [31,9 kB]
Fetched 31,9 kB in 1s (24,2 kB/s)
Selecting previously unselected package mesa-utils.
(Reading database ... 161837 files and directories currently installed.)
Preparing to unpack .../mesa-utils_8.3.0-5_amd64.deb ...
Unpacking mesa-utils (8.3.0-5) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up mesa-utils (8.3.0-5) ...

galoget@hackem:~$ glxinfo | grep '^direct rendering:'
direct rendering: Yes

Hope it helps.


Flashing Ubuntu ISO to USB stick with dd: recommended block size

My standard dd block size is bs=4096

Some years ago I tested different block sizes, and found that bs=4096 is a good value for most cases. It made no big difference to increase the block size to higher values. If I understood correctly, it was also the value used by several programs (cat, cp etc). This is the block size used for dd under the hood in mkusb.

Things may have changed since I tested different block sizes, but I think the speed in your case is limited by the flash memory hardware. A fast USB 3 pendrive or fast memory card will be 5 times faster (~25 MB/s) even when connected via USB 2. See this link and links from it,

help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed

So you can continue with bs=1M or use bs=4096.

If you wish, you can try some different block sizes, but do not expect any big improvement. Please come back and report the result, particularly if you find a major improvement. In that case it is also important to specify the hardware and the operating system (version of Ubuntu).

Edit: New test

I tested again, with current Lubuntu 16.04 LTS versions, and computer hardware of different kind and age, as described in the following table and graphs.

Test details

The test was run with a shell-script, that for each block size wiped and synced the first Gibibyte of the target USB pendrive (overwrote with zeros), then cloned and synced from a Lubuntu iso file (which is slightly smaller than one Gibibyte, so within the wiped part of the pendrive).
In all cases a pure dd command line was used (no piping via pv or similar commands).
Most tests were run from Lubuntu 16.04.2 LTS amd64 system (with a yakkety kernel) installed in an SSD, but the tests in an HP xw8400 workstation were run with the installed Lubuntu 16.04 LTS i386 system (with a xenial kernel) in an internal HDD.
'Extreme' and 'Cruzer_blade' are Sandisk USB pendrive models
'drive port' is where the target USB pendrive is connected
'os port' is where the SSD or HDD with the operating system is connected
More details are listed in the following table, and the variations due to the block size are illustrated in the following graphs with log (block size) along the x-axis because of the character of the range of block size values,

512 (default)
4096 (4K)
65536 (64K)
1048576 (1M)
4194304 (4M)

Conclusions

The default block size, bs=512 (bytes) makes dd slow.
Cloning with block sizes from bs=4096 to 4M run at 'full speed'. There are only minor differences between the test cases (except for bs=512).


Can't adjust trackpoint speed on Lenovo T450s with 18.04

Device id=11 is covering both touchpad and trackpoint.

I had similar issue on Dell and xinput helped me.

First do xinput --list-props 11, it will show you properties of that device.
Then find the property you want to change and change it with (this is my case, yours will be different)

xinput set-prop "DualPoint Stick" "libinput Accel Speed" -0.5

where "DualPoint Stick" is name of the device (Ps/2 Synaptic Touchpad in your case) and libintput accel speed is name of property I wanted to change.

Then I put this commmand to ~/.xinitrc and it is applied automatically.

Note - don't use deivce number in the command, but rather use device name, because ID can change when you connect other peripherals.


I solved the problem by creating a file inside my /etc/MBRbackup directory

dd if=/dev/sda  of=/etc/MBRbacku/MBR bs=512 count=1


How can I protect my data when lending my computer to someone?

You are correct. Someone could still access your data through a livecd. You should take a look into encrypting your home directory. They ask you to do it when you install ubuntu but you can also do it after the fact. Here is some information to help you: https://help.ubuntu.com/community/EncryptedHome

The information on that page is good for Ubuntu 8.10 and newer.

Basically you need to do this

1) Make sure you have ecryptfs-utils (sudo apt-get install ecryptfs-utils)

2) Add a new user with an encrypted home - (sudo adduser --encrypt-home)

If you have any more questions or run into problems just reply :)


How can I get involved in the Ubuntu Ayatana team?

Most open source projects, or projects that are otherwise open to third party contributions will publish some sort of development guidelines.  These are all different for each project and controlled by the project maintainers.  You'd need to look through information posted for any particular project to find out how to contribute.

In the case of Ayatana, the main page is located here.  From which you can choose browse a project like the notify OSD, which has it's development guide posted at this page.

  Please realize that some of these pages may be out of date.

In the case of Ayatana projects, it looks like all of the development is taking place on Launchpad using the Bazaar VCS.  So grabbing a copy of the source and committing your changes to the VCS will be a good start.  You'd then be able to submit those changes via Launchpad.


vsftpd - GnuTLS error -15: An unexpected TLS packet was received

I tried adding a line to my configuration file. Open the config here:

sudo nano /etc/vsftpd.conf

And put this line at the bottom:

allow_writeable_chroot=YES

Afterwards, restart the service:

sudo service vsftpd restart

That fix it for me.


How can I install photoshop CS6 on Ubuntu 16.04 LTS?

You can install it through PlayOnLinux.PlayOnLinux in ubuntu software center
You can download playonlinux from ubuntu software center.


That file belongs to the xserver-xorg-input-synaptics package. Simply reinstalling will put it back in place:

sudo apt-get --reinstall install xserver-xorg-input-synaptics

alternative:

sudo aptitude reinstall xserver-xorg-input-synaptics


How do I change Clementine's play/pause indicator icons?

first of all sorry for my English, regarding the icons...
I think that those icons are in the original source (no binary) in the "data" folder (tiny-pause.png and tiny-start.png)

You should download the source, here is the link:

git clone https://github.com/clementine-player/Clementine.git && cd Clementine

And here you have a little instructions to compile it:

https://github.com/clementine-player/Clementine/wiki/Compiling-from-Source

Kind Regards.

Roman.


First, I need to explain how encfs works. It basically uses 2 folders:

a rootdir folder where the encrypted data is stored (for example ~/encfs/.encrypted). It is a fully normal folder, just the data can't be read directly.
a mountPoint folder where the decrypted data is visible. This is the one you use (for example ~/encfs/clear). It is not a typical folder, more similar to a thumb drive.

Every modification that you make in the mountPoint is encrypted by encfs in the rootdir.

If you want to remove the data from encfs' control, you just need to move the files out of the mountPoint to another folder. Encfs will just consider that you have removed the data and will delete the corresponding files from the rootdir.

Then you probably want to get rid of the rootdir and mountPoint folders. The first step is to unmount the mountPoint:

fusermount -u ~/encfs/clear

After that, only the rootdir will remain. You can then simply remove the emptied (good idea to check first if it's really empty) folder ~/encfs/.encrypted.


Firstly, SCJAM is not a copy of GoPro. It is a Chinese manufacturer of miniature cameras, and one of their product lines are cuboid cameras.

I've spent 50+ hours going through reviews and eventually decided to go for their top model - SJCAM SJ5000+ Ambarella (with Panasonic's "Ambarella" processor), because it is almost as good as GoPro Hero 4 Black and 4 times cheaper. When I say "almost" I mean "white balance is slightly different - in my view better, and slightly worse video stabilisation". And yes, housings of the SJ**** line are compatible with GoPro mounts for a reason - GoPro has the largest number of available mounts. Worth noting that "SJ****" is a fake of "SJCAM SJ****".

With that out of the way... I've got Ubuntu 14.04.02 LTS, clean install with no extra drivers, software, etc., and my SJCAM SJ5000+ Ambarella with software ver. 2.4 mounts with no problem as "storage" (set up on camera end). Ubuntu recognises it with no problems.

I'd suggest: firstly check if you have a microSD card in the camera. Is not the camera itself that the OS mounts but the microSD card.

Secondly, I'd perhaps upgrade packages - just in case. In terminal type

sudo apt-get update && upgrade

Finally, it is time to see what devices plugged into all USB ports your computer can see. In terminal type:

lsusb

And check if you can see a line with no micro-controller description. This will be the SJCAM. For example mine looks like this:

me@mylaptop:~$ lsusb
Bus 002 Device 003: ID 8087:07da Intel Corp.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0c45:644a Microdia
Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 4255:1000
Bus 003 Device 002: ID 046d:c077 Logitech, Inc.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As I experimented by pluging in and out the camera, the one you should be looking for is the one without description (4255:1000).

Please post the result.


I had the same problem. When I started nemo from the command line (first killing it with nemo -q) and tried to open "trash", I got the following message:
Nemo-Share-Message: Called "net usershare info" but it failed:
  »net usershare« gab den Fehler 255 zurück: info_fn:
  file /var/lib/samba/usershares/comics is not a well formed usershare file.
info_fn: Error was Path is not a directory.

I had created a share which I deleted later without un-sharing the folder.
Solution: looked in the given file "comics" for the original path, created the folder again, shared/unshared and deleted it. => "trash" is working again :-)


No command is working, edited .bashrc file

In your current shell, reset a basic working path: PATH=/bin:/usr/bin

Then edit your .bashrc. Make sure when you're assigning to your path, that you don't make one of these mistakes:

use a dollar sign on the left hand side: $PATH=/foo:... # don't do this
allow spaces around the equal sign: PATH =/foo:... # don't do this


How to enable systray Quickstarter in libreoffice 6

The Quickstarter is deprecated, as of libreoffice 5.4.  From what I can gather, it was finally removed in version 6.1.  I was sad to see it go as well.  Like you say, it sped things up quite a bit, especially on slower hardware.  I guess I should really be upgrading some of my 1990's hardware... :)

In all seriousness, I think the answer is basically no, you can't use the quickstarter, unless you want to design some kind of custom script that would run the soffice app in the background somehow without opening a window, while still allowing libreoffice windows to open...  Alternatively, you can simply put libreoffice in your startup applications and simply leave the basic window open on different workspace.  Yeah.  Annoying, but I'm afraid that's the best you'll get.


You could install programs like strace, and it's family of tools. That way you could run 'strace ./GASS_NCBI' and see all the library calls being made to see if it is just choking on something.


install some package on ubuntu 14.4 LTS shows error

Try apt-get install -f. If this still gives the error of the dependencies then I guess you will have to remove and reinstall the package.


How do I set the font used by Fontconfig for generic font family names?

Try this config file:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Roboto</string>
        </edit>
    </match>
</fontconfig>


I imagine the phone is using the wrong type of USB connection by default. Try dragging the notification bar down and then clicking on the USB settings to see what the options are. Usually, changing the connection type should be enough to allow your computer to see it.

Edit: I don't have enough reputation to comment so I'm editing this...

Have you tried looking at the USB settings as mentioned above? Do you see options like "connect via MTP" or "connect via PTP"?

To transfer files, you need to use MTP. I'm guessing your phone is trying to use PTP by default.


How do i get my wireless to work on a dell inspiron 6000?

Open Update Manager
Open Settings
Go the the Additional drivers tab.
Check if a Broadcom proprietary driver is offered. Install it.
Reboot.

If that doesn't work, try following these instructions.

In short:

Identify your card by typing in a terminal lspci -vvnn | grep 14e4
Check which driver is suitable for you from this list
In your case (BCM4318) you need the b43 driver
Open a terminal (Ctrl + Alt + T) and run sudo apt-get update followed by sudo apt-get install firmware-b43-installer
Reboot.


Check to see if the python environment is matching (i.e. run "which python" in VSCode's terminal or see options in the interpreter dropdown). It might very well be the case that VSCode is pointing to a different instance of the interpreter, which doesn't have numpy installed.
VSCode-specific solution: o select a specific environment, use the Python: Select Interpreter command from the Command Palette (Ctrl+Shift+P).
Extra mention for other people stumbling across this question: This is quite a generic issue if you have a mixture of barebones python, anaconda/miniconda plus almost any IDE (what you describe happens on Pycharm as well). The solution always boils down to making the IDE point to the correct interpreter/environment.


I've found the solution!!

I'm translating from spanish, maybe the things has diferents names in your desktop.

"system config" > "applications view" > "fonts type"
Enable "smoth borthers"
Choose "configure"
Use subpixels with RGB and soft "hinting"


The transparent window is as a result of Gnome PPA, remove it from Software and Updates and run sudo apt-get update then log-off and login again.

if you like to know with more thorough answer, go here


No. I'm being logged out! All windows are gone. Firefox want to recover. Dropbox restarts. If that isn't a new login then I don't know what it is.
I'll have to recheck but I already turned off settings->power-iautomatic suspend.


Open terminal and run command, from the command line

Your initial command, gnome-terminal -- 'echo "foo" | bash', attempts to run a program named literally echo␣"foo"␣|␣bash, which you most likely don't have on your system.

The correct syntax would be gnome-terminal -- sh -c 'echo "foo" | bash', but it would not help, unless you actually have an executable named foo. You can see that the syntax is correct by trying

gnome-terminal -- sh -c 'echo "date; sleep 2" | bash'

But this is just a very complicated way of saying

gnome-terminal -- bash -c 'date; sleep 2'

As for the intended command, it probably should be

gnome-terminal --tab -- bash -c 'ts-node /home/oleg/codes/typeaware/doc-gen/lang/typescript/api/src/.test/express.test.ts'


Recovery files which removed by rm command Ubuntu 14.04.2 LTS

Firstly you should not use OS until the files will be restored, because your data which still present in disk may be overwritten. You should use live-cd/live-usb (maybe Ubuntu DVD) for data recovery and save files on different disk. If data is really valuable you should make image your disk (byte-by-byte copy), and work with them:

dd if=/dev/sda1 of=/home/user/image.bin bs=1048576

where /dev/sda1 is partition with data, /home/user/image.bin - name example for disk image file. You should be sure that disk image file will be located in another disk or partition.

No simple ways to undelete files removed by rm if your file system is ext2/3/4.

If you filesystem in ext2/3/4, see this:
https://superuser.com/questions/171673/how-to-recover-files-from-linux-ext4-harddrive

You can try extundelete:
https://unix.stackexchange.com/questions/122305/undelete-a-just-deleted-file-on-ext4-with-extundelete

If this does not give the desired result you can use TestDisk:
http://www.cgsecurity.org/wiki/TestDisk


Tried Ubdating Kernel; Now, Desktop won't load on startup

If your /lib/modules/$(uname -r)/modules.alias is less than 100 bytes, that is the problem: Kernel module installation was broken, so the hardware is detected incorrectly. Use an older kernel. If you fix the modules problem with a new kernel, tell me how ;)

Otherwise, if the file is big, please disregard this answer.


Simple Scan : no scanners available, Ubuntu 15.04

You need a driver for your Samsung SCX-3205W

Open an terminal and enter the following:

sudo echo "deb http://www.bchemnet.com/suldr/ debian extra" >> /etc/apt/sources.list
sudo wget -O - http://www.bchemnet.com/suldr/suldr.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install samsungmfp-driver

More infos and software here.


Intel has a open source driver, you can download with the following link.

https://download.01.org/gfx/ubuntu/14.04/main/pool/main/i/intel-linux-graphics-installer/intel-linux-graphics-installer_1.0.7-0intel1_amd64.deb

go to the download location and run

  sudo apt-get install mesa-utils

  sudo dpkg -i intel-linux-graphics-installer_1.0.7-0intel1_amd64.deb

Type intel in your launcher and you will find intel graphics installer for linux,

CLick on it and follow through the instructions.

Reboot.

I hope this will help.

Other workaround that i use since i am on ubuntu 14.10 is keeping the system awake  to stop power save mode.

I do by changing the  "turn screen off when inactive" option in

  System settings --> Power --> Turn screen off when inactive
  Change it to "Never"

I hope this helps :D


Good news is I fixed it, bad news is I don't know what was the problem, which was the whole point of trying to fix it - please, please post another answer if you know something!

Here are the changes I made that made everything work.

Placed /boot on the first EFI System partition (/dev/nvme0n1p1).
Deleted the second EFI System partition because the community wiki strongly recommends to have only one EFI partition.
Ran boot-repair utility that reinstalled GRUB.
Disabled Secure Boot in BIOS.

All the changes were made from the live USB.


access and read the external disk mounted on a server

The easiest way to connect to a SSH server in order to view its files is to open nautilus (a.k.a. Files), press CTRL+Land type ssh://username@servername. You will be asked for a password. The other side needs to support and permit this, but Ubuntu does this out of the box.


Solved! I installed again ubuntu 19.04 in safe graphics mode.

It seems that also Nvidia now works. But, I have another issue: after login Ubuntu is blocked. May be issue with graphic card driver..but I didn't check yet

Should I do a new thread?

Thanks


TP-Link TL-WA850RE Wi-Fi Range Extender won't work

As this comment is too long for a comment field, posted as an answer:

As you seem to have tried both a D-Link and a TP-Link Extender you seem to be misunderstanding what a WiFi Range extender does and and how it works:

A WiFi Range Extender works by capturing a WiFi signal and transporting that good signal over to a wired connection.  It does not turn a crappy WiFi signal into a good signal! :-(

So let's say you have your WiFi router in the basement and on the first floor you still have good WiFi reception but on the second floor you don't.  Then you have to plug in the WiFi extender on the 1st floor and run a cable to the 2nd floor.

In this particular use case, you might be better off with a TL-WPA9610 KIT which will use your existing electricity wires to transport LAN signals (you need 2: one next to the router to send the LAN signals and one in an electricity socket next to your computer to receive them)

This also makes this question and answer completely off-topic here as there is absolutely no Ubuntu angle...

Sorry! ¯\_(ツ)_/¯


Which desktop application handles webcal urls?

Thunderbird does not know how to open a Webcal link from the command line (which is the same as what "Choose Application" does). However, once you have Lightning open, you can retrieve the contents of a Webcal link and paste it into a calendar. In this discussion, the following actions are recommended:

open Lightning
in the calendars list: right-mouse click -> new calendar
select 'on the network'
select 'iCalendar'
then paste the URL to your .ics


The easiest way to set a custom DNS on Ubuntu 14.04 (and other) is by editing the base file of the resolv.conf.d folder:

sudo nano /etc/resolvconf/resolv.conf.d/base

Add your DNS to the file :

nameserver 8.8.8.8
nameserver 8.8.4.4

Update resolv configuration :

sudo resolvconf -u


Here is how I got it working. In my folder with all my vpn ovpn files I create a file called auth.txt. Which contained the following, substituted for my actual credentials:

Username
Password

I then opened up the ovpn file I wanted to use, and found the line with auth-user-pass I modifying it to look like this, replace path with full path of your auth.txt file:

auth-user-pass /home/philip/open_vpn/auth.txt

I then made a bash script called start_vpn.sh which looks like:

#!/usr/bin/env bash
sudo openvpn --config /home/philip/open_vpn/nord/ca24.nordvpn.com.udp1194.ovpn

I then create a systemd startup script at /etc/systemd/system/start-openvpn.service which looks like:

[Service]
ExecStart=/home/philip/open_vpn/start_vpn.sh

[Install]
WantedBy=default.target

I then enable the systemd job with:

systemctl enable start-openvpn.service

Bonus:

If you have 100s of ovpn files like me you may want to update the line in all these files at once. Here is the sed command I used in the folder with my ovpn file, you will nedd to update to reflect your system:

sed -i *nordvpn* -e 's/auth-user-pass/auth-user-pass \/home\/philip\/open_vpn\/auth.txt/g'


Backups not running, "Storage location not available" using samba server as target

First, it depends on how you are mapping the share you're attempting to backup to. For myself, I would create an entry in my fstab for permanent mounting, which can be done as follows:
# Example Comment on the Mount:
//192.168.0.121/myshare        /mnt/sharemount/      nfs     0       0

An example of my previous answer. You can read a better answer on directory structures if you want to know where you should mount things.
Then, it depends on how you're backing things up. If you're using inbuilt backup, set the destination to your location you have mounted and it "should just work".

Further to the error you're receiving - "Storage location not available" - this is very generic. From a terminal on the server, if you run the following command,the output should be quite explanatory of the error:
sudo mount -t nfs 10.x.y.z:/share /mnt/path -v

The -v will give you verbose output to let you know what's happening. For example, for me I get the following output on a successful mount:
mount.nfs: timeout set for Tue Jun 30 22:19:16 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.121,clientaddr=192.168.0.116'

The type of share you're tying to mount will be dictated by the -t in the previous command; for me, a lazy person, I do a NFS mount and whitelist my IPs as read/write (not recommended), but you can start with this to see what errors you have
For a Samba Share, try the following command:
mount –t cifs IP_Address:/sharename /mountpoint –o username=userid,workgroup=workgroupname

Or for putting this in your fstab path:
# sudo nano etc/fstab

//10.x.y.z/share_file   /mount/pount    cifs  rw,user,username=$username,password=$password 0 0

Some other questions that you can refer to for Samba Diagnostics are:

can't connecto to Samba Server on NAS
Problem With Samba Share between Ubuntu 18.04 & Kali Linux


Looking for a Frontpage alternative (web design IDE)

There is BlueGriffon

  Is an open source, cross-platform WYSIWYG editor has reached version 1.0. You can use it to >edit / design web pages and supports CSS3 and HTML5, web forms, web fonts and more.

BlueGriffon


Install nvidia drivers for Ubuntu 18.04 SERVER

Run the following commands in your terminal to install the latest NVIDIA Drivers:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt-get install ubuntu-drivers-common
sudo ubuntu-drivers autoinstall

If you get any unmet dependencies problems, manually install those unmet dependencies. For example, if you get:

nvidia-driver-418 : Depends: xserver-xorg-video-nvidia-418  (418.56-0ubuntu0~gpu18.04.1) but it is not going to be installed

Run:

sudo apt install xserver-xorg-video-nvidia-418 nvidia-driver-418

Finally, reboot.


You can use Samba Server as a domain controller. If you need network manager, I suggest you to try EBox (server and network manager) You can install it from repos by using this command:

sudo apt-get install ebox

Or you can download and install the new version Zentyal (project name is changed) from their site:

Zentyal Downloads


I wanted to add this as a comment but for now I can't so I will just post it as an answer.

Here's what I will check for, the first is ifconfig, is the IP it gets on the same subnet as the gw. Is the subnet mask under the scope of the gateway.

check the /etc/network/interfaces file, does it look like

iface eth0 inet static
    address 192.168.0.200
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
#   dns-nameservers 192.168.0.1

I'll go for routes, any default route that use IP, and gw as default

try to ping from outside and see if it works.

try to connect other endpoints to access points do they work

try to connect that endpoint to another access point, does it work?


Once you have installed kernel 3.4 on 12.04, the sound card is fully recognised by default.

The only problem is that by default the internal microphone level is extremely low. It needs to be adjusted through a microphone boost device.

See Ubuntu 12.04 - Installation on Acer Aspire One 722 (AO722) - Nicolas Bernaerts


Installing okular via apt-get on bionic gives me

A possible fix would be to use the following command to add the "universe" repository:

sudo add-apt-repository universe

Or, if this returns an error, try:

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

If none of these work, then inside the terminal, type:

sudo apt-get install software-properties-common

and repeat the first command.

Then finally update by typing:

sudo apt update

Then try installing again by:

sudo apt-get install okular

Hopefully this works out.


Installing 10.10+ with Radeon HD 6970 Video Card

Make sure you have nomodeset selected before booting into the live cd. After you install ubuntu hold shift during the boot process to get to the grub menu, now edit the boot options and add nomodeset to the list of items, you can remove nosplash if you want to see what happening during bootup. Once you get into Ubuntu go to system/Admin./Hardware drivers. If its already installed, at the grub menu select recovery mode and you will be able to drop to a root shell prompt.


Strange characters displayed after awakening from regular sleep Ubuntu 18.04

Apparently, the EDIT above in the original question was the right guess.
My computer is able to recover from sleep. I sometimes still have those strange characters, but it happened to me only once in 3 weeks.

Also, a problem that may be related appeared in Windows : when I shutdown the computer, the power switch stays light on. REISUB doesn't affect the state, I have to hold the power switch and the switch light finally turns off. The problem may be on the bios layer... Computer Science...

Cheers!


I just couldn't build this iwlwifi core source. Others could

Please try an experiment. From the terminal:

sudo modprobe -r ideapad-laptop
sudo rfkill unblock all

If this enables wireless, we can blacklist the module in order to make it permanent.

Since we now know that this methods enabled your wireless, let's make it permanent:

sudo -i
echo "blacklist ideapad-laptop"  >>  /etc/modprobe.d/blacklist.conf
exit


How can I go back to the first word of my command in terminal?

Yes, there is a Home key on your keyboard.

Its label might vary depending on your keyboard layout and language, on german keyboards it's e.g. called Pos 1 instead.

Another shortcut to jump to the beginning of a line is e.g. Ctrl + A.

More shortcuts to navigate the command-line can also be found here: How to navigate long commands faster?


Dual boot windows 10 and ubuntu 16.04 on ssd+hdd not working

Check your boot order, I think "Windows boot loader" (or something alike) is on top so grub wont load.

Set grub as the first boot option and you will boot into grub, where you will have the option to choose either windows or Ubuntu.

If grub isnt in the list you probably have to add it manually via one of the options in your BIOS or by disabling secure boot and install ubuntu again.


Can we create bandwidth Limit for all users

Sharing Internet Connection is easy, and DpN has already provided a possible solution to that through a GUI. Alternatively, you can use iptables and masquerading to achieve the same, though it'll be without a GUI. More information can be had on http://www.tldp.org/HOWTO/IP-Masquerade-HOWTO/firewall-examples.html

Following is a sample script that you can run on the server. You can provide the gateway of this server to other machines so that they can access internet through this.

#!/bin/bash

echo -e "\n\nSETTING UP IPTABLES PROXY..."

INTIF="eth0"
EXTIF="eth1"
EXTIP="your.static.IP.address"

echo "Loading required stateful/NAT kernel modules..."

/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe ip_conntrack_ftp
/sbin/modprobe ip_conntrack_irc
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ip_nat_irc

echo "    Enabling IP forwarding..."
echo "1" > /proc/sys/net/ipv4/ip_forward

echo "    Loading proxy server rules..."

# Clearing any existing rules and setting default policy
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD DROP
iptables -F FORWARD
iptables -t nat -F

# FWD: Allow all connections OUT and only existing and related ones IN
iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

# Enabling SNAT (MASQUERADE) functionality on $EXTIF
iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE

echo -e "       Proxy server rule loading complete\n\n"

However, managing / limiting bandwidth (also called traffic shaping) is a different ball game. You would need to have some advanced knowledge of the tools to be used and what your needs would be. There are some external firwalls such as pfSense which help you manage it pretty well, but it'll require a different type of network setup.


To Install Winehq 1.7.8 via PPA in Ubuntu 12.04

open Terminal ( Ctrl+Alt+T) and copy the following commands in the Terminal:

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


Can I install on an SSD via USB and then later connect the SSD through internal SATA?

The installation is not the problem, it will be the bootloader(s) on a UEFI machine.
A legacy machine should be no problem, grub will install to the external drive as requested, and the disk may be moved to the internal location.

There are several bugs on an install to an external disk which you should be aware of:
 * 1173457 -- Ubuntu Installer uses wrong bootloader location for USB
   UEFI installs
 * 1229488 -- EFI install to removable media not supported (unwanted
   nvram changes shimx64.efi to grubx64.efi, makeing a secure boot
   enabled machine unbootable.

Get ready for the UEFI install, and put an EFI partition on the external SSD. This external partition will be ignored, regardless of what you enter on the grub location during the install.  Also in preparation, make a copy of the /EFI/ubuntu/grub.cfg file (like grub.cfg.orig).  This file uses the UUID of the internal disk's root, and will be wrongly replaced with the external
disk's root UUID.  After the install to the external disk,
you will have to manually copy the internal EFI files over to
the empty external EFI (bug 1173457).  These files are correct for the external device, but the host is left with a stub /EFI/ubuntu/grub.cfg which has the UUID of the external disk's root (for the maintained grub.cfg file).  This boots as long as the external disk is present, but I'd suggest simply copying back the grub.cfg.orig file to grub.cfg (or just edit the UUID back to the original).

On the external disk's EFI, check that you have /EFI/ubuntu/grubx64.efi and /EFI/ubuntu/shimx64.efi (these will be the normal bootloaders when the disk is moved to the internal location). Also
check that /EFI/Boot/bootx64.efi exists and is a copy of shimx64.efi. /EFI/Boot/grubx64.efi should also be present.  You might get away with only grubx64.efi as the file bootx64.efi when secure boot is disabled, but using shimx64.efi as bootx64.efi should work in either case.  The /EFI/Boot location bootloaders are used when the external disk is still a "removable" disk in the external case.  The external disk should boot when it is selected as the boot device.

When the external disk is moved to the internal location, there might be a boot problem.  The nvram probably has some of the old disk identification, so a new boot entry might be needed (efibootmgr may be used to create a new entry).  Another possible error is for a shimx64.efi boot entry to be changed to grubx64.efi, which wont work with secure boot enabled. Maybe the boot will actually work via a fallback mechanism. When/if the old nvram entry fails, the /EFI/Boot entries may be tried.  Even if this succeeds, I'd suggest you use efibootmgr to make the regular /EFI/ubuntu/shimx64.efi (or grubx64.efi). entry.

Invalid partition table may be something like using GPT on an old machine that does not boot with GPT, or installing to the device instead of a partition, making the location of the partition table really part of the filesystem.  What partitioning did you use, and what does it look like (when in the external enclosure).


I had the same problem about two weeks ago and used diskinternals linux recovery on windows to scan my linux partition and recover some of my files. I couldn't get them all back but I was glad it worked to some extent.

Your home folder was not actually deleted, it was just moved. I stumbled upon mine a week after I upgraded from 11.10 to 12.04LTS and boy I was glad. Follow the instructions below.

Open your home folder and select the file system icon under the video icon on the left side of the screen.
Open the home folder and select your former user account icon. That's it. You should have all your previous files arranged in their folders.

Let me know if this solves your problem (that is if you haven't already done that).


Direction for a socially concious computer illiterate

Welcome to Ubuntu and Linux. Start by running the live / desktop CD and if it works well with your hardware and you like the interface, go ahead and install.

KDE (kubuntu) and xfce (xubuntu) and LXDE (Lubuntu) all offer a slightly different user interface, LXDE works well for older less powerful hardware (but unity 2d is not bad).

From there I would suggest you familiarize yourself with the Ubuntu community. Many people come to Ubuntu for the OS, and stay for the community.

If you are not familiar with it, irc has a thriving Ubuntu community

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

Come on over to #ubuntu or #ubuntu-beginners (or any of the other ubuntu channels such as #ubuntu-offtopic or ##club-ubuntu).

When you have enough reputation you will be able to use some of the chat channels here as well.

In addition there are the Ubuntu Forums and Launchpad. The Forums provides support, but there is an off-topic area, The Café, for social interaction.

Launchpad is used primarily (IMO) for developers, bug reports, and ppa.

Lots of additional resources (sorry if I forgot anyone, tried to mention the major ones), see:

http://www.ubuntu.com/community

Edit: I completely forgot about the LoCo. The LoCo teams are Local community teams and often work with local LUG (Linux user groups) and, assuming you have a LoCo (or LUG) near you, make an excellent entry point.

https://wiki.ubuntu.com/LoCoTeams


Rhythmbox "shuffle" button appearance doesn't seem to change

If you (install and) run unity-tweak-tool then under "Appearance -> Themes" you can select a GTK theme.  On my machine there are three themes available: Ambiance (default, what you are seeing), Highcontrast, and Radiance.  Ambiance and Radiance have the problem you noticed, while Highcontrast doesn't, so it's true that Rhythmbox is at least doing something to the button that some GTK themes are willing to display.  It seems that the Ambiance and Radiance themes are part of the Ubuntu light-themes package, so you could report a bug there and see what its maintainers say.


I always did it this way.  Just copy the file VMwareTools-xx.x.x-xxxxxxx.tar.gz to the downloads folder, and the extract it.

Once extracted, you will get a folder called vmware-tools-distrib.  The just open that folder in terminal, and just run:

sudo ./vmware-install.pl

And that will install VMware Tools


Flickering behavior on Ubuntu 16.04 with AMD Ryzen 5 1600 + GTX1050 graphics card

After this and this I made:

sudo apt-get purge nvidia*
sudo apt-get install nvidia-390 nvidia-modprobe

Blacklist nouveau

sudo gedit /etc/modprobe.d/blacklist-nouveau.conf

Wrote:

blacklist nouveau
options nouveau modeset=0

Then

sudo update-initramfs -u
sudo reboot

And all is working perfectly.


how can I change the storage location of /var/lib/mlocate.db?

You can check if your version of updatedb supports --output FILE parameter and make it an alias for your bash sessions and specify it on your cron jobs.

You must also use locate with --database FILE parameter

As stated by evencoil there's no possibility of using a symbolic link because updatedb recreates the file on each invocation.


Sloppy focus not working after upgrade from 11.10 to 12.04

If you're on 12.04 you're probably not using metacity any longer but compiz.  If you using Unity then you are using compiz.  You don't mention though.  To configure compiz install the settings manager ccsm and go to general settings.

Additional details can be found here.


Is there a fast way to show your desktop

If you are using Ubuntu 12.04 you can simply hit Ctrl + Super + D to minimize all windows. Super key is also known as the Windows key.

Another tip, holding the super key in Ubuntu 12.04 will bring up a list of shortcuts for your future use.


For Nomachine installed on a server, how do I increase the resolution?

Edit/create /etc/X11/xorg.conf to contain the following:

Section "Screen"
    Identifier "MyScreen"
    Subsection "Display"
        Virtual 1920 1080
    EndSubSection
EndSection

(In the above case for a resolution of 1920x1080)
Credit: How to detect and configure an output with xrandr?


blacklist specific url using iptables on linux

iptables work on layers 3/4 of the OSI. i.e. block access to certain ips and ports. What you are asking for is url filtering.
iptables cannot be used to perform URL filtering.
You can use a proxy like tinyproxy to filter out certain URL's.
[1][https://tinyproxy.github.io/]


How to change default program for files ending in one extension

This answer is adapted from Ondra Žižka's answer here: How do I set the default program?. Please upvote there as well if this helps you.

To change the default program for files with a specific file type, a mime type needs to be created for each file extension. This is because Ubuntu tracks this indirectly:

file extension -> MIME types
MIME type -> application(s) to open
Applications -> list of compatible MIME types

For Ubuntu (18.x), the following applies:

file extension -> MIME types

This is determined from files in /usr/share/mime/packages/.
  E.g.:

cat << EOF | sudo tee /usr/share/mime/packages/staruml.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
  <mime-type type="application/staruml-project">
    <comment>StarUML project</comment>
    <glob pattern="*.MDJ"/>
    <glob pattern="*.mdj"/>
  </mime-type>
</mime-info>
EOF

Other xml files are generated from these and placed in /usr/share/mime/. Sometimes these files may be found online, especially for open source software packaged for Ubuntu. For example, the mime files for KiCad can be found in the KiCad source code repository: https://gitlab.com/kicad/code/kicad/-/tree/master/resources/linux/mime

MIME type -> application(s) to open

This is driven by ~/.config/mimeapps.list or possibly ~/.local/share/applications/mimeapps.list. This should override /usr/share/applications/mimeapps.list. For example:

echo 'application/staruml=staruml.desktop' | tee -a ~/.local/share/applications/mimeapps.list

Or, to change for all users:

echo 'application/staruml=staruml.desktop' | sudo tee -a /usr/share/applications/mimeapps.list

Applications -> list of compatible MIME types

This is driven by the .desktop files in /usr/share/applications/. That file can contain a MimeType= entry with semicolon-separated list of MIME types. For instance, the EOG app has MimeType=image/bmp;image/gif;image/jpeg;image/jpg;....

cat << EOF | sudo tee /usr/share/applications/staruml.desktop
[Desktop Entry]
Name=StarUML
Comment=StarUML
GenericName=StarUML
Exec=/sw/prog/StarUML/StarUML-3.1.0-x86_64.AppImage %U
Icon=/sw/prog/StarUML/staruml.png
Type=Application
StartupNotify=false
Categories=Development;Programming;Modeling;UML
MimeType=application/staruml-project;
EOF

This makes it a full circle. The changes take effect after running

sudo update-mime-database /usr/share/mime

and, for icons,

sudo gtk-update-icon-cache /usr/share/icons/gnome -f

Or, you may need to logout/login.

Then, mimetypes for a given file extension can be checked using mimetype:

$ mimetype .mdj
.mdj:  application/staruml-project

References:

How do I set the default program?
https://coderwall.com/p/qjda2q/create-new-mime-type-and-assign-an-icon-to-it-in-ubuntu
https://help.ubuntu.com/community/AddingMimeTypes
How to assign (set) a MIME type to a file?

Credit: Ondra Žižka (Adapted)


Simple Scan not recognizing Canon LiDE 25

The scanner has been well supported earlier. At the moment he is no longer in the list of supported devices.

Here are some options:

Fixed by disabling xHCI in BIOS (CanoScan LiDE 25 not recognized? (Ubuntu 14.10))
Works out of the box in Gutsy o_O (Hardware Support Components Scanners Canon)
Try a shorter cable and don't use a USB hub (Canon CanoScan LiDe 25 funktioniert nicht mehr mit SimpleScan)
Fixed by disabling USB 3.0 and connect the scanner to existing USB 2.0 port (Cannot scan using Canon Lide 25 with simple-scan on 14.04.)


How to get Mac style title bar buttons on Ubuntu gnome without changing rest of the theme?

First you will need to find a theme with the buttons you want and install that theme.

You can find many OS X themes at gnome-look, search gtk3 theme in the type and osx in the description, though I will recommend you, based on your question, this nice flat Yosemite theme (Developers screenshot).

This should look really nice with the Arc theme, in my opinion.

Next install

sudo apt-get install gnome-tweak-tool

When it is finished start this app from the launcher or

gnome-tweak-tool

Browse to the Appearance section and you will see this

Change the window theme to change your window declarations and gtk3 for the rest of the theme.


There must be something wrong in translation. What command did you use to mount it? It should be:

sudo mount /dev/cdrom /media/cdrom

cdroms are also usually sr devices under /dev, i.e. sr0, sr1, so if the above command doesn't work, try

sudo mount /dev/sr0 /media/cdrom

If you are still having trouble, make sure the folder /media/cdrom exists and give us the output of

mount


Nested sshpass for ssh with "-J" jump host option

I got it to work with the proxy command:
> sshpass -p serverpassword ssh -oProxyCommand="sshpass -p gatewaypassword ssh -W %h%p uname@gatwayserver" uname@targetserver


Unfortunately, TP-Link UB400 does not support Linux.

Refer this website: https://www.tp-link.com/us/support/faq/2744/
In Ubuntu's official documnetation, it is mentioned that:

Some Bluetooth adapters are not supported on Linux, so you may not be able to get the right drivers for them. In this case, you will probably have to get a different Bluetooth adapter.

Refer this website: https://help.ubuntu.com/stable/ubuntu-help/bluetooth-problem-connecting.html.en
So I guess the best thing to do is to choose a bluetooth adapter which supports Linux.


How can you wget a file and execute it directly while giving arguments?

You can put perl script arguments after programname which in this case is the standard input (-). So, I think, this is what you ask:

wget -O - http://xrl.us/cpanm | perl -- - A

or

wget -O - http://xrl.us/cpanm | perl -- - --help

See: perlrun man page for more details.

Note: From the manual page:

  A "--" signals the end of options and disables further option
  processing. Any arguments after the "--" are treated as filenames and
  arguments.

In other words, -- terminates the perl arguments. After that we put the file name containing the script (in our case this is the standard input which is indicated by a -) and then the arguments to the script.


How can I organize files based on their filename first letter into A-Z folders

A late python option:

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

def path(dr, f): return os.path.join(dr, f)

dr = sys.argv[1]
for f in os.listdir(dr):
    fsrc = path(dr, f)
    if os.path.isfile(fsrc):
        s = f[0]; target = path(dr, s.upper()) if s.isalpha() else path(dr, "#")
        if not os.path.exists(target):
            os.mkdir(target)
        shutil.move(fsrc, path(target, f))

How to use

Copy the script into an empty file, save it as move_files.py
Run it with the directory as argument:

python3 /path/to/move_files.py /path/to/files

The script will only create the (sub) directory(-ies) (uppercase) if it is actually needed

Explanation

The script:

lists the files, gets the first character (defines the sourcepath):

 for f in os.listdir(dr):
    s = f[0]; fsrc = path(dr, f)

checks if the item is a file:

if os.path.isfile(fsrc):

defines the targeted folder for either if the first char is alpha or not:

target = path(dr, s.upper()) if s.isalpha() else path(dr, "#")

checks if the folder already exists or not, creates it if not:

if not os.path.exists(target):
    os.mkdir(target)

moves the item into its corresponding folder:

shutil.move(fsrc, path(target, f))


This has nothing to do with time and date settings; it's because your computer's language is set to Arabic. In order to display time and date in English, for instance, you'll have to change your computer's language to English.

Changing Current System Language:

You can do that by going to System Settings, then click Language Support. If English (or your preferred language) is not installed, you can do so by clicking on Install/Remove Languages.

Changing Regional Format

Click Language Support again, but this time change to Regional Format and select English (or your preferred format); press Apply System-wide.


No drivers listed?/How to install all drivers? 12.10

The forums would probably be a better place to discuss this type of problem. Your lspci results show that everything if recognised (with linux most of the drivers are included in the install). You can add both the Nvidia driver and probably the network driver by launching 'Additional Drivers' in settings.

Re-reading your post I notice your ethernet is not working. Best to look for a solution to this first as installing/updating will be problematic without this working. I suggest searching the web and or ubuntu forums Ubuntu Networking Forum for information about your nic. From the lspci your nic is 02:00.0 Ethernet controller [0200]: Atheros Communications Inc. Device [1969:e091] (rev 13) Try here Solved in this post


First lets update the Nvidia drivers.

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current

x-swats been slow lately but do that first.
Then Install the Compwiz manager:

sudo apt-get install compizconfig-settings-manager

I dont know all the other settings needed for Nvidia (Using AMD/ATI) so check out this How-To:

http://www.howtoforge.com/enabling-compiz-fusion-on-ubuntu-11.10-oneiric-ocelot


ecryptfs home folder Installation and Backup

Your home partition's currently using ecryptfs, or LUKS? Usually for a whole partition LUKS would be great, and I think it's easier to decrypt a LUKS on it's own than it is an eCryptfs folder (many people lose the important hidden/dot config files & wrapped-passphrase and can't get back into their files if something goes wrong).
I think the answer's basically:

Yes. Personally I'd start by installing Ubuntu with a plain/un-encrypted home user, then change the home (or make a new user & change their home) to the old encrypted home partition. I've read that Ubuntu's installer likes to overwrite existing partitions sometimes, so I'd keep it simple to start, and definitely make backups first.

Copy the home files while logged in/decrypted would be easiest. It sounds like the backup drive's not saving user/permissions (maybe it's FAT or NTFS isn't co-operating) so using an archive (or a few small archives) like tar.xz is nice for keeping permissions & smaller backups too. If you're using eCryptfs this avoids the problem of having to get into a copied eCryptfs encrypted folder too.
If they're encrypted now, you may want to keep the backups encrypted so piped/encrypted with gpg (tar.xz.gpg) would be great. Or make another LUKS container (partition or file) to copy them to. Or if just copying the eCryptfs encrypted files themselves, make sure to get all the settings files especially wrapped-passphrase.

Just copying a partition with dd (I think gparted does the same thing) would make an exact image, so the same label & UUID, and that probably causes the two homes problems. You could change those afterwards, but just making a new partition would give it a different UUID & you can pick a new label, and copying only files wouldn't copy all the free / unused space (like dd) so should be quicker too. A gui file manager should copy the user & permission info, or search for rsync and it's "-a --archive" mode .


Why does my symlink to /usr/local/bin not work?

The solution is rather simple. Use an absolute symlink here such that the first argument of ln -s is a full path instead.
sudo ln -s /home/user/bin/julia-1.5.3/bin/julia /usr/local/bin/julia
Now it opens correctly and executes as expected.
The second and more complex solution is to use a relative symlink. However it has to be relative to the folder where the symlink will be created. Thus starting at /usr/local/bin one has to move up three folders to be at / and then descend into the appropriate folder.
sudo ln -s ../../../home/user/bin/julia-1.5.3/bin/julia /usr/local/bin/julia
Update: The comment below is correct and I edited the answer accordingly. Relative symlinks are fine and exist for good reasons however here they don't make any sense since they complicate the path a lot.


How to solve '/dev/fd/63: ... command not found' bash script error

Check your script file for nonstandard blank characters such as the non-breaking space. (U+00A0 or HTML &nbsp;)

The error message command not found normally reports the name of the command that was not found. (eg. sudo or snap.)
But in your case it reports the entire line as the command.
This is a hint that the blank characters separating the arguments from the command name and and from each other are not regular blank characters (U+0020), but some other characters that appear blank on the screen.
The most frequently encountered such character is the non-breaking space (U+00A0).
This may happen if code is transferred via copy&paste from a web page or other source of formatted text.
The bash command line parser does not consider such a character as a delimiter and therefore doesn't recognize the command verb.


Windows 7 - VirtualBox - OpenVPN - Ubuntu 12.04

If you use the default NAT configuration for your guest (Ubuntu) in vbox, it will use the OpenVPN connection of your host without any configuration in the guest.

However, if you use "Bridged network" for your guest in vbox, you will need to configure OpenVPN in your guest also.


How to have gnome-tweak-tool settings the same for all users

This guide helped me.

To make extensions available to all users on the system, install them in the /usr/share/gnome-shell/extensions directory.

  Note that newly-installed machine-wide extensions are disabled by default.

To enable the extensions for all users, you need to set the org.gnome.shell.enabled-extensions key. To set it, create a user profile in /etc/dconf/profile/user:

user-db:user
system-db:local

Create a local database for machine-wide settings in /etc/dconf/db/local.d/00-extensions. Note that the directory does not exist on Ubuntu 18.04:

[org/gnome/shell]
# List all extensions that you want to have enabled for all users
enabled-extensions=['myextension1@myname.example.com', 'myextension2@myname.example.com']

The enabled-extensions key specifies the enabled extensions using the extension's uuid (myextension1@myname.example.com and myextension2@myname.example.com).

To complete it, update the system databases with:

dconf update


Disable all keyboard shortcuts except for Alt+Tab in program

This issue happens quite often with default settings. A lots of applications rely on Alt shortcuts but don't work because unity or compiz is already using them.

I don't know of a way to disable the shortcuts temporarily, but even if there is the best solution i've found is to avoid conflicts altogether. The first thing i do on a new setup is go through the desktop keyboard shortcut settings and have them use Super instead of Alt.

It makes things very clear:

Super is for window manager actions
Alt is always available for apps (except for Alt+Tab and Ctrl+Alt+Arrows which i like to keep).

The "windows" keys act as Super by default, but you could have the "menu" key do it:
(i like to have it on the right side and there's no right "window" key on my keyboard)

System Settings -> Keyboard Layout -> Layouts -> Options -> Alt/Win Key Behavior
and choose "Alt is mapped to Right Win, Super to Menu".

Now go through keyboard shortcut settings and change Alt bindings to Super ones.

Change compiz shortcuts as well with CompizConfig Settings Manager (install it first).
You can easily find all Alt shortcuts with:
Advanced Search -> Search in ... Settings value and type "Alt"

That's it, you will never be annoyed by conflicting shortcuts again.


How can I warn before installing snaps (Bionic, Focal)?

In both versions of Ubuntu, you can remove snap support. That way, you never can install snaps by accident. You do not need to continue reading if you remove snap in the first place.
In Ubuntu 18.04, you never can inadvertently install snap when using apt on the command line. This situation is changing with Ubuntu 20.04, where at least one package, chromium-browser will automatically revert to installing the snap even if you use apt.
With "Software" you get different versions of the same app, the snap version being listed first. So there, one has to be careful what version to select. That, however, can be overcome by removing gnome-software-plugin-snap. That way, software will not offer snaps. In Ubuntu 20.04, it is a bit more complicates. By default, it comes with a snap version of software, called "Snap store". You could remove the Snap store (sudo snap remove snap-store) and install the regular Gnome software instead: sudo apt install gnome-software.
Anyway, if you want exceptionally to install a snap and leave the system as-is, just use apt on the terminal, or be a little careful selecting the software you want to install. Forewarned is forearmed.
On a more advanced level, you could probably replace the snap binary by a wrapper script to include a warning that it will be invoked, if you really wished so.


I haven't used switchers for many years but when I did the generic ones from Amazon or eBay worked flawlessly for me. As with all thinks Ubuntu related make sure the devices work with Linux and your hardware before purchasing.

The HDMI plus keyboard or mouse switcher looks like this:

The HDMI monitor only switcher looks like this:

You might also be interested in 4 USB sharing to complement option 1 and 2 above:


Windows keyboard layout not working in Ubuntu

For the sake of formatting I will add my comment as an answer.
I have a similar keyboard and I use English (US) and Greek languages. I can show you how to reconfigure your keyboard layout via the command line.
Open a terminal and type:
sudo dpkg-reconfigure keyboard-configuration
This will launch the package configuration for keyboard in the terminal. You can navigate to selections with Tab and select with Enter or Spacebar.
On keyboard model select: Generic 105-key (Intl) PC

On Country of origin of the keyboard select English (US)

On keyboard layout select English (US)

On Key to function as AltGr select The default for the keyboard layout

On Compose key select No compose key

On Use Ctrl+Alt+Backspace to terminate the X server select No (or yes if you prefer)

Hopefuly this will configure your keyboard properly.


Help needed! Nvidia/Intel graphics driver installation problem on 12.10

Did you try change the drivers via GUI mode? You can do it via Software Center. Press menu "Edit" > "Software sources" and then the tab "Additional Drivers". It should offer you a easy way to change or update drivers detected.


Autostart desktop applications without session login

One way could be to give admistrative rights to all those users.(i.e make them all administrators)

From Dash, search for user accounts.
In menu bar,click on unlock
enter your password(password of current administrator)
At the bottom click on + sign
create a new user,don't forget to give him administrator status.

now for each of them,you can add necessary programs in startup applications list.


AVLD doesn't appear to be maintained anymore.

A similar video loopback package exists in the repositories which you can install - its called v4l2loopback-source.

Auto Install

First from a terminal, drop to a root shell

sudo su

If you havent installed kernel modules before with module-assistant run the following from a terminal

apt-get install module-assistant
m-a prepare
m-a update

Finally - download and install v4l2loopback

m-a a-i v4l2loopback
exit

Manual Install

Download the package - once installed it can be found in /usr/src/v4l2loopback.tar.bz2

Copy the package to, for example your ~/Downloads folder
compile and install

cd ~/Downloads
tar -xvf v4l2loopback.tar.bz2
cd modules/v4l2loopback
make
sudo make install
sudo modprobe v4l2loopback

This will create a /dev/video0 or /dev/video1 (etc) device.


usermod -d /home (user) makes a login loop on the user

For GUI logins, the home directory has to be writable by the user whose directory is being changed, as steeldrivermentioned. This way, there will not be any looping logins.

If you change the directory to something that is not writable by the user, you can still log in as the user without the loop if you log into tty by doing: CTRL+ALT+F1-6 (press a key from F1 to F6) and entering the credentials of the user.


I can not find /sys/kernel/debug/vgaswitcheroo/switch Ubuntu 11.10

Either you have enabled modeset in your kernel option in grub while booting or you are not root. If you have not made any changes to boot option then try

sudo -i
cat /sys/kernel/debug/vgaswitcheroo/switch


This is proberly a steam/game issue.

Many games ONLY support x-input (Xbox 360 compatable controllers) but this can vary from game to game.

The gamepad you mention is direct-input, this started to be phased out years ago.

If you have the correct button layout (2 sticks, 4 shoulder, 4 face, a d-pad,select and start buttons, you can try the following driver.

X-input emulator

Though you may run into issues with certain games as this is an x-input emulator and may have issues.


Ubuntu is 0% compatible with DX. DX is a Microsoft product so it ends there.

But ... you can use Steam with Wine and Play on Linux (I normally would include as much info as I can but this is rather lengthy so I will just post the link). Both PoL and wine can be installed through Ubuntu Software Center. For me games have had mixed results though when using wine.

The link has an important note:

  Please note: Games run with these methods will be slower than running them on Windows because the games are not native executable files. To get the best performance we will need to wait for Valve to develop a native Steam client (which is now happening).

If you follow that guide you will have a working steam with wine but you will need to check games 1 at a time. It is by no means a '1 install and all play'.

You might be a bit early with your question though.

Valve is in the process of opening a native Ubuntun client for Steam. They made Left 4 Dead 2 their 1st game to run under Linux. As soon as this is perfect they plan to release games at a steady pace. As far as I understood it they are porting their games to be capable running with Direct3D (so no DX). For now you will have to rely on wine though.


Add or append new column to csv file using shell script

The last awk command inside your loop

awk -v v1="$diff" -F"," 'BEGIN { OFS = "," } {$9=v1; print}' a.csv >> b.csv

processes the whole file a.csv at every loop iteration, and appends the whole result to b.csv each time.

Presumably what you intended was to apply the command only to the current contents of the $line variable - in bash you can do that with a here string

awk -v v1="$diff" -F"," 'BEGIN { OFS = "," } {$9=v1; print}' <<<"$line" >> b.csv

However, processing CSV files line-by-line in a shell loop is not generally recommended - you might want to consider using a utility that provides datetime processing natively (Perl, Python, GNU Awk) or Miller ex.

mlr --csvlite --implicit-csv-header --headerless-csv-output put -S '
  $9 = strftime(strptime($6,"%Y-%m-%dT%H:%M:%SZ") - strptime($3,"%Y-%m-%dT%H:%M:%SZ"),"%T")
' a.csv > b.csv

(remove --implicit-csv-header --headerless-csv-output if your CSV file does actually have headers).

See also

Why is using a shell loop to process text considered bad practice?


Why is Vim not launching when passing arguments in its .desktop file?

Try logging out/in or even restarting to fix this. The following .desktop file works perfectly for me:

[Desktop Entry]
Name=Vim Text Editor
Comment=Edit text files
Exec=vim -c 'startinsert'
Terminal=true
Type=Application
Icon=terminal
Categories=Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;


Automatically add new wireless access points

You can ask upstart (the init daemon used on Ubuntu) to stop NetworkManager, that's much "cleaner" than killing the process yourself: sudo initctl stop network-manager (replace "stop" with "start" to start it manually again).

About the issues with NetworkManager: it seems like it logs to /var/log/daemon.log; maybe you can find some useful messages there?


command is a bash builtin as we can see:

seth@host:~$ type command
command is a shell builtin

So we know command is provided by our shell, bash. Digging into man bash we can see what its use is:

(from man bash):

command [-pVv] command [arg ...]
              Run  command  with  args  suppressing  the normal shell function
              lookup. Only builtin commands or commands found in the PATH  are
              executed.   If the -p option is given, the search for command is
              performed using a default value for PATH that is  guaranteed  to
              find  all  of  the  standard  utilities.  If either the -V or -v
              option is supplied, a description of command is printed.  The -v
              option  causes a single word indicating the command or file name
              used to invoke command to be displayed; the -V option produces a
              more  verbose  description.  If the -V or -v option is supplied,
              the exit status is 0 if command was found, and  1  if  not.   If
              neither  option  is  supplied  and  an error occurred or command
              cannot be found, the exit status is 127.   Otherwise,  the  exit
              status of the command builtin is the exit status of command.

Essentially you would use command to bypass "normal function lookup". For example, say you had a function in your .bashrc:

function say_hello() {
   echo 'Hello!'
}

Normally, when you run say_hello in your terminal bash would find the function named say_hello in your .bashrc before it found, say, an application named say_hello. Using:

command say_hello

makes bash bypass its normal function lookup and go straight to either builtins or your $PATH. Note that this function lookup also include aliases. Using command will bypass both functions and aliases.

If the -p option is provided bash bypasses your custom $PATH and uses its own default.

The -v or -V flags bash prints a description (short for -v, long for -V) of the command.

Note: As souravc pointed out in the comments an easier method for finding information about shell builtins can be found here: How to make `man` work for shell builtin commands and keywords?


To remove broken packages run sudo dpkg --remove --force-remove-reinstreq package_name

Afterwards run sudo apt-get update


Install previous version of Pycharm (snap)

As per the time of writing the only solution I have found is to uninstall (snap remove pycharm-community) the snap version and manually download and and use the version you wish. However, this was only temporary due to a (now solved) bug in the database navigator.

Running (rather than installation) instructions are provided on this page.


Install fbmenugen: where are the perl-linux-desktopfiles and the perl-file-desktopentry dependencies

These are CPAN modules for Perl, which can be installed using:

cpan Linux::DesktopFiles
cpan File::DesktopEntry

Information about the modules:

Linux::DesktopFiles
File::DesktopEntry


USB ethernet adapter (Realtek r8153) keeps disconnecting

While writing the question I found the source of the bug on the kernel mailing list. The r8152 driver which is responsible for managing my r8153 adapter cannot handle the usb autosuspend (done for power saving reasons). Blacklisting the device for usb autosuspend solves the disconnects and is done like so:

Find out the usb id of your device (0bda:8153 in my case) by using lsusb, which gives me:

Bus 004 Device 003: ID 0bda:8153 Realtek Semiconductor Corp.

Now you open /etc/default/tlp and search for USB_BLACKLIST and add an entry for your device:

USB_BLACKLIST="0bda:8153"

You may need to reboot, after which your ethernet connection should be stable again.


Edit Crontab File of Remote System Hard Drive

Check that /temp_volume/var/spool/cron/crontabs/root exists. On modern Ubuntu systems, root's crontab is in /etc/crontab (/temp_volume/etc/crontab in your case) and has a different format. See man 5 crontab.


Unity3D Warning Updating from Ubuntu 12 to 14

It sounds like your graphics card does not have sufficient 3D capabilities to run the Unity3D interface fluently.

Is it an old card?
You might want to use a different desktop environment once you finished updating. Like XFCE or LXDE.


Chrome Custom Title Bar Option for Linux

To use the system's default title bars in windowed Chrome apps you will have to create a .desktop shortcut manually.

Below is an example for YouTube but can be modified for any website.

Desktop shortcut

Create .desktop file: gedit ~/.local/share/applications/youtube.desktop

Add:

[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=YouTube
Icon=<custom path to your icons>/youtube.png
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app=https://youtube.com
StartupWMClass=youtube.com

Icon

Icons can be retrieved by browsing to the website and going into Chrome's menu: More tools > Create shortcut...

The icon will be located in its corresponding extension directory: ~/.config/google-chrome/Default/Extensions

Select the icon image with the largest size.

StartupWMClass

If your app URL contains a /, then it must be replaced with __.

Example:

StartupWMClass=play.google.com/music becomes StartupWMClass=play.google.com__music

Testing

Restart GNOME:
Alt+F2 r Enter

Open app from application list.

Results

Before:

After:


directory permissions adding user in a group

Was the user already there? Anyway, just run

adduser myuser upperdevs


Cannot type '^' (caret) in native KDE apps

Same happened for me, only way to get it back was to switch to a keyboard layout without deadkeys.


Making a pen-drive with a image from scratch bootable both in BIOS and UEFI mode

Broadly speaking, you need to install an EFI-mode boot loader for Linux on the USB drive you've prepared. This boot loader should be stored as EFI/BOOT/bootx64.efi on the EFI System Partition (ESP), which is a FAT partition on the disk. There's a chance that the disk you've prepared lacks an ESP, so you may need to create it. (Even an ordinary FAT partition is usually sufficient, so if the disk has a FAT partition, you might not need a separate ESP.)

The tricky thing about this is that the boot loader you write to the disk must be properly configured to boot the installation on the disk. GRUB taken from the Ubuntu installation .iso file won't work without changes, because it's configured to boot the Ubuntu installer, not the installation you've created on the USB drive. Thus, you must know enough about the boot loader to know how to configure it, and enough about your installation to know what values to put in the boot loader's configuration file.

Unfortunately, GRUB 2 is a very difficult boot loader to configure; its configuration file format is rather complex, and is usually created by specialized scripts. Even the binary may need to be modified for your specific situation, since the main configuration file (grub.cfg) is normally located on the Ubuntu root (/) or /boot partition, meaning that the binary must be modified for your particular installation.

I've written a page on EFI boot loaders for Linux that covers many alternatives, most of which are easier to configure than GRUB 2. My own rEFInd is likely to be the easiest to set up and configure, since it tries to auto-detect Linux kernels when it starts, and it can usually figure out what options to pass to the kernel to get the system booted. Thus, configuration file changes needed to boot with rEFInd are minimal, and sometimes non-existent.

One big caveat in this is Secure Boot. If you want the computer to boot with Secure Boot active, you must provide either Shim (shimx64.efi) or PreLoader (preloader.efi) as the boot loader (renamed to EFI/BOOT/bootx64.efi), with your follow-on boot loader renamed appropriately for Shim or PreLoader. Furthermore, depending on the boot loader in question, you might need to add keys or hashes to the firmware whenever you boot your disk on a new computer. In this case, it's probably worth going to the hassle of using GRUB 2 on the new computer, since Ubuntu provides all the pieces necessary to get a computer to boot Ubuntu without messing with keys or hashes.


I built an updated version of curl

#! /usr/bin/env bash

# Install any build dependencies needed for curl
sudo apt-get build-dep curl

# Downloaded and build lastest available version at 02/08/2017
mkdir ~/curl
cd ~/curl
wget --no-check-certificate http://curl.haxx.se/download/curl-7.52.1.tar.bz2
tar -xvjf curl-7.52.1.tar.bz2
cd curl-7.52.1

# The usual steps for building an app from source
./configure
make
sudo make install

# Resolve any issues of C-level lib
# location caches ("shared library cache")
sudo ldconfig

After that, I successfully downloaded and added the node key


Acer E5-574G Laptop touchpad not working in Ubuntu 14.04

Most likely this touchpad is supported by kernel 4.2.

You can install it by running

sudo apt-get install linux-generic-lts-wily

P.S. Why do you install Ubuntu 14.04.3, when 14.04.4 has been released with new hardware support? Kernel 4.2 is already there.


Avro-Keyboard Bengali not working in Xubuntu 14.04

This YouTube video tutorial will help you Install Avro in Xubuntu


On Settings Panel, under the tab Sound, you can choose the device for the Sound Output.

You can look the official documentation to know how to use different sound output.


After struggling not to losing other important installations, I finally re-install the whole system and this trick by doing +iglx make the software appear without losing the Terminal.


Below here's a find, sort and awk one-liner.

Basic idea is to list files, sort them numerically (which works, unless Aaaaaaa.bbb and tags are themselves are numbers), and then let awk store each 3rd field of filenames into prev variable, and compare it with current value of field 3. If they match, print a message.

find . -type f -print | sort --numeric | awk '{if(prev == $3) print $0" is duplicate of "$prevEntry}{ prev=$3; prevEntry=$0}'

Below is a small demo:

    $ seq 6 10 | xargs printf "%07d\n" | xargs -I {} touch "Aaaaaaa.bbb - {} tag 9tag"

    $ seq 00001 00020 | xargs printf "%07d\n" | xargs -I {} echo "Aaaaaaa.bbb - {} tag tag_tag 9tag"

$ find . -type f -print | sort --numeric | awk '{if(prev == $3) print $0" is duplicate of "$prevEntry}{ prev=$3; prevEntry=$0}'

    ./Aaaaaaa.bbb - 0000006 tag tag_tag 9tag is duplicate of ./Aaaaaaa.bbb - 0000006 tag tag_tag 9tag
    ./Aaaaaaa.bbb - 0000007 tag tag_tag 9tag is duplicate of ./Aaaaaaa.bbb - 0000007 tag tag_tag 9tag
    ./Aaaaaaa.bbb - 0000008 tag tag_tag 9tag is duplicate of ./Aaaaaaa.bbb - 0000008 tag tag_tag 9tag
    ./Aaaaaaa.bbb - 0000009 tag tag_tag 9tag is duplicate of ./Aaaaaaa.bbb - 0000009 tag tag_tag 9tag
    ./Aaaaaaa.bbb - 0000010 tag tag_tag 9tag is duplicate of ./Aaaaaaa.bbb - 0000010 tag tag_tag 9tag


Yes, I do this for various build tools (Jenkins, etc) and local dev sites.
First you want to edit your host file here,

sudo nano /etc/hosts

There should be at least two lines already, one for localhost and another for you machines name. Now get the internal IP of the machine running your service(s) and add a new entry.

127.0.0.1    localhost
127.0.0.1    MyMachine
192.168.1.2    example.com

Don't forget when you add example.com to the host file, if it was for example askubuntu.com instead you would reach your machine with the IP you entered, on port 80.
Obviously this will only route that name (example.com) on your machine with the hosts file.


Is there a desktop note taking software connected to Google Keep?

You can check out this article at Install Google Keep in Ubuntu 14.04 Trusty | UbuntuHandbook

  Download the Google Chrome web browser at: Google Chrome Web Browser

  You may check out your OS type (32 or 64 bit) via System Settings →Details→Overview.
  Install the package via Ubuntu Software Center, or by running the below command in terminal (press Ctrl+Alt+T to open terminal):

sudo dpkg -i google-chrome-stable_current_*.deb && sudo apt-get -f install

  Open Chrome browser and go to Google Keep for Chrome page.

  Click on the blue button which says "Free" and then select add to Chrome.
  Once you installed this app, type in chrome://apps/ in address bar to go to the Chrome Apps page.

  There you’ll see a list of app shortcuts including Google Keep. Right-click on the icon and select "Create Shortcuts…"

  Right click and create a shortcut to your desktop


copying files and inherit permissions of target folder

You can use ACL and the command setfacl for that.

ACL Entries
ACL entries consist of a user (u), group (g), other (o) and an effective rights mask (m). An effective rights mask defines the most restrictive level of permissions. setfacl sets the permissions for a given file or directory. getfacl shows the permissions for a given file or directory.
Defaults for a given object can be defined.
ACLs can be applied to users or groups but it is easier to manage groups. Groups scale better than continuously adding or subtracting users.

This is the part you are after:

Copying an ACL into the Default ACL
Once the ACLs are the way they need to be, they can be set as the default. Defaults are inherited, so a new directory will inherit the defaults of the parent directory.

getfacl -a /path/to/dir | setfacl -d -M- /path/to/dir

You do need to add the acl option when mounting. In /etc/fstab add acl to the options for your disc. Make sure to use a LABEL and not a UUID.
LABEL="ExternalUsbDisc"   /media/usb-disc     ext4   defaults,acl   0   2


Wordpress permissions problem on apache2 server

Apache2 is using the group www-data. You may want to add your current user into the www-data group by executing : sudo useradd -g www-data username.

Alternatively, you can do a recursive chown to the web root folder. To do this, issue the following command : sudo chown -R www-data:www-data /var/www


Ubuntu 14.04 LTS can view but cannot connect to 5Ghz wifi

I had similar problems, see https://askubuntu.com/a/870717/387404
Regardless it is best to update to 16.04 when using new hardware

  I had similar problems with my D-link DWA-582 (same Realtek chip),
  only I could not connect to any network.

  I uninstalled the Ubuntu network-manager and installed wicd (see
  https://help.ubuntu.com/community/WICD) as I read somewhere some
  problems could be caused by the network manager. This fixed the
  connectivity problems to both 2.4 and 5GHz, but speeds were limited to
  about 2Mbps, this was on Ubuntu 16.10 .

  Then I installed the latest driver from
  https://github.com/lwfinger/rtlwifi_new (build with make && sudo make
  install and insert in kernel with modprobe -v rtl8821ae, notice:
  rtl8821ae not rtl8812ae). This raised speeds to 40Mbps (on 5GHz),
  which is consistent with the speeds from the Windows driver.

  Note: I also installed the new kernel 4.9 somewhere during this, so
  I'm not sure whether installing the drivers from the github repo is
  really necessary.


How to log in after wrongly modifying path

In addition to @João Pinto's answer, you cannot use text editors like gedit or Kate. For the terminal or console, use text-based editors like nano.

The full steps needed to make changes to the ~/.profile file:

Press Ctrl + Alt + F1 to switch to a text console
Login with your username or password
Restore your $PATH variable by restoring the environment so you can run nano without specifying the full path:

. /etc/environment

Edit the ~/.profile file by running:

nano ~/.profile

Use Arrow keys, Page up or Page down to move the cursor. As with text editors like Kate, you can use Backspace or Delete to delete text before or after the cursor and insert text by typing it.
After making the changes, save the changes and quit the nano editor by pressing Ctrl + X, followed by Y to answer yes on saving changes. Finally, press Enter to confirm the filename.
You can now logout from the console by pressing Ctrl + D (or by executing exit)
Switch back to the graphical login by pressing Ctrl + Alt + F7 or Ctrl + Alt + F8 if F7 did not work.

If this does not work out-of-the-box for whatever reason, then we can always revert to karthick87's answer which Jasper added as an answer below: using a LiveCD to make changes.


A Zenity command like this might help

zenity --entry --text "Enter short description:" --entry-text=""

Command returns your short description so you need to work that into your cronjob


Here's an alternative to Miro that may be of help. Firefox has an addon called "Download Video Helper" -- You can download streaming video with that.


Can't boot in windows 8 after upgrade to 14.04

Boot into Ubuntu 14.04 and try updating Grub

sudo update-grub

That will check for the other OS that are installed in your machine and updates grub then reboot to see if it worked

If that did not work then you have to repair your windows boot-loader first and then re-install grub

for windows boot loader

=> u need a windows 8 repair disc or windows 8 live usb or live cd

boot from any of the above windows disc and go to

Repair=>System Recovery Options=>command prompt

type the following two commands in cmd exactly

Bootrec/fixmbr 'press enter'

Bootrec/fixboot 'press enter'

now reboot u can see windows boot loader again

Now back to grub boot loader

=> u need ubuntu live usb and use " load ubuntu without install" then install boot-repair and repair grub u can see it in this how it is done https://help.ubuntu.com/community/Boot-Repair

if u install windows boot loader u can create a ubutnu live usb in windows using unetbootin(in case if u have a single pendrive currently)

i hope this will solve ur problem


Oracle Java JDK 9 unable to install via tar

Java is one of the many commands which can be installed to / configured (selected) in /etc/alternatives/

Java 9 example

$ sudo update-alternatives --install /usr/bin/java java /usr/java/jdk-9.0.4/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/java/jdk-9.0.4/bin/javac 2

If more than one version, please select with :

$ sudo update-alternatives --config java


Can I change the default of "block-size" in commands?

All those commands you mentioned (du, df, ls) have a -h option to make the output sizes "human-readable", using K, M, G and T as appropriate.

If you want to avoid adding the 'h' everytime, simply define bash aliases that include it, eg

alias duh='du -h'
alias lsh='ls -h --color -F '


Can't install Skype through Software Center 12.04

Heres the better solution:

Download deb file here. Open terminal, cd to directory of downloaded skype and then run sudo dpkg --install --force-all TheSkypeFileName.deb. After installation, do not run skype, run this command instead sudo apt-get install -f, this will install all the dependencies. And your up.


No, ppa and repositories are configured as a part of system configuration (apt) and not as a part of user accounts.

See https://help.ubuntu.com/community/Repositories/Ubuntu

You need access to root, ie an administrative login, to configure the system however.


How to prepend a string to only the lines of text which are numbers

sed can do that:

$ sed 's/^[[:digit:]]*$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word

In case we want to account for empty lines, we'd use + and -r option:

$ sed -r 's/^[[:digit:]]+$/number-&/' input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty

line above is empty

Once you verify everything is proper, you can use -i option to edit the file itself, i.e. sed -i ....  Otherwise, you can always make a copy of the file with  sed 's/^[[:digit:]]*$/number-&/' input.txt > output.txt

Note that this assumes consistent file format, with no leading whitespaces or trailing whitespaces on each line.

And here's Python as extra:

$ python3 -c 'import sys; print("\n".join([ "number-" + i.strip() if i.strip().isnumeric() else i.strip() for i in sys.stdin]))' < input.txt
Series
Of
Word
number-73914
Again
Word
line below is empty

line above is empty


not able to upload file to server via ftp/ cpanel

There was some firewall problem.
Many programs are built to offer network services. For instance, you can share content, or let someone view your desktop remotely. Depending on which additional programs you install, you may need to adjust the firewall to allow these services to work as intended. ufw comes with a number of rules already pre-configured and you can add your own rules. For instance, to allow SSH connections, enter sudo ufw allow ssh in a terminal. To block SSH connections, enter sudo ufw deny ssh.

To check the current status of ufw, enter sudo ufw status in a terminal.

You can read complete reference here


I had the same thing, but rather than disabling the autocomplete package you can just change the hotkey.  By default, the suggestion is autocompleted when you press either tab or enter which is annoying when you press enter to get to next line.

I changed it to tab only so that I can still use autocomplete when it's useful, but it won't put the wrong text in place when starting a new line.


PermitRootLogin without-password not working

That is normal behaviour. You will be prompted for a password, but if PermitRootLogin without-password is set, then  no password will work. If you don't want to be prompted for a password at all, then set in your sshd_config:

PasswordAuthentication no

If you only want to deny it for root, try:

Match User root
    PasswordAuthentication no


Run acpi_listen in the terminal, to test if the key event received by the system. Then press Fn+F2 & Fn+F3. Below an output example:
 # acpi_listen
  PNP0C14:00 000000d0 00000000
 video/brightnessup BRTUP 00000086 00000000
  PNP0C14:00 000000d0 00000000
 video/brightnessdown BRTDN 00000087 00000000

See if you can control backlight using
 sudo apt-get install xbacklight
     xbacklight -inc 20
     xbacklight -dec 20

Another try at lower level
 # ls -l /sys/class/backlight/
 lrwxrwxrwx 1 root root 0 Jun 10 13:56 /sys/class/backlight/intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight

 # ls -l /sys/class/backlight/intel_backlight/
 total 0
 -r--r--r-- 1 root root 4096 Jun 10 14:28 actual_brightness
 -rw-r--r-- 1 root root 4096 Jun 10 14:28 bl_power
 -rw-r--r-- 1 root root 4096 Jun 10 15:19 brightness
 lrwxrwxrwx 1 root root    0 Jun 10 14:28 device -> ../../card0-LVDS-1
 -r--r--r-- 1 root root 4096 Jun 10 14:28 max_brightness
 drwxr-xr-x 2 root root    0 Jun 10 14:28 power
 lrwxrwxrwx 1 root root    0 Jun 10 14:28 subsystem -> ../../../../../../../class/backlight
 -r--r--r-- 1 root root 4096 Jun 10 14:28 type
 -rw-r--r-- 1 root root 4096 Jun 10 14:28 uevent

 # echo 3600 > /sys/class/backlight/intel_backlight/brightness

Setup an ACPI script as explained in What code is executed when headphones are disconnected?
/etc/acpi/events/intel-backlight
 event=video/brightness*
 action=/etc/acpi/intel-backlight.sh

/etc/acpi/intel-backlight.sh
 #!/bin/bash

 x=$(cat /sys/class/backlight/intel_backlight/actual_brightness)

 if [ "$2" == "BRTUP" ]
   then
     x=$(echo $x+490 | bc)
     echo $x > /sys/class/backlight/intel_backlight/brightness
 fi

 if [ "$2" == "BRTDN" ]
   then
     x=$(echo $x-490 | bc)
     echo $x > /sys/class/backlight/intel_backlight/brightness
 fi

Make the script executable with chmod +x /etc/acpi/intel-backlight.sh.


How do I build a snap in an isolated environment?

You certainly can. snapcraft has a "cleanbuild" option which can either (default) build locally inside an lxd container, or remotely (via the --remote option).

So:-

Build in a local lxd (needs the lxd package to be installed, and networking setup for LXD):

snapcraft cleanbuild

Build in a remote lxd:

snapcraft cleanbuild --remote remotemachine

I followed this guide to setup remote building on my home server. Works well!


Thank you for the link, here is what I did:

Synaptic -> removed all wine repositories
sudo dpkg --add-architecture i386
sudo apt update
Removing previous WineHQ repository:

sudo apt-add-repository -r 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main

Adding other repositories:

wget -q https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key -O Release.key -O- | sudo apt-key add -
sudo apt-add-repository 'deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./'

sudo apt-get update

But!
The final suggested step with wine-stable:

sudo apt install --install-recommends **winehq-stable**

did not work - it said that Linux could not locate the package
sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package winehq-stable

The final suggested step - with wine-devel:

sudo apt install --install-recommends **winehq-devel**

.. worked!


How do I hide / remove a partition from the Nautilus left panel?

You can use the mount option x-gvfs-hide in /etc/fstab to hide it in nautilus, for example.

For example, a line in /etc/fstab would become:

/dev/sda1 /mnt/sda1 ext4   defaults,x-gvfs-hide       0     2

Edit:
Or you can create a fake line in /etc/fstab like this

/dev/sda2 /mnt/sda2 ext4 noauto,x-gvfs-hide 0 2

for the sole purpose of hiding it in nautilus. It will not be mounted so the mount point could not exist.


Permanent email/chat indicator till click

Recent Notifications indicator is a solution that I have just found.

sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications recent-notifications


Work on localhost, on domain not working. Connection timeout?

Your firewall doesn't allow port 33333. Run:

sudo ufw allow 33333/tcp

to open it.


why does transmission bittorrent client still send and receive with zero download/upload speed!

I can't say for sure. But what you're limiting is the actual file transfer. I'd guess that Transmission would still update the trackers at a regular interval. That shouldn't be too much data, but if you have many active torrents, it'll grow. Perhaps it keeps updating the list of peers as well.


Gnome Settings

You can control the screensaver via Settings > Background, sorry but there are no more options in the GUI.

and via

Settings > Power

Tweak Tool

A little bit more options are in the Gnome Tweak Tool

gsettings or dconf-editor

And all options you can access via gsettings. Here is a list of all available keys for the screensaver

% gsettings list-keys org.gnome.desktop.screensaver
picture-opacity
logout-enabled
lock-enabled
logout-delay
embedded-keyboard-enabled
primary-color
idle-activation-enabled
secondary-color
logout-command
color-shading-type
embedded-keyboard-command
show-notifications
picture-options
lock-delay
show-full-name-in-top-bar
picture-uri
status-message-enabled
ubuntu-lock-on-suspend
user-switch-enabled

and for the power management

% gsettings list-keys org.gnome.settings-daemon.plugins.power
button-power
critical-battery-action
percentage-low
priority
lid-close-suspend-with-external-monitor
idle-dim
button-hibernate
sleep-inactive-ac-type
button-sleep
button-suspend
sleep-inactive-battery-timeout
time-low
lid-close-ac-action
notify-perhaps-recall
percentage-critical
percentage-action
sleep-inactive-battery-type
time-action
lid-close-battery-action
idle-brightness
sleep-inactive-ac-timeout
time-critical
active
use-time-for-policy

gnome-screensaver-command

To control the gnome-screensaver you have to use

gnome-screensaver-command

From man gnome-screensaver-command

SYNOPSIS
       gnome-screensaver-command [OPTION...]

DESCRIPTION
       gnome-screensaver-command is a tool for controlling an already running instance of gnome-screensaver.

OPTIONS
       --exit Causes the screensaver to exit gracefully

       -q, --query
              Query the state of the screensaver

       -t, --time
              Query the length of time the screensaver has been active

       -l, --lock
              Tells the running screensaver process to lock the screen immediately

       -a, --activate
              Turn the screensaver on (blank the screen)

       -d, --deactivate
              If the screensaver is active then deactivate it (un-blank the screen)

       -V, --version
              Version of this application


Need to force specific resolution at boot

OK, found the resolution code needed for GRUB, GRUB2 and LILO at http://linuxquestions.org/questions/blog/archtoad6-147095/… - added the code then updated grub, and on the next reboot, I got the resolution I needed. Now looking for the other solution, for GUI only on demand. The 800x600 code (256 color) to add in to /boot/grub/menu.lst is vga=771 .