Search Results

Search found 165 results on 7 pages for 'wm syscommand'.

Page 3/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Bash: infinite sleep

    - by watain
    I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too because the .xinitrc script reached EOF. So I added this at the end of my .xinitrc: while true; do sleep 10000; done This way X won't terminate if I kill my WM. Now my question: how can I do an infinite sleep instead of looping sleep? Is there a command which will kinda like freeze the script? Best regards

    Read the article

  • How do you globally set the default browser using KDE4?

    - by wishi
    Hi! I'm using awesome-wm on Kubuntu 10.10. I like some of the KDE tools... like choqok. Thing is, that within awesome wm it seems to be impossible to set a default browser, because KDE4 settings overwrite the generally desired settings: To illustrate the problem: % xdg-mime query default text/html chromium-browser.desktop And from ~/.kde/share/config/kdeglobals [General] BrowserApplication=firefox.desktop Which does in no way make sense to me. If I set Firefox as default xdg-mime should not have Chrome. In fact I want Firefox. So how do I globally once and for all, across all frameworks, define Firefox as default? Best, Marius p.s.: I should probably mention, that clicking in Choqok starts Konqueror...

    Read the article

  • Logging in over and over again. How to fix this?

    - by romeovs
    Ok, I messed up. I installed ubuntu 11.10, installed awesome wm and removed unity, to have something to fall back on, I also installed gnome-session-fallback. I was messing around and did the following, because the awesome wiki told me to: gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop False # Still disable the buggy Nautilus desktop thing gconftool-2 --type string --set /desktop/gnome/session/required_components/windowmanager awesome # sets awesome as wm Now here's what's wrong: I can start up decently, and then I get into a login window (that of gnome-session-fallback). I enter my username, select the preferred window manager (awesome in my case) and enter my password. It accepts these, but then hold for a second and just opens the login window again, in effect preventing me from actually logging in. I also tried gconftool-2 --unset (from the tty) on these settings, but that didn't work either. What can I do to revert the gconftool-2 settings to something that should work? I tried apt-get purging gnome-session-fallback and lightdm, and then installing them again, but that didn't work.

    Read the article

  • Can I use Unity with XMonad?

    - by geniass
    I've been using Fedora for a while, but I recently decided to upgrade my ubuntu installation from 12.04 to 12.10. While I was using Fedora, I found xmonad tiling window manager which I sort of got working with xfce. I really like xmonad and I now automatically use the keyboard shortcuts without even thinking. So I would like to use xmonad with unity. Now, I have seen several blog posts etc. that explain how to setup the whole thing in 12.04, with Unity2D. But now, Unity2D has been removed, and the old methods no longer apply. I have read that Unity is actually just a Compiz plugin, and that the wm can't be replaced. Does no version of Unity have a replaceable WM? I've also tried MATE (GNOME2 fork) with xmonad on 12.10 and that is totally broken for me, but that's for another question.

    Read the article

  • Is Google Analytics for Mobile available for Windows Mobile / Compact Framework

    - by Michal Drozdowicz
    Recently Google introduced an SDK for application usage tracking on mobile devices (Google Analytics for Mobile Apps). Unfortunately, it seems that it only supports IPhone and Android devices. Do you have any idea if this framework can somehow be used from Windows Mobile / Compact Framework applications or if Google is planning to release an SDK for WM? BTW, I don't mean a WM application for browsing through GA server reports, but an SDK for tracking your mobile app's usage.

    Read the article

  • get url of all tabs in a firefox window (if posssible all ff windows)

    - by encryptor
    I can retrieve the url of current tab in firefox using var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var mainWindow = wm.getMostRecentWindow("navigator:browser"); var tabbrowser = mainWindow.gBrowser; var url = tabbrowser.currentURI.spec; Now i want to do it for all tabs and save it in a string and if possible get it for tabs in the other ff windows as well. How can i do that?

    Read the article

  • Write a program that allows the user to enter a string and then prints the letters of the String sep

    - by WM
    The output is always a String, for example H,E,L,L,O,. How could I limit the commas? I want the commas only between letters, for example H,E,L,L,O. import java.util.Scanner; import java.lang.String; public class forLoop { public static void main(String[] args) { Scanner Scan = new Scanner(System.in); System.out.print("Enter a string: "); String Str1 = Scan.next(); String newString=""; String Str2 =""; for (int i=0; i < Str1.length(); i++) { newString = Str1.charAt(i) + ","; Str2 = Str2 + newString; } System.out.print(Str2); } }

    Read the article

  • How could I evaluate this in code?

    - by WM
    There is a medieval puzzle about an old woman and a basket of eggs. On her way to market, a horseman knocks down the old woman and all the eggs are broken. The horseman will pay for the eggs, but the woman does not remember the exact number she had, only that when she took the eggs in pair, there was one left over; similarly, there was one left over when she took them three or five at a time. When she took them seven at a time, however, none were left. Write an application that can determine the smallest number of eggs the woman could have had. It might be a multiple of seven because there are no eggs left when it's seven at a time. But I have a problem. 49 eggs -1=2*24 49 eggs -1=3*16 49 eggs-4=5*9 49 eggs-0=7*7

    Read the article

  • Why is my code not printing anything to stdout?

    - by WM
    I'm trying to calculate the average of a student's marks: import java.util.Scanner; public class Average { public static void main(String[] args) { int mark; int countTotal = 0; // to count the number of entered marks int avg = 0; // to calculate the total average Scanner Scan = new Scanner(System.in); System.out.print("Enter your average: "); String Name = Scan.next(); while (Scan.hasNextInt()) { mark = Scan.nextInt(); countTotal++; avg = avg + ((mark - avg) / countTotal); } System.out.print( Name + " " + avg ); } }

    Read the article

  • How to reverse a string?

    - by WM
    Example : hi how are you; output : you are how hi; but wrote this code and im stuck not knowing how to put a string into an array and reverse it..? public class Reverse { public static void main(String[] args) { Scanner text = new Scanner(System.in); System.out.print("Enter your Text : "); String input = text.nextLine(); Scanner text2 = new Scanner(text.nextLine()); String[] array = new String[] ; int i; for(i = 0; i < input.length(); i++) { array[i] = input;

    Read the article

  • from loop to Nested loops ?

    - by WM
    I have this program that returns a factorial of N. For example, when entering 4,,, it will give 1! , 2! , 3! How could I convert this to use nested loops? public class OneForLoop { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter a number : "); int N = input.nextInt(); int factorial = 1; for(int i = 1; i < N; i++) { factorial *= i; System.out.println(i + "! = " + factorial); } } }

    Read the article

  • im writing this code so the user would enter his/her name and followed by his/her marks to get the a

    - by WM
    What if the user wanted to enter his/her grades in the following way: Will 23, 34, 45, 45 how would i get rid of the commas public class StudentAverage { public static void main(String[] args) { int markSum = 0; double average = 0; Scanner input1 = new Scanner(System.in); System.out.print("Enter student record : "); String name = input1.next(); Scanner input2 = new Scanner(input1.nextLine()); int countTotal = 0; while (input2.hasNextInt()) { countTotal++; markSum += input2.nextInt(); } average = markSum / countTotal; // to calculate the total average System.out.print( name + " " + average ); } }

    Read the article

  • How could i evaluate this to a code.?

    - by WM
    There is a medieval puzzle about an old woman and a basket of eggs. On her way to market, a horseman knocks down the old woman and all the eggs are broken. The horseman will pay for the eggs, but the woman does not remember the exact number she had, only that when she took the eggs in pair, there was one left over; similarly, there was one left over when she took them three or five at a time. When she took them seven at a time, however, none were left. Write an application that can determine the smallest number of eggs the woman could have had.

    Read the article

  • Lua Alien Module - Trouble using WriteProcessMemory function, unsure on types (unit32)

    - by jefferysanders
    require "alien" --the address im trying to edit in the Mahjong game on Win7 local SCOREREF = 0x0744D554 --this should give me full access to the process local ACCESS = 0x001F0FFF --this is my process ID for my open window of Mahjong local PID = 1136 --function to open proc local op = alien.Kernel32.OpenProcess op:types{ ret = "pointer", abi = "stdcall"; "int", "int", "int"} --function to write to proc mem local wm = alien.Kernel32.WriteProcessMemory wm:types{ ret = "long", abi = "stdcall"; "pointer", "pointer", "pointer", "long", "pointer" } local pRef = op(ACCESS, true, PID) local buf = alien.buffer("99") -- ptr,uint32,byte arr (no idea what to make this),int, ptr print( wm( pRef, SCOREREF, buf, 4, nil)) --prints 1 if success, 0 if failed So that is my code. I am not even sure if I have the types set correctly. I am completely lost and need some guidance. I really wish there was more online help/documentation for alien, it confuses my poor brain. What utterly baffles me is that it WriteProcessMemory will sometimes complete successfully (though it does nothing at all, to my knowledge) and will also sometimes fail to complete successfully. As I've stated, my brain hurts. Any help appreciated.

    Read the article

  • How to poll a file in /sys

    - by Bjoern
    Hi, I am stuck reading a file in /sys/ which contains the light intensity in Lux of the ambient light sensor on my Nokia N900 phone. See thread on talk.maemo.org here I tried to use pyinotify to poll the file but this looks some kind of wrong to me since the file is alway "process_IN_OPEN", "process_IN_ACCESS" and "process_IN_CLOSE_NOWRITE" I basically want to get the changes ASAP and if something changed trigger an event, execute a class... Here's the code I tried, which works, but not as I expected (I was hoping for process_IN_MODIFY to be triggered): #!/usr/bin/env python # -*- coding: utf-8 -*- # import os, time, pyinotify import pyinotify ambient_sensor = '/sys/class/i2c-adapter/i2c-2/2-0029/lux' wm = pyinotify.WatchManager() # Watch Manager mask = pyinotify.ALL_EVENTS def action(self, the_event): value = open(the_event.pathname, 'r').read().strip() return value class EventHandler(pyinotify.ProcessEvent): def process_IN_ACCESS(self, event): print "ACCESS event:", action(self, event) def process_IN_ATTRIB(self, event): print "ATTRIB event:", action(self, event) def process_IN_CLOSE_NOWRITE(self, event): print "CLOSE_NOWRITE event:", action(self, event) def process_IN_CLOSE_WRITE(self, event): print "CLOSE_WRITE event:", action(self, event) def process_IN_CREATE(self, event): print "CREATE event:", action(self, event) def process_IN_DELETE(self, event): print "DELETE event:", action(self, event) def process_IN_MODIFY(self, event): print "MODIFY event:", action(self, event) def process_IN_OPEN(self, event): print "OPEN event:", action(self, event) #log.setLevel(10) notifier = pyinotify.ThreadedNotifier(wm, EventHandler()) notifier.start() wdd = wm.add_watch(ambient_sensor, mask) wdd time.sleep(5) notifier.stop() Thanks for any hints, suggestions and examples Kind regards Bjoern

    Read the article

  • Python: two loops at once

    - by Stephan Meijer
    I've got a problem: I am new to Python and I want to do multiple loops. I want to run a WebSocket client (Autobahn) and I want to run a loop which shows the filed which are edited in a specific folder (pyinotify or else Watchdog). Both are running forever, Great. Is there a way to run them at once and send a message via the WebSocket connection while I'm running the FileSystemWatcher, like with callbacks, multithreading, multiprocessing or just separate files? factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() If we run this, it will have success. But if we run this: factory = WebSocketClientFactory("ws://localhost:8888/ws", debug=False) factory.protocol = self.webSocket connectWS(factory) reactor.run() # Websocket client running now,running the filewatcher wm = pyinotify.WatchManager() mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE # watched events class EventHandler(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): print "Creating:", event.pathname def process_IN_DELETE(self, event): print "Removing:", event.pathname handler = EventHandler() notifier = pyinotify.Notifier(wm, handler) wdd = wm.add_watch('/tmp', mask, rec=True) notifier.loop() This will create 2 loops, but since we already have a loop, the code after 'reactor.run()' will not run at all.. For your information: this project is going to be a sync client. Thanks a lot!

    Read the article

  • Mac OS X Server Open Directory does not push Software Update settings to clients

    - by joxl
    I have an Xserve G5 running Mac OS X Server 10.5.8 configured as an Open Directory master. I have also enabled and configured Software Update service on the machine. The SUS is configured to serve Tiger, Leopard and Snow Leopard clients (see http://discussions.apple.com/message.jspa?messageID=10297359#10297359) The clients bound to the OD are a variety of Mac's running OS X 10.4, 10.5 or 10.6. In Workgroup Manager, I have created 3 machine groups for each client OS. Each group is configured with a custom SUS URL, and the managed client computers are members accordingly (see http://discussions.apple.com/thread.jspa?messageID=10493154#10493154) My problem is that the server pushes the SUS settings to some of the client machines, but not all. When I first configured all this stuff on the server (a few weeks ago) I was closely monitoring a few of the client machines to confirm that they received the custom settings. I noticed that some of the clients (10.4/5/6 alike) seemed to get the settings immediately, others didn't show the new settings until after a reboot. As I said, results are mixed across OS's, but some clients will not "sync" at all. My immediate thought was to unbind/rebind the problematic machines. I did this on several client computers with no success. For example, today I was working on one of the Tiger clients. I noticed it was not pointed at my local SUS, so I checked the OD binding; it was fine. Just to be sure I unbound the machine. Next, I checked WM and confirmed the computer record was gone. I noticed the machine group still had a residual (broken?) member from the unbound client; I manually removed this. Finally, I re-bound the client to OD and re-added the machine to it's correct group in WM. Unfortunately, the client still pings apple's SUS for updates. Just to play it safe I rebooted the client, but to no avail, it will not see my local SUS. To confirm that there is nothing wrong with the server, or the client's connection to it, forcefully pointed the machine at my SUS: sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "$LOCAL_SUS_URL" and the machine successfully updated off my local server. Great, successful updates, but problem not solved. I've done exhaustive reading on discussions.apple.com (not saying I read everything, I'm just saying I have read a lot) without a good answer. The discouraging thing is that a lot of OD problems I've read about only result in the sysadmin completely reinstalling the server, or OD, or some other similarly heavy-handed operation. At this point, I am not willing to go that route. I still have hope that I can find the reason for this flaky behavior. If anyone can point me in a helpful direction it would be much appreciated. EDIT: Indeed, some files are being pushed to the client: # from client machine: $ sudo find /Library -type f -name com.apple.SoftwareUpdate.plist /Library/Managed Preferences/com.apple.SoftwareUpdate.plist /Library/Managed Preferences/username/com.apple.SoftwareUpdate.plist /Library/Preferences/com.apple.SoftwareUpdate.plist A few weeks ago, prior to my (previously mentioned) modifications, the SUS was still running "stock". Which meant it could not serve SL (10.6) machines. At that time, the Software Update settings were setup in WM under User Groups. This didn't make any sense because some users work on multiple machines with different OS's. Before creating Machine Groups in WM, I deleted all the SU settings from the User Group Preferences. This just makes the whole thing more confusing, because when I see a file here: /Library/Managed Preferences/username/com.apple.SoftwareUpdate.plist I assume it's still remaining from the "old" settings, because I wouldn't think a Machine Setting belongs there. Despite all the com.apple.SoftwareUpdate.plist hanging around under the Managed Preferences, why does the client machine still call home to Apple and not my SUS? # on client machine: $ date Tue Jan 25 17:01:46 EST 2011 $ softwareupdate --list Software Update Tool Copyright 2002-2005 Apple No new software available. switch terminals... # on server: $ tail -n1 /var/log/swupd/swupd_access_log 10.x.x.x - - [25/Jan/2011:15:54:29 -0500] XXXX POST "/cgi-bin/SoftwareUpdateServerStats" 200 13 ... Notice the date of the client softwareupdate and the latest access to the SUS server; the server never heard a peep from that client.

    Read the article

  • How does one view the "inline docs" of a .cpp file?

    - by Mala
    I have cpp files peppered with comments such as the following before every function: /** * @brief Set the normal and expansion handshake timeouts. * * @param wm Array of wiimote_t structures. * @param wiimotes Number of objects in the wm array. * @param normal_timeout The timeout in milliseconds for a normal read. * @param exp_timeout The timeout in millisecondsd to wait for an expansion handshake. */ I assume from the format that there has to be some way of exporting this into a "friendly" format, perhaps html, which can then be read in a manner similar to the Java API. How would I do this? (I'm on Windows 7, running MS Visual Studio 2010)

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >