OpenSource Document Management I'm looking for Web-based, Opensource, PHP-MySQL Document Managment for my organization with these features:

Features :

Full text searching
Document Metadata
User access previledges
Document history
Database backup
Upload document
Document upload with some
Document Categorization by its type
Document Categorization by company names (it will be used by organization subsidaries)
It allows user to share document link
Automated User, File, and Activity report

Well, it should be free too :)

We need it to run on PHP and MySQL due to the current server setup. I've checked some of demos such as Ajaxplorer, OWL, LetoDMS, DocMGR, Maarch Archiving DMS, OpenDocMan, and KnowledgeTree (Demo).

I concluded that KnowledgeTree is the best choice that I found, but since they ended the Community Edition, it will be hard for us to manage the future problem. I tried to install it on Ubuntu 12.04 LTS and get stuck with several dependency of PHP 5.2. The IT Departement will mantained it independently, so I try to find the best choice for them, both of the community support and the server requirement.

Is there any suggestion?

Thanks!

If your requirement is to use a document management system with PHP and MySQL you could use OpenDocMan, otherwise, if you have more space you should try LogicalDOC (MySQL+Java) which integrates a great search engine (Lucene)

You can try LibreOffice or OpenOffice.org
You can try also using MS Office with Wine, but it won't provide you full stability or functions.


MAC address changing in Ubuntu 12.04 I am trying to change the MAC address of my device. I tried the ifconfig way as well as the macchanger tool way. However although the MAC address changes on interface eth0. I do not get a DHCP based IP address. When I tried a nework-manager restart, then the old eth0 MAC is assigned and I get an IP.

Is there a way to get an IP based on my new random MAC?

Please help.

I think, there is MAC filtering on router, switch, dhcp server. Also you may check there is static assign list MAC->IP or allow/deny list.


Can't log in to Ubuntu 16.04 Ubuntu installed some updates, and after the restart, I cannot log in.  It seems to accept, but then beeps and returns to the login screen.  All of the users, including guest do the same thing.

I was looking at some other posts here, and tried some of the suggestions without success.  I looked at the .xsession-errors file but I don't understand the error:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  155 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  34
  Current serial number in output stream:  35
openConnection: connect: No such file or directory
cannot connect to brltty at :0
upstart: gnome-session (Unity) main process (1751) terminated with status 1
upstart: unity-settings-daemon main process (1737) killed by TERM signal
upstart: Disconnected from notified D-Bus bus
upstart: logrotate main process (1601) killed by TERM signal
upstart: update-notifier-crash (/var/crash/_usr_bin_compiz.1001.crash) main process (1669) killed by TERM signal
upstart: update-notifier-crash (/var/crash/_usr_bin_compiz.1002.crash) main process (1671) killed by TERM signal
upstart: bamfdaemon main process (1730) killed by TERM signal
upstart: hud main process (1735) killed by TERM signal
upstart: indicator-bluetooth main process (1795) killed by TERM signal
upstart: indicator-power main process (1796) killed by TERM signal
upstart: indicator-datetime main process (1797) killed by TERM signal
upstart: indicator-application main process (1844) killed by TERM signal
upstart: job window-stack-bridge failed to stop

Thanks,
David

Set appropriate ownership to .Xauthority and .ICEauthority.

chown username:username .Xauthority
chown username:username .ICEauthority

Set permission for /tmp

sudo chmod a+wt /tmp

Restart lightdm

dpkg-reconfigure lightdm
sudo service lightdm restart

Reboot and login, this should fix your problem, if not then remove incompatible graphics driver:

For Nvidia:

sudo nvidia-settings --uninstall
sudo apt-get remove --purge nvidia*

For amd:

sudo apt-get purge fglrx*


Black screen on boot when any NVIDIA drivers installed I have a machine with Ubuntu GNOME 15.10 and an NVIDIA GTX 970 graphics card. For the last few months it was working fine with NVIDIA driver 352.63 and CUDA 6.5 installed, however I recently tried installing CUDA 7.5 using the .deb from NVIDIA's site and running:

sudo dpkg -i cuda-repo-ubuntu1504-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda

After doing this, when my computer rebooted I was met with a black screen, with no mouse cursor. To fix this, I booted into recovery mode in grub and in a root terminal, typed:

sudo apt-get remove --purge nvidia*
sudo apt-get --purge autoremove

After doing that, I was able to boot back into a GUI (without NVIDIA drivers), however, whenever I try to install any version of the NVIDIA restricted driver or CUDA, I get the same black screen (even installing versions that worked previously) and I have to repeat the above commands to get my computer to boot again.

I have tried:

Installing NVIDIA 352.63 using the 'Additional Drivers' menu
Installing NVIDIA 352.93 using the 'Additional Drivers' menu
Installing NVIDIA 364 using:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-364
Resetting xorg.conf
sudo dpkg-reconfigure xserver-xorg
sudo apt-get install nvidia-common sudo apt-get install xserver-xorg-video-nouveau sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo apt-get install nvidia-modprobe nvidia-common
Installing CUDA 7.5 using the .deb network file without first installing drivers
Installing CUDA 7.5 using the .run file without first installing drivers
Adding nomodeset to the grub config

Since installing the drivers that previously worked no longer works, I suspect that there is something I am forgetting to reconfigure/reset prior to installing.

Any help would be very much appreciated.

this is already answered here at askubuntu - I refer to this workaround of myself here :

How can I Install Nvidia Driver GT 520 and Cuda 5.0 in Ubuntu13.04?

You should carefully read this and follow this step by step - read this here too at nvidia :

http://www.nvidia.de/object/cuda_1_1_beta.html

This should solve your black screen into a magic screen ...


How do I check if a package is installed on my server? I recently installed Ubuntu Server edition 13.10 (Saucy Salamander). But I have run into a bit of problem.
At the end of the installation, it asks about several extra packages whether you want them or not, like OpenSSH server and virtual machine host. Here's what I'm looking at:

Now, my problem is that I can't remember if I have checked the "virtual machine host" checkbox. How do I check if my server has the corresponding packages?
What packages come with the virtual machine host?

Are you looking to know about all dpkg commands with options? Have a read from the below link.
15 dpkg commands to Manage Debian based Linux Servers
To List all Installed Packages
Here less is a simple text reader used to scroll through the list of packages in a new buffer that opens in the existing terminal window. The list will not be mixed with other terminal commands and output. Hit q to return to the terminal prompt. See man less for more info.
dpkg -l | less

To check whether a package is installed or not:
dpkg -l {package_name}
dpkg -l vlc

To check if the package is installed or not (for example, vlc). If installed, launch the package:
dpkg -l | grep vlc

Show the location where the package is installed. The -S (capital S) stands for "search"
sudo dpkg -S {package_name}
sudo dpkg -S skype

To use Grep to search:
dpkg -l | grep {keywords}
dpkg -l | grep pdf

For example, if I know or I want to confirm that mysql is installed use:

apt list --installed | grep mysql

the --installed part is mandatory to confirm that is installed
Knowing that I don't have postgresql installed, so:

apt list --installed | grep postgresql

returns empty/nothing
If I execute without --installed

apt list | grep postgresql

it returns everything about postgresql package names and repository available
In global try apt list --installed vs apt list the latter is bigger than the former about the results returned, the difference is about of course what is installed or not, and what is available


14.04: How to use NVIDIA Graphics instead of Intel integrated graphics? I previously tried to install my nvidia graphics card driver more than 50 times when this version was released (14.04) and every time i always got either blank screen, terminal only with no x-server or it would go back to the first alternative driver there was when it was installed.

This was the only reason why i stopped using linux (ubuntu). now im trying to give it another try but i need real detailed help and guidance. I have tried many ways and techniques from forums here and the result was never great.

**My PC (laptop)

Intel i5 4200/intel hd integrated video graphics
8gb ram
500gb hdd**
nvidia geforce 720m

I realize this may just be linking you to another page of instructions, but this one worked perfectly for me and I keep it bookmarked as a fallback:

http://mylinuxexplore.blogspot.com/2014/03/solved-nvidia-cant-access-secondary-gpu.html?m=1

I am running on a Lenovo Y50 with an Intel i7 / Geforce GTX 860M and for whatever reason I can only get the nvidia-331-updates drivers to work as this link suggests. Literally any other nvidia driver will leave me with the same problem you are describing. It seems like its hit or miss with this Optimus technology. Hopefully we will get a good update for it in the near future.

If you can not start X server go into a tty terminal (CTL+ALT+F2)
Update :
    sudo apt-get update and make sure that x server is installed sudo dpkg -l | grep xserver
There are 2 approaches to installing the Nvidia graphics driver(s).

Install them with the apt package manager  apt-cache search nvidia
You should then see a list of available drivers to choose from. Run: apt-get install nvidia 3XX
You may also need to install 'libgl' as well as the nvidia settings:apt-cache search nvidia-settings
Download the proprietary Nvidia graphics drivers for your respective GPU (you may need to add Nvidia to the apt/sources.list). Then run the install script (the install script may add Nvidia to the apt/sources.list file)
Then, reboot.


Permission denied when running sh file I am trying to use an sh file to easily start a screen with my minecraft server console. I named this file mc.sh. I have another sh file in the same directory as mc.sh that runs fine.

Here is what is in mc.sh:

screen -S minecraft java -Xms1024M -Xmx1024M -jar spigot.jar nogui

Here is what is in the other sh file:

#!/bin/sh
java -Xms512M -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar

The error message i get is -bash: ./mc.sh: Permission denied. The permissions for mc.sh are -rw-rw-r-- 1

The permissions don't have the execute bit set, so bash won't execute the script. You can set the bit and execute the script:

chmod u+x mc.sh
./mc.sh

or let bash execute it for you:

bash mc.sh

You can open the terminal (press Ctrl + Alt + T) and cd to the target directory:

cd /path_to_target

To give the file "your_file_name" permission to execute:

chmod +x your_file_name


How to remote into windows 7 through virtualbox on ubuntu 12.04 from outside the network I have ubuntu 12.04 installed with virtualbox 4.1.12. I have a windows 7 professional 32-bit virtualmachine with a bridged network adapter inside virtualbox.  I've given a static ip to this machine with all ports open on both host and virtual machine (for now) but people outside of my network can't remote into the virtual machine, just the host. If they are on my network they're able to remote in just fine.

What am I missing to allow the outside connections into the virtual machine (remote display was way too slow).

Host's internal ip: 192.168.2.151 port: 3389 --- Virtual Machine's internal ip: 192.168.2.155 --- port: 10155

First enable remote display in virtual box settings then try again using a remote client such as Remmina

Try changing the virtual network interface to "NAT" type in VBox, then just use port forwarding on your router to jump in.


