My question is simple, is it possible to enable and disable automatic sleep/hibernate/standby using BASH? I need it for a bash script.Been searching for a while now, can't seem to find it.
I'm trying to make the power manager NOT automatically shutdown / sleep / hibernate when battery power of my laptop reaches critical
I am surprised there isnt an 'NO ACTION' option for that in power manager
I've tried editing the acpi-supper in /etc/default bu couldn't find a solution in there nor in the /home/user/.gconf/apps/gnome-power-manager/ directory
I just bought a Logitech V470 bluetooth mouse. It's no problem to let it work under Koala 9.10 (gnome), but after shutdown/standby/sleep, it doesn't work anymore. With my USB mouse, I have to click the bluetooth icon and select 'switch off bluetooth'. After that, I click 'switch on bluetooth' and bluetooth works again. I thought switching on and off bluetooth with the applet is the same as 'sudo /etc/init.d/bluetooth start/stop', but it isn't! The previous command greyes out/in the bluetooth icon, but it doesn't resume my bluetooth. If 'sudo /etc/init.d/bluetooth restart' would work, I would be able to add this line into /etc/pm/sleep.d, so it's automatically loaded on resume.
My objective is pretty simple: To have a variable within a bash script where I can switch between logging to file or screen.
Simple example of what I am trying to do:
Code:
So, as you can see, I have a variable which clears the log path if the user variable vLOG is not 'Y'. This should mean the user can run the script from the command line and view all the output (instead of it going to a log file).
The problem is that with the final line of the script (which ultimately tests the intention), I don't get the required result as the vLOGPATH variable is just passed to echo as text.
I have tried using 'echo -e' and getting some backslashes in there, I have tried using eval but I am either using them incorrectly.
I am using WICD as my wireless network manager and it works connecting to a network for the first time. But when I resume my laptop from hibernate or standby, WICD will not reconnect to the network and gets stuck on obtaining an IP address. And if I try to change networks without hibernating I get the same problem. Also, I notice that the network name is stagnant. I connect to multiple wifi networks a day because of school. When I leave my "home" network and connect to my "school" network WICD still says "Homebtaining IP address" even thought it should say "schoolbtaining IP address." My thoughts are that it isn't releasing the network properly and when its trying to connect it can't because it still thinks it's connected. The only solution I have found is to restart my laptop every time I want to connect to a new network, or shut down every time I am done using my laptop, which is a major inconvenience.
Here is what I am using:
HP tx2000 Broadcom BCM4322 Ubuntu 10.04 WICD 1.7.0
I have been working on this problem for a few month. By messing with windows registry and local security policies I was able to remotely shut down windows from Linux by issuing:
I am looking for a tool in fedora which can hibernate/standby and also resume after a few seconds automatically with a command. If we have that option by default in fedora.
I'm using CentOS 5.6, kernel version 2.6.18-238.12.1.el5xen, and the Hibernate and Standby options don't even appear in the System menu. How can I get them to appear?
The funny thing is that before I reset my system to a clean install of CentOS 5.6, I was able to see those entries and execute them just fine. (I think that in that previous installation, by doing some updating of packages I got another kernel version and booting into that one showed the menu items.)
Could it have something to do with the fact that it's a xen kernel? Even though I've disabled xend, it doesn't appear.
I have a home server that I'd like to put into standby for a specified period of time (like from 1AM to 9AM) daily. How could I make this happen, so that it goes to sleep and wakes up automatically?
jeff@jeff-lappy:~$ sudo hibernate hibernate:Warning: Tuxonice binary signature file not found. Some modules failed to unload: nvidia hibernate: Aborting suspend due to errors in ModulesUnloadBlacklist (use --force to override).
I even installed this tuxonice thing but to no avail...
I just installed the ubuntu 10.10 along with a dual boot of win7 and running toshiba m511, the problem is when I am using ubuntu I cant sleep, all I get is a black screen and then nada, the fans still on etc etc, I cant push any buttons and have to hard reset it, for it to start working again.
If I put my computer into sleep or hibernate, I have no wireless connection when I start up again. I click on the wireless manager in the tray, but wireless is disabled and I can't enable it. This never happened until I updated to Ubuntu 9.10.
I am using the b43 driver (I think), but I'm not sure which command to execute to display information about my wireless card.
I have recently switched to Ubuntu from Windows Vista. But I am having a few problems, any pointers will be grand.First sleep and hibernate do not work. My laptop sleeps or hibernates fine, but on awake I just get a blank screen and the hard drive doesn't spin at all. This also disables the network manager, which is a real pain.Also for some reason I can't enable special effects. I have the ATI Radeon 200M series integrated graphics chipset.eres some spec details:
running 10.04 Netbook edition. I would like my screen to lock after the netbook goes to sleep but NOT after it enters the screensaver. is this possible? i use my laptop to read in the university a lot and to save power tell it to go into black screensaver after a minute of inactivity. if i enable the lock option i have to enter the password each and every time after the black screensaver activates. but if i deactivate this option and then put the netbook into sleep/hibernate mode it doesn't ask for a password (which i would like) is there any way configure separate passwords for these instances or are they firmly linked?
I have an annoying problem which I am not able to solve. I have installed Ubuntu 10.10 on my home laptop (MSI X410) and I wanted to use it as a media PC stored in the shelf under my TV. The issue is that I cannot open the lid everytime I want to use the PC because of the height of the self.Everything is working fine (HDMI to TV, running with closed lid once turned on...) except sound - no sound via HDMI. However, I think I might bypass this issue by audio cables though I haven't tried it yet.
Anyway, the issue is that I don't want to keep my laptop turned on 24/7 and once done, I would like to hibernate it/put it to sleep, to save energy, prolong lifetime of the pc and get rid of the noise. The restoration from hibernation/sleep works flawlessly, however I can do than only by pressing the power button (hidden under the closed lid).I can put the PC to sleep by pressing sleep button on my wireless keyboard, but I cannot restore it by pressing the same button, enter, or even power button on the keyboard itself. It seems like the keyboard is automatically unplugged when hibernating (which could be quite
I don't know how to stop this monitor standby thing. When I'm not using the computer, the screensaver will start after a few minutes, what I want. But after a few minutes then, it'll go black. How can I stop this from happening?
when I hit the shutdown option... I notice my Hibernate and Sleep button are gone... just the other 3 buttons are there.I wonder if it's certain apps I'm running (that can't be allowed to go into Hibernate) or if it just happens at random for no reason.Has anybody else had this problem? and what is causing this?
I'm a new member of LinuxQuestions but using Ubuntu since January, Kubuntu since last month (KDE 4.5.1). I've got the problem that hibernate/sleep deactivate the Network Manager. There is no error report, only that network is deactivated.
By now I solved the problem by editing the: Code: /var/lib/NetworkManager/NetworkManager.state. How can I prevent Hibernate/Sleep from deactivating the Networkmanager?
I have some problems getting some of the buttons on my Thinkpad working properly. Volume buttons, thinklight, etc. work through tpb. It's the other buttons (sleep, hibernate, etc.) that are causing problems. The wireless radio button also works. I can hibernate and suspend successfully from the command-line using pm-suspend, etc. I have copied the 30-keymap-module-thinkpad-acpi.fdi file to /etc/hal/fdi/policy, where it sits alongside my UK keyboard layout policy (10-keymap.fdi). In this file, I have edited the 'radio' button to call a 'bluetooth' event instead, but it seems to be ignored and pressing Fn+F5 toggles both bluetooth and wlan radios and not just bluetooth... Is there something I have to do to merge the 2 files together? Or do I have to rename the thinkpad .fdi file so I have 10-keymap.fdi and 30-keymap.fdi?
I have the tpb daemon running but it's set not to block keystrokes and when I run xev and press the key combination for sleep, it reports 'xf86sleep' correctly, hibernate reports 'xf86suspend', etc., so I know the keys are getting recognized in some form... However, it seems that the HAL daemon is not picking up these events and running the corresponding commands. I am a member of the 'power' group, nevertheless, even running as root does not seem to make any difference. Finally, I am running wmii as a windowmanager with no desktop environment, and none of these buttons is configured in the window manager. hald should be picking up the events but it seems it isn't
I have been using fedora 14 .. I have set d sleep timer and lock the window timer to "Never"But when i watch movies on VLC player the screen locks automaticaly after a few minutes ..
Installed Squeeze into my Thinkpad T410 and noticed that when I closed the laptop lid, the moon icon does not light up.Reopening the lid and will see a screensaver password screen immediately.Does this means that the laptop does not have Sleep (or is it called hibernate) mode enable? How can I enable it?[Solved]Managed to found out what I've done wrongFor KDE users, go to the menu-> Power Management-> Chose the Profile as Powersave
I have installed Ubuntu as wubi (next to windows 7). When I expect the computer to shut down (either to hibernate or as part of, you know, shutdown), it doesn't. All the programs end, I am logged out, but I still have a picture on the screen (ubuntu default picture).
Running Ubuntu 10.04 on a dual-boot Windows 7 laptop.
On "suspend," the wireless card appears to close connections correctly. Then, >15 minutes later, the laptop's wifi LED lights up and the laptop generates heat.
The computer should be on standby, but instead it's waking itself up and running down the battery.
Are there any programs that might be failing to suspend for sleep? Are there any settings to prevent the wifi card from waking the computer?
I only noticed this because the laptop was getting hot and the battery was wearing down.
I was looking for a way to disable the Suspend and Hibernate options from the logout menu as my laptop hangs on both and requires unplugging/battery removal to restart.
I found a few pages with instructions for older Ubuntu versions but I didn't come across anything that applied directly to 10.04 Lucid Lynx so I thought I'd post what I found worked for me on 10.04.
Open a Terminal from the Applications>Accessories>Terminal. Because the file you will be editing requires root privileges to edit, you will need to use the sudo command:
Enter your password. This will then open the settings file in the text editor with the needed permissions (opening the file directly with the editor you will get an error message if you try to save the file). There are two sections in this file, the first for suspend and the second for hibernate. Near the end of each section will be a line with:
Code: <allow_active>yes</allow_active>
Change this from Yes to No to disable. Save the changes and reboot.
Code: <allow_active>no</allow_active>
Now the power menu will not display these options. To reverse changes just repeat the above and change from no back to yes.
Running Lucid. Every time I hibernate, when I come back, it requires entering a password. I would like to disable this.In the config editor, under apps -> gnome-power-manager -> lock, I've already unchecked _everything_ there, and it still asks me for a password after hiberate.
My laptop running Ubuntu 10.04 insists on automatically logging me in without asking for my password. The only thing is, I've disabled auto login and it shouldn't be doing that.
When I first boot up Ubuntu all I have to do is select my username, no password required to log in. I want the login screen to prompt me for my password for better security.
Here are the settings I already have:
System - Administration - Login screenSet to "show the screen for choosing who will log in"
System - Administration - Users and GroupsI am the only user I have an Administrator level account "Don't ask for password on login" is unchecked, i.e. it should ask for my password on login. If I create a new user with the same settings, that user gets asked for its password. But I don't.
Surely this should be enough to disable automatic login.