Questions tagged [lock]
The lock tag has no usage guidance.
229
questions
273
votes
5
answers
727k
views
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
I'm trying to run this command in the terminal:
sudo apt install software-properties-common
This is the error message I get:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource ...
53
votes
3
answers
217k
views
Could not get lock /var/lib/apt/lists/lock
when I try to apt-get update I'm getting the below error,
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
52
votes
7
answers
257k
views
Folders showing lock icon
Whenever I open my documents, all the folders in it are displayed with a lock icon. Therefore, I cannot delete any file or folder in it.
I tried changing the root access using sudo chmod user:...
45
votes
6
answers
69k
views
How to unlock locked session?
I'm using xubuntu 14.04 on AMD based hardware. It is configured not to lock a session and not to power down automatically on longer idle times.
There have been no recent changes or new software ...
45
votes
5
answers
173k
views
Can't format / delete locked partition from GParted?
I can't format my hard disk for Ubuntu installation. It has Fedora installed in it. I wonder how to unlock the locked partition to delete and format it, since I am stuck at installing Ubuntu. I am now ...
38
votes
1
answer
87k
views
'sudo apt-get install' is showing "Not using locking for read only file /var/lib/dpkg/lock" warning on Ubuntu Touch
I just installed Ubuntu Touch on my Nexus 7.
Unfortunately I can't install anything from the terminal app:
If I enter:
sudo apt-get install yasm -y git make g++ build-essential libminiupnpc-dev
I get:...
34
votes
3
answers
140k
views
How do I unlock /var/lib/dpkg/lock? [duplicate]
I attempted to install dropbox on my Ubuntu system, but now I am unable to install or uninstall any software. I get this error:
E: Unable to lock the administration directory /var/lib/dpkg/lock?
I ...
21
votes
4
answers
76k
views
How do I enable Scroll Lock?
I need to enable scroll lock so I can toggle lights on my keyboard.
This works on Arch.Funny thing it doesn't work on Ubuntu.
http://linuxtechie.wordpress.com/2008/04/07/getting-scroll-lock-to-work-...
17
votes
3
answers
31k
views
Lock and Unlock from USB disk (pendrive)
Is there Any program for locking and unlocking my Ubuntu machine using a flash- drive?
For instance, when I take out the usb flash drive, the computer locks automatically and when I put in the flash ...
16
votes
1
answer
3k
views
Ubuntu 22.04 won't wake after screen lock / screen dim
I have a fresh installation of Ubuntu 22.04 and it won't wake after screen lock. This is true for both, X11 and Wayland (also disabling Wayland for gdm3 doesn't help). System suspend works fine, only ...
15
votes
4
answers
47k
views
Unable to use package manager due to "exclusive lock" error [duplicate]
My synaptic package manager in ubuntu is giving error:
Unable to get exclusive lock
This usually means that another package management application(like apt-get or
aptitude) is already running....
15
votes
2
answers
14k
views
Lock Tmux Session With Vlock
I have just installed tmux and vlock. When I try to perform the lock-session command, my terminal flashes and then nothing happens. Is there something in my .tmux.conf that must be added to tell tmux ...
15
votes
4
answers
18k
views
iOS 7 Locked Bug via Ubuntu 13.10
I wanted to bring up an issue with the latest Ubuntu release that I hope can be solved. Although I will agree with the community that iOS 7 is not the most open platform release, it still is my desire ...
13
votes
1
answer
6k
views
How do I prevent the blank screensaver when using keyboard shortcut to lock the computer?
I lock my computer a lot, and was wondering if there was a way to get the lock screen when I hit Ctrl + Alt + L. Right now when I use that key combination it turns the screen black, and I have to hit ...
13
votes
2
answers
19k
views
How to disable the lock screen on Lubuntu?
I want to disable the lock screen after suspend session of Lubuntu. But it seems Lubuntu doesn't have a lot of fans. Can anyone help me on this issue?
I don't want to lock the screen after suspension....
13
votes
6
answers
39k
views
Lubuntu enforces screen lock
I can't disable screen lock in Lubuntu. In Power management I have it unchecked. There is another option "Enable light locker" in the "Light locker settings". I also have this unchecked but I still ...
11
votes
3
answers
26k
views
Mouse locks when keys are pressed
Whenever I play Minecraft and try to walk and turn at the same time, I can't. When I hit keys on my keyboard, my mouse locks in place. (This happens both in and outside of Minecraft)
(Ubuntu 10.04 ...
11
votes
3
answers
2k
views
Only require password when waking up from suspend when suspended for 10 minutes
I generally want my laptop to be locked when it's suspended but not when I just suspended it because there is a use case in which entering my password after my laptop woke up from suspend is pretty ...
10
votes
0
answers
24k
views
Installation Error, "Unable to lock the administration directory" [duplicate]
Whenever I try to install any software through Terminal or Software on my Ubuntu 11.04, I'm getting this response:
In Terminal:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource ...
8
votes
3
answers
5k
views
CPU usage goes to 100% when I lock the screen
Whenever I lock the screen, after a certain amount of time, the CPU and the CPU fan go to their limits, and they return back to normal the moment I unlock the screen again (as shown by psensor).
How ...
8
votes
2
answers
2k
views
How to lock without turning the screen (monitor) off?
Due to a recent bug, each time my screen turns off, I cannot get it back on.
Currently, the screen starts turning off after the computer is locked - which effectively means that I cannot lock my ...
7
votes
4
answers
13k
views
"Lock" one specific file so that I nor root no longer have access to it any more
To combat procrastination, I edit my /etc/hosts file by adding time-wasting websites and pointing them to localhost. However, the flesh is weak and I often find myself reverting my changes.
I was ...
7
votes
2
answers
5k
views
Not Locking Screen after X minutes
Since I upgraded from Ubuntu 11.10 to 12.04 (and also 12.10 problem still occurs), my notebook does not lock the screen automatically.
I wen into "Brightness and Lock" settings, Set "Turn Screen of ...
6
votes
8
answers
16k
views
CTRL-ALT-L not locking screen Ubuntu 15.04 w/ Gnome
Title says it all.
This is a feature I need. It's probably something easy, but googling it just gave me a hodgepodge of unrelated stuff.
6
votes
2
answers
4k
views
Lock Ubuntu Server 12.0.4
How do I lock Ubuntu server screen without installing gnome screensaver?
I'm running the server with only the console without desktop installed.
6
votes
3
answers
9k
views
How to disable locking in LibreOffice?
I want to disable file locking in LibreOffice, i.e., the creation of a hidden lock file in the directory of an opened document. The advice of the official documentation to comment out the second of ...
6
votes
2
answers
9k
views
What is the purpose of lock file? [duplicate]
I have seen a file named lock in /var/cache/apt/archives in my Ubuntu 14.04. This file has only root access. When I try to display the contents of this file using sudo nano lock the file seems empty. ...
6
votes
6
answers
15k
views
Ubuntu 18.04 opening system setting logs me out
I've recently installed Ubuntu 18.04 in a dual-boot configuration with Windows 10. I noticed today that, when trying to open system settings, Ubuntu seems to log me out to the lock screen. When I log ...
6
votes
2
answers
5k
views
Unable to lock screen after upgrading to 12.04
After upgrading to 12.04, I can't lock my screen anymore, has anyone encountered this and found a solution? Basically the keyboard shortcut does nothing and even if I select the lock option from the ...
6
votes
2
answers
7k
views
How to unlock file, locked by a process
The file is locked by a process, java in my case. I only want the lock to be released.
lsof | grep /home/user/workspace1
A temporary solution was to 'End Process' from 'System Monitor'.
But ...
5
votes
1
answer
40k
views
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5200 (apt) [duplicate]
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5200 (apt)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg ...
5
votes
1
answer
2k
views
Screen does not lock on suspend
I have recently updated to 20.04 and now when I suspend, either waiting for a long time, closing the lid or manually suspending, the screen does not automatically lock. I've tried setting the 'lock on ...
5
votes
2
answers
19k
views
sudo useradd: cannot lock /etc/passwd; try again later (no lock files)
When doing this on Ubuntu server 14.04:
camilstaps@localhost:~$ sudo useradd --home-dir /var/www/xxx.camilstaps.nl/ --no-create-home --root /var/www/xxx.camilstaps.nl/ --shell /bin/sh xxx
I'm getting ...
5
votes
0
answers
416
views
After closing the lid, no screen display and computer hangs. Have to restart everytime.(14.10)
When I lock my laptop and close the lid, and again after sometime,when I open the lid, their is a blank screen with no display and even if I press any key(s), my system does not wake up.I have to ...
4
votes
1
answer
2k
views
Lock builtin laptop keyboard but keep an external USB keyboard functioning
I have a laptop but also an external USB keyboard connected to it. Is it somehow possible to lock the built-in laptop keyboard (i.e. keys pressed should have no effect) but keep the external one ...
4
votes
4
answers
29k
views
How to lock a folder from terminal
Is there any way to lock a folder from terminal(protected with password) without using any third party applications like truecrypt,crypteeper nor giving user permissions.
It was just like whenever a ...
4
votes
1
answer
7k
views
Unable to create lock file when starting mongod via upstart
I'm trying to set up my mongodb upstart script to work as an arbiter, but I'm having permission problems when trying to create the lock file in the data directory:
Tue Apr 1 17:11:01 [initandlisten] ...
4
votes
2
answers
977
views
How does apt-get use /var/cache/apt/archives/lock?
I am curious of how /var/cache/apt/archives/lock used in apt-get.
I found out that it is a regular file and I think it is used by calling flock on it every time apt-get needs to make some changes to /...
4
votes
1
answer
4k
views
Update: Failed to lock /var/cache/apt/archives/lock
I am running the upgrade(12.10 to 13.04) through terminal and it keeps getting stuck at this:
Failed to lock /var/cache/apt/archives/lock
What do I do? I have root access. I have no idea what else ...
4
votes
1
answer
4k
views
Lock Terminal and Suspend from Terminal
I am trying to lock and suspend from the terminal. I tried:
pmi action suspend | at now + 1 min
And then typed
exit
But both that and vlock kill the running command. Is there a way to lock the ...
4
votes
1
answer
2k
views
Is it possible to permanently lock launcher icons?
I have installed Ubuntu onto my parents laptop. They are around their 80s. They manage to remove icons from the launcher accidentally again and again. I have to put them back manually, only to find ...
4
votes
1
answer
1k
views
What is the gksudo "lock taken...exiting" warning and how do I resolve it?
I recently run into problems when using gksudo. For example, the Truecrypt installation fails because of following error:
** (gksudo:3262): WARNING **: Lock taken by pid: -1. Exiting.
PID must be a ...
4
votes
1
answer
871
views
Why does apt not display an error message even if flock is used?
Running script
#!/bin/bash
(
flock 9
# ... commands executed under lock ...
fuser -v /var/lib/dpkg/lock
apt-get -f --assume-no install
) 9>/var/lib/dpkg/lock
as superuser does not display ...
3
votes
2
answers
2k
views
How can I run a command when a usb device is (dis-) connected?
I am new to linux, and this is probably a noob question, so, sorry for that.
I am using a linux PC in my workshop, and I would like to automate the workshop. That's why I have installed a power strip ...
3
votes
2
answers
2k
views
Ubuntu 12.04 forgetting XModmap settings often
I have the following contents in my ~/.Xmodmap file. It seems a couple times a day (without rebooting or logging out) I need to rerun the command "xmodmap ~/.Xmodmap" to reset my settings. The only ...
3
votes
1
answer
1k
views
Apache startup script keeps lock file open
I am writing a bash script for a backup task. Among other things (file system freeze, database lock, snapshots,...) it involves shutting down Apache and restarting it after the Backup. Since that ...
3
votes
1
answer
2k
views
Lock file and release it
I have multiple threads running from different terminal windows in ubuntu trying to write to the same file.
I would like to lock the file via terminal while writing so that the other thread(s) has ...
3
votes
1
answer
1k
views
Explanation of visudo lock file
When I edit /etc/sudoers using visudo, I think it saves to sudoers.tmp, checks it for errors, then copies it to the real /etc/sudoers.
However, I can't confirm my theory (how the lock file is used) ...
3
votes
1
answer
5k
views
how to unlock /var/cache/apt/archives/lock
I was trying to install firefox from deb instead of firefox snap because the firefox extensions will not work in the snap version, but the system tried to re-install snap version instead. The dialog ...
3
votes
1
answer
714
views
How to launch program on lock and close it on unlock [duplicate]
Have siblings who like to "play" with my laptop by waking it from suspension and then typing random keys on the keyboard into the password field. Afterwards, they always deny it. I plan to install ...