Is there a Linux equivalent to LinqPad? I've recently been finding myself writing more SQL, on Windows with MSSQL and LinqPad and while I want to experiment on Ubuntu to get more of a handle on databases and I have no love lost for MSSQL, I'll be using MySQL I do want to find a LinqPad equivalent.

What I mean by this in more concrete terms is not the most powerful tool but more of a scratch-pad like LinqPad is, where a novice can quickly write down a query and run it to see what happens, also something which is fast to start and run.

I have to disagree with the basis of Shauna's answer; LINQPad is not a MS-SQL gui or frontend.  It is a .NET scratchpad which can generate a LinqToSql context for supported data contexts.  This makes it fundamentally different from typical SQL clients (such as SQL Server Management Studio or MySql Workbench).

Out of the box LINQPad ships with drivers which support MS-SQL, however additional drivers can be easily installed and can add support for other data sources--including MySql.

For your specific question the answer is that the closest think you'll find that can run natively on Linux would be a custom .NET application written with Mono (version 2.6 added LINQtoSql support).

However, if you need to use LINQPad with MySql you easily can using the IQ driver.  You will still need Windows to run LINQPad (or, possibly wine).  I personally keep a Windows VirtualBox on my Linux development station specifically for a handful of tools such as LINQPad which are windows-only.

LinqPad is basically a gui front end for MS-SQL Server. In that sense, you have several options, but remember that you'll need to install MySQL server (sudo apt-get install mysql-server in terminal) to use them. Additionally, you'll probably want create and populate a database to play around with. The biggest difference will be that you won't be able to use Linq syntax, because Linq is a .Net syntax (you can, however, get similar syntaxes by getting into some of the languages and frameworks, the most closely-resembling probably being Ruby or Python).

MySQL's built-in terminal application. You'll have to install mysql-client (which you'll probably need if you do any PHP/Python/Ruby development, anyway), but then, you can open up a terminal and type in mysql -u[a mysql user] -p (-p if the mysql user has a password, otherwise just leave the -p off). That will bring up a mysql console, which you can then run SQL queries directly in.
MySQL Workbench This is a more full-featured database management GUI more similar to Management Tools than LinqPad, but it features a SQL query editor that allows you to run queries to your heart's content. You can find this in the repos as the mysql-workbench package.
PHPMyAdmin This is somewhere between, and is a web-based solution. You'll need to install the php5 and php5-mysql packages, and a web server (such as lighttp or apache, either of which PhpMyAdmin should give you the option to configure), then install the phpmyadmin package. Open your browser and navigate to the URL you created for it, and you can play with SQL in the "SQL" tab, again to your heart's content.

I personally prefer Workbench, or just the plain terminal application for most things.

Update: JetBrains has been working on a plug-in/standalone SQL client similar to MySQL Workbench. The standalone version is called 0xDBE, but you can get it as a plug-in if you already use one of JetBrains' other suites (WebStorm, PHPStorm, etc). It's about a step or two below Workbench's power in some areas (it doesn't have Workbench's reverse engineer and data modeling), but has the advantages of integrating into what may be your existing development environment and supporting multiple database systems if that's what you need. It's also cross-platform, like the rest of their IDE products. I've been using it for some time as part of the early access program and it has proven to be rock-solid and a great scratch-pad like tool (albeit a bit heavy compared to LinqPad if you use the standalone version).

Update 2016: Sqlectron is a new cross-platform lightweight SQL client, built on Github's Electron system. I haven't had a chance to play with it, yet, but as I understand it, it's a lighter weight option for Mac and Linux environments than some of the former options.


How can I remove memtest from boot menu I first installed Windows 8 and then Ubuntu. There was no Windows entry on the boot screen, so I did grub-update and now it is present, but I also have 2 additional memtest entries in the list.
Is there a way to remove those from the list and have only Windows and Ubuntu there?

If it's just the memtest options you don't want, you can simply remove that package:

sudo apt-get remove memtest86+

You can also control the generation of the submenus (the "Advanced options for ..." entries), and the recovery options by editing /etc/default/grub. From the grub info documentation:

'GRUB_DISABLE_RECOVERY'
     If this option is set to 'true', disable the generation of recovery
     mode menu entries.

and

'GRUB_DISABLE_SUBMENU'
     Normally, 'grub-mkconfig' will generate top level menu entry for
     the kernel with highest version number and put all other found
     kernels or alternative menu entries for recovery mode in submenu.
     For entries returned by 'os-prober' first entry will be put on top
     level and all others in submenu.  If this option is set to 'y',
     flat menu with all entries on top level will be generated instead.

For more details on the grub configuration, check out:

 info -f grub -n 'Simple configuration'

You can edit list in the /boot/grub/grub.cfg

gksudo gedit /boot/grub/grub.cfg

or

sudo nano /boot/grub/grub.cfg

Also, please do the backup first. ;)


Unable to start my apache After I downgraded my php5.5 to php5.3.10, I no longer able to start my apache2.

Here is what I get:

sudo service apache2 start
[sudo] password for fcasili:
* Starting web server apache2
apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Could not open configuration file
/etc/apache2/mods-enabled/access_compat.load: No such file or directory Action 'start' failed. The Apache error log may have more information.

I already tried purging my apache2 and re-install it again. Please help

You've made a downgrade, I suppose by removing and re-installing packages.
This probably not removed all the configuration done previously.

The way the configuration of Apache is made in Ubuntu is no more to link every module load and configuration file separately and explicitely in the main config file but just by pointing to the site-enabled/, mods-enabled/ and conf-enabled/ directories for files ending by .conf and .load.
The content of these directories is in turn symbolic links towards a file in the site-available/, mods-available/ and conf-available/ directories, where the packages provided files are stored.

I suspect that the downgrade you've done removed the access_compat.load file in the mods-available/ directory but left the symbolic link mods-enable/access_compat.load untouched, so making it a dead link.
Look in your mods-enable/ directory for dead links and remove it (or them).


Remove the first part of a string using sed How do I get from this:

randomcollege-nt\user90

to this:

user90

using sed?

You're parsing some text to extract the username from a domain\username string, most likely from Windows. Most of the above answers are only addressing your specific example string.

The best way to do this is using regex in sed to extract whatever comes after \. Here's how you would do it:

sed 's|.*\\\(.*\)|\1|'

That will match everything (.*) until a backslash (here, we're escaping it, so it's \\), then match everything after the backslash (.*), but making it a capture group (i.e. wrap brackets around it, but we also have to escape them, so \(.*\)). Now that we have whatever comes after the \ in the string as a capture group, we print it by referencing it with \1.

You can use the above sed command with any domain name, not necessarily randomcollege-nt.

$ echo "randomcollege-nt\user90" | sed 's|.*\\\(.*\)|\1|'
user90

$ echo "domain\username" | sed 's|.*\\\(.*\)|\1|'
username

$ echo "anydomainname\roboman1723" | sed 's|.*\\\(.*\)|\1|'
roboman1723

echo 'randomcollege-nt\user90' | cut -f 2 -d '\'


Making a Bootable USB flash drive which will boot in EFI I have recently bought a laptop with windows 8 (EFI) installed.  I thought I'd be able to handle installing 12.04.2 relatively easily - how wrong could I be?

Using a live-usb I made using startup disk creator on ubuntu with a 64 bit .iso file...
*I First tried to install ubuntu in legacy mode without a boot partition which needless to say didn't work.
*I then reinstalled ubuntu with the boot partition, still using legacy.  This time I managed to get the grub menu to show up but I only had the choice of booting into Ubuntu.  (unless I told it to boot in EFI mode and then it only booted windows)
*I tried boot-repair both times and that didn't help things at all.

I now realise I can't boot ubuntu in legacy mode if windows is booting in EFI.
So I need to boot from the live-usb in EFI mode.  But when I enable EFI mode and boot from USB FLASH DRIVE it says: FLASH DRIVE HAS BEEN BLOCKED BY THE CURRENT SECURITY POLICY.  (or something to that effect)

Is there a problem with the way I made the live-usb?
How am I supposed to boot from the live-usb in EFI mode if I get the error message each time?

I realise lots of people are asking these sorts of questions at the moment, but I've been looking for a while and I haven't found any solutions that work. :/  Thanks for your help!

Go in your BIOS settings and disable secure boot. There must be an option somewhere.

I wanted to be able to use Grub2 personally. I run Linux mint but it's similar enough in this respect that it should work regardless, I've even applied the same principles to install red hat as well so I could study for the RHCSA and RHCE exams (wish me luck).

Disable secure boot and enable both legacy and efi booting
burn a normal x64 Ubuntu/Linux iso to a flash drive or DVD
boot into the DVD and perform a normal legacy installation, including installing grub2 to the root of /dev/sda, and make sure the live system is connected to the internet
once installation is complete and you're on your live DVD, take a deep breath and open a terminal
Live CD's don't let you use the root account and insist on using sudo but I have not seen any benefit to using sudo on the live disk vs simply becoming the root user and doing what you need to do. You of course want to be extremely careful but on the other hand we won't be rm'ing anything or overwriting anything, just installing and uninstalling packages.
type the commands:

$ sudo -s
# passwd
Enter new UNIX password:
Reenter new UNIX password:
Password successfully changed...
# exit
$ su
Password:
#

You will now be the root user, our next task is to mount our newly installed system, You need to know the partition layout and the drive layout but I'm going to assume this:

/dev/sda (only internal hard drive)
/dev/sda1 (EFI system Partition)
/dev/sda2 (Windows System)
/dev/sda3 (Recovery Image)
/dev/sda4 (Recovery Program)
/dev/sda5 (diagnostic)
/dev/sda6 (your new /boot/ system)
/dev/sda7 (your new linux swap)
/dev/sda8 (your new / system)
/dev/sda9 (your new /home/ system)