how can I install ubuntu on dell inspirion 15z I am trying to install ubuntu 14 on a dell inspirion 15z with intel chip.  The machine came preloaded with windows 8.  I want to wipe windows out and run only ubuntu.  When I try to install the installer does not detect any discs.  I have modified the SATA in the bios from ata to ahci and intel smart response technology.  Secure boot is off.  Ubuntu crashes on install. ProcEnviron  [errno13] permission denied.  I have tried legacy mode and uefi and still no discs are detected.  I also tried to install fedora and mint and they both stopped at the same place--no discs detected?  Is there anything else I can do?

Install ubuntu on windows 8 with intel smart response

For anyone else having this problem this was the final step that made the installation work.  I had to find the intel gui and disable the acceleration.  The installation still did not recognize that I had an OS installed, but it could find my hard drive and everything worked fine after that, because I didn't care about preserving the windows 8 install.

Don't make it harder than it is. Just wipe your hard drive first,then reformat it, then you should be able to install Ubuntu, provided your hardware is not creating the problem. Remember to save(backup) your important files first!
P.S.  I read that Windows 8 has some new programming that doesn't play well with Linux.


Force alt + tab to switch only on current workspace in GNOME shell I am looking for a clean and fast method to force GNOME in Ubuntu 14.04 to switch between active apps only on the current workspace when pressing the shortcut alt + tab.

Simply:

gsettings set org.gnome.shell.app-switcher current-workspace-only true

The other solutions here did not work for me on Ubuntu 18.04.1, but the Alt Tab Workspace extension worked.


Terminator: shortcuts don't work after switching the keyboard layout I'm having a strange problem with Terminator:

The keyboard shortcuts work for the default keyboard layout (in my case, German) just fine.

But when I switch the keyboard layout using Super+Space (to Polish or English-US), they don't work any more.

Instead, e.g. Ctrl+Shift+O sends Return to the terminal.

The only shortcuts that work seem to be F11 for fullscreen and Ctrl+Shift+T for new tab.

The problem seems to concern the functionality, not the key combination:

I remapped horizontal split on F11 or Ctrl+Shift+T, and it still didn't work, while after remapping new tab to Ctrl+Shift+O, it still worked.

I'm using Ubuntu GNOME 16.4. Keyboard shortcuts in other applications work without problems.

EDIT: Tried also switching the default keyboard layout to Polish.

Now the shortcuts work for Polish layout but not for German, so it's the matter of default/non-default, regardless of the actual layout.

This also might be because you have german keyboard which physical layout is different than US or polish (for example the ? symbol on US software layout on nordic and German keyboards is typed by holding shift and pressing - symbol.

All regional keyboards have different layouts (with exception of modifier, function, cursor, system command and numeric keys)

Here is example of US keyboard layout

SO.  This is a bug, pure and simple.
WORKAROUND:
Most all of those functions are available by using the mouse.

Right-click in a window and you get the options to split it.
Once split, you can drag boundaries anywhere.
The entire terminator can go full-screen by clicking on the Maximize control.


Installation problem, not showing partitions When it comes into installing Ubuntu I really wanted to try and not break anything.

I have Ubuntu 12.04.2 LTS on a bootable USB and set my BIOS to make it the priority boot device, which worked great, so I'm running Ubuntu through the USB.

Then clicking the icon to install, made sure my WIFI is connected to the internet and it will install updates while installing. It will add the 3rd party software.

I click continue and then get a screen I wasn't expecting. Here http://www.ubuntu.com/download/help/install-desktop-long-term-support at step 4 it shows clear options for installation of the partitions I'm not getting that. I get this:

I'm trying to make the laptop a dual boot between Windows 7 and Ubuntu 12.04

Specifications:

Sony Vaio
Intel i3-2367m @1.4GHz
8GB DDR3
500gb HHD

You  should have two choices...install and keep present OS, or Install Ubuntu ie ( format and wipe windows and install Ubuntu as only OS....I did not install from usb, I downloaded and installed from cd-rom, so I don't know if there is a difference.


Which external sound cards are supported in 12.04? Rather than try to get an unspecified external sound card to work it would make sense to buy an external sound card which is known to be supported.

Has anyone got an external sound card which worked out of the box?

hardware is supported by the kernel version and not the version of Ubuntu (although they are obviously related).

Hardware lists are user supported and I would encourage everyone to participate in reporting results of hardware support to the various listings.

See:

http://www.h-node.org/home/index/en

http://www.h-node.org/soundcards/catalogue/en

http://www.ubuntu.com/certification/test-suite/

are you talking about a usb sound card?

I have a Creative X-FI Titanium Fatal1ty Pro and the sound works.


Bootable USB for Windows 10 I am using Ubuntu 18.04.1 version and now wants to use Windows 10 as well.
I have downloaded WoeUSB to create bootable USB for Windows, but I'm getting the below error message when installing. Before this step I have formatted the USB as NTFS.

Installation failed!
Exit code: 256
Log:
WoeUSB v@@WOEUSB_VERSION@@
==============================
Mounting source filesystem...
mount: /media/woeusb_source_1533820829_2541: wrong fs type, bad option, bad superblock on /dev/loop8, missing codepage or helper program, or other error.
mount_source_filesystem: Error: Unable to mount source media
Error: Unable to mount source filesystem
Unmounting and removing "/media/woeusb_source_1533820829_2541"...
umount: /media/woeusb_source_1533820829_2541: not mounted.
cleanup_mountpoint: Warning: Unable to unmount "/media/woeusb_source_1533820829_2541".
Some mountpoints are not unmount/cleaned successfully and must be done manually
You may now safely detach the target device

Rather than using WOEUSB, try using a piece of software that I can confirm to work, called MKUSB (also known as "Do USB Stuff" / dus). (Ubuntu Wiki pages: MKUSB, MKUSB GUI)

  There may be versions of this in the repositories already, but I prefer to have the 'latest' so I keep using the PPA, which is why I indicate to set up the PPA on your system specifically here.

First, install the MKUSB PPA so we get the latest MKUSB version:

sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb mkusb-common dus guidus

Next, run mkusb.  It'll ask you if you want to run the version called 'dus', we want to hit Yes at that screen.

It will open a terminal window for the console output, which is very useful to have so you can see the progress of the write tasks.

It should prompt you for your sudo credentials as well, however I'm running this from a Live USB at the moment so it doesn't prompt me, it just goes to the next screen in the GUI:

Once you click OK you'll see this screen.  Choose "Install (make a boot device)" and hit OK:

Then choose "Extracting Windows installer"

It will then open a page asking you to navigate to the ISO.  Go to the ISO file, select it, then hit OK.

It'll then ask you to select the device you want to write to.  This will overwrite all data on the selected device, so make sure you select the right one (in my system, /dev/sdc is the USB stick I'm going to put the Windows installer disk onto)

Click "OK" and it'll confirm you want to begin the write process.

It'll list the tasks it wants to do, and ask you if you really want to do this.  Select "Go", then hit "Go" when you're ready for it to run.

The console window will gain focus and you can watch the 'progress':

This will take many of your system resources and will result in some slowness on your computer at times, so you might want to go get a coffee or read the newspaper or take a quick walk.  This will take some time to complete, because it clones the ISO to a tarball, and then extracts the tarball to the target device.

When it's done, the GUI will return with this screen if it successfully created the disk:

Hit OK, and remove the disk from your computer.  You can then shut down and boot to the installer USB stick that was created.

A warning: Once you install Windows, you will then need to boot to a LiveUSB for Ubuntu, and follow the steps to run Boot Repair (the link is from the Ubuntu Wiki) in order to restore Grub so you can boot into Linux again.  Otherwise, you will only be able to boot into Windows (this is why Windows is typically installed first before you install Ubuntu).

Format the USB drive as FAT32 (or whatever it may be called by your formatting program... just try all containing FAT) and simply copy all the files from the ISO to it.

UEFI BIOS'es can boot from FAT32 partitions - they will try to find a file  efi\boot\bootx64.efi or  efi\boot\bootia32.efi  (not case sensitive) which you will notice is present on your typical Windows or Linux installation ISO image.

It is as simple as that nowadays. No need to use a special program that overwrites the boot sector anymore.


In virtualbox fullscreen mode, can I disable or move the popup menu bar? I'm running XP in virtualbox cause I need Photoshop and Illustrator. It works great on my 5 year old laptop which is stunning, but there's a minor annoyance when I go fullscreen.

The menu bar is in the bottom middle, and it pops up over the content. Since I use the escape buttons all the time I have no need for this to be there really, and it's really annoying when you try to change windows with the mouse and hit some random virtualbox menu item instead...

I know it's minor, and I can deal with the fact that you are probably just going to tell me to use alt+tab, but I'm just hoping there's some option I have overlooked that can turn off this bar or move it...

Thanks.

You can disable the menu bar. For the setting to take effect you may have to exit and return to fullscreen/seemless mode. No need to shut down the virtual machine first.

Go to the settings of the machine. In "General" on the "Advanced" tab you can select: "Show in Fullscreen/Seamless" and there's an option to "Show At Top Of Screen".

In VirtualBox 5 the setting is under “User Interface” instead of “General”.

The option to display the mini menu at the top is now (I am running version 5) in the User Interface section rather than general.
I would post an image of the dialogue box - but I don't have 10 reputation points!


Private alternative to Google Docs? Is there software to install on an ubuntu server, and then use to collaboratively edit text files, sometimes adding some attachments? it's important that no data is lost if 2 people save the same doc with different contents at the same time. I've found seafile, but it seems too complicated considering it need 3 ports to work, and requires manual installation.

Try Etherpad, a nice alternative to Google Docs based on Node.js. We used it in some projects with relative success.

You could try http://www.collatebox.com/ , or simply write to them to kow if they have a solution for that.


Does auto updating work across major versions? I'm using Ubuntu 11.04, and installing regular automatic updates. Since 11.10 is out, I expected it will be auto upgraded, but no, I'm still:

$ cat /etc/issue
Ubuntu 11.04

Now I want for example modal dialogs, but if I understand well, update will get only 11.10 users.

Is Ubuntu auto updating major versions?

11.10 is not out yet. only the alpha has been released and the final version will be released in october and you will notified through the update manager when that happens .

If You want an alpha release, just change your sources.list in /etc/apt and replace all natty with oneiric. Then type sudo apt-get dist-upgrade.
After upgrade completes, you should have 11.10 release.


Ubuntu Screen Brightness setting not affect in Acer Aspire4750G I have Acer 4750G with Ubuntu 14.04 and the screen brightness is not affect to screen ( Not Decreasing the brigthness ). My VGA is nVDIA GEFORCE GT 540M, is that possible to decrease screen brightness ? how ?

Brightness control doesn't seem to work on a Toshiba Satellite M115 laptop

Have you tried the suggestions in this link. I have tried them and i managed to change my screen brightness through settings.

Try this app, I am running ubuntu 14.04 on samsung np nc 110, nothing I tried worked even terminal solutions, until a came across this app, and it is free, though it does say buy in the app store, chillax, you should still get it free unless that changes!

https://apps.ubuntu.com/cat/applications/brightness-controller/

P.S. Best of luck


Xfce4 panel not responding to mouse(touch pad) clicks That is the gist of it; basically I can no longer click (LMB or RMB) on a tab to access a window, nor can I click on an item on the right of the xfce panel. The only way to change windows is by ALT+TAB or by pressing SUPER (configured to open whisker menu).

Steps to reproduce:
I believe what I did was: press ALT+F11 and then repeat to undo full-screen mode.

I have not been able to find anything about this in the bugtracker, so maybe this is a feature, but I wasn't able to find any settings regarding the issue.

I always got the same problem recently with xubuntu 14.04
My temporary solution is to type xfce4-panel -r in a terminal window to restart the panel.

I have had similar issues when I had a stuck key on my keyboard or mouse.  Try tapping SHIFT, CTRL, ALT, and Fn (if you have a Fn key) several times each.

Also, check for stuck buttons on your mouse (Click and release each mouse button, including pushing down on the scroll wheel, and any ancillary buttons you may have, such as a thumb button).

The key may not be physically stuck either, but just stuck in software.  Tapping the listed keys several times each can sometimes clear this issue.


Which Ubuntu distro is fully compatible with Hp pavilion 15n-205tx Laptop? I had recently installed Ubuntu 14.10 and 13.10, however I went back to Windows OS as both the version didn't Supported laptop's wifi (Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe)

Hardblock:yes

I have tried installing driver by refering http://ubuntuforums.org/showthread.php?t=2104690 but it end with an error while running
 make install
as tried to  sudo modprobe rt3290sta getting "rt3290sta" dir doesn't exist.

I have also tried blacklisting rt2800pci and rt2x00pci in  /etc/modprobe.d/blacklist.conf file

the last option was changing the version of kernel but it also didn't worked.

If anyone have the Solution for this please reply or let me know which distro is compatible with Hp pavilion 15n-205tx.

Did you check the Fn keys on your laptop? Many laptops can toggle the wifi on/off from the keyboard to save power.

Enable the Fn keys
Here is the guide for your Laptop

I googled your problem and hope you check this link it has a solved problem with the same issue you have i believe.

http://crunchbang.org/forums/viewtopic.php?id=35938

hope this work for you


How to run a script when a directory is changed by another user? I know has been a bit of discussion about topics similar to this. But here is what I am basically trying to do.

I have a watch directory called watched and whenever a file is added to that directory, I want to trigger a script called syncbh.sh which will take files out of that directory and upload them to a remote server.

The caveat is that files are created in the watched directory by one user (user2), but the script is executed by another (user1).

I've tried using incron to accomplish this, but keep running into a major problem because while the script can be executed manually by user1 with root privileges, the incron daemon is never actually automatically triggered by a file creation event by the other user2.

I've thought about whether inoticoming would be a better alternative, but I'm unclear about how the syntax of this works. If there a better way to accomplish this, or if I end up using inoticoming what would the command syntax be to ask it to watch /home/user1/watched directory and execute the script /usr/local/bin/syncbh.sh if a file is created/modified within that directory?

Any help would be much appreciated.

Using inoticoming:

You can put a script in /etc/init.d/ that runs inoticoming at boot time.

Create a new folder to hold the inoticoming log / last pid for the watched folder: sudo mkdir -p /var/log/inoticoming/watched/
Create a script inoticoming_watched in /etc/init.d/:

* Remember to change <path_to_folder> and <path_to_script> to match the full path of the watched folder and the full path of the script to execute

#!/bin/sh

case "${1}" in
    start)
        inoticoming --logfile '/var/log/inoticoming/watched/inoticoming.log' --pid-file '/var/log/inoticoming/watched/inoticoming_last_pid.txt' <path_to_folder> <path_to_script> \;
    ;;

    stop)
        kill -15 $(< /var/log/inoticoming/watched/inoticoming_last_pid.txt tee)
    ;;

    restart)
        ${0} stop
        sleep 1
        ${0} start
    ;;

    *)
    echo "Usage: ${0} {start|stop|restart}"
    exit 1
    ;;
