exercise on ACL from computer security course

I've written an answer, but this seems like a "homework" question. I don't consider that bad, but I do suggest providing details about what
  you have figured out so far when asking such questions. This can both
  get you  most useful answers, and assist you in combining pedagogical
  benefits intended by the instructor with those afforded by Internet
  communities--for example, by informing us about what you have and have not
  yet learned, or by making it so you can still figure out some of the
  solution yourself.

ACL stands for Access Control List. The problem here seems to relate to ordinary Unix-style permissions (see also FilePermissions), and not to ACLs. Specifically, this is an exercise about setuid executables, and about the executable permission bits for the  group and other classes. (If this is an exercise you're currently working on, that might be enough of a clue for you to solve it.)

Why do I think this is not (also) about ACLs? There's no information about ACLs set on the file, in the output of ls -l. Even if there is an ACL-related problem with dangerous.exe, there's no information given that would point to or otherwise suggest it.

Furthermore, at least in Ubuntu, ls checks if a file's permissions are customized through an ACL, and if so, appends + to the end of the symbolic permissions string.

ek@Ilex:~$ ls -l foobar                  # no + in the output of ls
-rw-rw-r-- 1 ek ek 0 Sep 14 13:16 foobar
ek@Ilex:~$ setfacl -m g:adm:r foobar
ek@Ilex:~$ ls -l foobar                  # now there's a + in the output
-rw-rw-r--+ 1 ek ek 0 Sep 14 13:16 foobar

(Note, though, that there may be some Unix-like systems with different ACL implementations and/or where the default ls executable does not check for the presence of ACL rules on files.)

For more information on ACLs in Ubuntu, see FilePermissionsACLs. As for the other issues, detailed analysis follows.

First, some commentary about what is contrived about the problem, to help us keep in mind the sorts of things that are ordinary in exercises but shouldn't be ignored if encountered "in the field."

In real life, though this is unlikely what the exercise was focused on:

A user called foo on a production system is odd.
(Though perhaps it belongs to Fordham Oo, Jr.)

And, more extremely, a user called user (as indicated in $PS1) is basically never a good idea.

These names will likely be interpreted metasyntactically in communication between colleagues, and may even be accidentally seen that way late at night by a system administrator who's struggling with a mostly unrelated problem.
Similarly, a group called group is basically never a good idea.
A file called dangerous.exe whose history I don't know about is alarming. It's either improperly named or maybe it shouldn't be lying around.

Now for what will, in this situation, usually be main security-related concern.

In both real life and probably in the mind of whoever wrote the question:

The s in -rwsr-xr-x means dangerous.exe is a setuid executable. This can be done with chmod:

ek@Ilex:~$ ls -l dangerous.exe
-rwxr-xr-x 1 ek ek 0 Sep 14 12:29 dangerous.exe
ek@Ilex:~$ chmod u+s dangerous.exe
ek@Ilex:~$ ls -l dangerous.exe
-rwsr-xr-x 1 ek ek 0 Sep 14 12:29 dangerous.exe

Since dangerous.exe is setuid, it runs as its owner no matter who executes it. Occasionally this is appropriate, but unless used sparingly and carefully it can cause very serious security problems, facilitating undesired access to the account who owns the executable.
But that's not all. We know this is especially likely to be a case where a security problem could arise. (If there are any users or services running on the system that ought to be prevented from doing things foo is able to do, that is. Which is likely. Remember that a system with just one human user will by default have other user accounts are used by the system to perform actions with reduced privileges.)

This is due to the other permissions set on dangerous.exe. Because of the way its executable bits are set, anyone can execute dangerous.exe!

-rwsr-xr-x 1 foo group 41836 2012-10-14 19:19 dangerous.exe
      |   \
      \    This x indicates all users other than foo and members of
       \   'group' may execute the file! That's almost definitely bad!
        \
          This x indicates anyone in the 'group' group may execute the
          file. Depending on what the 'group' group means and who's in
          it, that might be bad.

How do we know this by inspecting -rwsr-xr-x 1 foo group 41836 2012-10-14 19:19 dangerous.exe? After the first character (which is - for normal files, d for directories, and l for symbolic links) come nine characters.

The first three say if the user who owns the file can read, write, and execute it. (A - appears when the answer is no.) The next group of three say if members of the file's group owner, other than the user owner, can read, write, and execute it. And the final group of three say if if other users, who neither own the file nor are in its group owner, can read, write, and execute it.

Therefore all users on the system can run dangerous.exe--and when they do, they are running it as foo rather than as themselves!
For a file to be safely setuid (or setgid), it must be carefully written to ensure it can only be used to engage in appropriate actions. For example, the /usr/bin/passwd executable that runs when a user changes their password with the passwd command is setuid, and owned by root, so even when a limited user runs it, it runs as root. This is necessary, for it to make changes to the password database. But it's carefully written so that it will only make authorized changes.

Depending on what privileges foo has on the system, this is likely a less severe problem than if a root-owned setuid executable had a bug that allowed it to be used in unintended ways. But it still is cause for alarm.

If you were a system administrator in this situation, you may wish to consult with the user foo to see if the permissions they've set on dangerous.exe were a mistake. (Depending on the context and other elements of the situation, you might potentially take more immediate action.)


Performance in Kubuntu 20.04 gets progressively worse while using

The solution for now was to disable Blur in plasma System settings. I will monitor my system for more perfromance issues over a day or two but the isssue seems to be gone for now.
You'll find the Blur checkbox under System Settings > WorkSpace Behaviour > Desktop Effects.
I disabled Blur and Translucency but I think it's only Blur that you'll have to target.
It remains to be explained why this issue exists and how one can continue to use Blur without performnace penalties.
Edit 1 - Update after a day of use.
I turned off Baloo file indexer as well.
Good news - Performance is much better after turning off Blur.
Bad news - Performance degradation still persists and my laptop slows down significantly after just an hour of use. Blur was just one of the issues, there's something else that's causing significant performance degradation.


I can't understand what reasons do you have to do this, but let's do it.

First move any files that you have in ~/Desktop wherever else do you want using the following command from terminal:

mv ~/Desktop/* /path/to/another/directory

Second, make your desktop background black:

Third, run the compizconfig-settings-manager  package and disable the Ubuntu Unity Plugin:

Related:

Unity doesn't load, no Launcher, no Dash appears


How to run Thunderbird on startup, minimised?

To start thunderbird when you log in, add it to the list of start-up applications See Setting up programs to startup at login - in short, open the "Startup Applications" app, and add an entry for Thunderbird.
For starting it minimized, I don't know of any native way, but I use an add-on: FireTray
It minimizes to the tray, however:

(Please excuse the clipped nature of the bottom - I did a hasty job of cropping out a lot of empty space from a too-large picture.)


Share ubuntu-server 16.04 folder to windows host

So i have figured this on my own and this is the easiest solution:

just install samba with

sudo apt install samba

and go to this file:

/etc/samba/smb.conf

and just at the bottom add these lines:

[share]

comment = Ubuntu File Server Share
path = /path/to/the/folder  #for example /home/user_name/public <- this comment needs to be deleted!
browsable = yes
guest ok = yes
read only = no
create mask = 0755

restart the samba service

sudo service smbd restart
sudo service nmbd restart

and that's it, easy peasy :)


How create a keyboard shortcut for a launcher to bring it on top of windows

Edit if you are using Unity there is an automatic shortcut that those this for every program in the launcher, just use SUPER+key, you can see the key assigned to each program letting SUPER pressed for a while.

If the program is pinned to the launcher, it will retain the same shortcut until you change its position.


Are there any tools for working with PL/SQL?

Unless you absolutely must use Oracle's product, there are many combinations of programming language and database engine that will probably meet your needs. Surely if you are already using Java you could just program your logic in that language and make your queries against a Postgres database, for example.

I apologize if I've misunderstood your question. If you necessarily must use PL/SQL then there is a list of possible alternatives at alternativeto.net. Unfortunately I don't see anything in that list that looks likely to meet your needs apart from Toad For Oracle, which is apparently a non-free product.


Is the monitor connect through VGA or DVI - DVI is better as it supports more detailed
communication between the graphics chip & monitor.


20.04 how to use adobe connect in ubuntu?

This really depends on the server's adobe connect version  but you could try adding:
&proto=true

to the end of the url.
So for example
https://adobe.connect/rn2eXts5e1b7/?session=somebreezsessionID

would become
https://adobe.connect/rn2eXts5e1b7/?session=somebreezsessionID&proto=true

Then click 'Open in Browser' button. I guess this way, you see the HTML version of adobe connect.


How can I use cron to edit a line in a file?

To replace the 35th line in the file /path/to/test.cfg
with the text x the following command will do:

sed -i '35 c x' /path/to/test.cfg

To have that run every fifth minute on Sundays in March
create the following cronjob via crontab -e:

*/5 * * 3 0 /bin/sed -i '35 c x' /path/to/test.cfg


Running PHPmyadmin from inside a site dir

No it should not be an issue as long as judith-law.co.il maps to 46.101.215.108.

This 46.101.215.108 is the way our computers think and judith-law.co.il is the way we humans think, so both are the same and will give no issues when you access phpmyadmin in either fashion.

Domain names map to IP addresses and a good example is localhost which maps to 127.0.0.1 on our local computers so calling or using localhost will have the computer resolve it to the IP address 127.0.0.1 or vice versa


How to use a common clipboard for vim and Unity?

In vim, the "+ register points to the system clipboard by default. But it sounds like you already know that.

That register probably isn't working because you need to install the gvim alternative. The default vim can't interface with the X clipboard (eg "+p will fail). Just do:

sudo apt-get install vim-gnome

The command vim will be updated to use gvim instead, and you should be able to yank from and paste to your system's clibpoard.


You could redirect the error output of your cronjob command to a file. Here is an example of a line in /etc/crontab:
01 3    * * *   user    /bin/command 2>> /var/log/some.file

Then at least you got a clue if errors occured. You might even write a script to notify you over notify-osd or similar tools when the file changes.
Edit:
The file /var/log/syslog reports messages from cron as well. You might want to take a look at that. To get a dedicated log-file for the cron deamon edit /etc/rsyslog.d/50-default.conf and uncomment/edit the line that says:
#cron.*             /var/log/cron.log

Don't know what you'll find there but worth the try. Report how it went.


Not finding Xampp in ubuntu software center?

You wont find XAMPP in the software center.

To install it you have to download it from the official xampp site, i suggest you choose the PHP 5.5 version.

To install it open the terminal (ctrl+alt+t) and run the following commands:

Change the permissions to the installer - chmod 755 xampp-linux-*-installer.run (IMPORTANT - replace the
    * with either x86 or x64)
Run the installer - sudo ./xampp-linux-*-installer.run (IMPORTANT - replace the
    * with either x86 or x64)
To start the program - sudo /opt/lampp/lampp start

Then open the browser and access localhost.

Good luck.


How can i make a script to open Winbox Wine easier and faster

Similar to what I did for running CloneVDI.exe with Wine. CloneVDI is an application to clone VirtualBox virtual drives. It works very well in Linux.

The easiest way to add your app as a menu item is by adding the app with Alacarte or Main Menu. If you don't have it in your Ubuntu, install it with:

sudo apt-get install alacarte

Then, open it (it may be installed under Accessories).

The image corresponds to my specific case. Change Name and Command to your app. You could locate your app with the Browse button.

This will add the corresponding .desktop file to $HOME/.local/share/applications.

The CloneVDI shortcut was saved under the name alacarte-made-1.desktop. Copy that file to your ~/Desktop and you are done!

The desktop file content will look like to something like this:

[Desktop Entry]
Comment=
Terminal=false
Name=CloneVDI
Exec=wine /opt/CloneVDI-exe-4.00/CloneVDI.exe
Type=Application
Icon=gnome-panel-launcher

I wish it could be easier but this is Linux Desktop world; infinitely hackable.


Attempting to install Postfix on an Amazon EC2 instance and getting 404 not found

That mirror http://us-east-1.ec2.archive.ubuntu.com/ is not accessable from here also. Try other public repository mirrors.


I finally stumbled across git the file  /bin/ntfsusermap . Apparently this executable has been renamed (from ntfs-3g.usermap) in more recent distributions, although I have not come across anything that mentions this, or why the change was made.


Ubuntu for Phones uses Cyanogenmod as a base, from where it chroot's in too Ubuntu. That's why the building procedure is most like Android.

To be able to use the building en setting-up commands, you fist need to set up the environment. This is done by issuing source build/envsetup.sh. More info can be found at Cyanogen developers wiki.


How to recover from chown on all the files?

I've come up with a solution. I tried to reinstall Ubuntu with the same USB stick that installed it the first time, before I used chown upon everything. Either the USB stick was plugged in when I used the command or I don't know, it may have gotten corrupted.

I've made a new bootable stick with another Ubuntu version and it worked.

Thanks :)


I need downgrade from Subversion 1.8 to subversion 1.7

In order to expand Sylvain Pineaus answer a bit: I had the same problem as OP and I solved it like this:

I added the following lines at the end of /etc/apt/sources.list:

# REMEMBER TO DELETE THIS AFTER SVN 1.7 is installed
deb http://extras.ubuntu.com/ubuntu saucy main
deb http://de.archive.ubuntu.com/ubuntu/ saucy main universe restricted multiverse

Now remove the svn packages with version 1.8

sudo apt-get remove subversion libsvn1

update the sources

sudo apt-get update

and install the correct versions

sudo apt-get install subversion=1.7.9-1+nmu6ubuntu3 libsvn1=1.7.9-1+nmu6ubuntu3

Now we need to fix the version of the packages by

echo subversion hold | sudo dpkg --set-selections
echo libsvn1 hold | sudo dpkg --set-selections
echo libserf1 hold | sudo dpkg --set-selections

The libserf1 is needed by subversion or libsvn1 and is now (in 14.04) called libserf-1-1, I guess.

Now remove the lines of /etc/apt/sources.list that were added and update the sources once again (just to be sure)

sudo apt-get update


Combine two ffmpeg commands to encode, watermark, and subtitle a file

ffmpeg -i video.mp4 -i watermark.png -filter_complex "[0:v]scale=640:360[bg];[bg][1:v]overlay=10:10,subtitles=text.srt" -c:v libx265 -preset veryslow -crf 33 videofull.mp4

Filters in the same linear chain are separated by commas, and distinct linear chains of filters are separated by semicolons. See FFmpeg Filtering Introduction for more info.
I removed -tune psnr -refs 3 because psnr is detrimental for general encoding and refs should be covered by the preset.


Where to point the browser to when using Virtual Host?

Adding 127.0.0.1 example.com in /etc/hosts file solves the problem.

The browser should be pointing to http://example.com/phptest.php.

Note: Make sure that the server-name variable in the php script accessing MySQL (phptest.php in our case) is set to "example.com".


Is there something I can do from the terminal when a program freezes up and Ubuntu becomes unresponsive?

You can do xkill. This nifty little utility automatically mauls the next window you click.

Another option you can use is something called top or htop. Look for a weird process, especially something marked as a "zombie" or taking up lots of system resources. You can then kill it using the K key. Use kill code 9, as that causes an instant and forced kill of the process.

Say the bad program is nautilus. Use one of these methods:

Use xkill in the terminal and click on the Nautilus window. X will terminate its session, causing Nautilus to crash. Spam the ESC key for a few seconds to make sure Xkill stll isn't running.
killall -9 nautilus
Run top, look for nautilus, and kill it from top.

Note that you might need to use sudo privileges to kill some processes.


How to configure Avahi network on Ubuntu 14.04?

You should NOT call your local domain .local because that is a reserved namespace for bonjour aka avahi aka zeroconf. Change your local domainname to localnet or something else.


Install the Gnome Extension Adjust Brightness Icon

After installation and setting to ON you will find a lightbulb icon on the top bar.

Left click with the mouse to reduce the brightness to that required and keep clicking to reset to default. 4 clicks completes the cycle.

Don't forget that you can also set the Night Light ON with the right most menu drop down on the top bar.

The Night Light On utility helps considerably in reducing glare from over-white background screens.


I can't be sure without looking at logs etc. but the IP addresses involved and the error suggest something like the following:

You had a mongodb sharded cluster configures in EC2
The cluster was configured using IP addresses (rather than hostnames)
The config database (you are only running one, so I hope this is test only and not prod) was on a host that was rebooted, its IP address changed when rebooted
Because of that change, you restarted your mongos process(es) and pointed them at the new IP address by altering the config string at start up
You did not restart the rest of the MongoDB processes
Hence the other parts of the cluster still expect the config server to be on the old  IP address and are throwing an error because of the mismatch

Assuming I am close in the description above, the root of your problem is two basic things:

If you move config servers and change the hostname (in your case IP address) you have to follow this procedure.  In particular note step 5: "Shut down all existing MongoDB processes"
Don't use IP addresses when configuring a set or a cluster, use hostnames instead, even if they are just in /etc/hosts rather than DNS, they provide a level of abstraction that is very useful if you are dealing with an environment where the IP address is transient and you cannot control what IP and instance receives when it is rebooted.

To fix this, you will need to restart the mongod and mongos processes, basically following the procedure linked in 1 above.  Once all parts of the cluster agree about the IP Address (or hostname) of the config server, this issue should resolve itself.


How to fix LibreOffice 3.5 to start from launcher icon?

Open Ubuntu Software Center. Search For LibreOffice Writer. Click on "Info" then See the bottom of Software Center. There is a Add to launch bar option. Try that.


How to set global route in GNOME Network Manager

Network-Manager default GW handling
The network-manager always uses the last configured interface as default gateway. In case of LAN vs. WIFI this is almost always the WIFI. To avoid this, the option "Use only for resources on this connection" can be set to the WIFI.
The problem with this setting is: It only works in the LAN+WIFI environment. If the LAN is not present, the WIFI will not be used as default gateway.
Network-Manager Dispatcher for special setups
The network-manager does not support profiles from the gnome GUI. But the network-manger dispatcher supports it. See the ArchWiki for a WLAN/Eth toggle sample.
# file: /etc/NetworkManager/dispatcher.d/wlan_auto_toggle.sh

#!/bin/sh

if [ "$1" = "LAN_interface" ]; then
    case "$2" in
        up)
            nmcli radio wifi off
            ;;
        down)
            nmcli radio wifi on
            ;;
    esac