If you need to figure this out, you can use the command sudo parted /dev/sda list
Now let's mount our system
    # mount /dev/sda8 /mnt/
    # mount /dev/sda6 /mnt/boot/
    # mount /dev/sda9 /mnt/home/
    # mount /dev/sda1 /mnt/boot/efi/
    # # this is optional here, you can mount the windows partition if you want
    # mount /dev/sda2 /mnt/mnt/
    # # this below is also necessary, it mounts the virtual file systems
    # mount -o bind /dev/ /mnt/dev/
    # mount -o bind /dev/pts/ /mnt/dev/pts/
    # mount -o bind /sys/ /mnt/sys/
    # mount -o bind /proc/ /mnt/proc/
Ok, at this point, your /mnt/ basically looks exactly and I mean exactly like that system would if you had booted into it, in fact the only thing that's different at this point besides differences in network configuration is that the root directory isn't the system's root and we're about to fix that. Before we do however, If something doesn't work after you issue the next command you'll need to use the exit command to get back and fix it before going back to the new root.
Change the root for the system to the newly installed system:
    # chroot /mnt/
Alright, you're in the new system and it's time to make some changes...
    #> apt-get update
    #> apt-get purge grub-pc
YUP, You're going to destroy grub and get rid of it for all eternity.... ok, you're just swapping it for grub-efi
now do this:
    #> apt-get install grub-efi
now we have the correct package for grub, now let's put things where they belong
    #> grub-install
    #> update-grub
