Getting an IP address with Ubuntu client from Windows Server 2016 DHCP in VirtualBox

Let provide an arrangement that should work. For questions (2) and (3) that has to do with the network set which if the steps I will show goes well then those should work.

Step 1: Set Host-Only network on Virtualbox:

Setup Host-Only Network for both machines. Open the file menu and click on Host Network Manager

Create the Host-Only network by clicking create button:

Now on both machines do the following:

Set click on the machine then settings and setup both NAT for first adapter then Host-Only for second adapter as seen in the images below:

Now I have not tested this and I have adapted it from an answer given here. I am assuming like you said the Windows DHCP Server has been setup so following that reference simply turning on the Ubuntu client should have it connect to the Windows server and get an IP from there. Enable that network on Ubuntu machine.


How to use local dovecot (imap) with Alpine (18.10+ changes)

Alpine hasn't changed from 18.04 to 18.10, but dovecot did.

The problem appears to be an issue that the developers of dovecot are working on.
I have not issued a bug report, but after discussions with lead dev Iko Tuomi, it turns out that the solution is to put the following into /etc/dovecot/dovecot.conf:

service stats {
  unix_listener stats-writer {
     mode = 0666
  }
}

Then all of my old prescriptions (including the custom .conf file that is used for the imapd call) work fine as they were. (and I'll update that blog shortly)


Feeling like a bit of a wally, I discovered that it's very easy to remount and get access to write to the file system by running the following very simple command.

mount -o remount,rw /

Once the file system is mounted, naturally you can do whatever you need to and disable network devices etc.


Update Err in recently installed ubuntu 16.04

Yes Dufte, now I've updated the sources.list and it works fine. I able to update most of it but some are still not able.

Guys thanks for your prompt answers. I managed to fixed the issue by my own.


Linse Numbers and mysql COUNT don't work together with BASH

You are mixing up shell arithmetic and bc arithmetic.
Either use
num=$(( CountLines + Counter ))

(the $s for variable de-referencing are optional in this case)
or
num=$( echo "$CountLines + $Counter" | bc )


Software Center not opening (whitescreen)

try this

sudo apt-get install --reinstall software-center

in your terminal with CTRL+ALT+T


Ok, plug the machine to the device A (where it works), open a terminal and type:

gksudo nautilus

Nautilus file browser will open, right click on your USB under "Devices" then go to the "Permissions" tab.

You have 3 groups, Me, Group and Others. Set them all with "Create and delete files" permissions and try to plug the USB to the B machine.


Please try add mapping to Home through xmodmap:

https://wiki.archlinux.org/index.php/Xmodmap


Since you don't specify any input file, grep waits for you to provide input data on its standard input.

The behavior where -r will use the current directory by default is non-standard (in fact, -r itself is), and was introduced in GNU grep 2.11.


This is bug https://bugs.launchpad.net/charms/+source/ceilometer-agent/+bug/1535062.

I believe a new VMware image has been made available for download at https://landscape.canonical.com/downloads/


change default paths of (Music, Pictures, Temples, installations, ECT)

Use symbolic linking.

First, you need to mount your 200Gb partition, if that has not already happened. You need to use the mount command to mount the partition manually; if that goes well, you may want to edit /etc/fstab to have the partition automatically mounted at reboot.

Suppose the partition is mounted at /media/largedisk, and that all your music is stored in /media/largedisk/Music/. Then, move everything in /home/youruser/Music out of the way so that it is empty, then remove the empty directory: rmdir /home/youruser/Music. Now, create a link to the new partition: ln -s /media/largedisk/Music /home/youruser/Music. Now everytime you use the folder /home/youruser/Music, you will in fact be addressing the Music directory on the other partition. To remove this, simply rm /home/youruser/Music: this will only remove the link, not the Music folder on the other partition.

Then repeat for videos, photos, etc.


The cause
In many cases, customizing commands that effect keyboard, mouse and screen need a minor break of appr. 10 seconds after log in. The reason is that obviously local settings in those cases are loaded in a relatively late stage, overruling (or breaking) your commands if they run too early.
The solution
Is simple, add a small break to make your command run after possible local procedures, breaking your command. In this case, add the following command to start up applications:
 /bin/bash -c "sleep 10 && oneko"

Choose Startup Applications: Dash > Startup Applications > Add, and add the command above.


To see the correct driver in System Details you have to install mesa-utils
just run this command in terminal:

sudo apt-get install mesa-utils
To verify if Bumblebee is correctly installed you have to type this command:

optirun --status

You should see sth like that:

`Bumblebee status:  Ready (3.0.1). X inactive. Discrete video card is off.`

No, Intel is primary card. To run something with NVIDIA you have to type the following command

optirun [application]


Volume bar reaching maximum sound level prematurely (Ubuntu 20.04)

I noticed it can be fixed on sound configurations, setting to option (S/PDIF) instead of the standard:

(I can't post a print of the menu options because of another bug on Ubuntu... )


I have recovered the 175GB of space by using BleachBit (as root).

Tick all  the boxes.


How do I fix screen tearing? Ubuntu 20.04

I am assuming that you have Nvidia Graphics card, in your laptop/desktop. Just go to your nvidia server setting, go to your PRIME profiles, and select NVIDIA-on-Demand.
Restart.
It fixed the screen-tearing for me.


grive is not very well maintained (last update was in 2013 I think), and google deperecated the api it used so it will not now work.

So for syncing Google Drive, you could try something else - for instance, this fork of grive. You can install that as detailed here, by adding the PPA ppa:nilarimogard/webupd8 and installing the grive package, or installing the appropiate deb package from here,

You can also sync using the Chrome/Chromium browser, create a application shortcut for drive, then sync for offline use - see here, here and here.

Google do provide a native client for windows/mac (the Windows one may work under Wine, I haven't tried this yet), however there is no offical linux (or ubuntu) client. There is some demand for one - as shown by this petition.


New software centre won't run after 16.04 upgrade

I had the same problem after a fresh install and it started working after I killed the process in System Monitor.


What is the difference between idle3 and idle-python3.2

idle3 is a package that depends on idle-python3.3 and Python 3.3 (in Quantal, probably 3.2 in older Ubuntus) amongst other things. From the description (from apt-cache show idle3):

  This package is a dependency package, which depends on Debian's default
   Python 3 version (currently v3.3).

The package itself provides a /usr/bin/idle3 script which imports the library provided by the idle-python3.3 package. idle-python3.3 provides a version specific /usr/bin/idle-python3.3 script too.


You have to make it archive file before you move to local disk, so please make the data as .zp or eny other archiver. Then move it to local disk. Here data loss will not occur.

In this case, you have to retrieve old data. For that you can use the open source application, testdisk you can download it here and follow the instructions.

Another way to install,

sudo apt-get update

sudo apt-get install testdisk

and open it,

sudo testdisk

From testdisk you can retrieve deleted data from any drive.


Why does the installer view my partitioned hard drive as one non-partitioned disk?

Is it possible you chose the "don't overwrite any existing filesystems" option when you're starting the install?  (I can't remember the exact name for that option...)

If the Linux partition (/dev/sda6 and /dev/sda7) is not needed, you could try deleting that partition and see if the installer sees the "free" space.  Then the installer should see the free space and let you install there.


Windows only sees the first partition on a flash drive.
In my experience formatting a multi partition flash drive in Windows can brick it.

As a minimum Gparted or Disks should be used to re-format the drive.

Mkusb is even better as it has a Wipe option and an option to reset the drive to it's original spec's with msdos partition table and FAT32 format.

https://help.ubuntu.com/community/mkusb/wipe


Is there an application that automatically tests the system?

There's no reliable way for the software to tell if e.g. you can hear a sound or if your screen resolution is what you expect. Therefore you can not have fully automated hardware tests but need someone to tell if the test was successful.


You should have a look at GIO which will do the trick. Especially the GMountOperation and GVolume.

There's a working answer on SO which handles your issue.


Why won't Ubuntu install, or even boot up the trial from my USB?

Possibilities:

You have a hardware problem like a failed hard disk drive. If this is why Windows isn't booting, of course that will translate to any other OS. The dev/sda errors make me suspect this. Depending on the make/model of your machine there may be hardware tests you can run from BIOS or boot selection screen.
The install media has gotten messed up. Sounds like you've done some pretty intense formatting and playing around with those sticks. I'd open up a program like UNETbootin and make sure it can recognize the formatting on those sticks and see them as writable.
Last but not least it could be an issue with booting from usb, or a problem with the usb port itself. You could rule these out by burning a disc if you are able to.

Hope that helps.


I have had similar issues before, particularly with flash drives. To fix the issue with gparted not seeing the disk try erasing the beginning of the disk with:

    sudo dd if=/dev/zero of=/dev/sdb bs=1m count=128 && sync

Then unplug and plug in your usb adapter. This will nuke the partition table on the ssd and should allow gparted to see the disk again.

It is also important to add:

  && sync

When working with dd and a device connected over usb. This is because most operating systems will cache data in ram to make usb disks appear to write faster. The sync command will force this data to be written to disk and prevent data loss/corruption.

As for copying data to your ssd with dd, it should work in principle, but you may not be able to do it in practice. I personally have had mixed luck when doing this, sometimes it works flawlessly, others not at all.

Further reading/Source:

Disk cloning Archlinux Wiki


Facing issues while using the update command on terminal

These messages mean that two of the PPAs you're using (~vincent-c/cherrytree and ~wiznote-team/ppa) aren't ready for 17.10 (artful).

I don't know, if they ever will be - the first one says it's deprecated and you should switch to ~giuspen/pa.


ubuntu detect my new display and I lost all around my working screen

If I'm interpreting correctly, the image is stretched beyond the bounds of your TV. The menu system of you TV should have controls to adjust the position and size of the image.


On screen keyboard malfunctioning on login screen

Recenly a friend of mine reported a similar problem which was due to "mistakenly" turning on the screen magnifier and on-screen keyboard from the accessibility preferences. Apparently this is a known bug.

If this is (a part of your problem) you can try out the fix recommended here.


Is it possible to remove windows from hostmachine after installing Ubuntu 11.10 inside it?

If you are ready to remove windows, probably the easiest thing to do would be to back up your data and do a fresh, standard install overwriting all your partitions.

Your other option would be to migrate your wubi install outside of windows and then delete windows.

migrating wubi has been discussed here : How to migrate from Wubi to a regular installation?


Configuration and initialization of spice-vdagentd

I've been running Ubuntu 18.04 for some years, and I've just started seeing this problem. Perhaps some update has broken things.
Every time I update packages I see this error.
Here's my fix:
# sudo vi /lib/systemd/system/spice-vdagentd.service

Find this line:
ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock

and replace it with these lines:
#ExecStartPre=/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock
ExecStartPre=/bin/sh -c '/bin/rm -f /var/run/spice-vdagentd/spice-vdagent-sock ; /bin/mkdir -p /var/run/spice-vdagentd'

In other words, comment out the original ExecStartPre (always good practice to leave the original code there), then put in a new ExecStartPre which does 2 things:

Remove the socket file (if it exists) - this is what the original did.
Make the /var/run/spice-vdagentd directory if it doesn't exist.

Now, save your changes and do this to start the daemon:
# sudo systemctl start spice-vdagent


Can't set transparent terminal background in Xubuntu 11.10

duffydack is spot on, I just wanted to add a screen shot.

It is under your settings, window manager tweaks

Make sure "Enable display compositing" is checked off (unlike the picture I posted), and you can adjust some other options while you are there ;)


Your output in the comment showing that, you have winetricks installed. Use this command to remove the wine completely.

sudo apt-get --auto-remove purge winetricks

Hope this will work


How will Deja-Dup operates when backing up to an external USB drive?

Deja Dup will wait for you to connect your external drive. So, when your external USB drive is not connected, Deja Dup will show a Notification saying that "Backup will continue when <external USB drive's partition name> gets connected."

So, when you do connect your external drive, Deja Dup will start backup automatically. Otherwise, it will wait in the background till the drive is connected.


X11 will still be used by KDE Plasma in the foreseeable future. There is still a lot of work to be done as evidenced by the following quote from KDE Decides the Three New Challenges: Wayland, Consistency, and Apps
published in September 2019:

Despite its many merits, the X server has become very long in the tooth, and Wayland is poised to become a more modern and dependable alternative. However, KDE's software is still quite far off from being completely implemented on the newer protocol.
"As technology and the needs of modern computer users advance, X server has been proven less and less capable to keep up", says Fanis Bampaloukas, author of the first proposal. "I propose to make our goal to migrate the core of the Plasma desktop, and make X server an optional compile and runtime dependency".
To achieve this goal, Fanis says KDE will have to fix major breakages and implement missing features.

Even Kubuntu 19.10 still defaults to X11.

A Plasma Wayland session can be added by installing the package plasma-workspace-wayland, but is not officially supported. This will add a Plasma (wayland) session option at the login screen. Users needing a stable desktop experience should select the normal ‘Plasma’ (without Wayland) option at login.

Source: https://kubuntu.org/news/kubuntu-19-10-is-released-today/
Given that 19.10 is the precursor of the next LTS to be released in April 2020, X11 will be supported by Kubuntu till at least April 2023.
So, if you use an X11 session, global menus are available for the applications that support them.

If you want to track the progress the KDE team is making with Wayland, monitor Plasma/Wayland Showstoppers.


Latte Dock 0.6.2

Adding plasmoid

Start the Latte Dock - the Latte Dock application not the plasmoid

Start the plasma widget browser.
Drag and drop
the plasmoid to the Latte Dock.

The keyboard layout indicator is part of the KDE System Tray.

Removing plasmoid

Enable the Latte Settings
Move the mouse over the plasmoid
Click the remove button


Can't install Ubuntu dual-boot alongside Windows 10

I have successfully install dual boot Windows 10 alongside by referring below:

How to dual-boot Linux and Windows

or

How To Install Ubuntu Along With Windows

But you mention VirtualBox.
So are you trying to dual-boot or just to install the Ubuntu in the Virtual Box?


How to prevent sleep on Ubuntu 20.04 Live

Using Caffeine from the software center worked


Disable the message " these files are on a digital audio player" in na

Each USB device presents itself to the operating system with a device class code. This determines what kind of device is plugged into your computer and thus enables your OS to  initiate class dependent actions.

It is likely that your phone sends the device class identifier 01h Audio to Ubuntu. Therefore seemingly correct Rhythmbox is opened as we believed it was an mp3-player.

Unless you are able to change this code from settings on your phone the easiest approach to avoid starting a media player is to turn off the default behaviour on what to do when a "audio"-USB-device is plugged in.

A more basic approach would be to define a udev rule for a given device.

We have no experience with this software, but you may also be able to change the USB mode of a flip-flop device with the help of usb-modeswitch .

See the instructions on the support page for details on usage.


pipelight: error downloading wine-flash-installer

Per the comments on the top post (and pipelight.net) it looks like Pipelight has been discontinued so I'm not sure there's a solution.

An alternative, for those without access to another OS, is to install Firefox and Flash with Wine. I find this to work reasonably well.


How do I determine the power state of my monitor?

If I understand your question, you are probably looking for xranr:

xrandr -q

will give you a list of connected monitors with spec info.

See http://www.thinkwiki.org/wiki/Xorg_RandR_1.2


How can I ensure that a minimal set of processes are running on ubuntu 11.10

Did you try using nice? that may be enough for your needs.

sudo nice -20 your-program.py

this will ensure that your program has a higher priority than other processes.


At the end I did it with rpm > tgz > deb . But i suppose that what Mohit Rajan suggested could be helpful to. I think now that even alien -g packagename and manual installation - copying of files could work too.
Thanks for that.

Anyway would be cool to know how to avoid such warnings and how to deal with them. I just don't want to ignore it without further investigation


What is the different between cryptsetup and truecrypt

cryptsetup is part of the main Ubuntu archive, which means that it's officially support by Ubuntu developers and Canonical.  It's specific to Linux, and provides block device encryption at the kernel level.

Truecrypt is not part of the Ubuntu package archive (due to licensing reasons) and is offered as an additional package that you can add to your Ubuntu system.  Truecrypt does its encryption and decryption in userspace, rather than within the Linux kernel, which actually allows it compatibility clients for Windows and MacOS.


Try

synclient VertEdgeScroll=1

and see if that allows you to scroll by using the right edge of the trackpad.

If it does you can make the change permanent by making the file /usr/share/X11/xorg.conf.d/60-synaptics-options.conf with your favorite editor. For example, with gedit:

sudo gedit /usr/share/X11/xorg.conf.d/60-synaptics-options.conf

Then putting the following in the file

Section "InputClass"
  Identifier "touchpad catchall"
  Driver "synaptics"
  MatchIsTouchpad "on"
  MatchDevicePath "/dev/input/event*"

  Option "VertEdgeScroll" "1"

EndSection


How do you set the exit status of a shell script?

The exit status of a script is the exit status of the last command that was executed.
For example if the last statement tries to create a directory with mkdir some/path, and the command fails,
then the exit code of the script itself will be the exit code of the failed mkdir.

If you want to set a different exit code, you can, using the exit builtin:

exit: exit [n]
    Exit the shell with a status of N.  If N is omitted, the exit status
    is that of the last command executed.

If your script detects that something went wrong,
then it's recommended that you exit with a non-zero code.
Typically 1 is used, and it's good enough,
until you want to give a different signal to caller programs in order to be able to respond to different kinds of errors differently.
Unless you have a specific idea in mind, simply use exit 1.


I can't activate Wifi or Bluetooth on a Toshiba Satellite Laptop

For wifi, you will have to connect via cable and see if there is any proprietary driver for your adapter. Go to software center and Edit - Software channels (sources), then go to the last tab "Additonal Drivers".


Change HDD partitions after installation

First, you might use your Ubuntu live CD/USB to make partitions changes on your bootable hard drive. You can make a number of online operations (I mean during you are on your system), but be sure to:

Always umount partitions before formatting or deleting them.
If you change hard drive layout (e.g. deleting partition) always prefer rebooting in order to allow a proper partition refresh in memory.


Problem with the accent marks on MS Office in PlayOnLinux

I have solved it. There are two actions to apply:

Solves the problem when you launch the application and then open the file.

To do so, follow ingasvist's user instuctions: go to Playonlinux, select Office program (Word, Excel, ...), go to Configure (do not get confused by "Configure Wine"), go to the Miscellaneous tab, and in the Command to exec before run textbox, enter: XMODIFIERS="". That solved it. Keep the keyboard entry method on IBus. Repeat for other office links.

Solves the problem when you want to open directly the file from your file browser.

Go to the files located at ~/.local/share/applications. Use a text editor to modify Office launcher files and look for the line which begins like Exec=.... Modify this line by adding env XMODIFIERS="" to it. This is what mine looks like now:

Exec= env XMODIFIERS="" /usr/share/playonlinux/playonlinux --run "Microsoft Word 2010" %F

I hope this helps!

Cheers!

PD: this answer is thanks to the contribution of ingasvist user, this blog, and this faq website.


Moving the environment variables to .profile didn't work for me.  Instead, I removed the code that @oliman suggests from my .bashrc and then I changed the my IntelliJ IDEA's launcher from this:

"/opt/idea-IU-163.12024.16/bin/idea.sh" %f

to this:

bash -c "source ~/.bashrc && /opt/idea-IU-163.12024.16/bin/idea.sh %f"


Snap gives wrong fs type, bad option, bad superblock on /dev/loop23 eror

It seems you are missing some required packages from your system.
Try installing required packages to handle squash file system like so:
sudo apt install squashfs-tools squashfuse fuse

Then reinstall snapd like so:
sudo apt install --reinstall snapd

Then reboot your system.


Firefox doesn't render Dravidian scripts (Telugu, Tamil, etc.) in 16.04

In my case it fixed just after installing indic fonts. You can install that specific package by

sudo apt-get install fonts-indic

or even shorter

sudo apt install fonts-indic


How can I uninstall python3.5.0 installed from source code?

From this source

You can do :

make clean removes any intermediate or output files from your source / build tree
If you can, running make uninstall will work.
The last option is you have to manually uninstall it. Running make -n install

Note : You must cd the file location where you make install


Resize/Create a New Partition in GParted

You can not resize a partition when it is in use. Boot a live CD, make sure the partition is not mounted, and run gparted from there.

Make sure the swap partition is not mounted either (swapoff).

You can mount / unmount a partition from gparted as well.


Broadband internet connection problem on Ubuntu 11.10

This is a known problem with Ubuntu 11.10 and wireless connection speed. The problem lies with 11.10's inability to deal with the "n" standard that most new routers use. The temporary ( I hope) workaround is to simply go to your router's settings page and disable the "n" connection speed. Hope this solves your issue, took me the better part of a day (and more than a little swearing ) to figure it out. Good luck!


Open a new Terminal window and run the following command:

sudo gedit /etc/apt/sources.list.d/google-chrome.list

In the text file that opens edit the file so that the line reads:

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

The only addition you need to make is entering the [amd64] architecture after ‘deb’ but preceding the ‘http’. Do not edit or replace any other text in this file.

Hit Save. Close the Gedit window.

Now return to the Terminal and refresh your package list by running:

sudo apt-get update
The ‘failed to fetch’ APT error should no longer appear.

source


ubuntu 18.04 Some files do not display emblem in nautilus Extension

/usr / share / mime / icons are empty, resulting in the wrong file icon


Is it possible to have vino use the same password as the user log in password?

Well, generally no - Vino cannot use the user's account password.

As can be read in this article discussing the issues with Vino, vino does not use the standard Linux authentication mechanism called PAM (Pluggable Authentication Module).

As to your suggested mechanism - there's no way to "read the password" from the user accounting system (password database) as the value stored for the password in the password database is not the password itself but a checksum (also called a hash function result) of the actual password, so the user's password is actually not known to the system - so it cannot be stolen.

That being said, because PAM is so awesome and, well, pluggable, you can have a plugin that runs some arbitrary script - for example: to change Vino's password - whenever a user changes their password (or log in, or whatever). I've actually found such a plugin here: https://github.com/jeroennijhof/pam_script. I have not tested it so I cannot explain how to make it work, nor even I guarantee that you can use this to do what you want - but I'm sure you'd learn quite a bit while trying ;-)


Apache causes 2 zombie processes after install certbot

Solution: if you have custom logs definied in :80 ports config file comment them out them, you should not use if you redirect 80 to 443 ports in the in the two config files the same log definition.


After the last 03/30/2018 update, can't boot ubuntu - get_random_bytes called from start_kernel with crng_init=0

Machine Check errors are due to issues with the hardware.  Check first that the memory is seated firmly on the motherboard and that you are not overclocking the CPU.


After upgrade to 14.04 I get "You don't have permission to access /wiki/ on this server."

This is an issue with a missing link:

cd /etc/apache2/conf-enabled
sudo ln -s ../conf-available/mediawiki.conf .

This made the wiki instance appear again.

Another error appeared after fixing the initial problem. This was due to change in MediaWiki database schema (if I understand correctly). I solved this with:

cd /var/lib/mediawiki/maintenance
sudo php update.php

As far as I can determine the wiki is now running ok.


Delete your keyring or revert your account to original password (not working for auto-login)


How to get the same scaling on two monitors

Got it fixed, here's how:

I enabled HiDPI mode on chromium.
went to settings->Display->Scaling and set everything 2 times larger on my screen that was scuffed.
$ xrandr --output DP-4 --scale 2.5x2.5


If Unity launcher is auto-hide, how will elements on upper panel behave?

It's true that the maximised window will then have window buttons which are a little inside from the left edge of the window. We haven't tested this yet, our position for the moment is that keeping them in the same place on the screen is more important than keeping them against the left edge of the window. We'll have to update that understanding once we're in a position to test it.

In answer to your question: that is the real plan on auto-hiding :-) but it may not be the final answer.