fi


Unfortunately, you can't, at least not easily.  Wubi's designed to install Ubuntu inside the Windows partition in what is called a loopback file.  Essentially, when Ubuntu boots, first the kernel mounts the Win7 NTFS partition, then looks for the file that contains the Ubuntu file system and "pivots" onto it.  The cleanest way to get rid of Windows would be to reinstall without using Wubi.

Of course, technically it would be possible to manually repartition, copy everything from the loopback filesystem, delete Windows, repartition again, install the bootloader, etc.  But I think that route would be nothing but a trail of tears for anyone except maybe Linus Torvalds ;).

Don't forget to back up your data!


If those streaming services use DRM, you must enable DRM in Firefox's settings: Preferences -> General -> Play DRM-controlled content You might also have to install package libavcodec-extra to get the codecs:

sudo apt install libavcodec-extra


You need to be the owner of the tasks file as well so you have permission to write a pid to it.  To do that, Use -t, e.g.,
sudo cgcreate -a $USER:$USER -t $USER:$USER -g cpu:ipeacocks


Edited:

I edit my answer to show a so much simpler aproach. You can use a device type:name instead of its ID like so:

xinput set-prop "keyboard:Logitech K400 Plus" "libinput Middle Emulation Enabled" 1

This avoids having to know the volatile ID field.

Old answer:

I had not found a way of changing Default values of Xinput, but you
can use bash pipes to get the ID dynamically and use it in a Startup
Aplication.

As I lack the specifics of your device, I exemplify with my personal
case. I want to change some Xinput properties of my K400+ keyboard.

First you have to locate univocally the Xinput line that
identifies your device.

$ xinput

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech K400 Plus                        id=6    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Logitech K400 Plus                        id=7    [slave  keyboard (3)]

So I can use the simple regex K400.*keyboard to get the last line
(not the pointer one). Next I grep this regex into a pipe, isolate
the id via cut utility.

$ xinput | grep K400.*keyboard | cut -f2 | cut -c4-
7

Finnaly I use it to change whatever property I want. In this case, I'm
interested in libinput Middle Emulation Enabled. The full command
that does this is:

xinput | grep K400.*keyboard | cut -f2 | cut -c4- |
xargs -I{} xinput set-prop {} "libinput Middle Emulation Enabled" 1

Now you can use it as a Startup Aplication.


You can remove Windows by deleting it's partitions. BE careful not to delete the EFI partition as this is used by grub.

Assuming that your windows partitions are before your Ubuntu partition. Growing it will require a move also. This may cause boot errors. I recommend making a new partition with the free space and mount it in your /home directory for data storage.


Trying to turn an old computer into a server. Where do I start?

Ubuntu doesn't officially support PowerPC, but it still provides a version for it:

https://wiki.ubuntu.com/PowerPC

According to their FAQ, PowerPC is a community-supported architecture of Ubuntu, and the downloads are available at selected mirrors.

Read their FAQ for more info.


How to find files that do not have a duplicate in a separate directory