This command might give you a warning but as long as the next set of commands gives you the listed results, you're good. Specifically it will complain about not having efi variables because "efivars" isn't loaded into the kernel (that's because you booted in legacy mode, but that doesn't matter for this part, it just means your live disc cannot bless the firmware which we're gonna take care of in a few steps.
and now let's make sure that things are where they should be...
    #> ls -R /boot/efi/EFI/* | grep grubx64.efi
    /boot/efi/EFI/ubuntu/grubx64.efi
If you see the output above then we're in good shape. remember that path...
and now that we're in good shape...
    #> exit
    # shutdown -r now

Ok... GRUB won't load.... I knew that was coming. Everything is set up, you just need to bless the firmware.... Well, mac calls it "bless", but we're going to do this in windows so we need to use bcdedit. We need to first bring up an admin command prompt. If you're in windows 7, it's in the start menu, if you're in windows 8, right click on the bottom left corner of the desktop and it will be right there in the menu. So issue this command...

C:\WINDOWS\system32> bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi`

Where \EFI\ubuntu\grubx64.efi is the path you recorded earlier without /boot/efi and switching the forward slashes for backslashes... type the /set {bootmgr} path exactly as written, type in the curly braces and the words you see. the only thing you're changing is the path at the end of the command.

and reboot.

You should now be looking at the grub menu and be able to select linux or windows. Enjoy!


Dropbox 3.2.9 ignoring local themes / missing notification icon After upgrading from xubuntu 13.10 to 14.04, I found that dropbox needed re-installation on my system, amongst a slew of other problems. I performed the following as suggested here:

sudo rm -rf /var/lib/dropbox/.dropbox-dist
dropbox start -i

EDIT: as this had failed to resolve the problem described below, I have also tried to install Dropbox from the .deb from here for Ubuntu.

This has installed dropbox version 3.2.9 which appears to be working again, however the notifier icon in the xfce4-panel does not abide by the locally set theme/icons:

Here, I am using elementary-xfce-dark, and can confirm that the Dropbox status icons I want to use are present in /usr/share/icons/elementary-xfce-dark/panel.

However, the icons actually being used (~/.dropbox-dist/dropbox-lnx.x86_64-3.2.9/images/hicolor/16x16/status) are PNG files with transparency, however on inspection the background is #EFEBE7, which suggests the alpha channel is being used, and something else is setting this as the background color.

UPDATE

On occasion, the Dropbox icon doesn't appear in the xfce4-panel at all after a reboot, either in the notification area, or the system tray.

PARTLY RESOLVED

So, err, after purging then re-installing Dropbox from here using the .deb package, I now intermittently see this after each hard reboot:

Here's a list of everything I can remember I did before the hard reboot:

Installed the following:

libappindicator1 (tried because of these tips, found it was already installed);
libappindicator3-1 (was not already installed)
libappindicator3-dev (was not already installed)

Followed the tip from here which disables auto-start of the indicator-application-service at login (called 'Indicator Application' in the 'Session and Startup'/'Application Autostart' menu);
Sacrificed several goats.

I can confirm that:

The running version is being invoked from ~/.dropbox-dist/dropbox-lnx.x86_64-3.2.9/;
The dropbox icon appears in the notification area, not the system tray, of the xfce4-panel;
$ python --version produces Python 2.7.6

I'm uncertain as to precisely which, if any, of the above steps were necessary to affect the appearance of the icon. Again, disappointingly, the icon only appears intermittently -- once out of every few shutdown/boot cycles, so YMMV!

I also note that when it is present, the icon(s) and theme/style being used are still not consistent with the locally set theme. For example, check out the tooltips :

 ...versus...

PROGRESS NOTES

There appears to be chatter about this problem here, and here, suggesting that the latest version of dropbox (3.0.3) now uses the Qt UI. The behavior of dropbox 3.0.3 to ignore local themes also seems to apply to other linux distributions such as Mint and Arch.
This page suggests that xfce4 had a bug which did not permit Qt5 software from using the local theme. However, upgrading to xfce4-session version 4.11 has not solved the problem.
I'm about to embark on a fresh install of xubuntu 14.0.4-1 to address other issues, so I'll report back here as to whether the problem persists.
After installing a fresh version of xubuntu 14.04-1, I now see no dropbox notification icon at all! I presume that if I find a way of activating it again, I might still have the same problem. I'll keep on it...
Trying out various installation options (deb files from the dropbox website, compiling and installing from source) has not yielded any solution yet. Suggestions welcome!

So, no complete answer in over two months?

Allllllll-righty then!

Now presenting... my ever-so-embarrassing, not-really-to-be-recommended, disgustingly cringeworthy hack:

Find your notification icons in the .dropbox-dist directory, which might be in ~/.dropbox-dist or /var/lib/dropbox/.dropbox-dist. Inside this, the icons are in the folder dropbox-lnx.x86_64-3.2.9/images/hicolor/16x16/status (or similar, your path may differ depending on the version and build used).
Determine the colour of your xfce4-panel. This is easy using a tool like Gimp with the colour picker tool (). Mine happens to be #242424.
For each of the notification icons which are PNG images with transparency, open them with Gimp. Yes, that's right folks, I'm going to change that background from transparent to a solid color (in my case, #242424).

The result:

Looking good. This is perfectly fine for me, as I don't change the xfce4-panel color. However, some things to note:

You'll need to restart dropbox for the change to take effect:

~$ dropbox stop
~$ dropbox start

If you edit the stock 16x16px icons, you might find them centred with a 2px #EFEBE7 border if your icons are 22x22px. I addressed this by simply enlarging the icons to my required size (22x22px).
If Dropbox is ever updated, your icons might be blown away. If you're going to try this yourself, keep a backup copy of your icons outside the Dropbox directory. Or, you can just download them from here (if you also use #242424 for your panel color):
 (dropboxstatus-logo.png)
 (dropboxstatus-idle.png)
 (dropboxstatus-busy.png)
 (dropboxstatus-busy2.png)
 (dropboxstatus-x.png)

The compositing thing works erratically for me, without doing a restart. If you keep clicking the enable/disable checkbox sometimes it reappears.


Why is swap being used even though I have plenty of free RAM? I thought the whole essence of swap was to act as a temporary storage safety net when RAM was full but my swap partition is constantly being used even though I sometimes have as much as 3GB free RAM. Is this normal?

You could try changing your "swappiness" value:
From the Ubuntu's Swap FAQ:

What is swappiness and how do I change it?
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.

swappiness can have a value of between 0 and 100

swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible. For Kernel version 3.5 and newer it disables swappiness.

swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache

The default setting in Ubuntu is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation. A value of swappiness=10 is recommended, but feel free to experiment. Note: Ubuntu server installations have different performance requirements to desktop systems, and the default value of 60 is likely more suitable.
To check the swappiness value
cat /proc/sys/vm/swappiness

To change the swappiness value A temporary change (lost on reboot) with a swappiness value of 10 can be made with
sudo sysctl vm.swappiness=10

To make a change permanent, edit the configuration file with your favorite editor:
gksudo gedit /etc/sysctl.conf

Search for vm.swappiness and change its value as desired. If vm.swappiness does not exist, add it to the end of the file like so:
vm.swappiness=10

Save the file and reboot.

Run sudo sysctl --load=/etc/sysctl.conf after editing the file to apply the changes
Also you can check out: https://askubuntu.com/a/103916/54187

Once swap has been used for a program it tends to remain mapped for the life of the program.  Many programs have code (and data) which is rarely used..  Once the memory is swapped out, it is unlikely to be swapped in.

One way to force these pages into memory is to turn off the swap device.  If you have two, you can turn one off, the turn it back on, then turn off the second one.  If swap is really needed, it will move between devices.  You could just turn off the swap device (or file), but if you really need swap space drastic things can happen.

Besides the normal things in memory, tempfs uses swap space, and will swap out like the rest of memory.  If you run something that requires a lot of temp disk, it may force pages to be swapped out.  Once created temp files may no longer be used after a couple of minutes and are good candidates to be moved to the swap device.

In a pinch you can use a file as a swap device.  This is useful if you need extra swap space temporarily.


Certain websites will not work on any browser I have Ubuntu 18.04.5, and suddenly a couple days ago some websites stopped working on my computer. I tried in different browsers too which resulted in the same outcome. I tried to change the mtu in Tilda with
ifconfig <dev> mtu 1400

but it says
bash: dev: No such file or directory

I am very new to Ubuntu and don't know how to troubleshoot this.
I would greatly appreciate any help!!

Try unplugging your modem or router for 30 seconds so it does a clean restart when you plug it back in. This needs to be done occasionally anyway. Just updating the packages as @RingGamesCompany kindly suggests will not bring the packages up to date. sudo apt update will only tell you if your packages are up to date or what packages need updating. You also need to use sudo apt upgrade to upgrade the packages so the system can bring them up to date. You can do both of these commands with this single command: sudo apt update && sudo apt upgrade -y. Some packages (like browsers) require a [Restart] before the upgrade will take full effect. Plus, a new installation of Ubuntu does not necessarily install all the latest upgrades. So, I suggest you do these commands (they only take seconds) and plan on doing a [Restart] after running them. Your entire system will probably run faster afterwards. Should doing the update, upgrade and [Restart] fail to solve the problem, your modem or router may need more time to warm up after startup. The Ubuntu operating system loads much faster than others and so your modem or router may not have warmed up enough after you system is up and running to connect to all websites. I too use Ubuntu 18.04.5 and occasionally my modem fools me in this way. It looks like the modem is working because the computer loads links I use all the time from the cache. Mine usually takes a few minutes after the system is up and running to warm up enough to load new links. Also, clicking reload/refresh on the page that failed may solve the problem as there may be a failed copy of it in your cache. If so, your computer keeps loading the failed page. Reload/refresh goes to the website and reloads it from scratch and updates the cache. Finally, the trouble may be with the links you are using to go to these websites. Have you checked if the websites you are having trouble with are working for others? If not, copy and paste a link or two here so someone can check them for you. Re-installing a package or Operating System should only be done after all else fails. The side effects may be worse than the problem. Installing a new version of an Operating System should only be done if you want or have to. I hope this solves your problem.

I think use firefox. And it seems you are using 18.04, a much older version of Ubuntu, so i'd suggest upgrade your system.
Also, note,go to terminal and then type in sudo apt update and this will update your files so that might work. If not, just try reinstalling the application


How can I move a file to a directory? I just want to read from the keyboard the file's name and move it to another directory.

I have this in my mind :

ls

read a // the name of the file

pwd

read b //the name of the directory where I want to move the file or  the path :-?

mv $a $b

Can someone correct me ? How should I use the mv command in this case?

in this case, simply mv filename path/to/somewhere, but in general, you probably need an intro to basic shell stuff. This looks reasonable:

http://linuxcommand.org/learning_the_shell.php

And mv and friends particular:

http://linuxcommand.org/lts0050.php


How do I save the output of last executed command in terminal after normally executing a command? I have an incremental build command for my project that will output something if I do a clean build, and output something else (less) if I do an incremental build.
Say, I forgot to do this:
mycommand.sh > myfile.txt

or this
mycommand.sh >> myfile.txt

for saving the output to a file.
How can I save this if I already run a clean build mycommand.sh and the output is printed on terminal window (without using copy paste)?

You can use $(!!) to view the output of the last executed command.
my_command
echo $(!!)

Example:
ls $HOME
echo $(!!)


Ubuntu has been installed but computer still boots into windows Sorry if this is a stupid query, but I spent ages getting the Samsung NP905S3G to boot from usb and eventually got it to work. Wanted to try a dual-boot alongside windows 8 first and the install seemed to work but I now can't figure out how to boot the laptop in ubuntu without the usb. It keeps starting in windows no matter how I configure the BIOS. Any help welcome. Thanks
Edited to explain further :
I think Ubuntu has installed successfully. My problem now is getting it to boot.

You need to install Grub on your boot partition to make your computer a dual boot, open Ubuntu from the installation disk and go to terminal and input:

  sudo fdisk -l

To learn which partition is the boot loader, in this example it's sda1.

and enter this command:

sudo mount /dev/sda1 /mnt

then this command:

sudo mount --bind /dev /mnt/dev

then this command

sudo chroot /mnt

then this command

grub-install /dev/sda

then this command

update-grub


Is there an equivalent to `chkconfig --add` in Ubuntu? I don't have an IT background so be patient with me, please.

I have an Ansible file (.yml) for glassfish configuration service, that was built for CentOS.

I'm trying to "transform it" for use it with Ubuntu 14.04.

In the file I have this:

name: Execute shell script - configure service glassfish - chkconfig --add glassfish warn=no
      shell: chkconfig --add glassfish warn=no

    - name: Execute shell script - configure service glassfish - chkconfig glassfish on warn=no
      shell: chkconfig glassfish on warn=no

    - name: Start service glassfish
      service:
          name=glassfish
          state=started

I searched and found that chkconfig is not a valid command in Ubuntu.

What should I use to replace the following commands?

chkconfig --add glassfish warn=no
chkconfig glassfish on warn=no

update-rc.d <service> defaults

or

update-rc.d <service> start 20 3 4 5


"../lib/libfreenect.so.0.5.0: undefined reference to `libusb_get_parent'" when building libusb I am trying to install OpenKinect on Ubuntu. I get this error when I run

tesla@ubuntu:~/libusb/libfreenect/build$ sudo make install
[sudo] password for tesla:

[ 51%] Built target freenectstatic
Linking C executable ../bin/freenect-chunkview
../lib/libfreenect.so.0.5.0: undefined reference to `libusb_get_parent'
collect2: ld returned 1 exit status
make[2]: *** [bin/freenect-chunkview] Error 1
make[1]: *** [examples/CMakeFiles/freenect-chunkview.dir/all] Error 2
make: *** [all] Error 2

Yes, I have installed libusb and libusb-1.0-0-dev
I have a 32 bit Ubuntu 12.04 virtual machine (VMware player)

I even tried installing on Ubuntu 14.04, but with same error.
I have enabled USB 3.0 support too.

you should try to build libusb from latest-source-tar from http://libusb.info/.
i had the same troubles with an old version of "libusb-1.0.0".


How to create a soft or symbolic link? I am installing p4v in /opt, but /usr/bin is on my path.  Is it possible to create a soft or symbolic link for p4v from /opt to /usr/bin, so I can just type "p4v" since /usr/bin is in my path?

See man ln.

To create a symlink at /usr/bin/bar which references the original file /opt/foo, use:

ln -s /opt/foo /usr/bin/bar

You would need to apply the above command as root (i.e. with sudo).

If it is saying target is not a folder, it means there are spaces in your folder names eg: New Folder has a space

You need to edit the path and add a backslash \ after every space in the paths

eg:

ln -s /opt/bin /usr/var/New\ Folder


How do I install Matlab? I have one problem so please help me. I have Ubuntu 11.10 and want to install Matlab; I searched a lot in internet but have not found the exact way yet. Please help me guys, I need it very much.

I know command line, but I don't know what kind of command I should use; I have installed  32 bit library ia32-libs, so what is additionally necessary?

You'll have to obtain a MATLAB install cd, unfortunately. Apart from a small selection of codecs and plugins, there are no licensed applications (that I know of) in the ubuntu repositories. There are a couple of paid applications in the Software Centre, but I checked and MATLAB isn't there.

You can either download a trial from www.mathworks.com and use that until you can obtain a full version, or you can try using spyder, which is an open-source matlab-like python IDE, available on the repositories.

Also, don't bother with wine (I can't comment on other people's answers because I don't have the reputation yet). You'll run into exactly the same problem of needing an install cd.

Have you tried wine?
you will find it in Ubuntu software center
     or
in terminal  sudo apt-get install wine


How do i install Ubuntu in UEFI or load in legacy while windows is in UEFI I've been trying to install Ubuntu on my windows 8 laptop. i've partitioned the drive created a Ubuntu dvd and disabled secure boot options. when i tried to load the dvd the only option i got was to load it in legacy boot mode there was no UEFI option. so i installed it in the legacy boot mode and now can't access Ubuntu. Windows seams to have been unaffected but i can't use Ubuntu. Ubuntu has installed i just cant load it in either legacy or UEFI modes. I think this has come about from instaling it in legacy mode when windows is in UEFI but i don't know how to get around that and install it in UEFI. i'm not particularly good at working with bios settings past what i've already done and don't want to do irreversible damage to my laptop dose anyone have any possible solutions.

Use EasyBCD software(Non-commercial freeware) in Windows to add Ubuntu to the boot menu when booting. Go here for detailed info of using it-
How to use EasyBCD

Download it here-
EasyBCD


What is the function of "kill -1 -9" command? I am a newbie in Ubuntu, I have learned a command-

kill -1 -9 - send signal to process.

Plzz tell me what type of signal it is talking about and in the command what -1 -9 means?

I suspect the command you really learned of was

kill -9 -1

According to man kill, the format of the kill command is

kill [options] <pid> [...]

so -9 is an option and -1 is a PID or process identifier. As noted in the man page,

                                                               A PID of -1
   is special; it indicates all processes except the kill  process  itself
   and init.

while for an explanation of the signal values, you can either run man 7 signal or get a synopsis from the kill command itself with the -l option:

$ kill -l
 1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
 6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX

So, as noted in the EXAMPLES section

EXAMPLES
       kill -9 -1
              Kill all processes you can kill.

The "you can" here is an oblique reference to privileges - in practice, ordinary users will not be able to kill processes that they do not own.

The actual command given in your question would attempt to send signal 1 (SIGHUP) to process -9 (which is not a valid PID) so will just return an error:

$ kill -1 -9
-bash: kill: (-9) - No such process

kill -1 -9

sends a SIGHUB to process with id 9

The first argument 1 is a numerical equivalent to a specific signal(SIGHUB) and the second 9 is a  programPID.

SIGBU is describe as Hangup detected on controlling terminal or death of controlling process

On terminal kill -l list the various Linux signals and man 7 signal gives some descriptive overview of the various signals


Pip is not working: ImportError: No module named 'pip._internal' Running pip or pip3 results with:

Traceback (most recent call last):
File "/home/myuser/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named 'pip._internal'

I had issues with this, and uninstalled pip3, but when i try to install it again using

sudo apt-get -y install python3-pip

it does install, but then running pip or pip3 i get the same error.

#which pip3
/home/myuser/.local/bin/pip3

After upgrading pip (or pip3, in this case) if the following occurs:

$ ~ pip3 -V
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

Force a reinstall of pip:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --force-reinstall

Verify install:

$ ~ pip3 -V
pip 10.0.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

Now pip3 install <package> and pip3 install --user <package> (for user-level installs) will work correctly.

There should never, ever be any reason you need to run pip in elevated mode.

(note: For Python 2.7, just replace python for python3, and pip for pip3)

Had same problem on macOS as well, it's a common issue across platforms.

The pip version now is 19.0.1:

which pip3
#/home/xxx/.local/bin/pip3
vim /home/xxx/.local/bin/pip3

Change from pip._internal import main into from pip import main


Any way to check the clock speed of my processor? Is there any way to check at which clock speed my processor is running?

I have already tried cat /proc/cpuinfo but the clock speed I'm running isn't showing. I know Ubuntu 12.04 (Precise Pangolin) requires 700 MHz and VGA, but will an AMD Mobile Sempron work?

From the command line type lscpu. The information will be at CPU MHz:

~$ lscpu | grep MHz
CPU MHz:               804.901
CPU max MHz:           3200.0000
CPU min MHz:           800.0000

Sample output of cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 774.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 1600.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 1
initial apicid  : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 800.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 2
initial apicid  : 2
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
stepping    : 1
microcode   : 0x17
cpu MHz     : 774.000
cache size  : 4096 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid
bogomips    : 3591.40
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

Here cpu MHz means current cpu frequency.
You can run cpufreq-info to understand easily.


What driver should I choose for my graphics card? Which one should I select? Preferably without breaking my system.

The last time I tried to install drivers, it totally messed up my system and I had to reinstall Ubuntu (which I just finished) and I would like to try an avoid the same mistake, but I am not sure which one I had installed the last time.

Well, this probably isn't the answer you expected... my apologies.

The only "real" way to find out what driver will work with your card/system is to ask someone with real experience with your specific card.  Google didn't help me much with your card..

So lets go break your system shall we ;D

First we need to provide a failsafe in case we break your ability to run Unity.  I usually just install Gnome Flashback so I can tinker with graphics drivers without using any of them.

sudo apt-get install gnome-session-flashback

You should then  be able to log into "Gnome Flashback" from the login screen, but I recommend using "Gnome Flashback (No effects)" as it doesn't use Compiz at all.

Now we are ready to test your drivers.  Go ahead and select one and apply it.  I'd start with the tested and stable ones first.
Reboot and try logging into Unity and see if it works..  Try your games, make sure the graphics meet what you want.  I recommend writing down which driver you tried and how it worked; it won't help to forget later ;)
If a certain driver doesn't work; log out of Unity (Or if you can't, press Ctrl+Alt+F1 login and run sudo reboot) and log into "Gnome Flashback (No effects)" and remove the driver.  You'll find additional drivers in the software center under Edit -> Software Sources in the "Additional Drivers" tab.
Repeat, starting from step one until you get a driver that pleases you.  If you don't find one.. well... I don't think there's anything you can do about it..

This is the method I use to find a good driver.  It has always worked for me.

Good luck!

Its safest to keep on using the nouveau open source driver, its the driver you use to generate this screen-shot and it is the only driver that is possible to support by the Ubuntu developers. The Nouveau driver will have the best Ubuntu integration in the long run.


Adobe Air workaround for Pandora not working I was trying this symbolic link approach because of the problem described here:
https://askubuntu.com/a/120221/70462

After I made the symlink, the installation proceeded further than before, but it eventually asked for my password (in an extra small x-term window within the AIR installation window). When I typed in my password, it told me there was an authentication failure. I tried about 8 times total (on 3 separate install attempts), but even when I was certain I was typing my password correctly, it would tell me there was an authentication error.

Specifically the text in the x-term window was:

TITLEBAR: xdg-su: /tmp/air.x0rSdF/setup
TERM:  This application requires administrative rights to run
Please enter root Password:
su: Authentication failure
Please enter root Password:

Any ideas?

This should only be happening if you did not run the Adobe AIR Installer (AdobeAIRInstaller.bin) as root using sudo.

Did you run

sudo ./AdobeAIRInstaller.bin

as in these instructions (step 6)?

Go to your adobe air installation location via the terminal (for me it's /opt/Adobe AIR/Versions/1.0). In here you'll find the "Adobe AIR Application Installer". Run this "Adobe AIR Application Installer" with sudo (sudo ./Adobe\ AIR\ Application\ Installer). Then you'll be given a window to select your ".air" file. Just select your file and click ok. Then there won't be any password prompt anymore. Worked for me. Hope it'll do good to you too. Good luck :)


Does Evince support javascript in pdf files? In some pdf file readers for MS Windows such as those from Adobe or Foxit, it is possible to turn off the ability to implement javascript in a pdf file. Is that possible with Evince (Document Viewer) 3.2.1? I don't see any option to do so.

Or, is it that Evince does not implement javascript in pdf files at all?

Essentially, it doesn't support it, so you can't turn it off.

Try PDF Studio, a free PDF reader / annotator and form filler that supports JavaScript for formatting, computing and validating.

https://www.qoppa.com/pdfstudioviewer/


How do I call a dialog for authentication? I am writing a gui program using wx module in python. In program whenever I am accessing a folder which requires root privilege then it asks password at terminal but I want to display the dialog to user to enter the password and authenticate him. How to call that dialog and authenticate the user in ubuntu?

There are two different Q&As at stackoverflow answering your question: here and here.

Both answers use the command gksudo (already mentioned by @khamer). If you run gksudo command (also without python) it will basically do what sudo does, but with a graphical interface - i.e. ask the user for a password and then run the command as root if the user is in the sudoers file.

To implement the suggested solution from the linked answers in python, you can use something as shown by the following example:

Create a file run.py:

#!/usr/bin/python

import subprocess
subprocess.call(['gksudo','python create.py'])

And a file create.py:

#!/usr/bin/python

# Create test file..
f = file("mytestfile", "w")

Then run python run.py and after you enter your password a file owned by root will be created. If you run python create.py it will be owned by you (the file should not exist before running the script).

Insert this script in your code:

import os

Password = raw_input('Please enter your root password!')

sudo_command = '<your command>'

execute = os.system('echo %s|sudo -S %s' % (Password, sudo_command))


Theme gnome panel handles in flashback session I'm using the the gnome flashback session (metacity) in Ubuntu 14.04.
The default theme is the ambient theme. If you set a gnome panel to not expand, the handles are looking ugly:

How can I theme/change this?

1 - install ubuntu

$ sudo add-apt-repository ppa:tualatrix/ppa
$ sudo apt-get update
$ sudo apt-get install ubuntu-tweak

2 - find & configure

Go to app search look for 'ubuntu-tweak' .
Open it then .
go to tweaks .
Then Unity .
Make it comfortable 'read then edit'

if that didnt workout with you try to reset unity then configure it
reset unity

$ unity-reset
$ setsid unity


How do I manually install the Oracle Java Plugin for Google Chrome and Firefox? How to install Java Plugin to these browsers manually ? I downloaded JRE from Oracle Site, run it in terminal. Now, what I should do ?. I want to do it manually because, I want to be up-date with recent Java version.

For Chromium, add this symlink:

sudo ln -s /path/to/java/jre/lib/amd64/libnpjp2.so /usr/lib/chromium-browser/plugins/libnpjp2.so

For Firefox, add this symlink:

sudo ln -s  /path/to/java/jre/lib/amd64/libnpjp2.so  /usr/lib/firefox-addons/plugins/libnpjp2.so

replace the /path/to/java/jre with the actual path from your installation.

open up your "synaptic package manager"  go to settings/repositories then other software,click on the canonical partners, then close and hit the reload button now type "sun java6 plugin" mark it for installation and now hit apply. if you have not done this already you may want to install the "ubuntu restricted extras" but this will install openJDK if you dont want openJDK you can remove openjdk-6-jre-lib by marking for removal and hit apply.


The NVIDIA X driver is not new enough to support the nvidia-settings Display Configuration page I've been trying without success to configure dual monitors on 12.04, I've installed the nvidia drivers but the gui tool doesn't seem to support my graphics card.

Any Idea on how to resolve this?

Oh, and the output from

$ lspci | grep VGA
$ 01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)

Problem was solved for me by switching from "(version current) [Recommended]" to "(post-release updates) (version current-updates)"
.

I had the same problem and solved it by removing the (too new) nvidia-settings. After that I had to reinstall the nvidia-settings belonging to the installed nvidia-kernel (in my case 295.40).


Why are hard links not allowed for directories? I am using Ubuntu 12.04. When I try to create a hard link for any directory, it fails. I can create hard links for files inside file system boundary. I know the reason why we cannot create hardlinks for files beyond file system.

I tried these commands:

$ ln /Some/Direcoty /home/nischay/Hard-Directory
hard link not allowed for directory
$ sudo ln /Some/Direcoty /home/nischay/Hard-Directory
[sudo] password for nischay:
hard link not allowed for directory

I just want to know the reason behind this. Is it same for all GNU/Linux distros and Unix flavours (BSD, Solaris, HP-UX, IBM AIX) or only in Ubuntu or Linux?

Directory hardlinks break the filesystem in multiple ways

They allow you to create loops

A hard link to a directory can link to a parent of itself, which creates a file system loop. For example, these commands could create a loop with the back link l:

mkdir -p /tmp/a/b
cd /tmp/a/b
ln -d /tmp/a l

A filesystem with a directory loop has infinite depth:

cd /tmp/a/b/l/b/l/b/l/b/l/b

Avoiding an infinite loop when traversing such a directory structure is somewhat difficult (though for example POSIX requires find to avoid this).

A  file system with this kind of hard link is no longer a tree, because a tree must not, by definition, contain a loop.

They break the unambiguity of parent directories

With a filesystem loop, multiple parent directories exist:

cd /tmp/a/b
cd /tmp/a/b/l/b

In the first case, /tmp/a is the parent directory of /tmp/a/b.
In the second case, /tmp/a/b/l is the parent directory of /tmp/a/b/l/b, which is the same as /tmp/a/b.
So it has two parent directories.

They multiply files

Files are identified by paths, after resolving symlinks. So

/tmp/a/b/foo.txt
/tmp/a/b/l/b/foo.txt

are different files.
There are infinitely many further paths of the file. They are the same in terms of their inode number of course. But if you do not explicitly expect loops, there is no reason to check for that.

A directory hardlink can also point to a child directory, or a directory that is neither child nor parent of any depth. In this case, a file that is a child of the link would be replicated to two files, identified by two paths.

Your example

$ ln /Some/Direcoty /home/nischay/Hard-Directory
$ echo foo > /home/nischay/Hard-Directory/foobar.txt
$ diff -s /Some/Direcoty/foobar.txt /home/nischay/Hard-Directory/foobar.txt
$ echo bar >> /Some/Direcoty/foobar.txt
$ diff -s /Some/Direcoty/foobar.txt /home/nischay/Hard-Directory/foobar.txt
$ cat /Some/Direcoty/foobar.txt
foo
bar

How can soft links to directories work then?

A path that may contain softlinks and even soft linked directory loops is often used just to identify and open a file. It can be used as a normal, linear path.

But there are other situations, when paths are used to compare files. In this case, symbolic links in the path can be resolved first, converting it to a minimal, and commonly agreed upon representation creating a canonical path:

This is possible, because the soft links can all be expanded to paths without the link. After doing that with all soft links in a path, the remaining path is part of a tree, where a path is always unambiguous.

The command readlink can resolve a path to its canonical path:

$ readlink -f /some/symlinked/path

Soft links are different from what the filesystem uses

A soft link cannot cause all the trouble because it is different from the links inside the filesystem. It can be distinguished from hard links, and resolved to a path without symlinks if needed.
In some sense, adding symlinks does not alter the basic file system structure - it keeps it, but adds more structure like an application layer.

From man readlink:

 NAME
        readlink - print resolved symbolic links or canonical
        file names

 SYNOPSIS
        readlink [OPTION]... FILE...

 DESCRIPTION
        Print value of a symbolic link or canonical file name

        -f, --canonicalize
               canonicalize by  following  every  symlink  in
               every component of the given name recursively;
               all but the last component must exist
        [  ...  ]

The reason hard-linking directories is not allowed is a little technical.  Essentially, they break the file-system structure. You should generally not use hard links anyway. Symbolic links allow most of the same functionality without causing problems (e.g ln -s target link).


How can I run an application with a GUI as admin from a non-admin user session? I defined 2 user accounts:

one with admin privilege (with sudo right) => lets call it adminuser.
a 2nd one without any privilege => lets call it normaluser
and I configure the autologin on this 2nd user normaluser.

So when I open a normaluser session and want to run an application with admin privilege,
I open a terminal Ctrl+Alt+T and:

su adminuser
sudo anyapplication ...

It works fine, without having to quit the normaluser session (no need to open a adminuser session).

But what should I do if the application needs to run with a GUI (Graphic User Interface) ?
I though about that:

su adminuser
gksu anyapplication ...

but I get

** (gksu:9122): WARNING **: the connexion is closed
No protocol specified
No protocol specified
(gksu:9122): Gtk-WARNING **: cannot open display: :0.0

Terminology
In this answer:

normaluser is a normal user who is not an administrator and cannot run commands as root with sudo.
admin is an administrator who can run commands as root with sudo. (Of course, any graphical commands should use a graphical frontend like gksu/gksudo, and not sudo directly.)
anyapplication is the name of the graphical application normaluser wants to run as root. normaluser knows admin's password and has (presumably) been told s/he may use it for this purpose.

The Problem
The cause of your problem, and the reason most of the other answers so far don't work (with the exception of Marty Fried's excellent answer), is:

gksu can be configured to use either sudo or su as its backend. The default behavior of gksu in Ubuntu is to act as a frontend for sudo, not for su. That is to say that, by default, gksu and gksudo behave exactly the same. See the manpage.
normaluser is not an administrator and thus cannot run commands as root with sudo. sudo prompts for the password of the user running it, not the password of the user they want to become. Not being able to use your password to perform actions as people who aren't you is what it means to not be an administrator.
normaluser, provided it is not a Guest account,  can run commands as another user with su, putting in the other user's password. But gksu acts as a frontend for sudo, not su.
normaluser cannot directly run any command as root, because normaluser cannot use sudo, and nobody can become root with su because there is no root password.

The Solution
The solution requires writing a command that performs two authentication steps:

normaluser must become admin to run a graphical command. To do this, normaluser must run gksu with the -w flag to make it run in su-mode instead of the default sudo-mode, and the -u flag to run the command as admin instead of root.
The command run as admin must invoke gksu without the -w flag to use sudo to become root.

Here's the command (yes, I have tested it ;-)):
gksu -w -u admin gksu anyapplication
You will be prompted for a password twice:

First, you must enter admin's password, to let normaluser run a command as admin with the su backend.
Second, you must enter admin's password, to let admin run a command as root with the sudo backend.

That's right. You enter admin's password twice.
Miscellaneous notes:

If you wish, you can replace the second gksu with gksudo to make it less confusing. In Ubuntu, they are equivalent. (You can also replace the first gksu with gksudo, but that would be extremely counterintuitive and confusing.)
-w is the short form of --su-mode.
-S is the short form of --sudo-mode but neither has to be used because sudo-mode is the default.
You may want to test this with some pretty harmless command first, to make sure it does what you want. (It will, but there's no need for you to trust me on that.) For example:  gksu -w -u admin gksu xclock
xclock is a nice simple clock-window application.

Here's the command to accomplish this.

gksu app-name

Run it without running su first. You only need to run the above command from a normal user session and the application will be run as root.


Is there a precompiled Nextcloud Ubuntu client? It seems there's no prepackaged binary client officially available for GNU/Linux (only sources).

Is there an unofficial .snap, .deb, .AppImage? I'm currently stuck on the ownCloud client while connecting to a NextCloud server.

Found this one:

sudo snap install --edge nextcloud-client-kyrofa

source twitter.

It seems to work, but there seem to be 2 problems: broken tray icon and keychain.

Yes, just type:

sudo snap install nextcloud

on Ubuntu 16.04 or later (or any distribution shipping snapd).

Edit: This is the server, not the client.


How do I find out which repository a package comes from? Is there a method or command which can tell from which repository a package is coming from?

Use following command. It has better output:

apt-cache policy <Package Name>

For Ubuntu 16.04 and later there is a shorter way to do that:

apt policy <Package Name>

sudo grep *packagename* /var/lib/apt/lists/* | grep "Filename:"

source


Running windows7 on ubuntu Virtual Box for games I'm currently using ubuntu 15.10 32 bit,
I installed Virtualbox with

windows7 32 bit in it with

3.5GB ram and

256 shared vga

4 processors,

and Enabled 2d,

3d acceleration.

Installed Guest permissions under safe mode then Installed Direct X 11...

My current graphic card is nvidia Geforce GTX 750 OC..

Now.. My Problem..

When I go for dxdiag in cmd AGP Acceleration is not available...

I've tried everything I can possibly think of..

and yet I can not run any game whatsoever.

Look, i don't recomend you run a game under virtualbox (if the game is a low graphic before accelerations graphic , like starcraft 1, doom 1 and prince of percia, no problem, but with virtual box, is 99% chance of don't run (like warcraft 3).

Try "PlayOnLinux" , can a lot of games under wine ...


I maybe have 2 versions of Firefox, and i want to get rid of one of them It is possible that this happened because of the recent Firefox update (from 64.something, to 66.0.2) which claimed that it couldn't download the update by itself, so it asked me to do it manually.

I'll spare the details about the things i did and tried, but the current state of things is this. apt remove firefox claims there is nothing to remove, because package firefox is not installed. The latest installation of Firefox that i made was through snap.

The problem manifests itself in the way that the same Firefox shortcut (the main menu), or also the firefox command ran from terminal, sometimes runs the wrong/other Firefox. I can tell them apart because they have different plugins installed, and i'm signed into one of them. Basically different user configuration. And it's not that it just sometimes doesn't read my user configuration and gives me a default Firefox; both versions have been customised.

The are both reporting to be 66.0.2 64-bit.

The first time i noticed this, i simply removed the snap one, but then the firefox command did not work anymore, and neither did the main menu shortcut. So i don't know how i would run the other one, or even if i actually do have two installed, or just the one installation is sometimes reading two profiles.

How do i find out where these two different versions are coming from, and how do i get rid of one of them?

Edits:

which firefox says:

/snap/bin/firefox

locate firefox-bin says:

/home/<username>/.themes/Zafiro-icons-0.7.4/apps/scalable/firefox-bin.svg
/snap/firefox/198/firefox-bin
/snap/firefox/198/firefox-bin.sig

dpkg -l | grep firefox says:

rc  firefox                                         66.0.2+build1-0ubuntu0.18.04.1               amd64        Safe and easy web browser from Mozilla
ii  firefox-locale-en                               66.0.2+build1-0ubuntu0.18.04.1               amd64        English language pack for Firefox
ii  unity-scope-firefoxbookmarks                    0.1+13.10.20130809.1-0ubuntu1                all          Firefox bookmarks scope for Unity

snap list reports, among other programs:

firefox               66.0.2-1                   198   stable    mozilla✓

If you still have this problem I found that Firefox works with profiles, you can list them by using:
firefox --profilemanager

I've removed all the profiles. Next time I opened Firefox this profile manager was prompted to me. So I created a new one and that solved it. No more duplicated instances of Firefox.

You cannot install an application twice with one specific package management system. The reason why you have two versions anyway is because you installed Firefox once using the regular package management system (APT), and once using the novel package management system Snap. Installing with Ubuntu software is a matter of clicking, and you do not notice whether you are installing a snap or a regular version.

To remove one of the versions, open Ubuntu Software. Search "firefox" and you will see two entries for the Firefox browser, ("Firefox", which is the snap version, and "Firefox Web Browser", which is the regular APT version that also comes with Ubuntu by default). Remove the one you do not want to keep.


Canon MG2922 cannot get to work I have a Canon MG2922 printer that I want get working on an Ubuntu 14.04 desktop installation.

I would seem that none of the drivers I tried for it work. When I load them and attempt a test page, it says "Processing', the printer flashes, but nothing happens.

How do I fix this?

http://support-asia.canon-asia.com/contents/ASIA/EN/0100626502.html
Follow the instructions you still may not be able to scan I'm still working on that myself


How to repair broken package dependencies I have a remote Ubuntu server. When I'm running apt install -f I'm getting this message:

sudo apt install -f
Reading package lists ... Done
......
The following packages were installed automatically and are no longer required.:
  binutils distro-info-data emacsen-common fonts-dejavu-core foomatic-db grub-pc-bin kbd keyutils
  lib32gcc1 lib32ncurses5 lib32stdc++6 lib32tinfo5 libaspell15 libavahi-client3 libavahi-common-data
.....
  libsnmp-base libtiff5 libtirpc1 libwrap0 lockfile-progs mc-data mime-support p7zip xkb-data
To remove them, use «sudo apt autoremove».
Packages to be REMOVED:
  acpi-support-base acpid adduser anacron ansible apt apt-utils aptitude aspell aspell-en aspell-ru
  astra-extra astra-safepolicy astra-version atftp bash bash-completion blends-tasks bsd-mailx
  ca-certificates cdebconf:i386 chkrootkit console-setup console-setup-linux cron cryptsetup
.....
  logrotate logtail lsb-release man-db mc mime-construct mount myspell-ru ntfs-3g ntp openprinting-ppds
  openssh-client openssh-server openssh-sftp-server openssl:i386 p7zip-full p7zip-rar passwd:i386 perl
  perl-base perl-modules-5.24 perl-openssl-defaults poppler-data procps python python-cffi-backend
  python-crypto python-cryptography python-enum34 python-httplib2 python-idna python-ipaddress
  python-jinja2 python-kerberos python-markupsafe python-minimal python-netaddr python-paramiko
  python-pkg-resources python-pyasn1 python-selinux python-setuptools python-six python-xmltodict
  python-yaml python2.7 python3 python3-minimal python3.5 python3.5-minimal quota readline-common
  rsyslog snmp sudo systemd systemd-sysv sysvinit-utils tar:i386 tasksel tasksel-data tcl-expect tzdata
  ucf udev ufw util-linux util-linux-locales wamerican wget:i386 wpasupplicant
ATTENTION: These essential packages will be removed.
DO NOT do this if you DO NOT imagine all the possible consequences!
  apt adduser (вследствие apt) gnupg (вследствие apt)
  init-system-helpers (вследствие apt) bash dash (вследствие bash) dpkg:i386
  ia32-libs (вследствие dpkg:i386) tar:i386 (вследствие dpkg:i386) e2fsprogs
  libblkid1 (вследствие e2fsprogs) libuuid1 (вследствие e2fsprogs)
  util-linux (вследствие e2fsprogs) grep gzip init systemd-sysv (вследствие init)
  perl-base (вследствие init-system-helpers) login libpam0g (вследствие login)
  libpam-runtime (вследствие login) libpam-modules (вследствие login) mount
  libmount1 (вследствие mount) sysvinit-utils libfdisk1 (вследствие util-linux)
0 updated, 0 new packages installed, 227 packages marked for deletion, and 0 packages not updated.
not fully installed or removed 42 packages.
After this operation, the amount of occupied disk space will be reduced by 2 096 MB.
What you want to do can have undesirable consequences.
To continue, enter the phrase: “Yes, do as I say!”

How can I repair this issue?

I think that somebody installed an incompatible package with dpkg and broke some dependencies.

Upd.: On this server im dont have any internet connection. Im can connect to them only at ssh via some vpn.

Can you please try the following:

sudo dpkg --add-architecture i386
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
sudo apt -f install


I am trying to download Adobe Flash 10 for Ubuntu 16.04.03 - 64 bit OS It gives me an error message of Package "adobe-flashplugin"is virtual.  This is after finding it on https://apps.ubuntu.com/cat/applications/oneiric/adobe-flashplugin/ and clicking the icon for "Available on the software centre".  This is all on Chromium Browser.  Tried it in Firefox too and it says it needs to be opened with AptURL.  When I use that to open it it returns the same error message as above.

Help???

adobe-flashplugin is available in the Canonical Partners repository, so you need to enable Canonical Partners.

P.S. It should be noted that the apps.ubuntu.com site is severely outdated. Canonical Partners currently provides Adobe Flash 28, not 10, and it's Adobe Flash 28 you'll install when you click that button.

If you need Flash I would recommend installing Google Chrome.

You can download it from here.

When you have downloaded it navigate to the download folder and type:

sudo dpkg -i NameOfDownloadedFile.deb

It will ask for your password and install Chrome.


Why I cannot create pipenv shell in ubuntu 20.04 LTS with python3.8? I am getting following error while creating executing pipenv shell command:

⠋/usr/bin/python3: No module named pipenv.pew

Virtualenv location:
Creating a Pipfile for this project…
Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==11.9.0', 'console_scripts', 'pipenv')()
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/pipenv/cli.py", line 571, in shell
    core.do_shell(
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 2093, in do_shell
    ensure_project(three=three, python=python, validate=False)
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 636, in ensure_project
    ensure_pipfile(validate=validate, skip_requirements=skip_requirements)
  File "/usr/lib/python3/dist-packages/pipenv/core.py", line 289, in ensure_pipfile
    project.create_pipfile(python=python)
  File "/usr/lib/python3/dist-packages/pipenv/project.py", line 518, in create_pipfile
    'python_version': python_version(required_python)[: len('2.7')]

TypeError: 'NoneType' object is not subscriptable

For hosting on heroku I require pipenv shell.

I was facing the same problem on Ubuntu 20.04, but since you are on heroku i am not sure, you can execute this:
Go in your terminal:
sudo apt-get remove python3-pipenv
sudo pip3 install pipenv (or sudo pip install pipenv)

After that i had another problem with the version of virtualenv. For that i removed python3-virtualenv and the version of virtualenv installed by pip
sudo apt-get remove python3-virtualenv
sudo pip3 install virtualenv.

You can check, if pipenv works:
/home/[your_username]/.local/bin/pipenv
If you still face a problem with virtualenv, look here:
https://github.com/pypa/pipenv/issues
After it works, add /home/[your_user]/.local/bin/ to your PATH:
export PATH=$PATH:/home/[your_user]/.local/bin/

I think is better that you use python3-venv instead of pipenv

you can install with below code

sudo apt install python3-venv

and create a virtualenv with:

python3 -m venv <folder name for virtualenv>

and active it with:

source <folder name for virtualenv>/bin/activate

and deactivate with:

deactivate

you can use python3.8 instead of python3(Especially when another version of Python is installed on your system)

I hope it helps you


Why crontab scripts are not working? Often, crontab scripts are not executed on schedule or as expected. There are numerous reasons for that:

wrong crontab notation
permissions problem
environment variables

This community wiki aims to aggregate the top reasons for crontab scripts not being executed as expected. Write each reason in a separate answer.

Please include one reason per answer - details about why it's not executed - and fix(es) for that one reason.

Please write only cron-specific issues, e.g. commands that execute as expected from the shell but execute erroneously by cron.

Different environment

Cron passes a minimal set of environment variables to your jobs. To see the difference, add a dummy job like this:

* * * * * env > /tmp/env.output

Wait for /tmp/env.output to be created, then remove the job again. Now compare the contents of /tmp/env.output with the output of env run in your regular terminal.

A common "gotcha" here is the PATH environment variable being different. Maybe your cron script uses the command somecommand found in /opt/someApp/bin, which you've added to PATH in /etc/environment? cron ignores PATH from that file, so runnning somecommand from your script will fail when run with cron, but work when run in a terminal. It's worth noting that variables from /etc/environment will be passed on to cron jobs, just not the variables cron specifically sets itself, such as PATH.

To get around that, just set your own PATH variable at the top of the script. E.g.

#!/bin/bash
PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# rest of script follows

Some prefer to just use absolute paths to all the commands instead. I recommend against that. Consider what happens if you want to run your script on a different system, and on that system, the command is in /opt/someAppv2.2/bin instead. You'd have to go through the whole script replacing /opt/someApp/bin with /opt/someAppv2.2/bin instead of just doing a small edit on the first line of the script.

You can also set the PATH variable in the crontab file, which will apply to all cron jobs. E.g.

PATH=/opt/someApp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

15 1 * * * backupscript --incremental /home /root

I once was working on a shared server with lots of restrictions.

All the answers here (PATH, SHELL, bash -c,...) could not get my script to work in the crontab.

It did work perfectly when I put the command in a little script file with the PATH, SHELL, and shebang rather than in the crontab itself. I did have to change the permissions to 700.


Windows are going black when mini/maximizing I´ve got 14.04 running perfectly on my desktop. There is however one slightly frustrating thing, which is that sometimes when I minimize a window, and then maximize it again the window is completely black.

Is there anyway to fix this? I have an Nvidia GTX 780 with the latest NVidia drivers.

I hope somebody could help me resolve this issue. I´ve been having it since 12.10.

This is a well known bug. Currently is no fix for it.

You can avoid it by turning off Animations, in ccsm (CompizConfig Settings Manager).
Or reducing the amount of memory used by your video card.

More information can be found on the bug report page.

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/1072206

SOLVED! Playing with options at General Tab of Unity Tweak Tool, Broden Destop, Hardward Acceleration, Texture Quality ... Solved!

I've got the same problem. Black maximized windows. While restored I can see the icons. But when goes to maximized turn to black. The same occurs when system windows opens and they are fixed size windows (can't change its size). Ubuntu 14.04 and I'm using the last updated Nvidia driver ver. 304.117.


How to set the terminal to open maximized I want to tell compiz, metacity, the gnome-terminal or whoever is in charge to open the terminal window maximized by default.

How can I do that?

EDIT for the future: most of the answers were upvoted in older ubuntu versions, since 17.10 and on the most upvoted solutions do not work.

Launch gnome-terminal as such:

gnome-terminal --window --maximize

You can probably modify your shortcuts to use the maximize one so that it always starts that way.

The easiest way of doing so is to locate your application (in /usr/share/applications or ~/.local/share/applications) and to modify your .desktop file.

In that .desktop file, you will see the line that starts  with Exec=.... To start gnome-terminal maximized, all you need to do is to add --start-maximized to the end of the command.


Matlab can't find /lib/libc.so.6 in 12.04 I'm trying to open Matlab (32 bit version) in 12.04, with

matlab -glnx86

but it returns

/usr/local/bin/matlab: 1: /usr/local/temp/bin/util/oscheck.sh: /lib/libc.so.6: not found
/usr/local/temp/bin/glnx86/MATLAB: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory

Any ideas? I've seen similar questions where it turned out that the needed library was moved and had to be linked to the right place, but I'm a pretty new user and I don't know how to check for that or fix it.

What about

sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6

Worked for me!

Regards

I found out a workaround. When I run /usr/local/MATLAB/R2011a/bin/matlab, nothing happens, only the first screen of MATLAB is shown and then disappears.

If I choose "Run in Terminal", the error message appears in a terminal window, BUT, the difference is that MATLAB launches and works.

This is far from perfect, but at least lets me run the program.


Deleted Xubuntu Partition, Windows Will now not boot I deleted the Xubuntu partition, hoping it would just delete Xubuntu and everything would be fine. But now it still boots to grub, and will not boot to windows. I have no idea how boot to Windows, it's not under any of the boot options or devices.

I think that you should repair the master boot record. Insert your windows dvd and follow instractions from http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/

Does pressing the F12 key during startup do this (grub), or can it let you select a Windows option/partion?

If not please check the first answer.


I'm getting this error when I generate a new rails application Fetching source index from https://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for rubygems.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying source fetch due to error (3/3): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for ruby gem.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Could not verify the SSL certificate for rubygems.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without
using SSL, edit your Gemfile sources and change 'https' to 'http'.
         run  bundle exec spring binstub --all

I ran gem update --system, but it did not work. I came down with another error:

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

What is going on here and how can I fix it? Thank you

This issue usually occurs with old versions of rubygem.
You can try updating it by running

gem update --system --source http://rubygems.org/

and after that

gem update

source.

Create a new file .gemrc in your home directory and add this line.

:ssl_verify_mode: 0

Now, it should continue even if it can't verify that the SSL connection is "trusted".


What's the difference between Google Chrome and/or Chromium? What are the advantages/disadvantages to each? I used Google Chrome in Windows, and am now using Chromium in Ubuntu.  Is there any difference to the two programs?  What are the advantages and disadvantages to each program?  Which one seems better?

There are some key differences between Google Chrome and Chromium. First off, Google Chrome is a commercial closed source product made by Google which is based on the open source Chromium project.

Chrome is not available in the default Ubuntu repositories as it's not open source, however Google makes Chrome available through their own 3rd party repository. Chrome is updated by Google directly, as they run the entire repository and update Chrome on their schedule. Since it doesn't need to be redistributable and open source, Chrome includes things that we can't ship in Ubuntu out of the box, like Flash and H264 support (See the Ubuntu promise). However you can install this support with a few packages (see below).

Chromium, being open source, is available in the Ubuntu repositories. This is maintained by Ubuntu developers and goes through our Stable Release Update process. Chromium has a release process exception, which allows the team to upload a Chromium build as soon as a new upstream release is made.

There really aren't any proper "releases" made of Chromium, so Ubuntu developers base their build on what stable version of Chromium the stable Chrome build is based off of. Fabien Tassin has a blog post about this process that goes into much more detail.

The following packages in Ubuntu install the codecs and features in Chromium that you can find in Chrome:

chromium-codecs-ffmpeg
chromium-codecs-ffmpeg-extra
flashplugin-installer

Really it depends on what you want. If you trust Google to not break your computer and like the convenience of Chrome then you can use that; if you want an open source browser that is the basis of Chrome that is peer reviewed by Ubuntu developers and doesn't require 3rd party sources then you want Chromium.

This Wikipedia page outlines some of the security/usage tracking differences between the two browsers.

Yes, Google Chrome works fine on Ubuntu(has higher memory usage than firefox, but less cpu than firefox). Difference between Chrome and Chromium is that Chromium is open-source and it is a bit more buggy.


Problem with help.ubuntu.com search engine I'm looking for decision preview photo and folders and help.ubuntu.com doesn't show own site in results. What I should do for correct searching?

Try searching Google (or another search engine) for “preview files site:help.ubuntu.com” (without quotes). The site: search term allows you to only search one Web site. Perhaps the page you are looking for is https://help.ubuntu.com/stable/ubuntu-help/files-preview.html.en or https://help.ubuntu.com/stable/ubuntu-help/nautilus-preview.html.en. The main page for that is https://help.ubuntu.com/stable/ubuntu-help/files.html.en.


Need owner permissions for root folder Actually i'm trying to copy some business purpose files into root folder but it's not allowing to access the root folder. When i'm trying to change the permissions of the folder, its showing that you are not the owner so that you cant change the permissions of this directory. Please help me..

Hmm... instead of explaining how to change permissions on the root folder I'll just say "you should not copy business-purpose files anywhere outside your home folder"

Your home folder is for your files. Folders outside your home folder are for system files. Changing permissions of those folders is not considered a good practice.

Having said that, if you still want to copy files, you can do this by starting file manager in superuser mode by pressing Alt-F2 and typing gksu nautilus.

It'll ask you for your administrative password, after which you'll be able to copy files.

In order to change anything that require root permissions "Superuser" you must have root access capabilities.  This must be done by providing the root password in order to change the files.  You can either do this in a few different ways.  Examples:

sudo -s

After typing the following command it will prompt your for the root password in which you will provide and hit enter.  If it is accepted then you will have full capabilities to do whatever you want on the system.

Another way is to use sudo before every command that requires root permissions.  Example:

sudo chmod 755 /etc/passwd

In which this case /etc/passwd is a file that is read only to all users besides root and requires root permissions in order to change.  After typing this command you will still be prompted for a root passwd.


Can't boot after GRUB Configuration saved new configuration! I've just removed acpi=off in updated Ubuntu 17.04 by Grub Customizer utility. And now I can't boot even with acpi=off parameter! I can see only white/orange dots on small rectangles in the center of the screen.

Also, I tried different kernels - 4.10.0.19, 33 (default) and 35 - with no success.

What can I do to fix it?

P.S. I'm using MSI X299 SLI motherboard. It has extremely buggy chipset X299 on board. But it worked perfectly fine with updated Ubuntu until I saved the new GRUB configuration.

Add acpi=off boot parameter.
Press Ctrl+Alt+F1 after unsuccessful boot.
Run sudo apt-get update and sudo apt-get upgrade commands.

Now I can boot but can't login. Also I can't use Ctrl+Alt+F1 anymore. Ubuntu is so buggy! Unbelievable.

Select kernel 33 instead of 35 and it works again.

But what happened? It looks like I just restarted Ubuntu during update in background. And it just stopped to boot because I restarted it after launching Grub Customizer! It's not an operational system. It's garbage.


How to install Redis on Ubuntu 16.04? I am working with Laravel but i have installed all on my own (php, mysql, composer, nginx) and now i need to install Redis and configure it so i could use it for queue driver in Laravel.

How to install it, because it cannot be installed through apt-get install redis

i get this error:

ubuntu@ubuntu:~$ sudo apt-get install redis
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package redis

I think always is better (and simpler) to install from main repos as first option if you don't have any special requirements.
The package you are searching for is named redis-server. You can check its package info with apt show redis-server.
Also you can search all packages mentioning redis with apt search redis, or even do some simple filtering using grep, use apt search redis | grep php to search for php-redis or related package(s) for example.

So, you can simply run:
sudo apt install redis-server
on your terminal, to install a fully working redis(server) environment.

If you have any special requirements, you always can build from source and install as @George posted in his answer.
Hope it helps.

1) First of all go to redis.io site

2) and you see there check the download page

3) Open the terminal

4) apt-cache policy redis-server

you able to see the version table for your operating system version display

5) sudo apt-get install redis-server

Don't getting this way install. Because redis server installing, but redis server install the your Ubuntu operating system version.

6) Easiest way
    Go to redis.io site and click on the download link
    Further you will go scroll on the more down you will see the installation

almost same way mac

7) First of all you are enter the update command. All the going to repo was update.

 sudo apt-get update

8) sudo apt-get install build-essential tcl

9) mkdir redis

10) wget http://download.redis.io/releases/redis-4.0.0.tar.gz

11) Now give the tar command

   unzip tar file.
   tar xzf redis-4.0.0.tar.gz

12) cd redis-4.0.0

13) make - making on redis binary

if once finish you can see the "make test" command

14) src/redis-server - start the redis server

15) src/redis-cli - start the redis client

set name vadivel
    Ok
    get name
    "vadivel"

16) sudo make install - whenever give the redis command on enter the any dir


Is it possible to use Unity8 on Ubuntu 17.10? I've tried:

unknownlinux@UnknownLinux:~$ sudo apt install unity8-desktop-session-mir
A ler as listas de pacotes... Pronto
A construir árvore de dependências
A ler a informação de estado... Pronto
E: Não foi possível encontrar o pacote unity8-desktop-session-mir

If it isn't possible, should I use Ubuntu 17.10, or Ubuntu 17.04 with unity8?

No, it is not possible to run the Unity 8 desktop on 17.10. You need 17.04 or 16.04 LTS.

EDIT:
Unity 8 is not in the 17.10 repository's, and Unity 7 is in Universe now and will be removed in 18.04 LTS.


Ubuntu 12.04 - Unable to change brightness [ATI HD xxxx - Toshiba Satellite L510 19e] i can't change my brighness. On my Ubuntu is the original Driver from ati.com running.
i used Ubuntu 12.4 with the lastest Updates.

Can everyone help me?
Thanks Guys!

my xorg.conf:

  Section "ServerLayout"
    Identifier     "aticonfig Layout"
    Screen      0  "aticonfig-Screen[0]-0" 0 0
  EndSection

  Section "Module"
    Load  "glx"
  EndSection

  Section "Monitor"
    Identifier   "aticonfig-Monitor[0]-0"
    Option      "VendorName" "ATI Proprietary Driver"
    Option      "ModelName" "Generic Autodetecting Monitor"
    Option      "DPMS" "true"
  EndSection

  Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    BusID       "PCI:1:0:0"
  EndSection

  Section "Screen"
    Identifier "Default Screen"
    DefaultDepth     24
  EndSection

  Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    Monitor    "aticonfig-Monitor[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
  EndSection

Its working for me :)

Follow the instructions in the link

http://vedimpokem.blogspot.in/2013/02/adjust-screen-brightness-ubuntu-1204.html


X.Org Nouveau display Ubuntu 16.04 Im running Ubuntu 16.04 on my Asus G55VW 15" ROG Laptop. When i use the X.Org driver which is default my system runs fine, ive got a hdmi port and screen which has a naitive res of 2560x1080 which is widescreen. It is currently set to 1920x1080 so it looks a little weird.

When i use any of the Nvidia legacy drivers i cant get it to use 2560x1080 so i switch to NVIDIA Binarydrivers either 304.131 or 361.42 and i can get the resolution and looks great but sporadically locks up the machine. Or when i boot it GUI doesnt start correctly

Its not due to the screen being used because when im at work just on the 15" built in using the NVIDIA binary it still occasionally locks up.

Anyone else experience this? I used to use the latest NVIDIA on 14.04 and never had an issue so its weird its starting now.

I an provide logs etc but just from a user experience perspective i wanted to see if anyone else has had similar issues?

Thanks,

I thought I'd share that this thread worked for me in case anyone stumbles across this question.

Graphics issues after/while installing Ubuntu 16.04/16.10 with NVIDIA graphics

Thanks!


How can I create a live USB with persistant storage that will run on a Macbook Air without using rEFIt? Sometimes I have to use a MacBook Air (2,1) at work. I'd like to be able to have an Ubuntu USB stick with persistent storage space for it, that does not require any modification of the machine's internal drive. So, that I can work in my normal (K)Ubuntu environment on the Machine and save stuff onto the stick. I don't want to install rEFIt or anything, since I am not to the only other of this machine. How can I achieve this?

I know that there is a Grub 2 version that supports EFI, which should do the trick in principle, but what are the necessary steps to get it working? Are there alternatives to this?

Apparently, the following answer seemed to help: How to create UEFI-only bootable USB live media?
There is a good chance that it will work fine for your Mac too.

just an "installation-stick" with your kubuntu .iso , boot it at work and the choose the live system - you can spare some space for files or programs to install, but booting will take about 5 minutes or so.
i haven't tried it - and its just an idea, but maybe if you take another PC and another stick and perform a simple clean install on the stick instead of the hdd (if this is possible) and then just plug it in at work and define it as the device to boot from, maybe it works. maybe.

just some random ideas, i'd be happy if they help you out!


" is not responding" while debugging in gnome 3 (ubuntu 17.10) Every time I'm debugging a Java game using graphics from OpenGL (libGDX framework), step by step (on my IDE), Gnome 3 freeze the game window and lock my mouse events outside that window, asking for a FORCE QUIT or WAIT because of a non responsive window (the game being debugged).
How can I ignore that message in the future (or delay it)? I can't debug anything with that open dialog, even if I press Wait (the dialog reappear again after 2 seconds or so)?
NOTE: CPU usage is a 1%.

Another thing to consider is if, when stepping through the code, you are getting to a point where the app is expecting some input from the user: a keyboard input, mouse movement etc. If the app is now locked waiting for that input it will be stuck there, but you are in the debugger, stepping to the next line of code. So your app never gets there because its waiting, and the debug can't move on because its waiting for the app to complete whats its doing.
Its called a deadly embrace

Check your CPU or RAM usage. This might be a simple hardware bottleneck considering what’s happening. Most IDEs use up quite a lot of system resources,and I doubt yours is different. I found an O’Reily book that states that over time the OpenGL API became more and more bloated on top of that. Try killing some tasks and look again. There might be some more information about disabling the repeated dialog boxes here.


Why can I not start cheese I have install many applications and cheese was one of those but I can not open

I have tried cheese on debian 6.04 and cheese works fine but not on Ubuntu.

Maybe, I do not any drivers installed on the system? Because they are available. Do I have to install them?

If this is the cause of that, what can I do ,or when a driver it will be available?
(I send a report 2 launchpad of the system)

and because of that I can not use neither Ubuntu 3d or gnome shell or play 3d games.

my hardware display on terminal using command lspci was:

01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 771/671 PCIE VGA Display Adapter (rev 10)

(..just about every hardware is from Silicon Integrated Systems [SiS] on my laptop)

using cheese on terminal give me this error:

Xlib: extension "GLX" missing on display ":0.0". (cheese:4163):
Clutter-CRITICAL **: Unable to initialize Clutter:
The OpenGL version could not be determined

but after a new installation of ubuntu and update (did here a reboot)and new instalations of applications give me a different error before reboot on terminal that was:

(cheese:506): Clutter-CRITICAL **: Unable to initialize Clutter:
Unable to find suitable fbconfig for the GLX context:
Unable to find fbconfig with rgba visual

but them after rebooting after installing aplication give the same error

Xlib: extension "GLX" missing on display ":0.0". (cheese:4163):
Clutter-CRITICAL **: Unable to initialize Clutter:
The OpenGL version could not be determined

i have also installed ubuntu 12.04 and cheese works fine like for example stellarium even without a driver installed

so should i try to upgrade ubuntu 11.04 to ubuntu 12.04 beta?
or wait for ubuntu 12.04 ?

i have upgrade ubuntu from 11.10 2 ubuntu 12.04 beta but still didn't work..

so i try to install ubuntu 12.04 beta from the start make a update and them install cheese it works like it did but them i also use synaptic and install all packages or applications from the markings on my ubuntu 11.10 .. and it seen all is working on the graphics better not fast but working like for exemple supertuxkart or stellarium

I think the answer above is incorrect. I also can not start cheese on my 12.04 setup with an NVIDIA GT240 graphics card. I am using the proprietary driver and the webcam works perfectly with Skype. Camorama does not work either.

I am using 12.04 updated today 18th April. This is Beta 2 updated.

I did a fresh installation on another machine (using the daily build) and the problem does not occur. I would suggest doing a fresh installation at the end of the month.

You need to install bumblebee and run with optirun cheese.!


Is there a fast way to add album cover art to 199 different albums I want to add cover art to my songs, but I have 763 songs, 110 artists, and 199 albums. Right now I can add cover art using EasyTAG, but this could take weeks. Is there any way to do this faster. There are tons of apps for Ubuntu, wouldn't there be one that gets the cover art and embed it in the mp3 for you?

Try Album Cover Art Downloader.

Album Cover Art Downloader will semi-automatically download album cover images for your music collection. All you have to do is point it at the root of your music directory and for each directory, the program will download a set of corresponding (well, best guess) album covers from the Internet, from which you can choose one that suits your fancy.Album Cover Art Downloader

Also you can take a look at Bliss

Keep the music files of the album in a folder, including the image of the album (jpg, pnm...).

Then right-click on the folder and select properties. Click on the folder icon and select the image for the folder.


Minecraft flickers sometimes and colors get buggy on an Intel HD Graphics 3000 I really like Ubuntu, but I always had to switch back to Windows just because I couldn't get my Intel HD Graphics 3000 to work. So, 11.10 came out and I'm trying to get things work in this update, so I can finally stay with Ubuntu and use it. Anyways, things seem to be more stable here, but they're still a bit fishy.

I'm doing tests with Minecraft. Currently, there's only 1 minor bug. The game flickers from time to time and the colors get buggy or something

I read that maybe I should update to kernel 3.1? Maybe 32-bit Ubuntu is better?

It was impossible to play Minecraft in 11.04, but 11.10 is so much more stable.

I run minecraft on archlinux with the same IGP and have the same graphical glitches.

Since arch has a newer kernel, I think it is safe to say, a newer kernel will not help. Switching to Oracle jre does not help either. I suspect a bug in the intel graphics driver.

If you are running 64-bit version of Ubuntu, try installing the 32-bit lib files as follows from Terminal:

Launch Terminal by pressing Ctrl+Alt+T
Then type the following command $ sudo apt-get install ia32-libs

You may have to reboot for the changes to take affect.


How can i update a software without password in 18.04? My problem is in my University's library, all the PC have Ubuntu, while thats not a problem, all the software are not updated, which is very much a problem.
For me, Vim is a very much needed tool for programming,but all the system in my University's library have a older version, where "A,B,C,D etc etc" are taken as a input when i click arrows key.

You either need to know root password or you need to be authorized to use sudo command if you want to update/install software.

When you are authorized to use sudo there are two possibilities - either you can use it without a password or you have to provide your password, it depends on how admin set up your account.