You need to edit /etc/lightdm/lightdm.conf and add xserver-allow-tcp=true to it.  Here's what mine looks like:

[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
xserver-allow-tcp=true

[XDMCPServer]
enabled=true

After that, run this:

sudo restart lightdm

If you have problems restarting, just 'ps ax | grep lightdm' and kill all the associated processes, then:

sudo start lightdm

I haven't researched yet, but I'm sure there are lots of configuration options for lightdm, I'm just not certain that they all work at the moment.  But this one does.  Here's what my X server process looks like now:

2981 tty7     Ss+    0:00 /usr/bin/X :1 -auth /var/run/lightdm/root/:1 vt7 -novtswitch


Try this utility https://github.com/ichiriac/ubuntu-smart-fan, it's based on lm-sensors and it will manage the fan speed depending on how you want it to behave.

After calibrating the temperature and thresholds you will be able to run it as a daemon on your laptop


After upgrade from 20.04 to 21.04 many applications won't start

If the application shows on the dock, click on it, try pressing Alt-Space and see if you can Maximize it or Move it back on to your screen.  Worth a try.


Use verbose mode for output generation, and you could looks what error is.

gcc -v -c hello.c


While I'm not sure of the exact rationale for this decision to play the sounds as mono, the reason why they are mono is because the system is supposed to play the sounds on either side of the system depending on where your mouse is positioned. It doesn't always work perfectly, but that is the intended behaviour.

Unfortunately this seems to be hard-coded, so that you cannot change this behaviour without editing the source code to Gnome itself.


Laptop Fan is CPU dependent and doesn't increase speed when gpu is even burning

Finally I've found a good idea, for making them warm together. I removed bumblebee, And currently using nvidia driver for Xorg and compiz too. But now, gpu processes need to do knock knock more on cpu and it's better. They're at least working together more.


Asuming both machines are connected in a network and the PC can reach the laptop's IP. Please follow these steps:
On the laptop
Install v4l-utils and ffmpeg by running:
sudo apt install v4l-utils ffmpeg

Install matroska media container like so:
sudo apt install libmatroska6v5

Run the following command to open a netcat listener for the camera stream:
ffmpeg -i /dev/video0 -codec copy -f matroska - | nc -l 9999

On the PC
Install v4l-utils and ffmpeg by running:
sudo apt install v4l-utils ffmpeg

Install v4l2loopback and load the virtual camera:

Run this:

sudo apt install v4l2loopback-dkms v4l2loopback-utils

Then this:

sudo modprobe -r v4l2loopback

Then this:

sudo depmod -a

Then this:

sudo modprobe v4l2loopback exclusive_caps=1 card_label="MyLaptopCam:MyLaptopCam"

Test it:

Stream the real camera on the laptop to the virtual camera on the PC ( change Laptop_IP to the IP of the laptop ):

nc Laptop_IP 9999 | ffmpeg -i /dev/stdin -codec copy -f v4l2 /dev/video0

Launch and play the virtual camera:

ffplay /dev/video0

Say cheese to your laptop's camera.

If you can see your face, then it's working.

Microphone?
To send over the microphone output as well from the laptop to the PC, please follow these steps:
On the laptop:

Run this:

arecord -f cd -c 1 | nc -l 7777

On the pc:

Run this:

sudo modprobe snd-aloop

Then this:

arecord -l | grep -i loopback

The output will be something like this:
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]