If you are ready to use CLI, the following command should work for you:

diff --brief -r backup/ documents/

This will show you the files that are unique to each folder. If you want you can also ignore filename cases with the --ignore-file-name-case

As an example:

ron@ron:~/test$ ls backup/
file1  file2  file3  file4  file5
ron@ron:~/test$ ls documents/
file4  file5  file6  file7  file8
ron@ron:~/test$ diff backup/ documents/
Only in backup/: file1
Only in backup/: file2
Only in backup/: file3
Only in documents/: file6
Only in documents/: file7
Only in documents/: file8
ron@ron:~/test$ diff backup/ documents/ | grep "Only in backup"
Only in backup/: file1
Only in backup/: file2
Only in backup/: file3

In addition, if you want to report only when the files differ (and not report the actual 'difference'), you can use the --brief option as in:

ron@ron:~/test$ cat backup/file5
one
ron@ron:~/test$ cat documents/file5
ron@ron:~/test$ diff --brief backup/ documents/
Only in backup/: file1
Only in backup/: file2
Only in backup/: file3
Files backup/file5 and documents/file5 differ
Only in documents/: file6
Only in documents/: file7
Only in documents/: file8

There are several visual diff tools such as meld that can do the same thing. You can install meld from the universe repository by:

sudo apt-get install meld

and use its "Directory comparison" option. Select the folder you want to compare. After selection you can compare them side-by-side:

fdupes is an excellent program to find the duplicate files but it does not list the non-duplicate files, which is what you are looking for. However, we can list the files that are not in the fdupes output using a combination of find and grep.

The following example lists the files that are unique to backup.

ron@ron:~$ tree backup/ documents/
backup/
├── crontab
├── dir1
│   └── du.txt
├── lo.txt
├── ls.txt
├── lu.txt
└── notes.txt
documents/
├── du.txt
├── lo-renamed.txt
├── ls.txt
└── lu.txt

1 directory, 10 files
ron@ron:~$ fdupes -r backup/ documents/ > dup.txt
ron@ron:~$ find backup/ -type f | grep -Fxvf dup.txt
backup/crontab
backup/notes.txt


How to install .tar.gz/.tar.bz2 packages without root privileges?

Untar the file using command

 tar xjvf tarball_package.tar.bz2

or

 tar xzvf tarball_package.tar.gz

If there is a .deb(Precompiled binaries) file in the extracted package. You can install it using command dpkg -i package_name.deb

If its a source file then you need to compile it using the following commands.

./configure
make
make install

For more information read this Ubuntu help page


dpkg "missing version" for libcgns2-dbg in /var/lib/dpkg/available — can't do update - how can I fix this?

dpkg: warning: parsing file '/var/lib/dpkg/available' near line 839085 package 'libcgns2-dbg':
missing description

From the above error report, it was clearly shown that description for a specific package is missing in the file /var/lib/dpkg/available. So delete the current available file and move or copy the backup file to it's location.

sudo rm /var/lib/dpkg/available
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available


Can't change ownership of mounted device

This problem is typical for partitions with a Microsoft file system, NTFS, FAT32 and exFAT. The ownership and permissions are set when mounting and cannot be modified without unmounting and mounting again, this time with new settings.

See this link with more details,

How do I use 'chmod' on an NTFS (or FAT32) partition?


Just hit /, and type your search pattern.

Patterns can be regular expressions, for example, you could search for the word "option" by typing

/[Oo]ption

Or find all of the long arguments with

/(--)[a-Z]

To cancel the search, hit Ctrl+C.

Some useful quantification operators are:

?    for zero or one of the preceding expression
*    for zero or more of the preceding expression
+    for one or more of the preceding expression

And expressions can be "grouped" with parentheses, as in (--)+ (for two or more dashes).

[a-Z] is a sequence (others include [0-9], [a-z] and so on), they can be combined, as in [a-Z0-9]. You can also invert expressions with the ^ operator, e.g. (--)[^a-Z]+ for all long arguments that start with anything other than a letter.

Another useful operation is Union (|), as in color|colour, which finds every occurrence of either color or colour (this is sometimes called boolean OR).

If you are searching for strings containing some of these "reserved" characters (like ?, *, +), prefix them with a \  (i.e. /\+k to search for +k)
To jump through the results, press N (forwards) and Shift+N (backwards).
There is also a way to search across all manpages:

man -K "Hello World"

The man program will open the first match, and after you close it with q, offer you to

view the next one (Return)
skip the current one (Ctrl+D)
or exit (Ctrl+C).


What does UUID mean? Is it used to identify and reference virtual
  machine?

Yes, you are right. A universal unique identifier (UUID) is a 128-bit number used to uniquely identify each virtual machines. It is stored in the SMBIOS system information descriptor. It can be accessed by standard SMBIOS scanning software and used for system management in the same way you use the UUID of a physical computer.

The UUID is generated when you power on or reset the virtual machine. As long as you do not move or copy the virtual machine to another location, the UUID remains constant.

Fore more read the documentation.

You can use:

VBoxManage list vms

to list all currently registered VMs with their settings, names and UUIDs.

Once you know the UUID you can also start a vm by:

VBoxManage startvm <UUID-of-vm>

which is essentially same as:

VBoxManage startvm "Name-of-vm"


Copying a Running Physical Server to Virtual Box

Using rsync directly turned out to be more problematic than I first thought:

The command needs to be run as root on the remote machine.
I didn't won't to enable remote root login.
The filesystem in based on LVM and it was a hassle to mount the actual root partition of the VM from inside the LVM in the VDI file.

For these reasons I ended up with a 2 step process:

Copy all the files from the remote machine to the local host machine.
Copy the files to the guest.

I finally went with basic tar, although I could have used rdiffdir provided by duplicity to save some bandwidth.

I started out by setting up an SSH tunnel which I could use to tunnel the tar files so I wouldn't have to write the archive to the filesystem I was copying.

local$ ssh user@remote -R 3000:localhost:3000
loacl$ nc -l 3000 > filesystem.tar.gz
remote$ sudo tar -vcz / --exclude={/dev,/proc,/sys,/tmp} | nc localhost 3000

This created a tar archive of the entire filesystem in my local host machine. The next step was to untar it on the guest:

guest$ cd /
guest$ nc -l 3000 | sudo tar -xvz
local$ nc guest_ip 3000 < filesystem.tar.gz

In my case /etc/fstab referenced filesystems by their UUIDs, so I had to update it with the output of guest$ sudo blkid. I also had to update the networking settings in /etc/udev/rules.d/70-persistent-net.rules (interface names) and /etc/network/interfaces (ip addresses).


SSRS does not operate properly in Ubuntu even with WINE.  The only way to build SSRS reports is to use SSRS reporting software from within Windows, so you would need to deploy a Windows VM to install SSRS Reports generator tools onto and then generate reports with.
There's no way to natively run this within Linux or Ubuntu at the moment, and SSRS toolkits don't run correctly from within Wine.


The login keyring did not get unlocked when you logged into your computer

I presume that you must have turned on the "Auto-login" option on, when you turn it on, to unlock the login-key-ring (the place where your passwords are stored for chrome and other applications), you need to enter the password that you have setup for your account. I always get prompted with this when I am trying to open Chrome for the first time after booting up Ubuntu-Gnome. It asked me to set up the password for this key ring but I believe that it won't ask for Ubuntu Unity and it's the default password that you used to log-in in to your account.

I wouldn't recommend disabling this feature because it will unlock your key-ring without the password. However, here is how to turn it off.


IPV6 Binding Failure Error: Cannot assign requested address

The line

memcpy(&(sin.sin6_addr), "fc00:1234:1::10",sizeof(sin.sin6_addr));

is wrong; that's absolutely not how you set the address and port of a socket. Please see man 7 ipv6 and the question "How to set sockaddr_in6::sin6_addr byte order to network byte order" on StackOverflow. For your use case you probably want to use inet_pton to convert the address from text to binary form.


Need to switch back to windows 7. and remove this error to resolve grub: Panic occured, Switching back to text console

You can replace Grub with Windows 7 boot-loader, simply boot from Windows 7 installer and rewrite the mbr from the console, or if you are lucky it automatically corrects it.


How to run a cronjob 10 times in 30 minutes from one specific hour?

The accepted answer works just fine, but can be simplified to:

0-30/3 8 * * *

Which sets the range with dash, and the steps with slash. See it in crontab.guru for a more verbose explanation.


I used this tutorial http://atik97.wordpress.com/2010/06/12/how-to-upgrade-to-php-5-3-in-ubuntu-9-10/


How to secure Ubuntu from malware/keylogger running on wine

The default configuration of mapping Z: to / can permit a malware to modify any file that the user has access to, including doing anything in the home folder. So, I think I can avoid that risk by using a separate non root user account for wine. Am I right by doing this? Is there any other means of infection?

No to the 1st. If you want it out of your /home/ you need to compile wine yourself and use ./configure prefix=path_to_install_directory && make. If you use another user you can not play from your own user unless you change permissions (so basically you are killing the reason why you wanted the different user).

Yes to the 2nd question: any method to infect a Windows system also applies to Wine. Though 1 remark: not a lot of virus writers care about wine so they do not tend to add support for wine in the virus. It will/can infect anything windows related inside wine as the files are windows files.

  If a keylogger run inside wine as another non-root user, can that keylogger monitor the keys pressed by the other users? Similarly, can the above mentioned setup protect me from malware taking screenshots or using webcam/microphone?

A keylogger adds itself to the system (for instance by adding a udev rule) where pressing keys are caught and redirected. Pressing keys is regardless of who is typing where. A keylogger inside wine is difficult to install though. A keylogger inside the users /home/ pretty easy (there is even one in the repositories so just 1 apt install away).

  Will that second non-root user have access to my Firefox profile data? If yes, how can I prevent a wine program from accessing my Firefox profile data?

Generally anyone that can get into the wine directory can get into its own /home/$USER/. But are there wine programs to access your linux firefox profile?

  Do I really need to use playonlinux? Is just wine enough?

No. See it like this: wine is for the experiences user. POL is a set of scripts created by those experienced users to make it easier on the new users of wine.

I would stay away from wine. To me trying to plug security related issues with wine is futile. Impossible to win unless you can change core functionality of wine. Use virtualization: it is sandboxed, does not mess with your /home/ and a better overall experience. Backups are easy and no messing with core functionality of a broken down operating system.


libcld.so.0: cannot open shared object file: No such file or directory error when using CLD

libcld is not a part of Ubuntu, but something the author of CLD wrote.

As he says in CLD's readme, you will have to compile and install that library yourself from the source provided in his github repository.


This looks like a duplicate of this problem. The user here recommended booting from recovery and running the following as root:

mount -o rw,remount /
apt-get update
apt-get dist-upgrade
reboot

In addition, if this is a login issue it could be an issue with lightdm. To reconfigure and restart lightdm, type Ctrl+Alt+F1 to move into a terminal, login, and type

sudo dpkg-reconfigure lightdm
sudo service lightdm restart

to get back from terminal, type Ctrl+Alt+F7


How do I install packages with pip when there are multiple Python versions?

You have two options, but either way, you need to get easy_install-3.2. Since it doesn't seem to be packaged, you have to install it yourself. Fortunately that's easy. And you should also get python3-pkg-resources, which is packaged:

sudo apt-get install python3-pkg-resources
wget http://python-distribute.org/distribute_setup.py
sudo python3 distribute_setup.py

Now you can just use easy_install-3.2 to install Pyramid, or go ahead and install pip in Python3.

OPTION 1:

sudo easy_install-3.2 pyramid

OPTION 2:

sudo easy_install-3.2 pip
sudo pip-3.2 install pyramid


How to connect to internet through VM's internet connection?

Following Configuration worked for me to communicate with virtual guests installed in Virtual Box using an Ethernet loop-back plug (http://www.juniper.net/techpubs/en_US/junos10.0/information-products/topic-collections/nog-interfaces/fe-ge-loopback-creating.html#id-11866686).

First Edit /etc/network/interfaces and add following lines to that

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
        address 192.168.0.10
        network 192.168.0.0
        netmask 255.255.255.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        bridge_ports eth0
        bridge_fd 9
        bridge_hello 2
        bridge_maxage 12
        bridge_stp off

restart network /etc/init.d/networking restart

it seems STP is on in ubuntu bydefault thats the reason Loopback plug not working without the configuration.


What is an alternative for Nautilus Actions in MATE DE?

The alternative is to use Caja and its Caja-actions:

sudo apt-get install caja-actions caja

You can setup anything in caja-actions-config-tool:

The official documentation is built-in when installed and also available in the github repository.

Also Caja has a lot of caja-extensions, so caja-actions is just one of them:

Available Extensions:

libgtkhash-properties-caja
libcaja-seahorse
Open terminal - Open terminals from folders
libcaja-actions-tracker
libcaja-actions-menu
Wallpaper - Allows to quickly set wallpaper
Python: caja-admin - Python-caja extension
Python: folder-color - Python-caja extension
Python: deja - Python-caja extension
Python: caja-rename - Python-caja extension
libeiciel-caja
Atril properties - Shows details for Atril documents
Engrampa - Allows to create and extract archives
Send To - Integrates email clients and Pidgin

Since we can not resurrect the Nautilus, the use of Caja seems appropriate.


Why are there start 'S' symlinks in rc0.d (shutdown) and rc6.d (reboot)?

I was wondering the same thing. See my question at Which arguments are passed to init scripts during shutdown.

The reason is that all scripts in rc0.d are first called with start and then again with stop. This way you can order the final shutdown scripts independently of any other kill scripts to be executed during shutdown.


Unable to mount XP share: Error NT_STATUS_UNSUCCESSFUL

You might have to specify the IP address separately because most Windows servers require you to specify the NetBIOS name too, e.g.

smbclient -L XPHostName -I 192.168.34.140 -U XPDomainName\\XPDomainUsername --debuglevel=10


How do I configure fcitx googlepinyin IM?

Is fcitx running? Which version?

fcitx-googlepinyin is not really supported now (see the bold text on it's googlecode homepage). fcitx-pinyin is good enough for me and fcitx-sunpinyin is also a good option.


Using scripts to add GPG Keys and Repository Lists

sudo is a command one normally doesn’t use in scripts (see How do I run a 'sudo' command inside a script?), you rather run the whole script as root. Your script would then be

#!/bin/bash
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" >>/etc/apt/sources.list.d/elastic-6.x.list

and you should make it executable with chmod +x /path/to/script and run it with:

sudo /path/to/script


switch between different version of kernel without a reboot

There is no way to swap out two complete Kernels. I'm sure you can understand the significance of a monolithic kernel like Linux and why that makes it impossible to simply replace.

The closest you can get is a live-patching process using Ksplice. It converts Kernel updates into magical shims that can plug holes in a running Kernel, allowing you to keep the computer on indefinitely without needing a reboot. For your purposes, it also lets you roll back changes.

It is free for Ubuntu Desktop editions so you can play around with it but you have to pay a subscription for servers (where this sort of thing is most needed).

Just seen your edit. Ksplice probably isn't going to help if you're manually hacking and building your own Kernels for debugging as "the service" is that they provide the special updates and they're not something you can generate on your own.

If you're just building things against an official kernel, it might still work.

One more idea: Virtualisation. You could build your new kernel and swap things around in your VM and reboot. It's still going to take the time it needs to reboot but you could make the VM much more light than your development machine (base it on Ubuntu Server, drop the X server if you don't need it, etc).


Have you looked at the top of the screen (taskbar? area) with the window selected.


Hi, I am usuing a dell laptop with Ubuntu. I am unable to open any application

Can you please elaborate on what applications would you like to open?
Have you tried to open them from the terminal?
Which flavor of Ubuntu are you using?

Please, mods, I can't comment because the system is asking me for a 50 reputation that I don't have.


Laptop -> Disable internal screen on lid close / docking station

We had the same problem on some of our Lenovo ThinkPad T480.
As it turned out the problem was related to an outdated BIOS Version. Updating to the current Version fixed it.
It even is mentioned in the Changelog (https://download.lenovo.com/pccbbs/mobiles/n24uj23w.txt):

(Fix) Fix an issue where ThinkPad LCD might be detected when LID
closed even user set power policy as "Lid Close Do nothing".


Delete message from jabber history in Empathy 3.2

found it on
http://live.gnome.org/Empathy/FAQ#Where_does_Empathy_save_files_.28accounts.2C_logs.2C_configuration.29.3F

It's stored in ~/.local/share/TpLogger/logs

Thank you!


I found out how to fix this problem.
Had to install libqt5gui5:
sudo apt-get install libqt5gui5
and then re-install Viber.


You can stop every process which is running in the foreground with ctrl+c which sends a kill (I think).
The > is a prompt like your $ when you start a new terminal (shell), or if you type python there is a >>> prompt. This one you can exit, by typing exit or pressing ctrl+d, which sends a logout.

The prompt means you started a program which has its own prompt, instead of the shell one. I don't know what exactly the ` (backtick) starts, maybe someone can give the answer.

There are tons of those useful shortcuts.

summary:

ctrl+c = kill a process

ctrl+d = logout


Can't use my login password for su - postgres in terminal

In order to run

su - postgres

you have to be root as the output says

=> If you are not root you have to run it with sudo like

sudo su - postgres

Or alternatively become root first using

sudo -i

su - postgres

Anyway both methods will only work, if your actual user is in the sudo group. You can check that listing all groups your user is in by running

groups

If it is not in the sudo group than you probably are not the one who installed this machine or have added this user afterwards.

By default the first added user during the installation is in the sudo group.

If this is the case you have to login as a user which is in the sudo group
(or if this is not possible you can boot into a root terminal following this answer)

and add your user manually to the sudo group running

sudo adduser <username> sudo


A great time to learn how to use apt!

Lesson 1: Let's use apt to find out which available packages have "gnome" and "chemistry" in their title or description.

$ apt search gnome chemistry

Sorting... Done
Full Text Search... Done
gcrystal/cosmic 0.14.17-1ubuntu2 amd64
  lightweight crystal structures visualizer

gcu-bin/cosmic 0.14.17-1ubuntu2 amd64
  GNOME chemistry utils (helper applications)

gcu-plugin/cosmic 0.14.17-1ubuntu2 amd64
  GNOME chemistry utils (browser plugin)

ghemical/cosmic 3.0.0-3build1 amd64
  GNOME molecular modelling environment

libgcu0v5/cosmic 0.14.17-1ubuntu2 amd64
  GNOME chemistry utils (library)

Lesson 2: Let's use apt to find more information about the gcu-bin package:

$ apt show gcu-bin

[additional information has been edited out for clarity]

Description: GNOME chemistry utils (helper applications)
 The GNOME Chemistry Utils provide C++ classes and Gtk+-2 widgets
 related to chemistry. They will be used in future versions of both
 gcrystal and gchempaint.
 .
 This package provides 4 applications:
 .
  * a molecular structures viewer (GChem3D)
  * a molar mass calculator (GChemCalc)
  * a periodic table of the elements (GChemTable)
  * a spectra viewer (GSpectrum)

Lesson 3: How to install a package. Let's keep using the gcu-bin package as an example.

$ sudo apt install gcu-bin


Where to find synaptics mouspad gesture installation packages

This software is not available in the Ubuntu-packages.
However it could be that it's available in this site (click here)

Mind you: installing software from unofficial sites or recourses could compromise your system.


These look like the relatively new Windows bootlader files.
You're right that you shouldn't rename them, e.g. by inserting a dot before the name in order to hide them under Linux.

To hide otherwise in a GUI way, you can install Nautilus Actions Extra by first adding the repository using these terminal commands:

sudo add-apt-repository ppa:nae-team/ppa
sudo apt-get update

You can then install Nautilus Actions Extra using this command:

sudo apt-get install nautilus-actions-extra

You can install nautilus-hide only instead of the whole package using this terminal command:

sudo apt-get install nautilus-hide

Finally, you'll get (Un)Hide option in Nautilus context menu to hide any folder(s) and/or file(s) selected after restarting Nautilus with this terminal command:

nautilus -q


OpenSSL remains vulnerable to CVE-2016-2107 on 16.04 after applying 1.0.2g-1ubuntu4.1

ajr, what confused you is that the package link in the update instructions says libssl1.0.0 but actually links to the openssl package.

(apt install openssl does not work, but installing libssl1.0.0 does resolve the issue)


Hardware issues on Samsung NF208 (NF210)

You may want to have a look at the Linux on my Samsung project. They maintain a PPA with some Samsung-specific software, that solved my wifi and brightness problems (I have a Samsung netbook myself, although it's another model).


how to stop Ubuntu 14.04 from logging me out

Does it log out out, or go to a lock screen?

Open the dash and type 'settings', then choose 'Brightness and Lock'.  There you can choose a time for how long it is before the screen goes to black, disable the lock function and unclick the 'require my password when waking from suspend' if desired.


Unable to extract themes pack to /usr/share/themes

Here are the permission settings of /usr/share/themes/:

drwxr-xr-x  151 root root  4096 Nov  7 06:50 themes

As you can see it is owned by the user root and group root. Moreover it has no write permissions for even the group members let alone others.

So the solution is to run sudo <command_to_extract_theme> or become root by sudo su and then <command_to_extract_theme>, the first option is preferable always.


To install the package vim you have first to create a signature for the installation on the off line machine:

sudo apt-offline set vim-offline.sig --install-packages vim

Then on the on line machine you download the packages:

apt-offline get vim-offline.sig --bundle vim-install.zip

Finally on the off line machine you install it:

sudo apt-offline install vim-install.zip

Vim and all its dependencies should have been installed properly on the off line machine.


What chording keyboard software is available?

I dug this up gkos
it looks like it can use the custom keyboard, or keys on a regular keyboard.
this looks promising, gkos_for_linux

then there is joy2chord that uses joystick buttons, hmmm
joy2chord


how to configure OpenVPN with only IPv6?

There are two device types supported by OpenVPN: tun and tap.

Tun devices receive raw IP packets and give them to a user space program. In the case of OpenVPN this program encrypts those packets and sends them on to the other end of the tunnel where they get decrypted and sent back to the tun device on that side. In other words a tun device behaves like a virtual Point-to-Point network connection.

Tap devices use raw ethernet frames instead of IP packets. A tap device is like a virtual ethernet card - any packet sent to it goes through the tunnel and back up the ethernet stack on the other side. So an OpenVPN connection using tap is like a virtual ethernet bus with exactly two ethernet cards connected - one on each side of the tunnel. The downside of using tap is that for each packet 14 more bytes (the ethernet header) are used up, the upside is that we can use any protocol over it without having to think about OpenVPN support for it.

The first article that describes IPv6 support in OpenVPN, uses tun while the second one uses tap:

1) https://community.openvpn.net/openvpn/wiki/IPv6

2) http://silmor.de/ipv6.openvpn.php

Hope it could help.


How can I read user input as an array in Bash?

Here's one way to do it:

while read line
do
    my_array=("${my_array[@]}" $line)
done

echo ${my_array[@]}

If you just run it, it will keep reading from standard-input until you hit Ctrl+D (EOF). Afterwards, the lines you entered will be in my_array. Some may find this code confusing. The body of the loop basically says my_array = my_array + element.

Some interesting pieces of documentation:

The Advanced Bash-Scripting Guide has a great chapter on arrays
The manpage of the read builtin
15 array examples from thegeekstuff.com


hardware vs. software

Ubuntu Edge is a bespoke, limited edition smartphone device (platform). It will run both Ubuntu Touch and Android.

See:

http://www.indiegogo.com/projects/ubuntu-edge <-- The offer, and video

http://en.wikipedia.org/wiki/Ubuntu_Edge <-- basic background

Or do a Google search ..

Ubuntu Touch is Ubuntu (Linux) with a touch-interface. Its current focus is on the 'phablet' form factor.

See:

What is Ubuntu Touch (Ubuntu for Phones)


Keyboard suddenly using wrong layout, do not recall editing any configs

Super+space switched the keyboard input source. This solved my problem.


How can I make AWN-only desktop session with gnome3?

Try running fallback mode sudo apt-get install gnome-session-fallback and then reboot and select gnome Classic at login.  That's the closest you can get afaik.

How to revert to GNOME Classic Desktop?


Solved by recognizing that the mentioned router doesn't have any DNS service. Building an own DNS server with Bind and propagating it using DHCP might be the solution. Thanks to @ByteCommander and @dobey.


Middle click with a three finger touchpad tap on 11.10, How can I restore this?

You could use a commandline programme called "synclient", which should be already on your system.

synclient Tapbutton3=2

where "Tapbutton3" means a Two-Finger Tap, and the 2 is for middle click.

This method only works until restart (or some other mousesettings-program overrides it). To get this functionality permanently, put this in /usr/share/X11/xorg.conf.d/50-synaptics.conf before "EndSection"

Option "TapButton3" "2"


What are differences between restarting apache2 and service apache2?

service calls scripts located in /etc/init.d, so there are no differences in the result in this case.

From the man service:

service runs a System V init script or upstart job in as predictable environment as possible, removing most environment variables and with current working directory set to /.

The  SCRIPT  parameter  specifies  a  System  V init script, located in /etc/init.d/SCRIPT, or the name of an upstart job in /etc/init.


My keyboard cannot input "1", maybe caused by shortcut setting

Go to Settings > Devices > Keyboard > Reset all

and

Reboot.


I copied from eli's answer in Unix forum

Cause: boot process can't find the root partition

Solution

Please type
ls
This will show all partitions, and then type individual

ls (hd0,1)/
ls (hd0,2)/

... and so on, until you find like

(hd0,1)/boot/grub or (hd0,1)/grub

In case of EFI,

(hd0,1)/efi/boot/grub or (hd0,1)/efi/grub... now set the boot parameters accordingly, just type this with your number

set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod linux
insmod normal
normal

now it would boot and please open the Terminal and put this command line

sudo update-grub
... it should boot correctly in the next time. If not, you have to go through the steps again. In other case, you might have to repair or install grub again, please look at this article.

My SW: Windows 10 and Ubuntu 16.04 dual boot

HW: HP Pavilion 15t


I don't think there is much difference. But instead take a look at apt-cacher-ng for an alternative way of doing mostly the same thing, with less work for you and less bandwidth waste.

deb/apt-mirror blindly copies all files (even if some are never used) from the distro/architecture/version you specify, periodically according to cron, etc.

But apt-cacher-ng is passive. When some user pulls a package, that package remains in your server for the next person. Similar to squid, unless there is a newer version online which then gets pulled and also kept.

And it happens to work with all apt distros just fine without you doing any extra work or adding anything else, third party repositories and ppas they all get stored (cached) in your server.

For your users to use apt-cacher-ng they only need to add a proxy to their apt configuration, instead of using a local mirror.


What is CPU topology in kvm virt-manager?

RedHat has a sparse writeup of CPU topology in virt-manager. Basically, this allows you to have the virtual guest believe it has a specific number of physical CPUs (sockets), each with a specific number of cores, with each core having one or more threads. This can be important when running a virtual machine with an enterprise database engine, such as Microsoft SQL Server, which is licensed by the core. Oracle also has licensing fees that are priced per socket and per core. So, the more resources you have available to these database engines, the more you have to pay in ongoing fees.
A number of large corporations choose to go this route to simplify licensing fees and simplify server management. For most people, however, this will likely be unnecessary. A single socket with a respectable number of cores, each with one or two threads each, will more than suffice for development or personal projects.
I hope this answers your question.


The guest user was vboxadd and after adding it on vboxsf group this issue has been solved.


Internet stopped working suddenly on 12.04

Get the Network settings of the other Ubuntu Lap top
Make a note of all the settings in all the tab.
Create the same settings in the new Ubuntu Laptop.

See whether it works or not.

Connect to router from the old laptop and get all the router information

Make a note of that. And access the router from the new laptop and see each and every settings are correct or not

See in the new lap top the restrictred network drivers are installed and active in the new laptop or not.

Similar case happened to me. In my case I am able to connect wireless using Windows but not with Linux


can I use scp in same network(wifi) to send file

Yes you can use SCP

But make sure you have ssh server running on both machine (install it if not installed)

sudo apt-get install openssh-server


Here's a great tutorial that still works on Ubuntu 12.04 - I just used it on the latest LTS version. Do what is said there, and then change some options in /etc/ppp/pptpd-options:

# Encryption
# Debian: on systems with a kernel built with the package
# kernel-patch-mppe >= 2.4.2 and using ppp >= 2.4.2, ...
# {{{
#refuse-pap
#refuse-chap
#refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
#require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
#require-mppe-128
nomppe
# }}}

There's a lot more options to configure pppd to your needs. Have a look at man pppd.


try this gnubg -r

you can play, but not save your settings.


You do not have to pass on maximized windows.

I do it the following way to have a maximized window in the current workspace:

function! MaximizeWindow()
  set lines=999
  set columns=999
endfunction

autocmd GUIEnter * :call MaximizeWindow()


AFAIK Kmail, Evolution, mutt and heilroom-mailx support Maildir. And of course dovecot. ;)