esac

Mark the script as executable: sudo chmod u+x /etc/init.d/inoticoming_watched
Make sure that the script called by inoticoming_watched is executable.
Update rc.d to make the service inoticoming_watched start at boot time: sudo update-rc.d inoticoming_watched defaults

You can check the inoticoming log in /var/log/inoticoming/watched.

First of all, a script to watch the watched directory:

#! /bin/bash

folder=/path-to-watched

inotifywait -m -q  -e create  -e modify  '%:e %w%f' $folder | while read file
  do
    #make the sync here
  done

Second To make sync as another user (user2) the :

sudo -H -u user2 bash -c 'sh /usr/local/bin/syncbh.sh '

Now in order to not make a user prompt, you can set your sudo password in a file and read the password from this file when needed (note you have to use -S with sudo to get the password from file the).

Put your sudo password in a file, suppose passwd.txt, then the command above will be suck like

sudo -S -H -u user2 bash -c 'sh /usr/local/bin/syncbh.sh ' < /path-to/passwd.txt

Now the overall script will be like:

#! /bin/bash

folder=/path-to-watched

inotifywait -m -q  -e create  -e modify  '%:e %w%f' $folder | while read file
  do
      sudo -S -H -u user2 bash -c 'sh /usr/local/bin/syncbh.sh ' < /path-to/passwd.txt
done


No keyboard/mouse input on Login Ubuntu 18.04 I've been having a super bizarre problem recently. About a week ago, I reinstalled Ubuntu on my dual-booted Dell XPS 15, since my keyboard and mouse were not working. The os itself was still fine (ie it wasn't frozen), but neither external keyboards/mice nor my internal keyboard/touchpad were responsive. After a week, it looks like the problem has occurred again on a relatively fresh install of Ubuntu.

I have tried reinstalling xserver and xserver-input as talked about in this question: Updated from 16.04 to 16.10; the keyboard and mouse no longer works after getting to the lock screen

Digging into it a bit, I noticed that there was a package named xserver-xorg-input-all and xserver-xorg-input-all-hwe-18.04. What are their differences, and what should I have installed?

This happened after a reboot of my system, and I don't remember installing or removing anything specifically. Any help would be appreciated!

Cheers!

Did u checked any other on that same port (eg..speaker)

working or not

*ctrl+alt+t

*sudo apt-get update press enter give yes

*sudo apt-get upgrade press enter

*reboot and check now


How to upgrade a single package using apt-get? How do I update a single package? As far as man apt-get says apt-get upgrade doesn't take a package/list of packages as parameter:

  upgrade

  upgrade is used to install the newest versions of all packages
  currently installed on the system from the sources enumerated in
  /etc/apt/sources.list. Packages currently installed with new
  versions available are retrieved and upgraded; under no circumstances
  are currently installed packages removed, or packages not already
  installed retrieved and installed. New versions of currently installed
  packages that cannot be upgraded without changing the install status
  of another package will be left at their current version. An update
  must be performed first so that apt-get knows that new versions of
  packages are available.

You just need to do apt-get install --only-upgrade <packagename>. This will upgrade only that single package, and only if it is installed.

If you wish to install the package if it doesn't exist, or upgrade it if it does, you may leave out --only-upgrade.

To upgrade a single package on Ubuntu 18.04 LTS:

sudo apt update && sudo apt install --only-upgrade <packagename>

To upgrade multiple packages:

sudo apt update && sudo apt install --only-upgrade <package1> <package2> <package3>


How to set TOOL_CHAIN_TAG while compiling EDK2 I am trying to compile EDK2 following these instructions. I am using GCC 4.8.4. I know I didn't set TOOL_CHAIN_TAG correctly in WHERE_EVER_EDK2_IS/Conf/target.txt because when I typed build, it gave this error:

 'No command 'build' found, did you mean:
 Command 'pbuild' from package 'pbuilder-scripts' (universe)
 Command 'xbuild' from package 'mono-xbuild' (main)
 Command 'sbuild' from package 'sbuild' (universe)
 Command 'guild' from package 'guile-2.0-libs' (main)
 Command 'buildd' from package 'buildd' (universe)
 Command 'bwild' from package 'bacula-director-common' (main)
build: command not found'

I found another Ask Ubuntu question that said this command would work if TOOL_CHAIN_TAG was set correctly. Using GCC 4.8.4, what do I set the TOOL_CHAIN_TAG in WHERE_EVER_EDK2_IS/Conf/target.txt?

EDIT:
Thanks, Yurii. That seemed to fix half the problem, but it still doesn't know what I mean when I changed the TOOL_CHAIN_TAG to GCC4.8.4. What do I change the TOOL_CHAIN_TAG to so the computer understands it???

It looks that you forgot to run one of the following commands.

make -C BaseTools
. edksetup.sh BaseTools

Pay attention to dot.


How to receive/read raw file sent using Gtkterm thru serial? I've downloaded Gtkterm in 2 desktop systems each with a RS-232 serial port.
I'm attempting to transfer a simple .txt file between the 2 systems thru one of the available serial ports. The 2 systems are connected at their respective RS-232 port using a null-modem RS232 cable.

I've selected the appropriate ttyS# port, and am sending the file on 1 computer. But, how do I read this sent file on the other computer.

If you have a serial login from one ubuntu workstation (local) to another ubuntu machine (remote), you can send a raw file over gtkterm with the following:

First, check the md5sum of the file so that we can be confident we transferred it successfully. If the file you wish to send is binary (contains non-ascii text) then I recommend that you first base64 encode the data. For example

[local]:

user@local:~$ md5sum my_file.bin
9426054eb507e98605d7a6b94189168b  my_file.bin
user@local:~$ base64 my_file.bin > my_file.bin.base64
user@local:~$ gtkterm --port /dev/ttyUSB1 --speed 115200 &

[remote]:

user@remote:~$ cat > my_file.bin.base64

Now use the gtkterm menu to "send raw file" and select your file. You'll see every byte of the file echo'ed on the gtkterm window. When the file is finished sending press Ctrl+D in the gtkterm window to send a EOF to cat. You'll see a new terminal prompt pop up. Then base64 decode the file. Finally it's a good idea to check the integrity of the data.

[remote]:

user@remote:~$ base64 -d my_file.bin.base64 > my_file.bin
user@remote:~$ md5sum my_file.bin
9426054eb507e98605d7a6b94189168b  my_file.bin

Notes
Note that the file transfer will proceed at the rate of the serial connection. You can't feasibly send very large files this way. Furthermore (and especially if the serial connection doesn't support flow control) there's always the possibility of some dropped bytes.

*BONUS:

Once you've started cat > my_file.bin.base64 on the remote machine through gtkterm, you can bypass gtkterm to do the actual file transfer. For instance you can use plain ole cat:

[local]:

user@local:~$ cat my_file.bin > /dev/ttyUSB1

Or if you want a fancy progress bar give pv a try:

[local]:

user@local:~$ pv my_file.bin | cat > /dev/ttyUSB1

This technique will work with other serial terminal clients, including terminal based clients (i.e. creen, minicom, etc).

Here's what you a gotta do:

If the name of the file is blahblah.txt

On the sending machine:

sudo cat blahblah.txt > /dev/ttyS0

On the receiving machine:

sudo cat /dev/ttyS0 > blahblah.txt

Don't forget the sudo, since some systems may need that.


I never can start any virtual machine in virtualbox! : Error “Kernel driver not installed (rc=-1908)” I installed VirtualBox using sudo apt-get install virtualbox.
Every time I try to start a virtual machine, I get this error:

I logged in as root, and typed this into the terminal: modprobe vboxdrv and I got another error:

I also got another error:

(More info: I am using Ubuntu 16.04)
Help!!!

Reinstall the virtualbox-dkms package by running the following commands
sudo apt-get install linux-headers-generic build-essential dkms
sudo apt-get remove --purge virtualbox-dkms
sudo apt-get install virtualbox-dkms


How to use wget with GET parameter, or redirect web? sorry,.. I'm noob in Ubuntu ... and I'm trying to make a robots for downloading file..

i can download the zip file via web browser's address bar like this

http://www.mysite.com/getFile.php?mirror=1&categori=advanture&file=001.zip

but, when i try to use wget, the file never been downloaded...

this is how i use wget :

$ wget -H http://www.mysite.com/getFile.php?mirror=1&categori=images&file=001.zip
$ wget -H -k http://www.mysite.com/getFile.php?mirror=1&categori=images&file=001.zip
$ wget -H -m http://www.mysite.com/getFile.php?mirror=1&categori=images&file=001.zip
$ wget -H -m -k http://www.mysite.com/getFile.php?mirror=1&categori=images&file=001.zip

all wget just download the php file.. when i open it, it's just
invalid url

does it because of redirect ? or cookie ? when i clear all cookie in mozilla, and download again.. it still wokrs..

or session ? mysite.com is never use login user to download