we will use device 1 ( this is usually the virtual microphone ) on card 1 like this hw:1,1

Then run this ( change Laptop_IP to the IP of the laptop ):

nc Laptop_IP 7777 | aplay -f cd -D hw:1,1

Select the new microphone device in System Setting -> Sound -> Input.

Test the microphone and be advised there will be sound latency because no compression is used.

Notice:

This has been tested and working flawlessly on two machines running up to date equal versions of Ubuntu 19.10.

If the test fails, then it is probably because you have other camera devices virtual or otherwise present in your PC's /dev directory.
To fix this, run ls /dev/video* and note how many are there. Then use the one with the greater number after it in the two commands in the test. This is done like so:

Run sudo modprobe -r v4l2loopback

Then run ls /dev/video* and note the existing cameras like /dev/video0  /dev/video1  /dev/video2 ... etc

Then run:

sudo modprobe v4l2loopback exclusive_caps=1 card_label="MyLaptopCam:MyLaptopCam"

Then run again ls /dev/video* a new camera /dev/video3 will be added like so /dev/video0  /dev/video1  /dev/video2 /dev/video3

Use the new camera in the last two commands instead of /dev/video0 like so:

nc Laptop_IP 9999 | ffmpeg -i /dev/stdin -codec copy -f v4l2 /dev/video3

and
ffplay /dev/video3

Troubleshooting:
To test if the stream is going through if you are having issues with v4l2loopback, you can run on the PC:
nc Laptop_IP 9999 | mplayer -

or
nc Laptop_IP 9999 | vlc -

or
nc Laptop_IP 9999 | ffplay -

To use it with Google Hangouts:
Thanks to @janjaromirhorak as indicated in this comment quoted below.

There might be more ways to do this, but this was my method in Mozilla
Firefox: Open Google Hangouts, start a videocall and allow both
requests for microphone and internal webcam. Then click the cogwhell
icon to open a settings dialog that allows you to choose which webcam
you want to use. Select your virtual webcam, accept the permission
request and click "done". Also this setting seems to persist to future
videocalls - next time I found my virtual webcam already selected and
working. :)


How do I bypass the purple screen to install my graphics drivers?

b43 is a network (wireless) driver, not a graphics driver
That said, you want to add the nomodeset option when you boot to allow you to bypass the purple screen and install the drivers you need.

Press the Shift when booting up, to get the Grub menu. Use the arrow keys to navigate/highlight the entry you want (usually the first one).

Press e to edit that entry, which will show you the details:

Find the linux entry as shown above, use the arrow keys to get to it, and then  press the End key to get to that line's end (which may be on the next line!). Enter nomodeset as shown, and press Ctrl+X to boot to where you can successfully install your graphics drivers.


Is there any on screen keyboard to use on inspiron duo in tablet mode?