Workflow for working on www-data owned files

I use sudo to support this kind of workflow. It will allow you to execute commands as the user www-data. As an example, if you use vi as your text editor, you would use a command like this:

sudo -u www-data vi index.php

In order to give yourself permission to use sudo as the user www-data, you'll need to add the following to /etc/sudoers:

yourusername ALL=(www-data) ALL


Why was the moodbar package omitted from 16.04 LTS?

According to its publishing history, its removal was requested by the Debian Quality Assurance Team, which provided these two reasons:

  It's orphaned and dead upstream (the release in the archive was released in 2007). It depends on Gstreamer 0.10, which is scheduled for removal from the archive.

In a related request it was suggested that Exaile be removed temporarily until it has been updated to use newer software libraries.

Since the latest development version of Exaile appears to have been successfully updated and still requires an external moodbar command, I expect that a moodbar package will accompany Exaile's return.


ffmpeg
FFmpeg (or avconv if ffmpeg was not available) can do this easily
ffmpeg -i input.mpeg -s 320x240 output.mpeg

There are felt one million additional options to change the output format. These can also be combined
ffmpeg -i input.mp4 -s 320x240 output.mpeg


I assume you will only have 1 command active at a given time. Then ...

pkill mpg123

will kill all instances of mpg123 in the process list.

pkill it not very friendly though. An alternative:

pidof mpg123 | xargs kill -9

With ps -ef | grep mpg123 you can find the process number and use

killall -9 {processnumber}

to kill 1 instance. I'll omit the longer versions ;)


To know which one should you pick, use the following command in terminal:

ubuntu-drivers devices | grep recommended

It will return the recommended video driver for your machine.

If ubuntu-drivers is not found, run the following command in terminal to install it:

sudo apt-get install ubuntu-drivers-common


Why are removed kernels still listed under dpkg?

dpkg --list | grep linux-image | grep "^r" will show kernels that have been removed. dpkg --purge <package> would remove it from the history as well -- but not really necessary.


How can I show the elapsed time instead of remaining in Rhythmbox?

Simply you can click on that. After clicking you can see elapsed time.


cost of installing and maintaining ubuntu server 12.04

Canonical offers professional support for Ubuntu. More information can be found on the website.


Should I set up my CUPS Printing to use IPP, LPD or URL?

LPD is an old standard, IPP is newer.

Ubuntu uses the Common UNIX Printing System ("CUPS") to handle printing. CUPS uses the Internet Printing Protocol ("IPP") as the basis for managing print jobs and queues. Other protocols are also supported (LPD, SMB, AppSocket a.k.a. JetDirect), some with reduced functionality.

LPD/LPR is still commonly used and works quite well but it doesn't provide much control for users on the printer settings per print job.