You have to use single(') or double quotes(") in URL, so the link should look like this:

$ wget "http://www.mysite.com/getFile.php?mirror=1&categori=images&file=001.zip"

Really awesome solution....!
It works for me perfectly.

Thanks....

$command = "wget 'URL WITH QUERY STRING'";

exec("$command >/dev/null &");


how to add a user directory in apache on ubuntu I am new to apache

Want to add a new user directory in addition to root directory i.e /var/www/html

I have gone through this answer before  How to add custom directory e.g. phpmyadmin? but unable to figure out exact steps

let that directory be /home/my_username/somefolder/

So that when i type the url: http://localhost/~my_username/somefolder/ , i get the html files in the specified directory.

Please can someone help me in setting up this.

Use

sudo a2enmod userdir

to enable moduserdir (if it isn't already enabled).

Add

UserDir somefolder

to your VirtualHost's configuration to set the diectory name to somefolder (by default it's public_html.

Add something like

   <Directory /home/*/somefolder/ >
     Require all granted
     Options +Indexes
   </Directory>

to your VirtualHost's configuration to allow access to the user directories.

You can use the terminal, and enter following bash:

        gksu /var/www/html users
        ln /etc/greeter-lightdm/lightdm.conf users
        echo 'users'
        sudo restart lightdm

and it might work fine this way.


How can I change Unity's super-t binding to something else? First, I've tried searching several threads to find the answer, but I couldn't find one that solved my problem, so I'm opening a new one here.

I just installed Ubuntu 11.04 with the new Unity desktop, and I'm trying to change the key binding of Super+t from Open Trash (which I don't have much use for) to Open Terminal (which I use all the time).  I tried running "Keyboard shortcuts" and changing the binding in there to "Mod t," but that didn't work and it seems to get overridden by something else.

So then I installed compiz-config-settings-manager and I looked for a keybinding in there for Super+t, but I couldn't find any.  In fact, I even tried changing a random feature in ccsm to Super+t hoping that it would tell me there was a conflict with that binding and I could locate it there.  But instead it let me use Super+t. Sadly, after I changed it, I pressed Super+t and it still opened the trash.

Is there another place that I can change the key bindings of Super+t?

In the Compiz Config open the Unity Plugin page, change the "Key to show the launcher" to anything other than just Super. Mine is Alt+Super.

This will alter all Unity shortcuts.
So opening the first program in your launcher is no longer Super+1 but Alt+Super+1.

They should really have a configuration panel for Unity shortcuts.

The default shortcut for opening a terminal is Ctrl+Alt+T, so you don't necessarily need to change it, just start using the default.

But if you do want to customize shortcuts, the keyboard settings panel in Ubuntu 13.10 (I will confirm 14.04 soon), is where the "Launch terminal" shortcut is controlled.

I changed it to Super+T and it now works to open a terminal instead of the trash.


Will there be a better alternative than Uniy in future? I'm running Ubuntu for a long time and many of my students at our University switched from Windows to your great OS after my lessons.

But after that forced update to Unity you lost a lot of fans. Many students came and asked what they should do. We tried Gnome Shell (it's much better than Unity) but it could not nearly compare to Gnome 2.x!

If you go your way with Unity in future you will only help Microsoft and loose the leadership in Linux distros. Please give us Gnome 2.x back - as soon as possible!

Michael

It is quite simply not true that anyone has forced you to upgrade to Unity. You can still use the old shell if you don't like the new one, as these screenshots prove. Nobody has even forced you to upgrade Ubuntu, with 10.04 being supported for another full year after the next LTS is released in April. It is much better to ask questions.

Anyway, this is how my Ubuntu 11.10 desktop looked after spending two minutes customizing it. As you can see, it is the old desktop.


Problems playing .mp4 files in Firefox on Ubuntu 17.10 Currently .mp4 files do not stream properly in Firefox.

Can I check to see what file types are supported on my Ubuntu machine?

firefox it doesnt decode media files, is just a graphic interface to the decoder(libav)

to see which codec you have installed on your pc open "synaptic package manager" > search for "codec"

ps: firefox is slow lately.. try chrome

apt-get update
apt-get install chromium


Connecting to wifi fails, but APs are shown After an update a few days ago, I am not able to connect to any wireless AP. I tried basic stuff like restarting and disabling wireless by the hardware switch. Clicking on any AP will show that graphic that it shows, and I get a Wireless Disconnected message.

This is the output of ifconfig

eth0      Link encap:Ethernet  HWaddr dc:0e:a1:6e:bb:b2
          inet addr:10.10.11.86  Bcast:10.10.11.255  Mask:255.255.255.0
          inet6 addr: fe80::de0e:a1ff:fe6e:bbb2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24076 errors:0 dropped:39 overruns:0 frame:0
          TX packets:15334 errors:0 dropped:0 overruns:0 carrier:5
          collisions:0 txqueuelen:1000
          RX bytes:15108360 (15.1 MB)  TX bytes:2980605 (2.9 MB)
          Interrupt:46

eth1      Link encap:Ethernet  HWaddr e4:d5:3d:7b:a6:cb
          inet6 addr: fe80::e6d5:3dff:fe7b:a6cb/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:15 errors:2 dropped:0 overruns:0 frame:25528
          TX packets:171 errors:86 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2045 (2.0 KB)  TX bytes:41601 (41.6 KB)
          Interrupt:17

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1329 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1329 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:101408 (101.4 KB)  TX bytes:101408 (101.4 KB)

The output of lshw -C network is

*-network
       description: Ethernet interface
       product: AR8152 v2.0 Fast Ethernet
       vendor: Atheros Communications Inc.
       physical id: 0
       bus info: pci@0000:07:00.0
       logical name: eth0
       version: c1
       serial: dc:0e:a1:6e:bb:b2
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI duplex=full firmware=N/A ip=10.10.11.86 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:46 memory:e0500000-e053ffff ioport:2000(size=128)
  *-network
       description: Wireless interface
       product: BCM4313 802.11b/g/n Wireless LAN Controller
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:08:00.0
       logical name: eth1
       version: 01
       serial: e4:d5:3d:7b:a6:cb
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=wl0 driverversion=6.20.155.1 (r326264) latency=0 multicast=yes wireless=IEEE 802.11abg
       resources: irq:17 memory:e0400000-e0403fff

I also looked similar problems and a few suggested adding these lines to /etc/modprobe.d/blacklist.conf

blacklist mac80211
blacklist brcm80211
blacklist cfg80211
blacklist wl
blacklist lib80211_crypt_tkip
blacklist lib80211

and this below line to /etc/rc.local

modprobe wl

I restarted after these changes, and still cannot connect.

A few other posts also suggested I install packages such as firmware-b43-installer, bcmwl-kernel-source and linux-firmware. However, these are already installed.

I also deleted the /etc/udev/rules.d/70-persistent-net.rules so it could be created from fresh at start and the contents are as follows:

# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:1c.1/0000:08:00.0 (wl)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e4:d5:3d:7b:a6:cb", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

I am really at a loss to understand what is happening and how to arrive at a solution. Can anyone help?

You want to first remove everything from your /etc/modprobe.d/blacklist.conf that you may have added, as well as that one line you added to /etc/rc.local.

First thing to try:

With your wifi device plugged in, search for "Software Sources" and open the app. Go to the "Additional Drivers" tab. There you will find an option to enable your wireless device.

Second thing to try:

If this does not work, uninstall and then reinstall the bcmwl-kernel-source package, then reboot. You should then perform the step above to make the change survive each kernel upgrade.

You can see a further explanation here. Basically, when you upgraded the kernel, the wireless driver, which is an extra that needs to be built into each kernel, was not carried along.

This is a bit of a guess but I had to set the channel rather than use auto. You can download apps to point you at a good channel if this is the problem


Fractional Scaling does not work properly ubuntu 20.04 Just updated to 20.04 and tried the fractional scaling on my laptop. That does not work at all. Whatever scaling I use it just sets 200%. I googled it and it seems works with wayland server only. I did not find any good solutions to fix it or install wayland instead of xorg. Can you help? Thanks in advance!

  Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Xiaomi driver: i915 v: kernel
  bus ID: 00:02.0 chip ID: 8086:5917
  Device-2: NVIDIA GP108M [GeForce MX150] vendor: Xiaomi driver: nvidia
  v: 435.21 bus ID: 01:00.0 chip ID: 10de:1d12
  Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia
  unloaded: fbdev,nouveau,vesa compositor: gnome-shell tty: N/A
  OpenGL: renderer: GeForce MX150/PCIe/SSE2 v: 4.6.0 NVIDIA 435.21
  direct render: Yes

This is a bug with Ubuntu 20.04 + the latest nvidia drivers (435 proprietary and 440 proprietary, tested as far as I'm aware). Check out the launchpad thread. I'm having the same issue with 20.04 + nvidia-driver-440 (GeForce RTX 2080).

Yes, I am having the same issue. I fixed this by by choosing the nouveau display  driver from the X.org X server instead using the "additional drivers" application. I hope this helps you.


Where is the default tmux.conf file located? I want to copy the default tmux.conf file to my home directory, but I can't find the location in Ubuntu 12.04. The man page states that the file resides at /etc/tmux.conf however this does not match with my setup.

You can use the current (default) settings as a starting point:

tmux show -g | cat > ~/.tmux.conf

Note the pipe to cat is required for now because of a known bug when redirecting tmux stdout to file.

The config file is located in /usr/share/tmux, not in /usr/share/doc/tmux.


Ubuntu 20.10 isn't recognizing usb drive as mobile broadband Recently I upgraded my distro to latest installation available, to escape some undesirable issues found on earlier version 20.04. But now I'm facing some unusual problem associated to my mobile broadband, since my first experience on Ubuntu 18.04 I never faced something similar. The system take to much time to detect my usb drive and doesn't recognize it as mobile broadband neither on system menu or networks settings. Pls, help!

Seems like I found temporary solution... For those who are facing the same issues follow this link: https://discourse.ubuntu.com/t/ubuntu-20-10-gnome-shell-modem-broadband-issue/19101

seems like 20.10 didn't install tcl by default. I was able to fix the issue by install tcl
    sudo apt-get install tcl

I was getting the following error
usb_modeswitch@1-1.service: Failed to execute command: No such file or directory
usb_modeswitch@1-1.service: Failed at step EXEC spawning /usr/sbin/usb_modeswitch_dispatcher: No such file or directory


Problem with installing Some Packages and Updating my Ubuntu I am somewhat new to this operating system. I have been using it since 6 months. Initially there was no problem with my operating system but since the day I messed up with some wine software whenever I Click on "Check" in the update software section after a while a window is popping up and it says "Failed to download repository information" When I click on details it is something like this:

W:Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/Release  Unable to find expected entry 'commercial/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
, W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release  Unable to find expected entry 'commercial/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)
, W:Failed to fetch http ://archive.ubuntu.com/ubuntu/dists/precise-updates/Release  Unable to find expected entry 'commercial/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

, E:Some index files failed to download. They have been ignored, or old ones used instead.

I am unable to figure out the actual problem since a couple of days. I am even unable to install some Software like VLC,SKYPE,TeamViewer even Wine also. I am being reported the same problem always it is something like this:

Package dependencies cannot be resolved

This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.

The following packages have unmet dependencies:

vlc: Depends: vlc-nox (= 2.0.3+git20120729+r318-0~r40~precise1) but 2.0.3+git20120729+r318-0~r40~precise1 is to be installed
     Depends: libavcodec-extra-53 (>= 4:0.8-1~) but 4:0.8.3ubuntu0.12.04.1 is to be installed
     Depends: libavutil-extra-51 (>= 4:0.8-1~) but 4:0.8.3ubuntu0.12.04.1 is to be installed
     Depends: libc6 (>= 2.15) but 2.15-0ubuntu10 is to be installed
     Depends: libfreetype6 (>= 2.2.1) but 2.4.8-1ubuntu2 is to be installed
     Depends: libgcc1 (>= 1:4.1.1) but 1:4.6.3-1ubuntu5 is to be installed
     Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.1-0ubuntu4.2 is to be installed
     Depends: libqtgui4 (>= 4:4.7.0~beta1) but 4:4.8.1-0ubuntu4.2 is to be installed
     Depends: libstdc++6 (>= 4.6) but 4.6.3-1ubuntu5 is to be installed
     Depends: zlib1g (>= 1:1.2.3.3.dfsg) but 1:1.2.3.4.dfsg-3ubuntu4 is to be installed

I became so ardent user of Ubuntu that It's impossible for me to uninstall and install it again. Can someone help me out here.?

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo apt-get install -f
sudo apt-get update

Edited /etc/apt/sources.list manually and removed all instances of word "commercial". Problem solved. Backup that file first!


How to Map my enter key to a different key I need of serious help my Enter key just got damaged and I can no longer use the terminal properly. I split drink on my keyboard, all the keys work fine except for the enter key.

So i wanted to ask if the is any way I kind map it to a different key as I would or could do with Windows

Thanks for the help

You need to have two app: xev and xmodmap, both are commandline-tool.

Run xev. Then press the key whose behaviour you want to change. i.e. Enter. and then xev will output some information about the pressed key. Pay attention to the third line. It should be like this:

state 0x10, keycode 110 (keysym 0xff55, Prior), same_screen YES,

In this example Prior is the name of the behaviour the key is assigned to at the moment, the number keycode is the internal id to recognize the key. Now do this with another key i.e. PgDown give this output

state 0x10, keycode 115 (keysym 0xff56, Next), same_screen YES,

Here again the interesting part for us is keycode 115 and Next. Now, when you want to swap the two keys use xmodmap.

 xmodmap -e "keycode 110 = Next"

This changes the key with keycode 110 on your keyboard to the action Next. It's pretty simple.

Adding that line works for me.

~/ tail -1 .tmux.conf
run-shell 'xmodmap -e "keycode 104 = Return"'


Multi-choice memory stick? Now, with large memory sticks being cheap, I think it would be nice to have many or all official flavours available on one memory stick. That is; you boot from a memory stick and get a menu which lets you choose between the most current version, the latest LTS, 32- and -64 bit, Kubuntu, Xubuntu, Lubuntu, etc. This would make for a very nice way to demonstrate different flavours and also choose 32- or 64-bit as appropriate.

What would be the best way to accomplish this?

I think probably the best (Linux) way to create a Multi-OS Live USB Memory Stick (if I understood you correctly), including different Ubuntu flavors as well as other live Operating Systems (e.g. Parted Magic, including Clonezilla, for backup, recovery and other maintenance purposes) is:

MultiSystem

which I've been using happily for several years now.

If you're not comfortable with French or Google-Translate-powered translation, you can also see furher info here: www.pendrivelinux.com/multiboot-create-a-multiboot-usb-from-linux

You can use Yumi.  The only thing it runs under Windows or Wine

  YUMI (Your Universal Multiboot Installer), is the successor to
  MultibootISOs. It can be used to create a Multiboot USB Flash Drive
  containing multiple operating systems, antivirus utilities, disc
  cloning, diagnostic tools, and more.1

Just run it, choose an OS, click create, and once done, it will ask you if you want to add another.  Choose it click create, and so on.

For a utility that run under Linux, see this

1Source:Pen Drive Linux


Youtube Videos Are Not Playing in Ubuntu 14.04 Well I saw youtube videos even yesterday. But now I see this message...

  your browser does not currently recognize any of the video formats available

Can anyone tell me how can I fix this in Ubuntu 14.04?

You should install a package called "ubuntu-restricted-extras" with this command in a terminal:

sudo apt-get install ubuntu-restricted-extras

Actually, installer offers to do it for you but you may have not checked it up. This package brings various parts that may be illegal in some countries, so they are kept out of installation images. This contains archievers, encryption software and media codecs.

Did you run the software updater? It may have updated and caused some compatibility issues. Try to use the canonical browser. just search "browser" and there should be another browser. If that doesn't work, than look at updating flash player.


Location for SSL certificates, how to secure them? I have a nodeStatic app on an ubuntu server.

A domain links to the server.

Now I need to add SSL certificates:

var fs = require('fs');
var options = {
    key: fs.readFileSync('ssl/privatekey.pem').toString(),
    cert: fs.readFileSync('ssl/certificate.pem').toString()
};

var fileServer = new(nodeStatic.Server)();
var app = http.createServer(options, function(req, res) {
  fileServer.serve(req, res);
}).listen(80);

The thing is they are not secure in the folder with the app, or am I wrong?

Here is my folder structure:

The app is in var/www/myapp

Anyone could open the contents of my certificates in the webbrowser with example.com/ssl/privatekey.pem

What is a good practise to serve the certificates and keep everything secure? Put them on the same level as index.js, or even further above? Is this secure?

Bonus question:

Kind of a general question, but the server is fresh, what shall I configure to keep everything secure? A good link on the topic would do it.

It might make more sense to have something like nginx in front of your app, in this case. The setup would look like:

Certificates in some place, not in your webroot, with the key only readable by root.
Nginx configured to listen on ports 80 and 443, loading the certificate and key as root.
Nginx will proxypass traffic to your node app listening on some other port (say 127.0.0.1:8080), which itself will run as a non-root user.

This way, the node app:

never sees the certificate key
can never serve it even if requested to, since the key is readable only by root
and so even if an attacker managed to access an arbitrary file or get shell access, they won't be able to access the key without getting a privilege escalation on top.

(As a bonus, you can then use certbot to get Let's Encrypt certificates automatically, and it will configure nginx to use them for you.)

Add middleware at that endpoint or Redirect to the other endpoint
Stop google indexing of that endpoint using a robot meta tag
Use Encryption and Decryption


Can I prevent/restrict standard users from installing/uninstalling software? Can i prevent/restrict standard user from installing/uninstalling software in Ubuntu 12.04 desktop?

You have asked a lot of similar questions.

To install software you either need to be root a special account which is locked by default or an administrator.

In 12.04 and later administrators are part of the group sudo in previous versions it was admin.

You can check what groups a user belongs to by typing id in a terminal when logged on as that user or id username replacing username with the name of that user.  On my machine I see

warren@vb:~$ id
uid=1000(warren) gid=1000(warren) groups=1000(warren),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare),125(vboxsf)
warren@vb:~$ id joe
uid=1001(joe) gid=1001(joe) groups=1001(joe)
warren@vb:~$

Which shows I warren is an administrator and joe is not.

By default the first user created on the computer is an administrator; all others are not.  To stop someone being an administrator just make sure they are not in the sudo or admin group.  To make someone an administrator add them to the sudo group.

Can you?  Anything's possible when you put enough resources at it.  You can make the partition the users launch from a read-only partition.  Pretty restrictive, but that would solve that problem.

Also, there are application whitelisting solutions for Linux.  Those will block installations.

I think that the biggest question here is what you mean.  Do you mean "Using the OS, is it possible to..." or do you mean "using whatever means exists, how do I..."


How do I dual boot Ubuntu alongside Windows 10 on a Lenovo Yoga? I'm sorry if this is a noob question. I have searched some online. But can't really figure out how. I think I have a weird BIOS.. I'm trying to change the BIOS security settings.

Welcome to the community :)
I would suggest you to follow the steps on this page: https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/
Best regards,
Martin


Blender 2.62 tutorial for architectural works? i just want to learn all staff aboout blender and how to work with it.I am trying to go on linux only and without a windows partition in my system!So i cannot work with autocad in linux also with 3ds max.So i want to work with blender, bricscad and maya.The starting for me will be with blender.So are there any tutorials(complete, step by step) for me to work with precision and dwg importing from brics and then export again etc..

Thanks!

I'd just start using Blender for some project (that's exactly what I did some time ago). Just configure it to have 1 Blender unit == 1 meter (or feet).

There are lots of free tutorials (including video tutorials) all over the Internet - just start doing it and after a while you'll get some speed.

IMO the best way of learning is doing.


Cant install Windows programs with Wine I am trying to install a couple Windows programs. I have tried Wine itself, PlayOnLinux & Crossover. No matter which one I try, I get the same error message: "access denied" I tried logging in as root, thinking this would work, but still got the same results.
I am running Ubuntu 12.04, 32 bit.
ADDITIONAL DETAILS AS REQUESTED:
I am using installation CD's. I have been able to install Windows programs before, so this is a new problem that occurred after updating my system. All was fine before that.
The install files are on the CD's. Permissions? I assume so since as I said, I had installed other Windows software without issue BEFORE the upgrade. And yes, I have checked compatibility & all 3 programs are said to work well in Wine/Crossover.

The prgrams I am trying to install are:
1. Age Of Empires III(Crossover rank: Gold)
2. Quicken 2011 (Crossover rank: Silver)
3. Steam (Crossover rank: Silver)

UPDATE:
Iright click on the .exe file & allow executing as program is not selected. Also, it wont let me change them, says permissions could not be changed.

Well, obviously the windows installer needs permissions! I had the same problem! I did the following:

I burned the CD into an ISO imagefile
Then i mounted the ISO file with the FuriusIso Mount
After that, i opened a terminal and typed: gksudo nautilus
(it will open a file browser with root access!)
Now find the mounted ISO path and edit the installer file's properties
Done!

Good Luck!

wine is just an emulator so the windows programm emutlator so sometimes wine can not run windows programms ...

go Wime HQ site
and look if your programm supported ...


can't access to a folder even after chmod 777 I just created a new user, and I want to give access to a folder.

I have done:

chmod -R 777 ./p

and this is the result

lisa@linux:/media$ ls -halt
drwxr-xr-x  27 root      root   4,0K dic 11 11:57 ..
drwxrwxrwx+  3 pierpaolo utenti 4,0K dic  8 23:48 p
drwxr-xr-x   3 root      root   4,0K set 10 12:20 .
lrwxrwxrwx   1 root      root     45 ago  5 01:22 .directory -> /etc/kubuntu-default-settings/directory-media

But still, i can not cd in to the folder (permission denied). Any idea how to approach this problem or debug it?

Edit:

getacl gives:

# file: p
# owner: pierpaolo
# group: utenti
user::rwx
user:pierpaolo:r-x
group::---
mask::rwx
other::rwx

Edit:
The folder i want to access by the new user is a second hard disk that has been mounted in /etc/fstab using the following command:

UUID=FEB222A8B222657D /media/p/Seagate  ntfs-3g  defaults,windows_names,locale=it_IT.UTF-8  0 0

This happens because there is a directory higher in the tree where you do not have execute permission. If a parent directory has no execute permission for some user, then that user cannot stat any subdirectories regardless of the permissions on those subdirectories.
Example:
$ ls -l cake
drwxr-xr-x 2 zanna zanna 4096 Jul 12 11:43 brownies
$ chmod 666 cake
$ ls -l cake/brownies
ls: cannot access 'cake/brownies': Permission Denied

Even though I am the owner of the directory 'brownies' and all users have permission to read and enter it, I can't access it if its parent directory has no execute permission.
It's better to use groups to manage permissions than give to give directories 777 permission.

acl are not exactly unix/linux standard.  I know RH keeps trying to push them but they confuse more then they help.  I would strip the ACL data and just use chmod/chown/chgrp.

setfacl --remove-all p   # see if that works.


Convert all .ape files to .flac in different subfolders I was trying to convert some .ape files to .flac files using avconv on command line; obviously, avconv is not the main point here; its syntax is pretty straightforward, avconv -i inputApeFile.ape outputFlacFile.flac.

The point is that the files are nested in more subfolders; i.e., I have the Artist folder, then various CD subfolders, each of one contain different .ape files.
How can I convert all the files and then save them in the same folder of the original file but with the .flac extension?

If it is possible, I'd like to use only shell command on a single line without using scripts. I think it should be something like that

avconv -i 'ls -R | grep ape' '???'

but I'm stuck with the second part (maybe using sed??!?)

The command that you need is:

find /path/to/MainDir/ -type f -name "*.ape"  -execdir sh -c ' avconv -i "$1" "${1%.ape}.flac" ' _ {} \;

This will find each file that has .ape suffix and then convert it with the same filename with .flac suffix to the same location as original file is located.

{} is the path of current found file.
See the test from here

one line command you were looking for:
find -type f -name "*.ape" -print0 | xargs -0 avconv -i

find command will provide only files ending with .ape

the find command will give the relative path to avconv command so that it can convert those files and keep them in same folder as the input file (i.e. .ape).

find command will find all the files in that directory irrespective of how deep they are kept in subdirectory


How to customize the initrd embedded in or coming with the kernel image I would like to add some tools and not just kernel modules into the initrd (initramfs-based). Now I'm aware of how to unpack and how to pack the initrd with cpio and have even written a hook for /etc/initramfs-tools/hooks in the past to integrate a third-party kernel module. However, while the available script libraries seem to be geared towards the integration of modules, none of them seems to be for integration of other entities (in particular programs and their dependencies).

What options do I have to automate the integration of some useful tools for recovery into the initrd? I'm talking about the "rescue" system that the system drops into if it is unable to mount the root drive given to it by the boot loader.

Please note that I don't want the SquashFS approach as is used for Live-CDs because for the issue at hand it will be by far sufficient to include some relatively small tools that aid in recovery of the system (when it gets stuck in initrd and can't boot further). Also, the machines when they run into the issue that we have had in the past tend to boot into the rescue system, but there a few tools are missing to kick the system back on trail ...

man initramfs-tools

and then write a script for hooks/ containing something like

copy_exec /sbin/mdadm /sbin

Check out this article doing something similar with Busybox:

http://scaryreasoner.wordpress.com/2009/08/29/debugging-the-linux-boot-process/


Launcher and menu bar have disappeared on Ubuntu 15.10 Yesterday, I uninstalled several applications. When I rebooted the computer, I found that the launcher and menu bar had disappeared and every function related to them has gone.

I read this post:
Unity Launcher and Top Panel disappeared in 14.04

But didn't find a solution.

What should I do?

Depending on the cause of the problem, this may fix it:

dconf reset -f /org/compiz
unity --reset-icon &disown

That is sometimes sufficient to restore a functioning desktop in Unity.


could not load module rsyslog lmnsd_gtls.so The rsyslog module is showing up in system log /var/log/syslog as message repeated.  rsyslog was also showing 99% cpu use in top at one point, possibly unrelated.

tail /var/log/syslog

Dec  1 22:18:16 here rsyslogd-2066: could not load module '/usr/lib/rsyslog/lmnsd_gtls.so', dlopen: /usr/lib/rsyslog/lmnsd_gtls.so: cannot open shared object file: No such file or directory
 [try http://www.rsyslog.com/e/2066 ]
Dec  1 22:18:56 here rsyslogd-2066: last message repeated 4 times

lsb_release -a

Description:    Ubuntu 12.04.3 LTS
Release:        12.04

sudo apt-cache showpkg rsyslog

Package: rsyslog
Versions:
5.8.6-1ubuntu8.5

Related Question : How do I find that lmnsd_gtls.so is related to rsyslog-gnutls ?

Get the missing module by installing the rsyslog-gnutls package.

sudo apt-get install rsyslog-gnutls

see also http://virtuallyhyper.com/2013/06/install-splunk-and-send-logs-to-splunk-with-rsyslog-over-tcp-with-ssl/

see also http://help.papertrailapp.com/kb/configuration/encrypting-remote-syslog-with-tls-ssl

Check to see if the module file exists :

ls -la /usr/lib/rsyslog/lmnsd_gtls.so

Dec  1 22:18:16 here rsyslogd-2066: could not load module '/usr/lib/rsyslog/lmnsd_gtls.so', dlopen: /usr/lib/rsyslog/lmnsd_gtls.so: cannot open shared object file: No such file or directory
 [try http://www.rsyslog.com/e/2066 ]

I have encountered recently above error, and the solution was to place  certificates under /etc/rsyslog.d.

Reference: https://www.loggly.com/docs/rsyslog-tls-configuration/


"Dummy Output" No sound in Ubuntu 16.04 None of the HDMI output are working, all saying "dummy output", it was working yesterday, but when I use the headphones it became soundless, with or without the headphones.
Thank you already!

I had a similar issue happen where suddenly (I have no idea what I updated, or what changed in the system) I could not get sound.

I did the whole pulseaudio -k && sudo alsa force-reload thing. I didn't have any cards listed from pacmd list-cards but I could see the device with commands like:
lspci -nnk | grep -A2 Audio

I even installed a newer kernel (4.8+ since it apparently has good support for my particular machine).

In the end, I rebooted into the bios and disabled the built-in audio, applied those changes, rebooted to Ubuntu, then rebooted again into the bios to re-enable the audio. Once back into Ubuntu after that, everything seemed to work great!

Don't know if this will help with other people looking for solutions to their problems. I was using a Dell XPS 13 (9350), but might be something for others to at least try.

Technically speaking the sound disappeared in the new accounts that have been created on the same machine and the same Ubuntu Version.
The weird part is that no particular changes have been made to any of those accounts. By that I mean some files were copied from one folder to an other. No change in addition from the main (admin/ root) account either. The sound kept disappearing progressively from every account which is not root. I created a new account just to see what would happen. The sound disappears after a couple of hours.

To fix that some methods require a sudo privileges. Yet it doesn't work with the users which aren't "sudoers". To be more precise they aren't in the sodoers file.

And for some reason the computer "see's" the soundcard while the soundmixer doesn't seem to.

The weirdest was after.
The sound came back as unexpected as it left.
Yes, I unchecked the members (users) from the audio group (whom I started to put in after the sound disappeared) and
yes, I restarted the computer from the main account.
It seems that the issue might come from the way the user have been logged out the one's from each others.


Help me with dependencies When I try to install .deb file it says:

Selecting previously unselected package guitarpro6:i386.
(Reading database ... 182150 files and directories currently installed.)
Preparing to unpack gp6-full-linux-demo-r11686(1).deb ...
Unpacking guitarpro6:i386 (6.1.9) ...
dpkg: dependency problems prevent configuration of guitarpro6:i386:
guitarpro6:i386 depends on gksu.
guitarpro6:i386 depends on libasound2; however:
Package libasound2:i386 is not installed.
guitarpro6:i386 depends on libglu1-mesa; however:
Package libglu1-mesa:i386 is not installed.
guitarpro6:i386 depends on libportaudio2; however:
guitarpro6:i386 depends on libstdc++6; however:
Package libstdc++6:i386 is not installed.
guitarpro6:i386 depends on libxml2; however:
Package libxml2:i386 is not installed.
guitarpro6:i386 depends on libxslt1.1; however:
Package libxslt1.1:i386 is not installed.

dpkg: error processing package guitarpro6:i386 (--install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.2~bzr0+15.10.20150627.1-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Errors were encountered while processing:
guitarpro6:i386

How do I fix this? I don't even know what to install.

sudo apt-get install --fix-missing gives me:

Selecting previously unselected package guitarpro6:i386.
(Reading database ... 182150 files and directories currently installed.)
Preparing to unpack gp6-full-linux-demo-r11686(1).deb ...
Unpacking guitarpro6:i386 (6.1.9) ...
dpkg: dependency problems prevent configuration of guitarpro6:i386:
 guitarpro6:i386 depends on gksu.
 guitarpro6:i386 depends on libasound2; however:
  Package libasound2:i386 is not installed.
 guitarpro6:i386 depends on libglu1-mesa; however:
  Package libglu1-mesa:i386 is not installed.
 guitarpro6:i386 depends on libportaudio2; however:
 guitarpro6:i386 depends on libstdc++6; however:
  Package libstdc++6:i386 is not installed.
 guitarpro6:i386 depends on libxml2; however:
  Package libxml2:i386 is not installed.
 guitarpro6:i386 depends on libxslt1.1; however:
  Package libxslt1.1:i386 is not installed.

dpkg: error processing package guitarpro6:i386 (--install):
 dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.2~bzr0+15.10.20150627.1-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Errors were encountered while processing:
 guitarpro6:i386
matjaz@X555LN:~/Downloads$ sudo apt-get install --fix-missing
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 guitarpro6:i386 : Depends: gksu:i386 but it is not installed
                   Depends: libasound2:i386
                   Depends: libglu1-mesa:i386 but it is not installed
                   Depends: libportaudio2:i386 but it is not installed
                   Depends: libstdc++6:i386 but it is not installed
                   Depends: libxml2:i386 but it is not installed
                   Depends: libxslt1.1:i386 but it is not installed
E: Unmet dependencies. Try using -f.


How to mount FreeNAS network share persistently I have a FreeNAS server in the house on which we keep our media. I would like to be able to automount this share in a persistent location when the machine is turned on so that the music players can index the music and we can conveniently browse through the folders etc.

How will I accomplish this?

If you're looking to have a persistent mount that is stale-proof (outside of the networking being down, or the remote machine being off) I would recommend using AutoFS

In short Autofs (also know as Automount) will only mount a directory when it is needed or accessed and after a few moments of inactivity will unmount itself. By doing so you can setup a persistent network location like you NAS and have it always accessible on your machine in the same mount point without having to worry about the mount going stale when networking drops or if you suspend your computer.

Judging by the tags you need to mount Samba. For that matter look here:

Samba Client Configuration Guide on Ubuntu Wiki

A good resource to look for answers about Ubuntu is http://wiki.ubuntu.com since many questions are answered there in greater detail. :)


Help me to install ppp server on Ubuntu 12.04 server I want build ppp server on Ubuntu 12.04 Server.  I failed even after tried to
install ppp server numerous times. I want to build ppp server like the below environment.

ppp client: Modem -------> NAS Network Access Sever--------------------> inthernet(ISP)
(embedded Target).........(PPP Server:ubuntu 12.04 installed vmware)

embedded Target was installed ppp client, so I am concerned about ppp server on Ubuntu.

I installed pptpd, ppp, mgetty, openssl  packages and I set configurations up according to this. However, it's not working.

Debugging info is

Dial start : ATDT9,750****
form modem : ATDT9,750****
route: SIOCDELRT: No such process
PPP START : /root/daehap/ppp/ppp-on ATDT9,750**** 00005@****.***.** 1234 115200&

::::: TIME END   -Dial : 700

CONNECT 28800 28800
PROTOCOL:V42bis
Debian GNU/Linux ttyS1 38400 (38400)
**EMSI_REQA77E^Q
ubuntu login: 00005@****.***.**
Password:

Serial connection established.
using channel 7
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS1
Warning - secret file /etc/ppp/pap-secrets has world and/or group
sent [LCP ConfReq id=0x1 asyncmap 0x0> magic 0x54e5c85e> pcomp> accomp>]
sent [LCP ConfReq id=0x1 asyncmap 0x0> magic 0x54e5c85e> pcomp> accomp>]
rcvd [LCP ConfReq id=0x1 asyncmap 0x0> magic 0x54e5c85e> pcomp> accomp>]
sent [LCP ConfNak id=0x1 magic 0x1a78e02e>]
rcvd [LCP ConfNak id=0x1 magic 0x1a78e02e>]
sent [LCP ConfReq id=0x2 asyncmap 0x0> magic 0x64a91fc7> pcomp> accomp>]
sent [LCP ConfReq id=0x2 asyncmap 0x0> magic 0x64a91fc7> pcomp> accomp>]
sent [LCP ConfReq id=0x2 asyncmap 0x0> magic 0x64a91fc7> pcomp> accomp>]
sent [LCP ConfReq id=0x2 asyncmap 0x0> magic 0x64a91fc7> pcomp> accomp>]
rcvd [LCP ConfReq id=0x2 asyncmap 0x0> magic 0x64a91fc7> pcomp> accomp>]
sent [LCP ConfNak id=0x2 magic 0xf0e6bde2>]
rcvd [LCP ConfNak id=0x2 magic 0xf0e6bde2>]
.
.
.

I think ppp server didn't communicate LCP Protocol.

What do I do to make it work? Please give me idea.

First, you should change the access settings for your /etc/ppp/pap-secrets file

  Warning - secret file /etc/ppp/pap-secrets has world and/or group

Second, there seems to be a Configuration Problem. You have multiple LCP ConfNak (LCP Configuration not Acknowledged) Packets, some are ok, but you need at least one LCP ConfAck(LCP Configuration Acknowledgement)

Read this doc from linuxdoc it will help you


Setting permanent MAC address in Ubuntu 14.04 Due to the unusual way my ISP set up Internet, I need to manually set up MAC address to go online.
So far I've been using:

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether  xx:xx:xx:xx:xx:xx
sudo ifconfig eth0 up

However, I have to enter this command every time I start my computer.
How to set MAC address permanently?

You can use an udev rule to automatically set the MAC address on your network interface

Create the file /etc/udev/rules.d/99-custom-mac.rules and paste into it:

ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="XX:XX:XX:XX:XX:XX", RUN+="/sbin/ip link set dev %k address YY:YY:YY:YY:YY:YY"

where XX:XX:XX:XX:XX:XX is the original MAC address of your interface (you can get it in the output of ip link) and YY:YY:YY:YY:YY:YY is the new MAC address you want to enforce.

To make the change effective you can run

sudo udevadm control --reload

but I doubt it works, so a reboot might be necessary.

Copy all the matter in the terminal

sudo ifconfig eth0 down && sudo ifconfig eth0 hw ether 00:4a:82:d5:e4:c6 && sudo ifconfig eth0 up


Dual boot Ubuntu and Windows 7, I Can only boot ubuntu through recovery mode I want to become a new user of Ubuntu, however this problem is preventing me.
I have/had Window 7 professional on my computer. I recently looked into getting linux. I discovered dual-booting and decided to give it a try.
First I created a bootable flash drive with ubuntu 12.10 64 bit. I then followed the instructions on:

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

after I finished going through the setup, my computer rebooted.
After the reboot I was able to select Ubuntu, advanced options for Ubuntu, 2 memory tests, and windows 7 (loader).
So I chose Windows ( honestly i was more concerned that i still had everything on windows at this point). I then rebooted again and selected Ubuntu. When i selected Ubuntu, the background screen of Grub (the crimson/burgandy color) stayed for a few seconds then the screen went black:
video here>>>

http://www.youtube.com/watch?v=6kKcG4sT7Lg&feature=plcp
I tried again with the same results. so i redid the ubuntu install differently using

http://www.liberiangeek.net/2012/10/dual-booting-windows-7-and-ubuntu-12-10-quantal-quetzal/.

After rebooting the same thing happened. After that i was stumped, so i figured it could hurt to experiment. after all i backed up my windows 7 stuff, and i have the software disk.
I tried booting in recovery mode under "advanced options for Ubuntu" and sure enough, after selecting continue to normal reboot it worked.
So i updated and everything but when i rebooted it still wouldn't boot under Ubuntu. It would always boot after recovery mode. So i try installing 12.10 32 bit Ubuntu. the same problem keeps happening. I can still get to Ubuntu through recovery mode. so i went online and tried using the terminal (in ubuntu that i booted through recovery mode) when i was using it i discovered that "Error in sitecustomize; set PYTHONVERBOSE for traceback:

EOFError: EOF read where not expected" kept showing up. also i noticed a notification in the top right corner that looked like a do not enter sign. it said "an error occured, please run package manager from the right-click menu or apt-get in a terminal to see what is wrong. the error message was: 'ror in sitecustomize;set PYTHONVERBOSE for traceback:
EOFError: EOF read where not expected
traceback (most recent called last): File "/usr/bin/lsb_release
EOFError: EOF read where not expected 39;0' this usually means that your installed packages have unmet dependencies"

Naturally i assumed this was what was causing my boot problems. I downloaded synaptic and updated everything and the error went away. but my boot problem was still a problem. so i go online find some things that have worked for others, like this>
Try to do this (in your terminal:
sudo nano /etc/default/grub

Look for:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Change it too :
GRUB_CMDLINE_LINUX_DEFAULT="quiet"

And update Grub:
sudo update-grub

This should fix stuff.)
I did this and i still have the problem.
sorry for the excessive explanation,
please help.

Run Boot-Repair --> Advanced Options --> GRUB options --> tick Uncomment GFXMODE --> Apply
Write on a paper the URL (http://paste.xxxxxx) that will appear.
Reboot the PC. If any problem, please indicate the URL.

la mejor opcion seria que en vez de hacer particiones hubieras instalado con wubi, la unica limitante es que solo puedes darle 30gb de espacio a ubuntu :/ , instala la de 32 bits aunque tu proceasador sea amd de 64 , es mejor la de 32, ahora mismo la estoy instalando desde wubi, te ahorras la particionada y es mas sencillo al momento de instalar, reinstalar y formatear.


rsyncing /home between 10.04 and 11.04 My co-worker has an old laptop with Ubuntu 10.04 installed on it. About a week ago I backed up her /home directory using rsync, and kept it on an external HD.
Now, she got a new laptop with Ubuntu 11.04.

I am still pretty new to the Ubuntu file system, so my question is this: Can I just rsync an Ubuntu 10.04 /home backup onto an Ubuntu 11.04 machine? Are there any directories I should not copy from the backup?

There are a great many differences between how Gnome is configured in 10.04 and how it's configured in 11.04. While you might loose some settings from the 10.04 desktop I would strongly recommend leaving the .gconf, .gnome, .gnome2, .gnome2_private, .gconf, .gconfd, .config, and .conf folders behind. Moving these over from 10.04 to 11.04 have a high potential for corrupting the desktop. I would also recommend making a tar'd backup of the /home folder prior to any moves.

Since you've used rsync you should have an exact copy of your friend's dir on your machine. There should not be any problems with copying between any other machines now.

The only to take care of is file owner.


How may I improve my boot / shutdown time? I have a pretty decent laptop (Intel Core i7-3520M CPU @ 2.90GHz, SataII SSD from Samsung, 8GB Ram), but I not satisfied with my boot and shutdown times...
I have installed bootchart, and am trying to interpret it, but I don't understand some parts.

In particular, I don't get what is happening during the first 10 seconds, when there is almost no CPU utilization, nor I/Os. What is happening then ? (there seem to be only udevd, modprobe and plymouth running).

On the other end of my daily work, I also experiente slow shutdown. No shotdown chart here, so I'm even more clueless...

Update
I have come accross a hint saying hitting the up key while shutting down gives access to the console (I had been fighting with F1 / Alt F1 before that). So I have seen that the long shutdown time seems to have to do with rpcbind and modem-manager being unable to quit cleanly... Any idea?

Update 2
I have uninstalled rpcbind, as well as modemmanager. This made things better for shutdown, but I still have several seconds waiting between the 'All processes ended within 1 seconds' message, and the real shutdown. Just then, I get a quick message I was unable to read yet, but I suspect some sort of timeout to occur...

Update 3
Ok, I think I have narrowed things down to the execution of resume and wait-for-root during the first 10 seconds of the boot process. This is taking more than 5 secs, with no disk nor noticable CPU activity. I noticed that swap UUID in /etc/initramfs/conf.d/resume does not match with the real UUID of my swap partition, which happens to be... crypted. Maybe that is the point ? Any hint on initramfs-tools and cryptswap ?

Ok, I have found the problem.
As I was feeling, the 5 seconds waiting on resume and wait-for-root is not normal.

Googling around, I finally found this bug report: 5 second delay on wait-for-root

Essentially, it states that the 5 secs wait is due to a wrong entry in /etc/initramfs-tools/conf.d/resume.

It turns out that my swap is encrypted, and I had the initial installation UUID in /etc/initramfs-tools/conf.d/resume.
I tried to put the one given by blkid for /dev/mapper/cryptswap1, but it didn't work...

I finally just commented out the entry in the file, and the 5 seconds delay is gone.
Any way, hibernate is not enabled on my system (I think it is disabled by default in Ubuntu). Notice the # at the beginning of the entry.

#RESUME=UUID=3835540d-0cb4-46fc-b39a-de9ff88dcefd

then run:

sudo update-initramfs -u

So here is my latest bootchart:

Much better.
Regarding shutdown, removing rpcbind and modemmanager did the trick. I now have great boot and shutdown times.

Maybe you would want to consider installing your OS on RAM? If real speed is what you are after then that would be it. The difference between SSD loadtime and RAM loadtime is just huge.


How do I determine the MIME type of a file? I recently switched to  GNOME 3 and was surprised to find that there was no way by which we could set the default applications. I am writing a Nautilus extension using Bash. I want to find the MIME type of a file.

Initially I used to extract the extension of the file using sed and build the code on it. Then I realized that there is this command called file. When I try to find the mime-type of a mkv file, the command file --mime-type -b <filename> outputs application/octet-stream but when I see the Nautilus properties window it shows the correct video/x-matroska mime-type.

Am I missing anything here? If not is there a better way in which I can file the mime-type of a file?

There are different ways to get a MIME type on Linux, and they often lead to different results.  Use

xdg-mime query filetype your_file

to get the same MIME type as Nautilus gets.

Look up the .desktop file of the application (i.e. gedit) in /usr/share/applications and add the MIME-Types as following:

...
MimeType=text/plain;text/wiki;text/foo;
...

They should then be automatically launched on these files.


Can I Run Ubuntu 12.10 or 13.04 on an ATI XPress 200 graphics card? I have a acer aspire t650 pc with a pentium 4 processor and a ati xpress 200 grafics card.
Does anybody knows if I can update ubuntu from 12.04 to 12.10 and to 13.04 and if so which driver do I need to install?
I am unsure because there is already no support for radeon 2xxx and 4xxx cards

you would have to install all of them and just split up your hard drive by portioning it. Then every time you turn on you computer it will ask you which one you would like to run with.


Poor peformance with an Mobility HD 4250 What i can do for this? I have so damn laggy and bad performance with Ubuntu 11.10 and Unity like with 11.04. ATI Drivers installed, and Sync to VBlank is disabled. I really want to use Unity, but its so laggy.

Try selecting Unity2d at the login screen. Visually, Unity and Unity2d are very similar, but Unity2d is not based on Compiz, so it may perform better.

I have an HD 4250. The problem is fixed by installing the proprietary driver.


How can I repair grub? (How to get Ubuntu back after installing Windows?) I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.

How can I get Ubuntu back?

When you install Windows, Windows assumes it is the only operating system (OS) on the machine, or at least it does not account for Linux. So it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply chroot into your install and run update-grub. chroot is great because it allows you to work on your actual install, instead of trying to redirect things here and there. It is really clean.

Here's how:

Boot from the live CD or live USB, in "Try Ubuntu" mode.
Determine the partition number of your main partition. sudo fdisk -l, sudo blkid or GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

If your main partition is in an LVM, the device will instead be located in /dev/mapper/, most likely, /dev/mapper/{volume}--{os}-root where {volume} is the LVM volume name and {os} is the operating system. Execute ls /dev/mapper for the exact name.
Mount your partition:

sudo mount /dev/sda2 /mnt  #Replace sda2 with the partition from step 2

If you have a separate /boot, /var or /usr partitions, repeat steps 2 and 3 to mount these partitions to /mnt/boot, /mnt/var and /mnt/usr respectively. For example,

sudo mount /dev/sdXW /mnt/boot
sudo mount /dev/sdXY /mnt/var
sudo mount /dev/sdXZ /mnt/usr

replacing sdXW, sdXY, and sdXZ with the respective partition numbers.
Bind mount some other necessary stuff:

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

If Ubuntu is installed in EFI mode (see this answer if you're unsure), use sudo fdisk -l | grep -i efi or GParted to find your EFI partition. It will have a label of EFI. Mount this partition, replacing sdXY with the actual partition number for your system:

sudo mount /dev/sdXY /mnt/boot/efi

chroot into your Ubuntu install:

sudo chroot /mnt

At this point, you're in your install, not the live session, and running as root. Update grub:

update-grub

If you get errors or if going up to step 7 didn't fix your problem, go to step 8. (Otherwise, it is optional.)
Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub # In order to find and add windows to grub menu.

If Ubuntu is installed in EFI mode, and EFI partition UUID has changed, you may need to update it in /etc/fstab. Compare it:

blkid | grep -i efi
grep -i efi /etc/fstab

If current EFI partition UUID (from blkid) differs from the one in /etc/fstab, update /etc/fstab with current UUID.
If everything worked without errors, then you're all set:

exit
sudo reboot

At this point, you should be able to boot normally.

If you cannot boot normally, and didn't do step 8 because there were no error messages, try again with step 8.

Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 8 does. Experience helping users in chat has shown that step 8 is sometimes necessary even when no error messages are shown.

Windows does not see Linux formatted partitions. You need to use gparted from a liveCD and create a primary partition formatted NTFS with the boot flag.

Some have had issues if the new primary partition is after the extended partition as Windows does not always reset partition table correctly. Best to have good backups and a separate backup of partition table.

Backup partition table to text file & save to external device.

sudo sfdisk -d /dev/sda > PTsda.txt

This is only for MBR (msdos) systems. If your Ubuntu install is in GPT partition drive you can only install Windows in UEFI mode or convert drive back to MBR (msdos).


How to empty swap if there is free RAM? When I open a RAM-intensive app (VirtualBox set at 2GB of RAM), some swap space is generally used, depending on what else I have open at the time.

However, when I quit that last application, the 2GB of RAM is freed up, but the same swap space use remains.

For example, right now, about two hours after having closed VirtualBox, I have 1.6GB free RAM and still 770MB in swap.

How can I tell Ubuntu to stop using that swap and to revert to using the RAM?

The Linux kernel underlying Ubuntu will automatically "swap in" those pages from disk to RAM as needed, so in general I'd say just let it happen naturally.

However, if you really feel that you need to force it, (I can see a scenario where you would want to know the system will be responsive later) you can momentarily disable and re-enable swap

sudo swapoff -a
sudo swapon -a

OR alternatively as a single line

sudo swapoff -a; sudo swapon -a

Be careful doing this, as you may make your system unstable, especially if its already low on RAM.

It doesn't affect performance if your swap space is occupied. The only performance penalty is is stuff is going in/out of swap. If nothing is being swapped in/swapped out, then you don't have to worry about anything.


why does /proc/cpuinfo show a single processor on the BQ Aquaris phone? phablet@ubuntu-phablet:~$ cat /proc/cpuinfo
Processor   : ARMv7 Processor rev 3 (v7l)
processor   : 0
BogoMIPS    : 2072.57

Features    : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part    : 0xc07
CPU revision    : 3

Hardware    : MT6582
Revision    : 0000
Serial      : 0000000000000000

as this is a quad core device I was kind of expecting more cores to show up here. Why don't they?

lscpu does show that it has 4 CPUs, I think it is showing core 0 is online and cores 1,2,3 are offline. What does that mean? How do I turn them on?

phablet@ubuntu-phablet:~$ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0
Off-line CPU(s) list:  1-3
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
CPU max MHz:           1300.0000
CPU min MHz:           598.0000

The kernel will offline cpus when they are not required to keep the power consumption low.  When the load increases it will automatically put more CPUs online.

One can see how many CPUs are available and how many are online using:

getconf -a | grep NPROCESSORS
_NPROCESSORS_CONF                  4
_NPROCESSORS_ONLN                  1

Above, 4 are available, and 1 is online.

I don't know why it is only showing 1 cpu, maybe it is only showing active/running cores.
But try the command lscpu, it will give you the cpu information.


How to completely remove Elementary-Desktop from Ubuntu 14.04 I installed Elementary OS Desktop on Ubuntu 14.04, and after that I removed it, but it's not completely removed.

I have changes in Unity, for example:

Reset Unity:

unity --reset

Or you can try to

Reset Theme:

gsettings set org.gnome.desktop.interface gtk-theme ''
gsettings set org.gnome.desktop.wm.preferences theme ''