Answers to this question: Onscreen keyboard? (like OSX's Keyboard Viewer) May refer to what you are looking for.

Placed here for your convenience:

  xvkbd is an option... http://packages.ubuntu.com/dapper/xvkbd

    xvkbd is a virtual (graphical) keyboard program for X Window System
    which provides facility to enter characters onto other clients
    (softwares) by clicking on a keyboard displayed on the screen. This
    may be used for systems without a hardware keyboard such as kiosk
    terminals or handheld devices. This program also has facility to
    send
    characters specified as the command line option to another client.

  Illustration is from the net.

  The same as matchbox-keyboard-im

    Matchbox-keyboard is an on-screen 'virtual' or 'software' keyboard,
    designed for touch-screen devices running X.

    Matchbox is a base environment for the X Window System running on
    non-desktop embedded platforms such as handhelds, set-top boxes,
    kiosks and anything else for which screen space, input mechanisms or
    system resources are limited.

    This package provides a GTK+ input module for use with
    Matchbox-keyboard or other on-screen keyboards.

  Illustration is from the net

  Both they are in my repositories on Natty but further information can
  be reached on the official websites.

  I remember to have used one of these when installed Jaunty on a Touch
  Screen HP Laptop, and can inform that it works pretty fine.

  I hope this help.

  Good luck!

Additional answers coming from other users can be found in the original question.

Good luck!


How can I update my nodeJS to the latest version?

Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable

To upgrade to latest version (and not current stable) version, you can use
sudo n latest

Fix PATH:
  sudo apt-get install --reinstall nodejs-legacy     # fix /usr/bin/node

To undo:
  sudo n rm 6.0.0     # replace number with version of Node that was installed
  sudo npm uninstall -g n

You may need to restart your terminal to see the updated node version.
Found in David Walsh blog


Script to establish SSH tunnel and then run another program that uses the tunnel

Use ssh -fNT -L 5433:127.0.0.1:19097 username@myserver.com.au to ask ssh to automatically background after establishing the tunnel, and then your script can move on the next command. I suggest you end the script with an exit, which will close the terminal and kill the ssh process; otherwise you must either explicitly kill it or it will exit if/when the server times it out.


Is there a PPA or other repository for recent proprietary ATI drivers?

On my system in 'Additional Drivers' (jockey-gtk), I can choose between:

NVIDIA accelerated graphics driver (version current) [Recommended]
NVIDIA accelerated graphics driver (post-release updates) (version current-updates)

Check if you have any ATI accelerated graphics driver that says '(post-release updates) (version current-updates)'.


Which 12.10 desktop version should I use for HP Prolaint N54L?

You should definitely go with 64 bit, as long you are not going to use any specific 32 bit applications (maybe some old games and so).

Cause it is server - you can install something light (like XFCE xubuntu, or LXDE lubuntu). They are pretty light and will still give you access to rest of the apps from repositories.


Edit this file:
sudo -H gedit /etc/default/grub

Find:
"quiet splash"

Change it to:
"quiet splash hpet=disable"

Then:
sudo update-grub


16.04 LTS Ubuntu boots slowly after dual boot to Windows

Four part fix... Windows hibernation file, fsck, disk NCQ errors, and bad blocks...

Part #1:

If the NTFS drives are mounting as read-only, its probably because Ubuntu thinks their filesystems are unclean, probably due to hibernation, or a damaged file system. Do this...

In Windows...

boot into Windows
open the Power control panel
choose change what the power buttons do
choose change options that are unavailable
uncheck fast startup
close the Power control panel
open an administrative command prompt window
type powercfg /h off
type chkdsk /f c:
approve to run chkdsk at next reboot
type chkdsk /f x: (replacing "x" with drive letters of other visible NTFS partitions)
reboot into Windows to let chkdsk run on drive C:

Part #2:

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

Part #3:

Edit /etc/default/grub

gksudo gedit /etc/default/grub

Change this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

To this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

In Terminal...

sudo update-grub
reboot

Part #4:

Your hard disk may be going bad, and has some bad blocks that it's having trouble reading and reassigning.

Backup your data now!

If Part #1 - #3 don't fix the problem, then continue with Part #4

Don't do the following on a SSD drive!

boot to a Ubuntu Live DVD/USB
start a terminal window

sudo e2fsck -cck /dev/sda5 # try to map out bad blocks
reboot


NetPlan Static IP address not acceptiing

Please try:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      dhcp6: yes
      addresses: [192.168.100.40/24]
      gateway4: 192.168.100.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

In other words, /24 instead of /22 and correct the spacing and indentation. Follow with:

sudo netplan apply

Please post any warnings or errors.


Ubuntu 12.04 I'm trying to ugrade my Geforce 8400 to Geforce GTX 560, getting a black screen

The GTX 560 will draw ~250 watts of power from your power supply while the 8400 is ~70 watts. There technically needs to be 2 x 12 volt + rails at >20 amps to operate that bad boy!

What is the max output of your power supply?


Shell command to enable auto-hide launcher

Try This One:

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-hide-mode 1


Where to get country flag images for keyboard indicator

Three seconds of googling return a set of freely (as in beer) usable flag icons - are these ok for your use case?


Dualboot ubuntu 11.10 and windows 7. Want to make sure grub resume the right OS after hibernate

If you change /etc/default/grub to have the two lines:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

It will always pick the last OS booted, thus bringing up the hibernated OS without your intervention; however, it will also do this even if you didn't hibernate.

(Thanks to @drs305 who wrote the GRUB 2 Basics guide on the Ubuntu Forums.)


I solved the problem by starting the disk with a win xp system (not working in safe mode), I think it did chkdsk automatically, the HD was accessible. Spread out with Lubuntu it was accessible again. Instead fsck from Lubuntu didn't work. The other options didn't work. Thank to FloT.


Problem is default gateway. Try to add second default gw with more metric.

sudo route add default gw xxx.xxx.xxx.xxx metric 200

xxx.xxx.xxx.xxx - in command represent ip address of wireless interface from router

Output from command will show two gw

xxx@xxx ~ $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         213.xxx.xx.xxx  0.0.0.0         UG    0      0        0 eth0
default         192.xxx.x.xxx   0.0.0.0         UG    200    0        0 wlan0
192.xxx.x.x     *               255.255.255.0   U     9      0        0 wlan0
213.xxx.xx.x    *               255.255.255.0   U     1      0        0 eth0


Source-based method will fail (see below), but you can install compiled package from PPA:

sudo add-apt-repository ppa:trebelnik-stefina/cinnamon
sudo apt-get install nemo

and enjoy:

According to PKGBUILD you need to use meson.

So you should download Ubuntu-specific build-dependencies

sudo apt-get build-dep nemo

then download the Nemo source from official repository:

sudo apt-get install git
cd ~/Downloads
git clone https://github.com/linuxmint/nemo.git
cd nemo
git checkout 4.0.3

then install meson and compile the package:

sudo apt-get install meson
mkdir build
cd build
meson

but it will not compile because of old version of xapp library:

  Native dependency xapp found: NO found '1.0.4' but need: '>=1.4.0'

  meson.build:84:0: ERROR: Invalid version of dependency, need 'xapp' ['>=1.4.0'] found '1.0.4'.

So it seems that you can't install it on 18.04 LTS...


How can add the line into etc/sudoers file?

To add a user to the sudoers the correct syntax is:

hduser    ALL=(ALL:ALL) ALL

If you want to add a group is:

%hdgroup   ALL=(ALL:ALL) ALL


Can different users of an Ubuntu machine each have a different VPN connection?

Depends on what VPN is being used, for example OpenVPN has a config dir in the users directly so it would allow seperate profiles and each user would not access the other config drive where the OpenVPN profiles would be imported. Hope this helps.


"All tuners are currently busy" after boot - restarting mythbackend helps

After looking at a few ways to go the simplest workaround was to add  "ExecStartPre=/bin/sleep 15" line into my /lib/systemd/system/mythtv-backend.service file:

[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStartPre=/bin/sleep 15
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1

Thanks to bill6502 at forum.mythtv.org!


How can I install an older version (6.3) of GCC? I need it for MATLAB compatibility

In standard Ubuntu repo you have various gcc versions. Simply type
apt-get install gcc-6 to install gcc version 6.4.


How to install an Ubuntu remix on a separate computer?

Burn the iso (which is a disc image) to a dvd and you will have a live disc you can install your own unique version of Ubuntu from.  Alternatively you can go to system/admin and use startup disc creator to make a live USB and install from that.


Can I create my own Ubuntu 16.04 Live DVD / USB with patches?

Linux Respin is a fork of the original Remastersys , designed to do just that, remaster an ISO.
The deb file, unfortunately, has a dependency problem in 16.04 so you have to compile from the source here.


xdg-desktop-portal-gtk conflict after upgrading to Ubuntu 20.04

Following the idea suggested by Terrance I solved the problem by removing the PPA that caused the conflict. In my specific case, I was able to install the same software from Ubuntu repositories, so I don't need that PPA anymore.


Wallpaper is not changing and right click does not work on desktop in Ubuntu 14.04

I had the exact same problem.
Tried everything in the book!
This is what worked for me.  Hope your problem is solved soon.

gsettings set org.gnome.settings-daemon.plugins.background active true


Fullscreen Restarts Ubuntu 18.04 if using two displays

I am guessing the video out is using a different display driver/hardware compared to the built in mointor. Check the syslog and dmesg to see if you can get any good hints of where the system is having and issue, is this a surface or laptop?


Choose 11.10 or 10.04 for file, and proxy servers?

10.04 will be supported until April 2015. 11.10 will only be supported until April 2013. 10.04 has been in use for a longer period of time, which means it'll likely be more solid and secure. Using the newest versions is not always a good idea. In fact, I would recommend using the oldest supported software possible for services like that.


Ubuntu Server replace Windows 7 as my home server?

Yes, install ssh and sshfs on the server, so you can access it remotely and copy files on it via internet.
Then, install samba filesharing, so you can access network shares from your windows machine.
If you want to be able to access your windows files from the internet, you need to install a webserver that supports webdav + webdav itselfs.

You can generate a ssh-key so you don't need to enter the password.

ssh-keygen -t rsa -b 4096

echo /home/username/.ssh/id_rsa.pub

login to your server via ssh.

cd /home/username/.ssh/
cat "OUTPUT FROM echo id_rsa.pub" >> authorized_keys

you can mount a sshfs file system like this:

mkdir -p /mnt/sshfs
sshfs 192.168.1.x:/ /mnt/sshfs

then you can access the server file system via /mnt/sshfs

You can also use x-forwarding:

ssh root@192.168.1.2 -X

Then you can start whatever graphical application on your console-only server.

Here are two minecraft server tutorials
https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux
http://minecraft.gamepedia.com/Tutorials/Setting_up_a_server#Linux_instructions

And this is how to setup teamspeak
http://www.howtoforge.com/how-to-install-a-teamspeak-server-on-ubuntu
http://ubuntuforums.org/showthread.php?t=236834


how to allow VMs and host ping each other?

Change NAT to Internal Network :

Select your VM
then press Setting
then Network.

Now you can see adapter attached to your VMs , to make all machine able to ping each other select Internal Network, that make a connection between all VMs , to ping the computer host select Bridge Adapter , then select the interface.


Check if your system is running (switch to a text terminal or try to ssh to your box)
bumblebee is not needed any more, just bbswitch.

I get also this black screen after every start of the X-Server, I suppose there is something broken with the initialization of the screen, most of the time this gets fixed, when I push the system to standby and back to operation, then the screen gets a proper set up.


Is There A Security Risk With Users That Are Also Groups?

In your example you:

Have  the user user1 as a part of the group user2.
Have  the user user2 as a part of the group admin.

The user user1 is distinct from the group user1.

Since (the user) user2 is a member of the admin group, and (the user) user1 is a member of (the group) user2 - is user1 effectively an admin?

No, the user user2 is a member of the admin group. Not the group user1.

If the admin group is in the sudoers file, can (the user) user2 use it as well?

Yes, just as the other users which are members of the group, jim and bob.

If the admin group is in the sudoers file, can user1 use it as well?

No, since the admin group only consists of users. It has the user user2 in it. Even though the user user1 is part of the group user2. They are different things, but share the same name in this and many distros setup. Groups on one side, users on the other. If the names match, they are still entierly different things.

To sum it up: Separate the user from the group. The names may be the same, but they refer to different entities. In GNU/Linux you do not have groups inside groups, a group can only contain users (which is different from say Windows).


I was having the same problem wiht same errors after upgrade on a ThinkPad X220. I've solved the problem installing bluez-utils:

sudo apt install bluez-utils


Change Plymouth Splash Screen.

This is the initial splash screen you see at bootup. Different Plymouth themes can be found by searching for plymouth-theme in a Package Manager. Install a new one and manually select the theme you wish to use. The default Ubuntu theme is already installed.

sudo update-alternatives --config default.plymouth
sudo update-initramfs -u


After enquiring on the Google product forums - it appears that the problem has been solved by turning on hardware acceleration in

chrome://flags

Other programs where the issue occurs only use software rendering, and there's no option to change to hardware acceleration, so are effectively unsolvable.


Splash screen with rEFInd on a MacBook Pro 8.1

Boot to Linux and run the mkrlconf.sh script that comes with rEFInd. (If you installed rEFInd from the Debian package, it will be on your path. If you installed rEFInd in OS X, you'll need to extract it from the .zip file that you presumably used under OS X.) This will create a file called /boot/refind_linux.conf, which will hold additional kernel options, probably including the ones needed to create the splash screen. If that doesn't do the trick, then you can edit /boot/refind_linux.conf manually; you probably want to add quiet splash to the default (first) set of options in that file.


How to create a persistent live on a file (disk image)?

Install virtualbox:

sudo apt install virtualbox

Start by creating a file of the desired size:

fallocate -l 3900M my-virtual-usb-stick.img

start virtualbox:

sudo virtualbox

Create a virtual machine with a virtual disk on which you will install Linux and mkusb using the graphical interface. Or start an iso image with mkusb built-in.

Attach (with virtualbox GUI) to that virtual machine a usb storage disk my-virtual-usb-stick.vmdk created with the following command in a terminal (CTRL+ALT+t):

sudo VBoxManage internalcommands createrawvmdk \
     -filename ./my-virtual-usb-stick.vmdk \
     -rawdisk ./my-virtual-usb-stick.img

then Start the virtual machine, download the Linux iso file and use mkusb with the virtual usb drive.

Once done, stop the virtual machine and quit virtualbox.

Then you can dd your image to a real usb stick (Replace the X with your drive letter):

dd if=./my-virtual-usb-stick.img of=/dev/sdX bs=4M status=progress

Reboot with your usb stick, and it works !


User Solved in Edit:

  I just needed to modify the file permissions


To install Gimp 2.8.10 on Ubuntu 12.04, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp

Source:Thorsten Stettin


What is happening when I run a persistent storage live USB from RAM?

The boot option toram makes the system read everything from the system image into RAM during boot. It means that the boot process in slower, but after that the system will be fast. It also means that /cdrom need not be mounted, and if it is a live-only drive, it can be removed or overwritten (for example installed into). But if there is a casper-rw partition or file there and you are running a persistent live session, obviously it is a bad idea to remove the drive.

Otherwise (without toram) the system image is mounted at /cdrom and programs and data are read from there, when needed (which is slower than to read from RAM).

The persistent overlay, which is read from casper-rw is managed independently of the toram boot option.


If you encounter a similar issue, this should be the solution below (as solved by OP themself):
It is probably caused by an old guix-daemon systemd file in /etc/ from a previous manual binary installation.

Delete this file (the old guix-daemon systemd file).

Run the following commands on your terminal to reload daemon and restart guix-daemon:
$ systemctl daemon-reload
$ systemctl restart guix-daemon

Everything should be OK now.


Tata photon max Wi-Fi Data card is not working in ubuntu 14.04 LTS. Please Help!

I'm using a Tata Photon card myself. It was installed in 13.10 and is still working when i upgraded to 14.04.
Try starting the Photon connection manager from terminal and paste the output here.

That would help in tracking the problem.


How to set Option "DRI" "?" in Intel integrated graphics chipsets driver Ubuntu 16.04?

Well, it seems the web advice to use Option "DRI" "n" (where n = 2 or 3) is incorrect according to man pages.
Additional man pages found since the original posting are http://manpages.ubuntu.com/manpages/precise/man4/intel.4.html
and
 http://manpages.ubuntu.com/manpages/precise/man5/xorg.conf.5.html

In the former link, as with the older man page link (see original post above), the "DRI" option is already enabled for hardware that can handle it:

  Option "DRI" "boolean"
                Disable or enable DRI support.

          Default:   DRI   is  enabled  for  configurations  where  it
          is supported.

and in the latter, if one wanted DRI 2 enabled, one would make an entry in 20-intel.conf as Option "DRI2" "true", since it is disabled by default.

This is according to the xorg.conf man page (last link):

  Option "DRI2" "boolean"

  enable or disable DRI2. DRI2 is disabled by
                             default.


Definitive guide to network and dns configuration on Ubuntu 18.04 workstation?

In short... you actually have multiple questions...

NetworkManager vs Netplan

In older versions of Ubuntu, NetworkManager was king.
In newer versions of Ubuntu, Netplan and systemd-resolved tries to be king.

Unless you're running a server, I'd recommend staying with NetworkManager.

$ cat /etc/netplan/01-network-manager-all.yaml

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

further netplan examples can be seen here.

dnsmasq vs systemd-resolved

In older versions of Ubuntu, dnsmasq was king.
In newer versions of Ubuntu, systemd-resolved tries to be king.

If you must run them both, you'll want to modify the following, or DNS errors will occur.

Do a ps auxc | grep -i dns and ps auxc | grep -i resolv and look for dnsmasq and systemd-resolved, and if both are running, you need to disable the DNS part of systemd-resolved by editing /etc/systemd/resolved.conf and...

change:

#DNSStubListener=yes

to:

DNSStubListener=no

/etc/resolv.conf

Do NOT manually edit this file.
if this file contains 127.0.0.1, then dnsmasq is managing this file.
if this file contains 127.0.0.53, then systemd-resolved is managing this file.
if you wish to add specific DNS servers, use the GUI for "Wired Connection", or your wireless connection profile.


Running a script at startup that uses xrandr to set display options

What you usually need to do in these situations is adding a small break in the command after login. Add this to your Startup Applications:

/bin/bash -c "sleep 15&&xrandr --output DFP10 --rotate left && xrandr --output DFP11 --right-of DFP10"

(If that is the normally working command)

The reason is that most likely the command is performed too early, while the desktop is still loading. It will break then.

You can experiment a little with the sleep 15 duration to see what is needed or possible.


gnome-screenshot area clipboard not working on Ubuntu 17.10

One solution is to use X.Org. You can select in in the login screen settings.

Ubuntu 17.10 uses Wayland display manager by default instead of X.Org. Not all applications support Wayland. Issues can be seen especially with screen sharing/recording software and like.


Error with Canon imageclass D480 driver in Ubuntu 12.04 x64

For Ubuntu 14.04 - x64

Install the following files in addition to Canon UFR drivers

sudo apt-get install libxml2:i386 libjpeg62:i386 libstdc++6:i386

Thanks to pdc on ubuntuforums.

http://ubuntuforums.org/showthread.php?t=2265278


Is there a way to download all of my Ubuntu One files?

If you simply install the Ubuntu One client on the new computer, log in with it to your account, and subscribe to all the folders you have on the server, it will download everything to the new machine.

There is no way to download all your data directly from the web site currently, via a zip or similar file.

Also note that Ubuntu One is more than only a file sync service, as there is also u1db for synchronization of structured data, which apps can use, and which may not be directly accessible via the web site at all, depending on what data is stored there. Accessing any data from apps which use u1db will also require installing them and associating them to your Ubuntu One account, so that they can sync up on the new machine.


If this is a Desktop(seems so from your question)
Then the simplest way is to detach the SATA drive while installation(if you can do it safely) otherwise
While installing ubuntu select the option
something else option
Then you will see the partition menu as follows

If you have connected two hard disks then you will see two devices as /dev/sda /dev/sdb. You will have to identify which is the blank IDE drive. It is very simple..the one which has some ntfs partitions on it is a SATA drive. while the one which shows completely unallocated space is your blank IDE drive. You can select the blank IDE drive and make partitions on it and then below in
Device for Bootloader installation
select your IDE hard disk(/dev/sda or /dev/sdb)
Once installation is complete you can restart your computer and at the time of booting just go to BIOS and select which hard disk you want to boot from. IF you select your SATA HDD then it will directly boot to windows, if you select your IDE HDD then it will show you grub menu(if it is not hidden :p)
Hope this helps!


As a Canonical customer, You would have access to their support team - see Ubuntu Advantage.

As a Community member, you can report issues here in AskUbuntu, or by filing bugs in Launchpad.

If you are evaluating a purchase, your sales rep can also help get the team's attention focused on a particular issue.


HISTCONTROL only affects new hist lines.
What I think the author what is a way to edit the existing hist file.

nl ~/.bash_history | sort -k 2 | uniq -f 1 | sort -n | cut -f 2 > temp_file
followed by
temp_file > ~/.bash_history

This should preserve line order, while removing dups from the existing hist file.
May leave behind ghost time-stamps, if you have turned on time-stamps.
If you have that issue, comment, and I'll whip up a second clean up for those.


Merging two Ubuntu partitions while keeping the data

/dev/sda7 is your primary Ubuntu partition - look at the mount-point! It is / (root).
You do not want to move this partition!

You have 2 gal-partitions one Windows NTFS, and your sda6 ext4 linux partition. The fastest way to move your sda6 files to your root (/ sda7) partition is to create a folder in your home-directory, copy all files from sda6 to this folder, verify that they are there, then dismount sda6 and delete it from Gparted!
Then reboot on a live ISO (we can not make changes to a mounted partition) - start Gparted and extend your ext4 partition into the unclaimed space(former sda6) (sda7 might have an other name after booting the live ISO probably sdb?)
Reboot into Ubuntu and your partition should be 90+GB now (85+ GB from sda6 and 5 unclaimed).
Good luck and happy Ubunting.


Print specific words/numbers via grep/cut commands

This should be a simple cut job:

cut -d/ -f5,6 --output-delimiter=" "

-d/ sets the input delimiter as /
-f5,6 outputs only the 5th and 6th field
--output-delimiter=" " sets the output delimiter as a space

Same thing with awk, awk by default sets the output field separator as space:

awk -F/ '{print $5,$6}'

Example:

% cat file.txt
service_name1= apple/ball/cat/dog/egg/12.34.56/ball/apple
service_name2= fan/girl/house/ice/joker/23.45.67/fan/girl

% cut -d/ -f5,6 --output-delimiter=" " file.txt
egg 12.34.56
joker 23.45.67

% awk -F/ '{print $5,$6}' file.txt
egg 12.34.56
joker 23.45.67


efibootmgr - Moving Win10 from one drive to another, w/ EFI on different drive

You cannot have duplicate UUIDs or GUID/partUUID that efibootmgr uses.
Disconnect sda, before trying any updates to avoid confusion of which device is which. Some example efibootmgr entries:
Sony, HP & others workarounds:
Dual boot Win 8 / Ubuntu loads only Win
You have to use /dev/nvme & correct drive, partition. Like this but check if correct drive/partition, compare GUID in UEFI boot entry and partUUID from lsblk. That will tell which ESP you are using to boot from.
sudo efibootmgr -v
lsblk -o name,mountpoint,label,size,fstype,uuid,partuuid | egrep -v "^loop"

sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\Microsoft\Boot\bootmgfw.efi" -d /dev/nvme1n1 -p 1

Grub only boots working Windows. Windows will turn fast start up back on and then grub will not boot it, so best to fix UEFI boot entry to boot Windows directly.
Grub2's os-prober looks for .efi boot files in the ESP to find other installs to boot. It is not using UEFI entries.


apt-get remove --purge wine* removed everything!

This particular problem bit me too. apt-get remove wine told me wine was not installed, while which wine and wine version were still functional. wine-devel and multiple other packages were installed though and you don't want to type them all one by one.

It's especially frustrating as you look at the list and actually see a lot of wine software getting removed as expected (as the list is displayed alphabetically they come close to last and take nearly the whole screen) and then hit Y.

Both answers provided here are wrong and it is not a misuse of the wildcard. It is beautifully explained in gertvdijk's answer to What is the correct way to completely remove an application?

The issue comes from apt-get interpreting the input as a regular expression and therefore interpreted the asterisk as "zero or more times" and not as the expected wildcard, resulting in removing any packages that contain the string win and any package that depends on such a package (which basically uninstalls nearly your whole system).

The command that would've done what I expected would've been

apt-get remove --purge 'wine.*'

That removes all packages whose names contain wine.


Total newbie wants to know - Ubuntu Tweak - changing the computer name

Change hostname on this way

sudo gedit /etc/hostname

And change name

You should also edit /etc/hosts and change the line

127.0.1.1     your-old-hostname


no boot disk has been detected ubuntu 14.04

I've had this happen if I create a USB drive WITHOUT first erasing it completely. I first made the mistake of just copying the ISO image to the drive and trying to boot it. Then I got smart  and used Disk Utility (on a Mac) to erase the drive fully, then the application "unetbootin" to create the bootable USB using a downloaded ISO image.


How to turn off display without turning off the keyboard blacklight?

You can turn display backlight.

Turn backlight off:

echo 0 | sudo tee $(find /sys/devices -path '*backlight/brightness')

Turn backlight on:

cat $(find /sys/class -path '*backlight/max_brightness') | \
sudo tee $(find /sys/devices -path '*backlight/brightness')

Explanation:

Find brightness interface of your display:

find /sys/devices -path '*backlight/brightness'

Set brightness of display to 0 with sudo privileges:

cat 0 | sudo tee <display brightness>

Get max_brightness of display:

cat $(find /sys/class -path '*backlight/max_brightness')

Set brightness of display to max_brightness with sudo privileges:

cat <max_brightness> | sudo tee <display brightness>


Problem with sound volume on 20.04 and B450 AORUS ELITE

No idea what's the problem but it's definitely related to the embedded sound card - it does not provide a good quality of sound.
Today I've tested two USB dongles and Creative HS-1200 and it all works sound, quality of the sound is very good.


What is the difference between different "compression" systems?

tar stands for tape archive.  All it does is pack files, and their metadata ( permissions, ownership, etc ) into a stream of bytes that can be stored on a tape drive ( or a file ) and restored later.  Compression is an entirely separate matter that you used to have to pipe the output through an external utility to compress if wanted that.  GNU tar was nice enough to add switches to tell it to automatically filter the output through the appropriate utility as a shortcut.

Zip and 7z combine the archiving and compression together into their own container format, and they are meant to pack files on a DOS/Windows system, so they do not store unix permissions and ownership.  Thus if you want to store permissions for proper backups, you need to stick with tar.  If you plan on exchanging files with Windows users, then zip or 7z is good.  The actual compression algorithms zip and 7zip use can be used with tar, by uzing gzip and lzma respectively.

lzma ( aka. *.xz ) has one of the best compression ratios, and is quite fast at decompression, making it a top choice these days.  It does however, require a ton of ram and cpu time to compress.  The venerable gzip is quite a bit faster at compression, so may be used if you don't want to dedicate that much cpu time.  It also has an even faster variant called lzop.  bzip2 is still fairly popular as it largely replaced gzip for a time before 7zip/lzma came about, since it got better compression ratios, but is falling out of favor these days since 7z/lzma is faster at decompression and gets better compression ratios.  The compress utility, which normally names files *.Z, is ancient and long forgotten.

One of the other important differences between zip and tar is that zip compresses the data in small chunks, whereas when you compress a tar file, you compress the whole thing at once.  The latter gives better compression ratios, but in order to extract a single file at the end of the archive, you must decompress the whole thing to get to it.  Thus the zip format is better at extracting a single file or two from a large archive.  7z and dar allow you to choose to compress the whole thing ( called "solid" mode ) or small chunks for easy piecemeal extraction.


How do I open a file that leads into the Terminal?

Some of the extension you can use in Save As when using a text editor, you can use .bat, .sh, .txt.

You can also use xdg-open it opens a file or URL in the user's preferred application.

You can also right click on the file from Nautulis, and choose open in terminal, and if its openable in terminal it will open.  To have that added to Nautilus, just look at
Add Open in Terminal Command to Nautilus Context Menu


How can I expand a partition into non adjacent free space using GParted?

You must run gparted from a livecd because you will be moving the partitions.

Backup your data (there is an high
risk if something goes wrong during
partition changes)
Move sda3 to the beginning of the
unallocated space
Move sda4 to the
    beginning of the unallocated space
Resize sda4


Is plexydesk supported on Ubuntu 14.04.3 LTS (Trusty)

Based on launchpad.net as well as the the official website it is only available for 15.04, 15.10 and 16.04 version of Ubuntu.

Yet you might be able to make use of its source code which is still unstable but available here.


Change Ubuntu 17.04 to Ubuntu 16.04.2 LTS

The best way is to re-install Ubuntu, so that you have a clean installation, without conflicts.

You need to have an installation CD/DVD/USB of Ubuntu 16.04.2 LTS.

Then backup your relevant files, just copy them to an external drive
or a secondary partition.
Then run the installation CD/DVD/USB.
On the installation select "Erase Ubuntu xx.xx and reinstall"

For more info check:

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

https://www.ubuntu.com/download/desktop/create-a-usb-stick-on-ubuntu


I suggest you take a look at the question "Reset gnome font configuration?" which has an answer saying how to reset the GNOME font configuration, which I include a summary of below.

Try running the following in a terminal (Applications->Accessories->Terminal):

gconftool-2 --unset /desktop/gnome/interface/font_name
gconftool-2 --unset /desktop/gnome/interface/document_font_name
gconftool-2 --unset /desktop/gnome/interface/monospace_font_name
gconftool-2 --unset /apps/metacity/general/titlebar_font
gconftool-2 --unset /apps/nautilus/preferences/desktop_font


apt-get keeps wanting to download a package, overriding my decision

nvidia-330 (actually, all nvidia-3XX packages from nvidia-310 onwards) are transitional packages that actually install nvidia-340. If you want an older driver, use nvidia-304 instead.


Ubuntu 18.04: hibernate with 2 swap partitions, or 2 swap files, or 1 of each, which do I resume from?

Just a few tidbits to consider...

In the best case scenerio, swap is not used at all. Use of swap is slow because of the speed of the devices that they're located on (HDD typically). The "I can feel the speed" is due to the additional RAM, not swap.

If you have a modern SSD, it's best to place one /swapfile on it, and to remove any swap partitions in use. Edits to /etc/fstab required.

If /etc/fstab, swap partitions are best referred to by UUID (UUID=xxx), rather than labels (LABEL=TSWP) or by device (/dev/sda2). Swapfiles are best placed in the root directory (/swapfile) rather than on removable media (/media/sdata/.swapfile), and not created as hidden.

In a non-hibernate situation, the swap size with 16G RAM might be in the 4-8G range. In a hibernate situation, the swap needs to be larger than physical RAM, in the order of (1.2-1.5)*RAM.

You should edit /etc/initramfs-tools/conf.d/resume to specify the resume swap... using your own UUID... like this...

RESUME=UUID=071f8b0e-8e16-4f4d-90ff-a4ae9cc56e2b

Then create a new /boot/initrd.img* file with:

sudo update-initramfs -c -k $(uname -r)

With 16G RAM, it's advantages to set vm.swappiness kernel parameter such that more RAM is used, and less swap is used.

To temporarily test this:

sudo sysctl vm.swappiness=10 # default is 60

To make a permanent change:

sudo sysctl -w vm.swappiness=10 # write value to /etc/sysctl.conf

sudo sysctl -p # load /etc/sysctl.conf

Lastly, after adding RAM, a memory test should be run to confirm good memory, and successful addition to memory slots. Go to https://www.memtest86.com/ and download/run their free memtest to test your memory. Get at least one complete pass of all the 4/4 tests to confirm good memory. This may take many hours to complete.


Ubuntu 18.04 update-rc.d doesn't do the right thing

I was facing the same issue. Using the systemctl command solved it.

sudo systemctl enable vboxautostart-service


Canon i560-Paper size error-with printer driver

Issue fixed in updated CUPS drivers.
If not try this:

go to System Settings -> Printing
right click the printer and select properties
In Settings click the change button next to Make and Model
select "select printer from database" and choose "Canon (recommended)" and click Forward
Then select i850 (the option below the recommended one) and click forward
Select "Use the new PPD as is" option and press apply

That did the trick with me.


'unknown filesystem' grub rescue prompt; trying to wipe drive and boot 10.10 live

None of the common automated tools for creating an Ubuntu LiveUSB use grub2 (instead they use syslinux) so your immediate and likely only problem is that you're not actually booting from the Ubuntu LiveUSB but from a different drive (likely your internal hard drive).

Make sure that the USB drive is first in the boot order in your BIOS.


Ubuntu components include the StateSaver capability.  This allows QML properties to be saved at program exit and restored at restart.  For each element with properties you wish to save, set the StateSaver.properties property to a comma separated list of the properties that should be saved.

However, there are two enormous limitations of the StateSaver.  First, state will not be restored if you program is launched through the Uri handler.  Second, no state will be saved when your program is "closed properly".  I have no idea what counts as closing properly, and therefore I don't know how to test this.

As I was trying this out, I stumbled on something strange: If you set a StateSaver property on an element, Component.onDestruction gets called.  When I added to the main Page of a test app,

StateSaver.properties: "title"
StateSaver.enabled: false

my destruction handlers started getting called, at least on normal exits.  You may be able to combine this with the StateSaver to ensure state gets saved on both normal and abnormal exits.  I don't know that you can count of this behavior, though.  I suspect it may be an accident of the StateSaver implementation.

Another approach would be to save state every time something changes.  This ensures you don't have to do anything on exit; your state is already safe.  One problem with this approach is that state changes are often associated with changes in the app itself, and the saving process could induce sluggishness.  I ran into this sort of problem, so I delayed the database write by one second.  This is imperfect, since I would lose state if the program crashes during that second.  But I felt that the risk was small enough, and the change in state inconsequential enough, to make this acceptable.


No, GoToWebinar doesn't support Linux as of yet.

There is hope, since GoToMeeting has a working WebViewer with requirements. But as of right now there is no support for GoToWebinar.


Your media keys are likely working fine. However, they control your default music player which—judging by the overlay—isn't launched, or has nothing in the playlist.

RadioTray can't be added as the default music player, unfortunately, because it doesn't support the MPRIS API Ubuntu uses for extra-application media controls. The status of that issue can be tracked here, it seems.


From your "file" output, the interpreter is /lib/ld-linux-armhf.so.3
apt-file search /lib/ld-linux-armhf.so.3

will give you the package
libc6-armhf-cross, so install that, but that's from my x64 system.
Look at ldd itself, and see what the RTLDLIST= line looks like, and pick out the loader you need (maybe just /lib/ld-linux.so.3).


How can I install PDFedit on Ubuntu 14.04?

You can find the pdfedit for Linux at:

http://sharadchhetri.com/2013/12/29/install-pdfedit-for-editing-pdf-file-in-ubuntu/

The current Ubuntu dropped support for the libqt3-mt library.  Currently you can add it by editing your /etc/apt/sources.list and adding the lines:

# libqt3-mnt
deb http://old-releases.ubuntu.com/ubuntu lucid main

Then run:

$ sudo apt-get update
$ sudo apt-get install libmng1 libqt3-mt

Now you can install the pdfeditor with (choose either 32b or 64bit):

Install pdfedit (32bit)

$ wget http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pdfedit/pdfedit_0.4.5-2_i386.deb
$ sudo dpkg -i pdfedit_0.4.5-2_i386.deb

64 bit version:

Download and install pdfedit

$ wget http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pdfedit/pdfedit_0.4.5-2_amd64.deb
$ sudo dpkg -i pdfedit_0.4.5-2_amd64.deb


Your script is totally fine, there are just some minor things I’d change:

xmodmap allows you to specify multiple expressions per command line, so instead of calling it four times your can call it only once per function
printf "%s\n" "$slock" won’t print an empty line if slock is empty
grep -oP 'Scroll Lock:\s*\K\w+' does the same as your sed command, but if you insist on using sed:

sed -nr 's/.*Scroll Lock:\s*(\w+).*/\1/p'

while : is the same as while true – it’s a matter of taste I guess

Script with changes

#!/bin/bash
xmodmap -e 'add mod3 = Scroll_Lock'

arrow() {
  echo "arrow mode"
  xmodmap -e "keycode 111 = Up NoSymbol Up" \
          -e "keycode 116 = Down NoSymbol Down" \
          -e "keycode 113 = Left NoSymbol Left" \
          -e "keycode 114 = Right NoSymbol Right"
}
page() {
  echo "page mode"
  xmodmap -e "keycode 111 = Prior NoSymbol Prior" \
          -e "keycode 116 = Next NoSymbol Next" \
          -e "keycode 113 = Home NoSymbol Home" \
          -e "keycode 114 = End NoSymbol End"
}

arrow
trap 'arrow; exit 255;' EXIT SIGINT

printf "%s\n" "$slock"
while :; do
  slock="$(xset -q | grep -oP 'Scroll Lock:\s*\K\w+')"
  if [ "$slock" != "$slock0" ]; then
    slock0="$slock"
    if [ "$slock" = "on" ]; then
      page
    else
      arrow
    fi
  fi
sleep 0.5
done

I suggest to even change the delay to sleep 1 – personally, I find that by far fast enough, and it saves your machine half the calls. Try what suits your needs.


sudo apt --reinstall install rtorrent

fixed it in this case. OP was runnig a version manually built from source before, but when libcrypto.so.1.0.2 was not available on the system any more due to an update it refused to work. Installing rtorrent from the package sources solves the problem in such a case. For 16.04 this has no downsides as package sources hold version 0.9.6, which is the most recent one at the moment. However, if there is a non-package-system version installed it's a good idea to remove this first before installing the package version, to avoid collisions and keep the system clean.


How can I use "udhcpc" with "avahi-autoipd"?

Referring to the udhcpc documentation, it supports a callout script and will indicate when a lease is gained and lost.  You would need to look at customising this script to call and kill avahi-autoipd as appropriate.

There is no pre-existing integration for this that I am aware of but it would not be difficult.

https://udhcp.busybox.net/README.udhcpc


How to prevent Graphics mode from running

You need to edit the file /etc/default/grub You will need root privileges.

Look for GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and replace with GRUB_CMDLINE_LINUX_DEFAULT="text"

Now sudo update-grub to update grub configuration and you are set to go.


If you're looking for an overarching feedback on an idea you should post on the ayatana mailing list.

If it's a specific feature requestion you can file a bug on Unity and mark it Wishlist.


How to check if one is using a raspberry pi?

sudo lshw will list all hardware available on that system and thus at least allow an educated guess as to whether the box contains a Raspberry Pi.

Anyway, if the system in that box is running Ubuntu, it won't be a Raspberry Pi, since Ubuntu does not support its CPU.


Can't see 14.04 server VirtualBox guest from OS X host

192.168.56.101 is an address given by virtualbox's internal DHCP server if you select host-only networking, but it doesn't mean that it will magically be able to communicate with your host system, this needs some extra configuration to ensure that routes are properly set up. The easiest way to get host and guest to talk to each other is to select bridged networking, in this case the guest (VM) will appear to be connected to the same network as the host. This depends on having a DHCP server on your home or work network to assign an address to the VM which will appear like just another computer on the network. Either that, or configure an IP address for it manually.


Ubuntu 14.04 hangs on boot after starting CUPS

The problem turned out to be with lightdm after an upgrade.

I was able to get it working with the following commands:

sudo apt-get install ubuntu-session (I'm not sure if this is needed, I ended up not using lightdm anyway)

sudo apt-get install gdm (Select gdm from the list)

sudo dpkg-reconfigure lightdm (Select gdm from the list)

reboot

This solution ends up with GDM as the display manager for Ubuntu, but I like the look and it runs better on my machine.

Some links that may be useful:

General "Computer boots to black screen" problem troubleshooting


NVIDIA GeForce drivers break Unity in Ubuntu 13.04

As I know GT540M is optimus graphical card. Next time install Bumblebee.

sudo add-apt-repository ppa:bumblebee/stable

sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia

to run some app with GT540M:

optirun executable_app

To solve you problem: remove drivers that you installed.


How do I install it on my notebook? it has no CD

I suggest you to re-create your USB drive:

download an Ubuntu version from here (you can try both 12.04 and 13.04)
reformat your USB drive to FAT32
create the bootable Ubuntu USB flash drive:

from a Ubuntu PC ( I recommended this solution )
or from a Windows PC

configure your computer to boot from USB flash drive and boot from it.

Well the detailed instructions are here....


Your disk wasn't unmounted correctly at last shut-down, maybe because you cut the power instead of shutting down normally. The io's that was pending at the time of shut-down has to be replayed from the journal, and leftover inodes and datablocks in the filesystem has to be cleared.


Confirmed on new Ubuntu 12.10 i686 installation, with initial user account.

guinan@x100e:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="12.10, Quantal Quetzal"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu quantal (12.10)"
VERSION_ID="12.10"

guinan@x100e:~$ arch
i686

guinan@x100e:~$ ls -l .bash_history
-rw------- 1 root root 302 Mar 12 13:19 .bash_history

guinan@x100e:~$ less .bash_history
.bash_history: Permission denied

guinan@x100e:~$ rm .bash_history
rm: remove write-protected regular file `.bash_history'? y

$ xterm
[ $ echo Hi there. ]
[ $ exit ]

guinan@x100e:~$ ls -l .bash_history
-rw------- 1 guinan guinan 15 Mar 13 13:48 .bash_history

guinan@x100e:~$ cat .bash_history
echo Hi there.


Ubuntu-drivers-common don't recognize nvidia-driver-450

The ubuntu-drivers utility is supposed to show drivers provided by Ubuntu.

It shows manual_install: True. This means that you have a manually installed driver. That seems really to be true ;-)

I see no problems anywhere.


To install a BURG theme

gksudo nautilus

Browse to the downloaded archive file and double click - Extract the archive to /boot/burg/themes.

If there is an icon folder inside the archive, then extract the icon files to the folder /boot/burg/themes/icons

Update burg by

sudo update-burg

source


I found this stackoverflow post, which leads to the documentation on the run function of a GtkDialog, where it states:

  The run() method blocks in a recursive main loop until the dialog
  either emits the "response" signal, or is destroyed. If the dialog is
  destroyed, the run() method returns gtk.RESPONSE_NONE; otherwise, it
  returns the response ID from the "response" signal emission. Before
  entering the recursive main loop, the run() method calls the
  gtk.Widget.show() on the dialog for you. Note that you still need to
  show any children of the dialog yourself.

  During the run() method, the default behavior of "delete_event" is
  disabled; if the dialog receives a "delete_event", it will not be
  destroyed as windows usually are, and the run() method will return
  gtk.RESPONSE_DELETE_EVENT. Also, during the run() method the dialog
  will be modal. You can force the run() method to return at any time by
  calling response() to emit the "response" signal. Destroying the
  dialog during the run() method is a very bad idea, because your
  post-run code won't know whether the dialog was destroyed or not.

  After the run() method returns, you are responsible for hiding or
  destroying the dialog as needed.

And also from the PyGTK 3 tutorial:

  Finally, there are two ways to remove a dialog. The Gtk.Widget.hide()
  method removes the dialog from view, however keeps it stored in
  memory. This is useful to prevent having to construct the dialog again
  if it needs to be accessed at a later time. Alternatively, the
  Gtk.Widget.destroy() method can be used to delete the dialog from
  memory once it is no longer needed. It should be noted that if the
  dialog needs to be accessed after it has been destroyed, it will need
  to be constructed again otherwise the dialog window will be empty.

So following on from those bits of information, if you call the hide function of the dialog before it receives the delete event, it will not be destroyed and you can keep calling run, to bring the dialog to focus.

e.g.

def on_mnu_test_dialog_activate(self, widget, data=None):
    result = self.TestDialog.run()
    if result == Gtk.ResponseType.OK:
        print "The OK button was clicked"
    self.TestDialog.hide()

Also, just to answer your second question.

In my example I have imported the class for the dialog:

from dialog_show.TestDialog import TestDialog

Then in the finish_initializing function, I created an instance variable for the dialog:

self.TestDialog = TestDialog()

I can then access a properties like so:

self.TestDialog.ui.txt_entry1.get_text()

or, as suggested by John,

self.TestDialog.builder.get_object("txt_entry1").get_text()


My script is

if [[ $(lpstat -t) = *192.168.X.XXX* ]]
then
    echo "Printer Already installed"
else
    hp-setup -i -a 192.168.X.XXX
fi


Try sudo shutdown -h now. This should work.


Easiest way to prevent Facebook from spying on where I surf on the web

Facebook mainly uses the Facebook Like buttons installed on the web pages you visit to track where you went and are. This button injects an iframe that stores cookies on your computer, and cross references all the web pages you visit.

To prevent this, I'd recommend the Adblock Extension, which, alongside blocking advertising on the pages you visit, has an option to block social network like buttons.

Adblock: https://getadblock.com

If you are really really nervous (read: paranoid, in a good way), use the  Tor browser. https://www.torproject.org/projects/torbrowser.html.en


Go to Applications -> Software center then install ubuntu-netbook and after installation logout and select Ubuntu Unity Netbook Edition


Customize pop-up indicator position and size for power and volume

Better OSD is what you're looking for. It works very well on Ubuntu 18.04.
It is a Gnome extension, that is available via Ubuntu Software too.
After installing it via Ubuntu software, you can access to its settings via Gnome tweaks>Extensions (if you don't have Gnome Tweaks, you can install it from Ubuntu Software too).
Here are some screenshots of what I got after playing around with the extension settings:

You can even resize the volume indicator

PS: If it doesn't work for you directly after installing it, you may need to restart the gnome shell environment ("logout and login again", or Alt+F2 then R then Enter)


How do I have desktop always display favorites bar (Ubuntu Dock) on left?

The always visible "favourites bar" is provided by the GNOME shell extension Ubuntu Dock (package name: gnome-shell-extension-ubuntu-dock). As per GNOME's security policy, whenever your system is suspended (goes to sleep), all the extensions get disabled automatically until you get back in, and then the extensions get re-enabled. Somehow it's failing here for the Ubuntu dock extension in your case.

As a temporary workaround either restart your system (or log out and log in again) or simply restart GNOME shell by pressing Alt+F2, then typing r, and finally hitting Enter.


Can I install Ubuntu 15.04 (Vivid Vervet) in place of Ubuntu 14.04 LTS and keep all my data (media, documents, etc)?

If your /home is on a different partition you can just install it.
Choose smoething else at partitioning and select you current /home as /home mountpoint. Do not tick reformat!
Choose your current / as / mountpoiny, tick reformat here.

If your /home is on the same partiotioin as / you have two options:

Do a backup of your /home and copy the data back after the fresh install.

Or shrink your partition and create a new one for /home, copy your /home there and then select it druing as /home mountpoint during the instqallation.


constantly check if the virtualbox is started or still booting up from a script

We can use VBoxManage to query the state of a Virtual Machine. The following command will list all running virtual machines on your system:

VBoxManage list runningvms

The output will show you the following information which you can then further parse in your script:

"name_of_machine" <UUID>

This will of course not tell you whether the guest OS had booted properly, or is ready to use. For such informations you may need to run a script on the guest starting after  boot to send it's running state to the host.


I deleted ubuntu and now GRUB doesn't boot into windows anymore

Use a different PC , install Unetbootin and create a bootable image of your favourite OS using USB and install it


Ubuntu 12.10: Can't change window title bar font

I would suggest you use gnome-tweak-tool  to change the title bar font. As of this writing, it works just fine for me.

To install gnome-tweak-tool, run this command:

sudo apt-get install gnome-tweak-tool


Need help troubleshooting Apache inside VM

you can not reach other ports trough your web browser, only port 80. all other are blocked for server security. first be sure that you have installed ssh on your server. if not so, type:

sudo tasksel

select ssh server from list. also:

sudo apt-get install tasksel

if not installed tasksel.

then find some remote control program, i dont know which one, there is just about milion available today, that you can select whichever you like. also check firewall status to make sure that port 22 is not blocked:

sudo ufw status


Where is to edit the firewall-rules for iptables and ip6tables correctly?

You don't really need to bother with file locations as long as you use either UFW or iptables commands to change the firewall rules.

Ubuntu now has UFW - Uncomplicated Firewall - that works as a wrapper for iptables and that makes it easier to enable the firewall and to edit rules. By default, the UFW is turned off and must be turned on with

sudo ufw enable

Rules are added with a simple allow or deny, for example:

sudo ufw allow <port>/<optional: protocol>

Both ports/packets and services can be allowed or denied. See the reference above for details on rules.

For more complex hardware setups - for instance several NICs on the same box - foregoing the simplicity of the UFW and editing iptables directly may be adviseable. This is set out in the How To you referred to: Iptables How To.


If I just install Ubuntu Server from a CD will it wipe any partitions?

Installation of the server version is non graphical.
You will be prompted for partitioning with a text based partitioner. Examples screens:

Of course it uses a partition.
It will use the one you tell it to use.
It will do with data what you tell it to do. Delete a partition and the data on that partition is gone. Same if you format a partition.
You do not run it from a desktop; you run the CD/DVD and install from there. And it is text based; not a graphical interface like the desktop version.

If you need guidance installing a server version please have a look at this guide.

But of course you start by making a backup of the files you deem important. That will make it possible to get your files back in place if you make a mistake.


You can just type the the name of the application you want to start. In your case it would be libreoffice or if you want to go to writer directly you can type libreoffice --writer


You can always remove your wine configuration:

rm ~/.wine -rf

It will be re-created the next time you launch wine (or winecfg, etc.)

Tip:
You can have a completely separate wine environment (WINEPREFIX) for each application. If you have trouble running an app, it could save you time to experiment in an environment that you can delete any time without having to ruin your whole configuration. Example:

WINEPREFIX=~/.wine_test winecfg


Tab sends to end of document in Document Viewer

I have the same issue, quite annoying.

It seems to be a focus bug in evince: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784219#5. It's fixed in versions 3.17.3+ (and back-ported to 3.14.2) however Ubuntu 15.10 is using 3.16.1. Not so sure how easy it is to upgrade/downgrade evince to these versions.

Edit: I back-ported the patch to 3.16.1 (the changes are minor) and the issue is gone. You can download my packages (if you trust me enough, otherwise it's pretty easy to build it yourself) here: https://cloud.bwns.be/index.php/s/06ssbVK3zNJwhVG (you don't need to install all the packages, I think evince and evince-common are enough).


Why does transmission-daemon need to access my user dirs when run as a system user?

At least in recent versions of Ubuntu, sudo is configured to preserve the invoking user's HOME environment variable1. You can verify this either by executing something like

$ sudo -u testuser sh -c 'echo $HOME'
/home/steeldriver

or by running sudo sudo -V and looking at the Environment variables to preserve section.

In order to set HOME to that of the target user, you can add -H (--set-home) option:

 -H, --set-home
             Request that the security policy set the HOME environment
             variable to the home directory specified by the target user's
             password database entry.  Depending on the policy, this may
             be the default behavior.

Ex.

$ sudo -Hu testuser sh -c 'echo $HOME'
/home/testuser

See also Why should users never use normal sudo to start graphical applications?


From https://wiki.winehq.org/Ubuntu:

If your system is 64 bit, enable 32 bit architecture (if you haven't already):

sudo dpkg --add-architecture i386

Add the repository:

sudo add-apt-repository ppa:wine/wine-builds

Update the package list:

sudo apt-get update

Then install (example for the development branch):

sudo apt-get install --install-recommends winehq-staging

If you prefer to use the devel (not Staging) branch, replace winehq-staging with winehq-devel in the line above.

If apt-get complains about missing dependencies, install them, then repeat the last two steps (update and install).

To install the latest version of Winetricks (recommended, the version in the repos is old), run:

wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && sudo cp winetricks /usr/bin/ && sudo chmod +x /usr/bin/winetricks


Stack applet was not starting automatically

Open up ~/.config/autostart/stackapplet.desktop, verify that it is the same as this:

[Desktop Entry]
Type=Application
Exec=python /usr/share/stackapplet/stackapplet.py
Icon=/usr/share/pixmaps/stackapplet.png
Terminal=false
Comment=a panel indicator for monitoring StackExchange sites
Name=StackApplet
Categories=Utility;

The problem is likely with the Exec line, if you used to be using an older version that had a different Exec command.

Even if they are the same, try removing that file. Then un-check and re-check the Start Stackapplet during login checkbox.

UPDATE: Looking at your ~/.xsession-errors, StackApplet needs internet access to work. If you aren't connected to the internet right away on login, you'll need to delay StackApplet from starting before you have connected to the internet.
Paste the following in a file called .stackapplet-start.sh in your home folder:

#!/bin/bash
sleep 30 && python /usr/share/stackapplet/stackapplet.py

Make that file executable:

chmod a+x ~/.stackapplet-start.sh

Now open System -> Preferences -> Startup Applications, edit the StackApplet entry and change the Command: to /home/<USERNAME>/.stackapplet-start.sh.


If you have to run your script with sudo, you can still run some commands as a normal user using:

sudo -u $SUDO_USER <command>

If you run the following script with sudo:

#!/bin/bash

whoami
sudo -u $SUDO_USER whoami

It will output:

root
sylvain


which is correct php.ini file to use in apache2?

You can enable a different mod_php for apache2. Try

$ a2enmod php7.2

This should disable previous versions and create /etc/apache2/mods-enabled/php7.2.conf with proper php.ini location.

If you don't have this mod, run $ apt-get install libapache2-mod-php7.2.

Keep in mind that you need to restart apache2 to see changes in loaded modules.