Both the LPD and JetDirect/AppSocket protocols can be used over the Internet today, however neither of these protocols provides authentication services, access control, and all of the document management and formatting (including printer-specific commands) must be handled by the machine sending the document.

IPP is preferred as it uses bidirectional communication which gives you more feedback and control.

Some printers may not support IPP.


How can I easily install indicators for lxpanel?

There is a PPA for LXDE on Lucid created by the same developers as Lubuntu.  As for all PPAs - use with care and have a good backup before usage.

Examining the lxpanel package in this PPA - the lxpanel-indicator-plugin is available.

You can add the PPA by adding it to /etc/apt/sources.list - you will need to install the GPG key separately.

Alternatively (and more easy to do), install the package python-software-properties and then use add-apt-repository i.e.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:lxde/ppa
sudo apt-get upgrade


Installing the linux-crashdump package will install the kexec tools and set up grub to pass the needed kernel options to have the crashdump kernel available.

This should automatically catch kernel crashes.  For non-crash kernel problems such as an oops you should be able to use the magic sysrq key's c command to kexec the crashdump kernel and get a dump.

You may also want to enable apport to have the dump nicely processed into a crash report for submission to Launchpad or for local retracing.  To do that you need to edit /etc/default/apport.


Handbrake (installable from Ubuntu Software Store or via apt) is a GUI tool but you can queue up a load of files and then just let it do it's thing.
Or FFmpeg command line tool.


systemd does not stop Docker Application Container Engine

I occasionally have this issue and I'm not sure why docker has hung.  But what I have found is that the timeout is explicitly set to unlimited in the service file deployed by docker-ce:
$ grep Timeout /lib/systemd/system/docker.service
TimeoutSec=0

To avoid this hanging for extended periods I set the TimeoutStopSec parameter in an override:
$ sudo systemctl edit docker.service

Add the following lines:
[Service]
TimeoutStopSec=300

Then reload:
$ sudo systemctl daemon-reload


Ubuntu 16.04 - switching from nouveau to closed source driver, after LUKS auth purple screen

This has helped:

Installing nvidia-370 seems to fix a lot, but theres a bug. This solution worked for me:
https://askubuntu.com/a/843534/600016

Now I just need to use the recovery image and just straight resume everytime, otherwise it'll stop loading at the initial ramdisk-bootloader.


100% Uninhibited LAN file sharing & collaboration?

[1] You stated you asked this question in the Ubuntu forums. If you could provide a link it would help since I cannot find it.

[2] What is missing from your question is how you are currently set up. It is difficult to offer a definitive answer without seeing what you shared, what filesystem is being used, etc ... Posting the output of the followings commands would help:

testparm -s
net usershare info --long

[3] It sounds like you created the share using Nautilus so one way to do this is:

Let's say you allowed guest access with read / write ability.

Let's say you want everyone on the LAN as well as the local user on the box itself to have full read / write access to everything in that share.

Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:
force user = xxxx

Replace xxxx with the user on the samba server who owns the mounted partition.

Then restart smbd:

sudo service smbd restart

Any time anyone on the LAN does something in that share they will do so as the user xxxx. Since xxxx is also the local user on the server all the files there will be his.

After the change this will apply to all new files added from the client. You will need to do some cleanup with the files that are already there.


How do I make the scanner function of my HP Photosmart d110 work?

Check this out. These are HP Linux drivers and this page is for your model printer. Apparently these drivers are open source as well.


"No bootable device found" after uninstalling Windows 10 on dual-boot Ubuntu 16

First, the prompt by Boot Repair to create a BIOS Boot Partition means that it probably booted (that time) in BIOS/CSM/legacy mode; however, both your Windows and your Ubuntu were installed in EFI/UEFI mode. Mixing the two boot modes is often possible, but usually very awkward, and should generally be avoided. To avoid this problem, you should disable the CSM in your firmware, if possible. See this page of mine for more on this issue.

Beyond that, EFI boot loaders are stored on the EFI System Partition (ESP), which is a FAT partition with a specific type code. Your /dev/sda2 has the ESP type code, but appears to use NTFS, and does not seem to hold any EFI boot loaders. My guess is that you've accidentally wiped out a formerly-valid ESP, thus destroying your Ubuntu boot loader. Your easiest path to recovery is:

As noted above, disable your CSM, if possible. If you can't figure this out, at least learn to control your boot mode, so that you boot whatever system you use to launch Boot Repair in EFI mode rather than in BIOS mode. (FWIW, your BootInfo output was from an EFI-mode boot.)
Using an emergency system, convert /dev/sda2 to FAT. (Use GParted or mkdosfs for this task.)
Run Boot Repair and tell it to fix the Ubuntu installation. Alternatively, you could install another boot loader, such as my rEFInd boot manager; but Boot Repair is likely to be easier in your case because you seem to have Secure Boot active. I'd therefore hold rEFInd as a backup option in case you have problems restoring GRUB.

Another option, which you might want to give serious consideration, is to use your emergency recovery system to back up all your user data from the disk, delete all the disk's partitions, do a fresh install of Ubuntu, and then restore your personal data. This would have the advantage of consolidating your many partitions. If you intend to run this computer with Ubuntu only, having NTFS on the disk is a Bad Idea, since there are no good NTFS maintenance tools for Ubuntu. Thus, when (note: when, not if) an NTFS partition needs repair, you'll have to jump through awkward hoops to do so if you leave those NTFS partitions as they are. On a Linux-only system, you should store your data on Linux-native filesystems, not on NTFS.


Ubuntu 17.10 Major security issue at login

I have found the reason my screen is unlocking.  I'm using takeabreak which calls "gnome-screensaver-command -d" at it's next scheduled wakeup time.  So that closes this issue.  I'm going to open anther topic about why "gnome-screensaver-command -d" unlocks my screen without a password. New question gnome-screensaver-command -d unlocks without password


You might want to change these:

chmod 775 -R /var/www/html
chown www-data:www-data -R /var/www/html
add this:AllowOverride all
    Order allow,deny
    allow from all

tell me if any worked for you.


Why can't I use the same host name for two dual-boot OS on the same machine?

You can have the same host name in each OS in a multi-boot system. However, if you are connecting to the network, your DHCP server may still have an active lease for that name, and Ubuntu tries to obtain a DHCP lease using the name you enter. If an active lease already exists, you may see the error you are getting.

You can open your router or DHCP server's config and clear the lease table, and that should free up use of the name to install with it. Alternatively, you can install using a different name and change it after.


I have made best experiences by setting up a network distributed audio solution based on both Icecast2, and uShare (for uPnP/DLNA streaming).
Any receiver connected to your LAN (either by cable or by WiFi) will then be able to acess audio from your server in the following way:

Stream a playlist: Combine icecast2  with  ices2 (for ogg)
or Ices (for mp3)

Broadcast the sound of your local soundcard: Combine Icecast2 with darkice

Make your library accessible: Run ushare  for UPnP file shares

When Icecast2 is broadcasting audio any device capable of receiving Internet radio streams in Shoutcast format will be able to tune in. This can be an old PC, a mobile phone, or a special Internet Radio device, just to name some examples. The devices do not need to be compatible to each other.
A short tutorial on how to set up Icecast2 can be found here. Some notes on ushare are found in this answer.
Icecast is able to stream more than one stream at a time. Therefore you will be able to select different broadcasts on different locations.

The above solutions still are available. A newer approach can stream the local sound to a Chromecast or DLNA device:  How do I set up live audio streams to a DLNA compliant device?

Instead of uShare we can also run minidlna for UPnP-sharing of media.


Is there any way to verify a Ubuntu iso or hashsum via HTTPS?

The hashes and iso's are only provided via http, so md5sum-checking is insufficient. As @Doug Smythies explained in a comment on a deleted answer:

  We (the Ubuntu Doc team) no longer maintain the https page, because it is pretty much impossible to do so. The people with the ability to do an https page won't.

However, Ubuntu's gpg fingerprints are available via https here.

TLDR

Download MD5SUMS and MD5SUMS.gpg for the relevant release.
Verify the MD5SUMS with the MD5SUMS.gpg and check that the fingerprint is the same as on this web page.
Verify the iso with the MD5SUMS.


Is there a Ubuntu program that can convert cbz to jpg?

.cbz files are actually a zip file with jpgs or pngs in it.

Change the file extension from cbz to zip, uncompress the file with Archive Manager, then you'll be shown a bunch of image files!


how do I find the pci.id for my Netgear WG311v3 wireless network adapter?

lspci -vnn | grep -a4 -i net

This will list all network adapters in your system with their PCI ID.

It will output lines resembling this:

00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1] (rev 05)

That bit in the brackets [8086:15a1] is the PCI ID.

http://www.linuxforums.org/forum/mint-linux/176871-solved-cant-find-pci-id.html


installing ubuntu base system in home folder as non-root

you can use sudo command and then it will ask your password so if you give your password it will get root privilege. and ask your system admin to incorporate your user into sudoers file

The command would be like  this

sudo apt-get update


Android Studio update issue with jre/bin/java

Kill java for update

ps -A |grep java

output of this command will give the list of java processes running on your system. Note down Process ID (PID) of that process whom you want to kill and run

kill -9 PID


How to setup USB wireless card as AP hotspot (tl-wn725n)

I just tried this out to verify that it works. No hostapd and no access-point script. Instead of an "access-point" this sets up an "ad-hoc" network using network-manager. "ad-hoc" uses wireless abg instead of wireless-n.

Sharing wifi from a wireless router to my laptop internal card (wlan0) to an acer chromebook from the laptop usb (wlan1). For some reason I couldn't get my internal card (wlan0) to broadcast.

Click on the network-manager indicator and select "create new wifi
network" from the dropdown menu.
I first selected the wlan1 card and named the network "pineapples".
I have it set to ad-hoc and under ipv4 it's set to "share connection
with other computers", no security.

Also, as "pineapples" was resolving on the laptop, I clicked to connect to "pineapples" on the chromebook as soon as the network appeared; then, the two computers connected to each other.

If the laptop drops or doesn't connect to "pineapples", it should
still be listed as an available network from the network-manager
dropdown list. Click to connect to the "pineapples" network on the laptop and while it is resolving, connect to "pineapples" from the other device.

At first, I had no access to the internet or any websites but I clicked on my wlan0 network to reset the connection to the router and now both computers have internet.


Is it possible to set the DNS and Gateway but still use dhcp to set ip address in Ubuntu 18.04 LTS server?

With netplan.io version 0.98 which is in bionic-updates, you can do this using the dhcp4-overrides section:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: yes
      dhcp4-overrides:
        use-dns: false
        use-routes: false
      gateway4: 192.168.0.1
      nameservers:
        addresses:
            - 8.8.8.8
            - 9.9.9.9


Turns out one package (ubuntu-docs) was in an inconsistant state, which lead to the error message shown above.

I found this post on UbuntuFormus and used

sudo dpkg --force-all -r ubuntu-docs

to force the removal of all ubuntu-docs related package information. apt-get/aptitude purge/remove (even with force) didn't work because of the inconsistant state.

Be cautious when using this command because it might destroy your system


How to sign kernel modules with sign-file?

On Ubuntu, that would be /usr/src/linux-headers-$(uname -r)/scripts/sign-file.

How did I figure that out? I did a search for sign-file:

dpkg -S sign-file

which told me which package provides this file (currently linux-headers-4.4.0-22-generic) and where it was installed, i.e. in /usr/src/linux-headers-4.4.0-22-generic/scripts/.

The uname -r part is just to keep the command independent from the currently-installed headers-generic package.


Is it a good idea to put sudo apt install softwareA in a Docker file?

You can create a base image with all software you need installed and use this image in your final dockerfile, in this case you will be installing packets only during the base image build process.


how do I install Aptana Studio 3 in Ubuntu 14.04 LTS?

This is how I got it done.

First thing to do is to download Aptana Studio.  Make sure that you download the right file for your architecture, 64bit or 32bit.  Once downloaded, make sure that the prerequisites are installed, before installing Aptana Studio.

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 git-core

With terminal still open, navigate to where you downloaded Aptana Studio, probably the Downloads folder, and run the following command(s):

For 64bit

sudo unzip Aptana_Studio_3_Setup_Linux_x86_64_3.6.1.zip -d /opt

For 32bit

sudo unzip Aptana_Studio_3_Setup_Linux_x86_3.6.1.zip -d /opt

At this point Aptana Studio is fully installed, but it will not appear in Dash.

Oracle Java installation compliments of Webupd8

In order to get the Aptana Launcher icon and make it show-up in dash, create the following .desktop file with the following text in it:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Aptana Studio 3
GenericName=Integrated Development Environment
Comment=Aptana Strudio 3 Integrated Development Environment
Exec=/opt/Aptana_Studio_3/AptanaStudio3 %F
TryExec=/opt/Aptana_Studio_3/AptanaStudio3
Icon=/opt/Aptana_Studio_3/icon.xpm
StartupNotify=true
StartupWMClass="Aptana Studio 3"
Terminal=false
Type=Application
MimeType=text/xml;application/xhtml+xml;application/x-javascript;application/x-php;application/x-java;text/x-javascript;text/html;text/plain
Categories=GNOME;Development;IDE;

And save it to /usr/share/applications


The solution was to turn the firewall (ufw) off

sudo stop ufw

the machines then auto-provisioned.


Go to the official Ubuntu download page and click on Get
Ubuntu 12.10.
You will be taken to the donate funds page. Scroll down to the
bottom and click on Not now, take me to the download.
The iso file will start downloading or you will see a prompt to save
the file.

If you want the 64 bit version then in the first page You can Choose your flavor. There is also a separate button for the older and long term support version 12.04 LTS on the same page.

I hope this helps.


apt-get update fails due to "Unable to connect to localhost:8250" error

Had to remove the line
    Acquire::http::proxy "localhost:8250/";;
from /etc/apt/apt.conf


How can I install the driver for Belkin N600 wireless adapter on Ubuntu 14.04?

It seems we must use ndiswrapper to install the driver. The answer provided by Ben Lee in How can I get a Belkin N600 DB (F9L1101v1) to work on Ubuntu 12,04 64-Bit does not work for my case.


Close current tab firefox using terminal

To keep Firefox minimized after closing its current tab (according to OP, see the comment) use the following commands in a terminal,
wmctrl -a firefox; xdotool key Ctrl+w; wmctrl -r firefox -b add,shaded

How it works

wmctrl -a firefox
Go to the window with a name containing 'firefox' in it
xdotool key Ctrl+w
Send the keystroke Ctrl+W to firefox which is the shortcut to close current tab in firefox.
wmctrl -r firefox -b add,shaded
Shade a window with a title that contains the word 'firefox' in it.

To know more about these see man xdotool and man wmctrl
Alias for above command
You can make an alias for the above commands, say the alias name be cfct ( Close Firefox Current Tab) in ~/.bashrc or better in ~/.bash_aliases from a terminal as,
echo -e "\nalias cfct='wmctrl -a firefox; xdotool key Ctrl+w; wmctrl -r firefox -b add,shaded'" >> ~/.bash_aliases
. ~/.bash_aliases

If you don't have ~/.bash_aliases replace ~/.bash_aliases in the above commands with ~/.bashrc
Usage
open a terminal and enter
cfct

And it will close Firefox’s current tab instantaneously.
Note: You need to have wmctrl and xdotool installed in your system. To install them use,
sudo apt-get install wmctrl xdotool


Can I make all the keys work on a Logitech N305 keypad

you can find the solution here :

http://users.skynet.be/linux-rixensart/3_peripheriques.html#keypad


No sound after installing update 14.04 LTS

Had the exact same symptoms after a recent apt-get dist-upgrade in 14.04, which updated the kernel. Tried also the old tricks, nothing worked. The only error I could find in any logs was in dmesg about a missing symbol (intel 915 something or other) needed by the hda driver. Reverting kernel back from 3.13.0-65 to 3.13.0-63 solved it for me.

Don't know if the cause of your symptoms is the same as mine. However, if you want to try, here's how.

To try whether this helps in your case, without doing any permanent changes, try booting with an older kernel and see if sound over HDMI works. To do this, see How to get to the GRUB menu at boot-time?. I couldn't get to the grub menu by pressing shift, instead I had to modify /etc/default/grub (and run sudo update-grub) as described in the other post.

Use the instructions from the other link, when you get to the grub boot menu, the older kernels are in a sub-menu, I think it was called something like "Advanced Ubuntu options". From the sub-menu pick a kernel older than 3.13.0-65. For me, everything older than that worked. I also tried 3.13.0-66 - did not work for me.

Once I found out that an older kernel works, I permanently reverted back to that version. See Kernel downgrade after update broke my system for instructions how to do that.

Hope this helps.


You can not fw one port to two ip addr. Only you can do is to set different port on host or make different in port.

Something like

iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8000 -j DNAT --to-destination 192.168.1.200:8080
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8001 -j DNAT --to-destination 192.168.1.201:8080
iptables -A FORWARD -p tcp -d 192.168.1.201 --dport 8080 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -p tcp -d 192.168.1.200 --dport 8080 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

Replase ports, interface and ip with you network parameters


Is swap enabled on this server? should it be?

You can always check if swap is enabled by running:

swapon -s

(See man swapon for details.)

This lists all swaps that are currently enabled. If you run that and get no output, swap is not enabled. Most of the time an Ubuntu system will have a single swap partition and no swap files enabled; that will look something like this:

ek@Kip:~$ swapon -s
Filename                Type        Size            Used         Priority
/dev/sda7               partition   4194300         1499712     -1

As for sudo fdisk -l telling you that Disk /dev/sda doesn't contain a valid partition table: no, that is usually not cause for concern. (In particular, it doesn't mean no swap is enabled.)

fdisk doesn't support some constructs--it will not recognize a disk that use LVM or software RAID (md) as having a valid partition table. LVM is very common on servers. When you see this warning from fdisk -l, run parted -l instead:

sudo parted -l

parted is more likely to be able to identify and report on such constructs.


Try placing your certificates in /usr/share/ca-certificates

Then modify /etc/ca-certificates.conf to include a reference to your new certificate.

Then run

update-ca-certificates

Update:

So done some more digging on this. It seems that firefox does not honour the /etc/ssl/certs database. Found this - its quite old but I believe it still to be the case.

As far as I can tell each user has their own cert database held in the cert8.db file in their profile directory. This can be updated using firefox directly (is their a reason for wanting to do this command line?) - but obviously each individual user will have to do this. Alternatively there is a command line way of doing this see here and here. You could build a script to go through each user profile directory to do this (yuk!). Doesn't seem to be a "nice" way to do this for all users as far as I can tell.


Checking data usage in a mobile broadband connection in ubuntu

vnstat is probably the best way to do this. It can be installed using the following command in terminal:
sudo apt-get install vnstat

If you don't want to keep checking the data usage status every time then use:
watch -n 5 --differences vnstat -d ppp0

It would display the status every 5 seconds in the open terminal with the differences that occur in the values. -d is used to display the status of each day and eth0 is the Ethernet used for internet connection (wlan0 may be used for WiFi).
Sample output:
 ppp0  /  daily
         day         rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
      02/07/15     99.11 MiB |   11.10 MiB |  110.21 MiB |   10.45 kbit/s
      02/08/15     25.09 MiB |    3.75 MiB |   28.84 MiB |    5.37 kbit/s
     ------------------------+-------------+-------------+---------------
     estimated        49 MiB |       5 MiB |      54 MiB |

NOTE: Type ifconfig in Terminal and see the output. The ppp thing followed by a number(could be ppp0) is your dongle. Use it with vnstat as explained above.


Try $ shutdown now

I had the same issue as you. My Ubuntu Mate 16.04 also takes some times to shutdown, like 30-40 seconds using the GUI. Usually it is just much faster, like 5 secs, if it's done via the terminal.

I still don't know why, I am guessing that the terminal way just forces everything to stop/kills everything and shuts down. I haven't found out why. Maybe some other people could shed a light as to why.


I Have 1.6Ghz Processor. What Happen if i keep run to install ubuntu desktop on virtual box

No your laptop will be fine. Virtual box is like an any other normal program. The question is that to run VM you need to assign some RAM to it, which you have only 4 GB, luckily linux is not so power hungry. Actually your experience will mostly depend on type of your laptop drive (is it HDD or SSD). By the way with this specs it's a good choice to use Ubuntu as main OS because of it's speed.


How to calibrate screen colour in Ubuntu 18.04 LTS?

You can import color profile in Settings -> Devices -> Color

Select your display and click on Import profile button

You can install default color profiles using sudo apt install icc-profiles or find your profile here

Also you can calibrate your screen manually in settings (unfortunately, that button is disabled in my system and I don't know why) or using gcm-calibrate:

$ sudo apt install gnome-settings-daemon

$ colormgr get-devices # take note of the Device ID of the one with Type: display, e.g. "xrandr-Acme Corp"

$ gcm-calibrate --device="some Device ID"


How to transfer files from Windows 10 partition to new Ubuntu partition

This is possible, although it would probably be easier to configure your ubuntu system to load the windows drive on boot. Ubuntu is able to read the Windows filesystem formats natively. The benefit of this method is that any changes made in ubuntu will be reflected in windows the next time you use it.

First, you need to grab the unique identifier for your partition.

# List all drives
fdisk -l
# Get the unique ID for your drive
blkid -s UUID -o value /dev/sda2

Replace /dev/sda2 with the drive you want to mount at boot. Take note of this value, you will need it for later. Next you will create the new folder where windows will be mounted each time you turn on Ubuntu. If you want windows to be easily accessible from your home folder, then you could run this command to make a folder called windows:

mkdir ~/windows

Next, create a backup of the file we are about to edit.

cp /etc/fstab /etc/fstab.bak

The fstab file determines what drives are loaded at boot. Edit /etc/fstab and append the following at the bottom:

UUID=12102C02102CEB83     ~/windows     ntfs-3g

Replace the numbers after UUID= with the output of the earlier blkid command. Save the file and restart your computer. You should have the windows filesystem auto mounted in your home directory.


I was able to solve the issue. I can write to the drive now.

I followed the directions on this wikihow of all things

Thanks @Fabby for the help.


I run an FX6300 on an M5A97 R2.0 (So my results should be very similar)

You should install Psesnor. It's like Hwmonitor for Windows.

sudo apt-get install psensor

Terms:
CPU Package = the temperature of the CPU socket, as measured by the motherboard.

CPU Core = the internal temperature of the actual cores on the CPU (This is the one to watch)
Motherboard = the temperature of the south bridge

Some Notes:
The CPU core temp will always be lower than the socket temp, since the CPU has active cooling, whilst the socket does not.

Since the FX6300 is a 6-core CPU, you would expect that each core has a temperature sensor. There is some confusion about this. It seems that only AMD's overdrive software can detetct all 6 of the FX6300's core temp sensors. However, all the cores will be within 1-2C of each other

Temps in Psensor:
 I have renamed all the temps so I know what is what. If you look at the "chip", you can know what is what and rename them like I did.

Motherboard

CPU Core Temp

CPU Package / Socket Temp


Workspace keyboard switching won't let me change

Might be this bug Window manager keybindings don't work after reboot:

Steps to reproduce:

  Use Settings -> Window Manager to rebind a key (e.g. rebind super + m to maximize window )
  It should work fine
  Reboot
  The keybinding is no longer recognized. Going into settings -> Window Manager the UI still claims that it is configured, but the setting doesn't work unless the key is manually rebound again.

While it is still worked on and not resolved yet, there are some workarounds:

clear before reassign:

  Select an action you want to reassign and click 'Clear' button until it will really empty. Sometime if there is some (hidden?)duplicates, you will still see some shortcut(the same or different), even you clicked 'Clear' button. In this case just click the button again. Since the action shortcut is really empty, just assign your custom one as usual, and it will work ok :)

delete mapping twice

  You simply have to delete the current key mapping twice before setting a new one. Then the new mapping will be stored in the config.

There is a similar bug related to CompizConfig Settings Manager, but I don't think that it applies to your setup. This particular bug however is fixed and available in the trusty-proposed repository (How do I add the "proposed" repository? on how to enable this repository).


12.04 nvidia graphics resolution problem

Try first to disable the ppa and then install nvidia-current from ubuntu archives:

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


Configuring Postgresql 9.1 and PostGIS 2 on Ubuntu 13

Sharpie's "For Science" PPA has packages only for Ubuntu Precise. You are running on Raring Ringtail (13.04). That is why it's throwing a 404 Not Found. Remove this PPA

sudo apt-add-repository --remove ppa:sharpie/for-science

Then like I've explained in my blog post add the PostGIS ppa

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable

and then install the postgresql-9.1-postgis-2.0-scripts package

sudo apt-get install postgresql-9.1-postgis-2.0-scripts

This should install everything from postgresql-server to the required PostGIS packages. After you're done you should be able to connect to a database with psql and be able to run this

create extension postgis;

If this works, then you should be good to go.


Try this

sudo apt-key adv --recv-key --keyserver keyserver.ubuntu.com F6A071ABEE5D5BA2
sudo apt-get update

to correct the problem with the W:GPG error

If you search , you will not find any address like this http://archive.canonical.com/commercial-ppa-uploaders/ . The address is wrong or not exist.

If you have added external PPA with this name , disable it or fully remove it. See here how.

Enable the partners repository , see here how and then search Ubuntu Software Center to install Skype correctly.


I want to change the host name - is it enough to edit the /etc/hosts file?

To change the host name persistently, you will have to change it in two files.
In the Ubuntu guest system open a terminal and execute these commands  :

sudo nano /etc/hostname ... now edit the file (change the host name).

Press Ctrl + X to close the file and confirm the change by pressing Y.

sudo nano /etc/hosts ... now edit the file (change the host name).

Press Ctrl + X to close the file and confirm the change by pressing Y.

Then reboot the virtual operating system - now the host name has changed.
Additional information : Changing the host name this way is completely safe.


maybe its because of the encryption type.see what type is supported by ur iphone and use it
if you don’t know what is the supported type, try making the network without any password and if it worked u will know that you have to change the encryption type.


Why KDE cannot change brightness, while Unity can? Macbook Air 4,2

I have laptop brightness buttons working. If I wouldn't I'd play with

/etc/acpi/events/asus-brightness-down
/etc/acpi/events/asus-brightness-up

files (do You have them - or some similar files there?). See what is written there - some shell commands.

Also in the old days bright could have been controlled with:

echo -n 100 > /proc/acpi/video/VGA/LCD/brightness # sets br to 100%

but now the mechanism is changed.


Nautilus : Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.GPhoto2VolumeMonitor: Timeout was reached (g-io-error-quark, 24)

Looking at the permissions of the /usr/libexec/ files, it seemed that gvfs-gphoto2-volume-monitor was the only one without execution permissions.
So chmod +x /usr/libexec/gvfs-gphoto2-volume-monitor solved my issue


Ubuntu 18.04 - Dock won't appear when moused over when VLC is in fullscreen

Open Terminal and run the following command:

gsettings set org.gnome.shell.extensions.dash-to-dock autohide-in-fullscreen 'true'

This should fix the issue.


Forwarding interfaces inside a docker container

Here is an example iptables rule set script for my guess as to what you need / want. I have guessed at some addresses, you will have to edit for what you really need.

#!/bin/sh
FWVER=0.01
#
# Mazzy Example 2015.02.20 Ver:0.01
#     Only port 80.

echo "Loading Mazzy Example iptables rules set. version $FWVER..\n"

# The location of the iptables program
#
IPTABLES=/sbin/iptables

#Setting the EXTERNAL and INTERNAL interfaces and addresses for the network
#
EXTIF="eth0"
INTIF="eth1"
# For example: Please replace with real IP address
EXTIP="192.168.33.134"
INTNET="10.0.2.0/24"
INTIP="10.0.2.25"
# For example: Please replace with real desintation IP address
INT80="10.0.2.43"
UNIVERSE="0.0.0.0/0"

echo "   External Interface: $EXTIF   Internal Interface: $INTIF   External IP: $EXTIP  Internal Network: $INTNET   Internal IP: $INTIP"

# Only needed if not already done elesewhere
#CRITICAL:  Enable IP forwarding since it is disabled by default
#
echo Enabling forwarding...
echo "1" > /proc/sys/net/ipv4/ip_forward

#Clearing any previous configuration
#
echo "  Clearing any existing rules and setting default policy to DROP.."
$IPTABLES -P INPUT DROP
$IPTABLES -F INPUT
$IPTABLES -P OUTPUT DROP
$IPTABLES -F OUTPUT
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -t nat -F
# Reset all IPTABLES counters
$IPTABLES -Z
# Smythies: While my references do not have it, I think this is needed.
$IPTABLES -t nat -Z

# loopback interfaces are valid.
#
$IPTABLES -A INPUT -i lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT

# At this point local interface, local machines, going anywhere is valid
#
$IPTABLES -A INPUT -i $INTIF -s $INTNET -d $UNIVERSE -j ACCEPT

# Allow any related traffic coming back to the server in.
#
$IPTABLES -A INPUT -i $EXTIF -s $UNIVERSE -d $EXTIP -m state --state ESTABLISHED,RELATED -j ACCEPT

# loopback interface is valid.
#
$IPTABLES -A OUTPUT -o lo -s $UNIVERSE -d $UNIVERSE -j ACCEPT

# any source going to local net is valid
#
$IPTABLES -A OUTPUT -o $INTIF -s $EXTIP -d $INTNET -j ACCEPT

# server source going to the local net is valid
#
$IPTABLES -A OUTPUT -o $INTIF -s $INTIP -d $INTNET -j ACCEPT

# anything else outgoing on remote interface is valid
#
$IPTABLES -A OUTPUT -o $EXTIF -s $EXTIP -d $UNIVERSE -j ACCEPT

echo Loading FORWARD rulesets...
echo "FWD: Allow all connections OUT and only existing/related IN..."
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT

# port forward stuff. see also the prerouting area.
#
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p tcp --dport 80 -d $INT80 -m state --state NEW -j LOG --log-prefix "PFNEW80:" --log-level info
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -p tcp --dport 80 -d $INT80 -m state --state NEW -j ACCEPT
#
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

# some port forward stuff. (normally commented out) see also FORWARD area.
#
$IPTABLES -t nat -A PREROUTING -p tcp -i $EXTIF --dport 80 -j DNAT --to $INT80:80

echo "NAT: Enabling SNAT (MASQUERADE) functionality on $EXTIF..."
#
#More liberal form
#$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
#
#Stricter form
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j SNAT --to $EXTIP

echo Mazzy Example iptables rules set. $FWVER done.


How to download youtube videos like with realplayer in windows?

The best program I have seen that can do this is MiniTube.  It allows you to search YouTube without using a web browser and also allows you to watch YouTube videos without having to use Flash.  MiniTube will also let you download the video you are watching and save it to the directory of your choice.

You can install minitube in Ubuntu by adding the official minitube PPA. Do this by opening a Terminal and entering the following commands:

sudo add-apt-repository ppa:ferramroberto/minitube
sudo apt-get update
sudo apt-get install minitube

Another choice would be UMPlayer, which is simply a tricked-out frontend for mplayer. Among umplayer's many features is a YouTube search field and options to download videos. UMPlayer can be downloaded and installed by adding the Webupd8 Team UMPlayer PPA. Do this by opening a Terminal and entering the following commands:

sudo add-apt-repository ppa:webupd8team/umplayer
sudo apt-get update
sudo apt-get install umplayer

If you have issues with subtitle files or UMPlayer is buggy or will not function, you may need to upgrade your mplayer from the Mplayer Daily PPA. Do this by opening a Terminal and entering the following commands:

sudo add-apt-repository ppa:motumedia/mplayer-daily
sudo apt-get update
sudo apt-get dist-upgrade

Hopefully one of these programs does what you need it to do.