[Solved] Launch GUI application and detach it from terminal

Hello, I find it convenient launching apps from terminal, but after that I am unable to use the terminal, since it it's "attached" to the process. Some searching revealed 2 methods of doing this, but they both don't work for me
1) add "&" after the command: upon closing the terminal the application closes as well; not what I want
2) press ctrl+z: this just closes the app
So how do I type a command to launch a GUI app and continue using the terminal?
I am using mate-terminal.
Last edited by axper (2013-02-11 19:14:08)

kaszak696 wrote:https://bbs.archlinux.org/viewtopic.php?id=157405
Thanks a lot, this is exactly what I wanted (for Bash):
olive wrote:
You can disown them (man bash). I have put
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'disown -a -h'
in my ~/.bashrc with the effect that if you launch a program in the background (with &). It will not be stopped when you close the terminal.
For Zsh, put this in your .zshrc
precmd_disown() {
emulate -L zsh
setopt extendedglob
local job match mbegin mend
jobs | while read job; do
if [[ $job = \[(#b)([[:digit:]]##)\]*running* ]]; then
disown %$match[1]
fi
done
autoload -U add-zsh-hook
add-zsh-hook precmd precmd_disown
(from http://www.zsh.org/mla/users/2010/msg00654.html)
Last edited by axper (2013-06-29 07:47:21)

Similar Messages

  • Applescript to launch an application and wait till it exits

    I have written the applescript to launch an application and wait till it exits and but it is not working. Here is the code for that
    tell application "/Applications/Pages.app" to activate
    tell application "/Applications/Pages.app"
        repeat until it is not running
        end repeat
    end tell
    But when I tried to close the app, the script is still running. I think the reason is , even though I closed the window, that process is still running. Can you please help me to solve this problem?

    Trying to make this kind of thing work from the script editor is going to give you headaches. A better approach is to create a script application.  Copy the following code into the Script Editor, and then save it as an application with the "Stay open after run handler" checkbox checked. Then run the resulting script application directly.
    on run
      tell application "Pages" to activate
      -- add a longish delay to allow the application to start
      delay 5
    end run
    on idle
      if application "Pages" is not running then
      -- the application has quit, so go to the 'on quit' handler
      quit
      end if
    end idle
    on quit
      -- do whatever you want to do after the application has quit
      -- allow the app to quit itself
      continue quit
    end quit

  • [SOLVED] Launching an application make gnome 3.2 to crash

    Hello !
    Since latest update, when I launch an application in gnome 3.2, I get an error message 'Sorry, an error occured. You have to close your sessions ...'.
    I would like to know if some of you also experienced this issue and if workarounds have been found ?
    Thanks a lot for your help.
    Best regards,
    Sirsurthur
    Last edited by Sirsurthur (2011-10-16 20:02:46)

    You will see below the bug :
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: Could not parse desktop file /home/julien/.config/autostart/xfconf-migration-4.6.desktop: Le fichier d$
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: could not read /home/julien/.config/autostart/xfconf-migration-4.6.desktop
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: Could not parse desktop file /home/julien/.config/autostart/xfce4-tips-autostart.desktop: Le fichier d$
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: could not read /home/julien/.config/autostart/xfce4-tips-autostart.desktop
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: Could not parse desktop file /home/julien/.config/autostart/xfce4-settings-helper-autostart.desktop: L$
    Oct  5 18:45:20 localhost gnome-session[1839]: WARNING: could not read /home/julien/.config/autostart/xfce4-settings-helper-autostart.desktop
    Oct  5 18:45:20 localhost dbus[855]: [system] Activating service name='org.freedesktop.UPower' (using servicehelper)
    Oct  5 18:45:20 localhost dbus[855]: [system] Successfully activated service 'org.freedesktop.UPower'
    Oct  5 18:45:20 localhost kernel: [  925.516762] EXT4-fs (sda3): re-mounted. Opts: commit=0
    Oct  5 18:45:21 localhost kernel: [  925.999692] EXT4-fs (sda4): re-mounted. Opts: commit=0
    Oct  5 16:45:21 localhost rtkit-daemon[1143]: Successfully made thread 1945 of process 1945 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level $
    Oct  5 18:45:22 localhost dbus[855]: [system] Activating service name='org.freedesktop.ColorManager' (using servicehelper)
    Oct  5 18:45:22 localhost dbus[855]: [system] Successfully activated service 'org.freedesktop.ColorManager'
    Oct  5 16:45:23 localhost rtkit-daemon[1143]: Successfully made thread 1990 of process 1990 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level $
    Oct  5 18:45:24 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:24 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:25 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:25 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:25 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:25 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:26 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:26 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:27 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:27 localhost dbus[855]: [system] Activating service name='org.freedesktop.Accounts' (using servicehelper)
    Oct  5 18:45:27 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:27 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:27 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:27 localhost dbus[855]: [system] Successfully activated service 'org.freedesktop.Accounts'
    Oct  5 18:45:27 localhost accounts-daemon[2030]: started daemon version 0.6.14
    Oct  5 18:45:38 localhost kernel: [  943.232212] gnome-shell[1967]: segfault at 10 ip b62bcfb7 sp bfb3eb3c error 6 in libcogl.so.5.0.0[b6269000+76000]
    Oct  5 18:45:38 localhost gnome-session[1839]: WARNING: Application 'gnome-shell.desktop' killed by signal
    Oct  5 18:45:39 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:39 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:39 localhost dbus[855]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
    Oct  5 18:45:39 localhost dbus[855]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
    Oct  5 18:45:40 localhost kernel: [  944.909261] gnome-shell[2053]: segfault at 10 ip b62d7fb7 sp bfa381ac error 6 in libcogl.so.5.0.0[b6284000+76000]
    Oct  5 18:45:40 localhost gnome-session[1839]: WARNING: App 'gnome-shell.desktop' respawning too quickly
    Oct  5 18:45:40 localhost gnome-session[1839]: WARNING: Application 'gnome-shell.desktop' killed by signal
    Oct  5 18:46:07 localhost dbus[855]: [system] Failed to activate service 'org.freedesktop.Avahi': timed out

  • [Solved] Removing "Recently Used" and "Search" Entries from Open/Save

    Each time I save or open a document, the dialog box defaults to "Recently Used". What I'm wanting to find out is how to get rid of the entry from the "Places" bar altogether. I understand that the entry was put there with good intentions, but it seems to always amount to an extra step. The best example is when I use "Save As". I will type the name of the file and since the dialog has automatically put me under "Recently Used", I have to then navigate to where I want to save or the "Please select a folder below" error will appear. Had the dialog defaulted to the home folder, this stumbling block could be eliminated.
    I realize there is probably some fundamental knowledge I'm not aware of and don't know exactly what to search for. I'm using Openbox and have the core XFCE applications installed, but I don't know if this is a GTK issue, xdg, or what. All of my searches point to getting rid of ~/.local/share/recently-used.xbel, but I'm not concerned with that and already have a transparent panel launcher that handles it.
    I have found a post in this forum that addresses the same issue, but it has gone unresolved also:
    https://bbs.archlinux.org/viewtopic.php?id=129555
    This user mentions a directory hack that is resolving the issue for now, barring any other solution, I'd like to know exactly what that is, as I can't seem to find the answer to that either.
    Thanks in advance for any help.
    Last edited by freud_zoid (2011-12-14 19:33:07)

    perseus wrote:In the recent update to gtk2-2.24.14-1 the code in gtkfilechooserdefault.c has changed and the patch no longer works. Gusar, is it possible to provide a new patch please? I absolutely hate the default behaviour.
    I haven't made many patches for things and you'll need to type in the file name when you apply it, but this will work for the current gtk2 package:
    --- gtkfilechooserdefault.c.orig 2012-12-06 20:24:05.758831989 -0500
    +++ gtkfilechooserdefault.c 2012-12-06 20:28:07.352183658 -0500
    @@ -6061,7 +6061,7 @@
    switch (impl->startup_mode)
    case STARTUP_MODE_RECENT:
    - recent_shortcut_handler (impl);
    + home_folder_handler (impl);
    break;
    case STARTUP_MODE_CWD:
    Or if you'd rather, you can just edit gtkfilechooserdefault.c directly and replace 'recent_shortcut_handler' on line 6064 with 'home_folder_handler' and rebuild.
    The patch above probably reveals my lack of expertise, but thanks goes again to Gusar for showing the way.

  • Why can't I get Applications and free music from itune stores from Nigeria?

    There are lots of my friends who are getting frustrated with their iPhones and iPads because we cannot get most of the applications, music to buy or download even though we have valid paying systems. The annoying information you get is the items are not available in Nigerian stores. What is the way out on this?
    I tried registering another apple I.d using U.S.A as my country as recommended by some 'geeks' withouth success.

    ref:
    http://www.apple.com/creativity-apps/mac/up-to-date/

  • [Solved] Launching multiple instances of a service from systemd timer

    I have a short script that I want to run every 5 seconds.  I've set up a systemd timer, which runs the script every 5 seconds, assuming the script terminates before the next elapse of the timer.  However, if the script is still running when the timer elapses, systemd sees that the service is already active, so it does not run my script again. 
    How can I make my script run in another instance, every 5 seconds, even in cases where the script is still running from an earlier elapse of the timer? 
    I'd like to keep everything managed by systemd, in that it should capture stdout into the journal.  I've looked at using a systemd socket unit with ListenStream pointing to a file system socket, where the socket-activated service template runs my script.  Then, a timer unit runs a script that calls socat to send a single character to the file system socket to spin up an instance.  The nice thing about this approach is that systemd can manage limiting the number of socket activations that can be spun up.  However, I haven't gotten this idea to work yet. 
    Here's my test script, which I can cause to run for a long time by creating a lockfile. 
    [root@dogbert system]# cat /var/lib/misc/test1.py
    #!/usr/bin/python2
    import os
    import time
    import sys
    print "%d starting..." % os.getpid()
    sys.stdout.flush()
    while os.path.exists("/tmp/test1.lockfile"):
    print "%d sleeping..." % os.getpid()
    sys.stdout.flush()
    time.sleep(1.0)
    print "%d exiting..." % os.getpid()
    Here are my unit files:
    [root@dogbert system]# cat /etc/systemd/system/test1.timer
    [Timer]
    OnBootSec=1min
    OnCalendar=*:*:0/5
    AccuracySec=50ms
    [Install]
    WantedBy=timers.target
    [root@dogbert system]# cat /etc/systemd/system/test1.service
    [Service]
    Type=oneshot
    ExecStart=/var/lib/misc/test1.py
    Here's what happens if I create the lock file and then remove it.  The script does not run at 10:39:30, but I get one "catch-up" run of the script at 10:39:32. 
    May 02 10:39:20 dogbert test1.py[10209]: 10209 starting...
    May 02 10:39:20 dogbert test1.py[10209]: 10209 exiting...
    May 02 10:39:25 dogbert test1.py[10228]: 10228 starting...
    May 02 10:39:25 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:26 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:27 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:28 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:29 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:30 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:31 dogbert test1.py[10228]: 10228 sleeping...
    May 02 10:39:32 dogbert test1.py[10228]: 10228 exiting...
    May 02 10:39:32 dogbert test1.py[10250]: 10250 starting...
    May 02 10:39:32 dogbert test1.py[10250]: 10250 exiting...
    May 02 10:39:35 dogbert test1.py[10269]: 10269 starting...
    May 02 10:39:35 dogbert test1.py[10269]: 10269 exiting...
    May 02 10:39:40 dogbert test1.py[10287]: 10287 starting...
    May 02 10:39:40 dogbert test1.py[10287]: 10287 exiting...
    Last edited by johnp636 (2015-05-05 01:22:35)

    johnp636 wrote:However, if the script is still running when the timer elapses, systemd sees that the service is already active, so it does not run my script again.
    That's normal, you cannot start again an already active service unit, which is what the timer tries to do if the next trigger comes before the service ends.
    How can I make my script run in another instance, every 5 seconds, even in cases where the script is still running from an earlier elapse of the timer?
    I don't think that a timer can do this with a simple service.
    But a shell script can manage this.
    I'd like to keep everything managed by systemd, in that it should capture stdout into the journal.
    The command 'systemd-cat' can be used in the shell script to get this feature.
    I propose this bash script:
    #!/bin/bash
    nbprocess=0
    while true; do
    if ((nbprocess <= 2)); then
    systemd-cat /var/lib/misc/test1.py &
    fi
    nbprocess=$(pgrep test1.py|wc -l)
    sleep 5
    done
    It limits the number of test1.py processes to 3.
    This script can be started with a service unit, without using a timer:
    [Service]
    ExecStart=/var/lib/misc/test1.sh
    Stopping this service, will end all the running test1.py processes.
    Maybe there is a better way to do this, but this method is simple; if I find something else, I will post again.

  • Releasing DHCP and Renewing DHCP from Terminal

    Hello,
    I have read through man pages and this board, and have not been able to find out how to run a command from the terminal to release a DHCP address and run a second command to renew.
    My boss is not satisfied with bringing the interface up and down with the ifconfig command. He wants the signal sent to the current DHCP server confirming the address has been released.
    How can I do this from the terminal. Any insight is appreciated.
    DB

    Weird behavior on these commands given in the "solution"
    After running the command to renew the DHCP address, nothing shows up in the Network Preference pane. When running the command ipconfig setpacket en0 from the terminal, it shows that I have received a new address, subnetmask, and gateway. Is this a bug in 10.4.9, or am I not fully renewing DHCP?

  • Transfer applications and settings from iPod touch to iPhone

    Hi all,
    Currently, I have an iPod Touch. I have bought applications and I have configured some applications on it.
    I am quite interested to buy the last version of the iPhone. But before buying it, I would like to know if it is possible to transfer the applications and the settings from the iPod Touch to the iPhone.
    If it is possible, do you know how to do it? Restoring the back up of the iPod? I don't options about that in iTunes.
    Thank you for your help.
    Damien

    First, be sure all your applications are included in your iTunes library. (iTunes > File > Transfer purchases from XXX's iPod Touch).
    The application data is not included in the app, but in your ipod Touch backup file.
    You can upgrade one device with the backup from a different type of device; most settings will transfer to the new device. See this: http://support.apple.com/kb/HT1414

  • Running a GUI application without holding command prompt

    Hi there ,
    I have developed a GUI application using Swing. After compiling the same successfully , when I run the same , presently , I am running it like ,
    c:\> java xxx
    where c:\ is the general command prompt on a Windows machine where I can type in my commands like javac or java and xxx is the class file name . Now till I complete using my GUI application and exit from the same , the command prompt will also be there ( and probably displaying the output of my System.out.println ) . So , two sessions are running , one is just the command prompt and another is the actual GUI application.
    How can I avoide this ? e.g. when I type command "notepad" and press enter , notepad is started and the command prompt returns after starting notepad i.e. the notepad and the command prompt are not related now , I can close the command intrepreter and still notepad is running . What should I do to create such a Java GUI application ? Please advice .

    If I understand you correctly this is something that happens in linux also. And I believe that you can solve this by creating to shortcut to this program.
    And the shortcut or link to application will be the command line that you use to run the Java Application.
    i.e.
    java c:\javadir\subjavadir\application.class
    And I believe that this will allow it to run without the command prompt. Just showing the GUI and no additional command prompt window. Freeing the command prompt is something that I don't know how to do in either OS.
    I use the Link To Application method because I ultimately don't need to have multiple windows for one application. Even though it is nice to be able to kill the Application by destroying the command-prompt session (in case your app causes lock-ups during testing).
    Post your results . . . I'm not even sure that I'm being clear at all with my explanation to your question.

  • Need Help On this(solve these 2 applications)

    Hello All,
    Find below the questions for Snooker scoreboard application programming in java and second one is an applet. Please solve the two applications and send me the code immediately to [email protected] and [email protected] .
    I have the exam tomorrow and any help regarding this is appreciated.
    1)
    UNIVERSITY OF SUNDERLAND
    SCHOOL OF COMPUTING AND TECHNOLOGY
    MODULE CODE:      COMM3C
    MODULE TITLE:      Java Network Programming
    MODULE ASSESSOR:      Adrian Wadsworth
    ASSESSMENT:      One of Two (Referred/Deferred)
    TITLE OF ASSESSMENT:      Individual Assignment Snooker Scoreboard Application (4 pages)
    MODERATED:      May 2006
    PLEASE READ ALL INSTRUCTIONS AND INFORMATION CAREFULLY.
    This assignment contributes 50% to your final module mark.
    Please ensure that you retain a duplicate of your assignment. We are required to send samples of student work to the external examiners for moderation purposes. It will also safeguard in the unlikely event of your work going astray.
    THE FOLLOWING LEARNING OUTCOMES WILL BE ASSESSED:
    Knowledge of:
    a.      Critical awareness of the issues and problems associated with the development of programs to run in a networked environment      �9
    b.      Critical understanding of the Java and the web      �9
    c.      Architectural issues of relating to distributed systems
    d.      Critical awareness of network programs and network protocols      �9
    and ability to:
    e.      Design and implement a Java applet or application      �9
    f.      Critically evaluate network technologies for specific requirements
    g.      Design test a Java based on-line systems      �9
    h.      Work as part of a team to develop a component based system.
    i.      Use and critically evaluate Software Engineering tools      �9
    IMPORTANT INFORMATION
    You are required to submit your work within the bounds of the University Infringement of Assessment Regulations (see your Programme Guide). Plagiarism, paraphrasing and downloading large amounts of information from external sources, will not be tolerated and will be dealt with severely. Although you should make full use of any source material, which would normally be an occasional sentence and/or paragraph (referenced) followed by your own critical analysis/evaluation. You will receive no marks for work that is not your own. Your work may be subject to checks for originality which can include use of an electronic plagiarism detection service.
    Where you are asked to submit an individual piece of work, the work must be entirely your own. The safety of your assessments is your responsibility. You must not permit another student access to your work.
    Where referencing is required, unless otherwise stated, the Harvard referencing system must be used (see your Programme Guide).
    Submission Date and Time      Before 4pm, Friday 1st September 2006
    Submission Location      LRC, Reg Vardy Centre, St Peters Campus
    Java Network Programming (COMM3C)
    Assignment 1 (Referred/Deferred) May 2006
    Snooker Scoreboard Application
    This assignment is designed to consolidate the knowledge of the Java programming language you have gained in the first half of the course and to develop your skills in using basic Java input/output facilities, designing graphical user interfaces and implementing client-server systems.
    The Application (70 marks)
    You will develop a client/server based scoreboard application which will present and log the activity of a snooker match which may comprise a maximum of 15 frames. Your application must be capable of performing the following functions:
    (a) Displaying the current score of each player for the current frame.
    (b) Displaying the break for the player currently at the table.
    (c) Displaying a record of the sequence of balls potted with their values during each break for each player during the current frame.
    (d) Logging, and ultimately storing on a floppy disc in drive A, a record of the sequence of events occurring during a frame. This would include: fouls committed, balls potted with their values and which player potted them for each frame completed. This is intended to provide the definitive record for the frame. Note that, with the exception of player names, match identification and the date, no other information (such as the frame score) should be stored on disc.
    (e) Recalling a frame's record from disc. The application must be able to process the data recalled from disc for any chosen frame and provide the following information:
    i) the frame score and the highest break for each player,
    ii) the number of points conceded as fouls by each player,
    iii) the number of times each player visited the table,
    vi) the number of times each colour ball (not reds or free balls) was
    v) potted in the frame as a whole by each player.
    The application must be developed as a client/server system using the loopback address so the client and the server can be run on the same computer.
    The client will include the graphical User Interface (GUI) which will facilitate the entry of player names, a method of scoring, a method of displaying all required information and interaction with the server to allow data to be sent to it and recalled from it. See above for detailed requirements.
    The server must facilitate the storage to and retrieval from floppy disc of match data and interaction with the client. The server need only be capable of interacting with a single client.
    The Application (continued)
    In addition to your report (see next page), you must submit a 3.5 inch virus checked floppy disc (CD's are NOT acceptable) which must contain four folders, described below, and nothing else.
    Folder 1: The clientSource folder. Must contain all client source files and nothing else.
    Folder 2: The clientClass folder. Must contain all client class files and nothing else.
    Folder 3: The serverSource folder. Must contain all server source files and nothing else.
    Folder 4: The serverClass folder. Must contain all server class files and nothing else.
    Any number of client classes may be developed, but the class containing the client's main method must be called client. Any number of server classes may be developed, but the class containing the server's main method must be called server.
    All applications must be executable directly from the command prompt window, without the use of an additional Integrated Development Environment such as Eclipse or JBuilder. You must clearly identify which version of Java you have used to develop your application.
    Note that it will not be possible for you to include class files corresponding to source files which do not compile correctly. You must, however, include all of your source files in the appropriate folder regardless of whether or not they compile.
    You should place the floppy disc in a small envelope and tape it to the front sheet of your report so that no text on the front sheet is obscured. Do not apply tape to the disc itself.
    Report Submission Details (30 marks)
    Your report must contain the following elements:
    (a) a well commented source listing of the application source code (whether functional
    or not). Note that sections of code which do not function correctly should be clearly identified by the words "NOT FULLY FUNCTIONAL" and accompanied by a brief hand written explanation of the problem.
    (b) a maximum of four screen shots showing the application in action
    (c) a conclusion, with clearly marked sub-headings, which must include:
    i) a clear statement of the extent of the application's functionality,
    ii) a brief explanation of how to use your version of the application,
    iii) a description of how you have made the application robust,
    iv) any other commentary that you feel is relevant.
    Your report must be presented on A4 sheets of paper which must be stapled together at the top left corner to allow access to all of the report�s contents without removing the staple.
    If your report is too thick to be secured using a staple, punch a hole in the top left corner and bind the pages together with a treasury tag.
    Your report must not be submitted in any type of cover or folder.
    Your name, my name and the module number must be clearly displayed on the front sheet of your submission.
    No other information, designs or motifs should appear on the front sheet.
    Note that all the pages of this assignment must be submitted with your report and must immediately follow the front sheet.
    Your report must NOT be submitted electronically and must NOT be included on your floppy disc.
    Failure to comply with the requested report and floppy disc submission format will result in the allocation of a significantly reduced mark.
    A.Wadsworth
    2)UNIVERSITY OF SUNDERLAND
    SCHOOL OF COMPUTING AND TECHNOLOGY
    MODULE CODE:      COMM3C
    MODULE TITLE:      Java Network Programming
    MODULE ASSESSOR:      John Tindle
    ASSIGNMENT      Two of Two (Referred/Deferred)
    TITLE OF ASSIGNMENT:      Java Media Player
    MODERATED:      May 2006
    PLEASE READ ALL INSTRUCTIONS AND INFORMATION CAREFULLY.
    This assignment contributes 50% to your final module mark.
    Please ensure that you retain a duplicate of your assignment. We are required to send samples of student work to the external examiners for moderation purposes. It will also safeguard in the unlikely event of your work going astray.
    THE FOLLOWING LEARNING OUTCOMES WILL BE ASSESSED:
    Knowledge of:
    a.      Critical awareness of the issues and problems associated with the development of programs to run in a networked environment      �9
    b.      Critical understanding of the Java and the web      �9
    c.      Architectural issues of relating to distributed systems
    d.      Critical awareness of network programs and network protocols      �9
    and ability to:
    e.      Design and implement a Java applet or application      �9
    f.      Critically evaluate network technologies for specific requirements      �9
    g.      Design test a Java based on-line systems      �9
    h.      Work as part of a team to develop a component based system.
    i.      Use and critically evaluate Software Engineering tools      �9
    IMPORTANT INFORMATION
    You are required to submit your work within the bounds of the University Infringement of Assessment Regulations (see your Programme Guide). Plagiarism, paraphrasing and downloading large amounts of information from external sources, will not be tolerated and will be dealt with severely. Although you should make full use of any source material, which would normally be an occasional sentence and/or paragraph (referenced) followed by your own critical analysis/evaluation. You will receive no marks for work that is not your own.
    Where you are asked to submit an individual piece of work, the work must be entirely your own. The safety of your assessments is your responsibility. You must not permit another student access to your work.
    Where referencing is required, unless otherwise stated, the Harvard referencing system must be used (see your Programme Guide).
    Submission Date and Time      Before 4pm, Friday 1st September 2006
    Submission Location      LRC, Reg Vardy Centre, St Peters Campus
    Module COMM3C Java Network Programming
    Assignment 2 (Referred/Deferred) May 2006
    Java Media Framework
    Part 1 Research Topics
    The Java Media Framework API (JMF) enables audio, video and other time-based media to be added to applications and applets built on Java technology. This optional package, which can capture, playback, stream, and transcode multiple media formats, extends the Java 2 Platform, Standard Edition (J2SE) for multimedia developers by providing a powerful toolkit to develop scalable, cross-platform technology.
    The aim of this assignment is to develop the skills required by a network systems developer so that they are able to incorporate standard Java components code into their own projects.
    Here is a link the JMF website
    http://java.sun.com/products/java-media/jmf/
    JMF documentation
    http://java.sun.com/products/java-media/jmf/reference/docs/index.html
    JMF code examples
    http://java.sun.com/products/java-media/jmf/reference/codesamples/index.html
    JMF Documentation
    http://java.sun.com/products/java-media/jmf/2.1.1/specdownload.html
    Download and read the JMF API Guide
    https://sdlc3a.sun.com/ECom/EComActionServlet;jsessionid=1BA18CD12B4C0D0DEC445DAAD5522248
    Research the topics given in Part 1 and answer the questions listed below.
    Describe the structure and mode of operation of the JMF in your own words.
    Describe in your answer Controller Event (ref p30 JMF API Guide)
    Describe in your answer Standard Controls (ref p20 JMF API Guide)
    Describe in your answer Presenting RTP Media Streams (ref p68 JMF API Guide)
    Describe in your answer Capturing Time Based Media (ref p77 JMF API Guide)
    Describe what is meant by a Media Processor and a Media Player. How do they differ?
    Part 2 SimplePlayerApplet.java
    Download the Java Applet, modify the source code and add it to a package within a Java Project. Recompile the Applet using JBuilder. Please refer to the following two links:
    Code examples
    http://java.sun.com/products/java-media/jmf/reference/codesamples/index.html
    SimplePlayerApplet.java
    http://java.sun.com/products/java-media/jmf/2.1.1/samples/samples/SimplePlayerApplet.java
    Download the JMF library and add it to the JBuilder IDE using the Project Properties function.
    Download the JMF library using this link
    http://java.sun.com/products/java-media/jmf/2.1.1/download.html
    Describe how you developed the applet SimplePlayerApplet.java
    Describe how you tested SimplePlayerApplet.java.
    Use the JB Builder/Designer tool to add two buttons to a Frame to start and stop the AppletPlayer.
    Upload the Applet online to your CET website.
    Set the access rights so that the Applet will run online via browser.
    Test the Applet using a browser.
    Provide screenshots to prove the Applet runs satisfactorily online.
    Here is a link to view the operation of the JMF Player
    http://osiris.sunderland.ac.uk/~cs0jti/NetSys/website/data-archive/COMM3C-JavaNP/JavaMediaFramework/SimplePlayerApplet/classes/
    To run the Applet click on SimplePlayerApplet.html
    To run this applet in your browser you must install the Java Runtime Environment and the JMF.
    http://java.sun.com/j2se/1.4.2/download.html
    To run the Applet it is also recommended that a codec pack is installed.
    Here is a link to freecodecs.com
    http://www.free-codecs.com/download/K_Lite_Codec_Pack.htm
    The following codec packs have been found to work satisfactorily with the JMG Applet.
    Install either the (i) K-Lite Code Pack or the (ii) XP Codec Pack
    Note - Do not install both codec packs at the same time.
    Video clips may be found at this URL
    http://osiris.sunderland.ac.uk/~cs0jti/NetSys/website/data-archive/COMM3C-JavaNP/JavaMediaFramework/
    Tests have shown that the following files are compatible with the JMF Player,
    1 - eng.avi
    2 - movie.mpeg
    3 - hvid.avi
    Note
    If any of the links given above are broken then students may find copies of this data stored at the following URL.
    http://cet-netres-srv.sunderland.ac.uk/website/Archive2006/JMF/SimpleAppletPlayer/
    Student Report Structure
         1. Write and submit an original report relating to the design of your Java application.
         2. Provide a printed report. Your mark will primarily be obtained from your printed report.
         3. The contents of the report must be completely original, this includes text, diagrams and any simple examples.
         4. Students are required to submit a disk with their JBuilder Java Projects.
         5. Students must put their disk in an envelope and attach it their report.
         6. If the disk is directly sellotaped to the report their project code will be allocated a mark of 0.
         7. The report submitted must not exceed the page count excluding the front sheet and index.
         8. Students should print on just one side of the paper.
         9. Staple your report at the top left hand corner.
         10. Do not use plastic folders or envelopes that must be taken apart and reassembled.
         11. Required font type Arial or Times Roman and size 12.
         12. To obtain high marks students must present work that has a high technical content with clear diagrams and a good standard of original English (your own work), that is not taken from standard textbooks, papers or websites.
         13. Students should provide good references and link them with the text and diagrams in the main body of their report. All text that is extracted and added from another source, such as the web, must be identified using bold italics. The total amount of text added that is not original must not exceed 5% of the total.
         14. Penalties will be incurred for the following
    No name on disk
    No name on report
    Disk Sellotaped to report
    Report in a plastic folder
    JB project is incomplete or will not compile.
    Moderated by MSc Moderation Panel May 2006
    Reference: jmf-2006-v4-modified.htm
    A copy of this assignment may be found online at URL
    http://osiris.sunderland.ac.uk/~cs0jti
    Name
    Frontpage 1 side of A4 Index 1 side of A4
    Part 1 Research into JMF 4 sides of A4 Marks 30
    Controller Event
    Standard Controls
    Presenting RTP Media Streams
    Capturing Time Based Media
    Player vs processor
    JMF Plug-ins
    Part 2 SimplePlayerApplet.java 3 sides of A4 Marks 60
    Link for application
    Description of development
    Start and Stop buttons
    Description of testing
    Online test � applet works
    Screenshots
    JB project loads
    JB code runs - 20 marks
    References 1 side of A4 Marks 10
    List of references
    Correct use of refs in main text
    2)

    Plagiarism, paraphrasing and downloading largeamounts of >information from external sources, will
    not be tolerated and will be >dealt with severely.
    You will receive no marks for work that is not yourown. Your work may >be subject to checks for
    originality which can include use of an >electronic
    plagiarism detection service.Hey, the OP didn't read the rest of the assignment so why should they read that part?

  • Applications and iPhoto Library folders not in backup

    My iMac G5 disk failed some time ago and was replaced by a new drive. I had been doing system backups via TM so was not concerned about being able to rebuild the system. However, when the new drive was initialized, I made the mistake of specifying a different account name from the original and doing a clean rebuild from the Leopard DVD. This resulted in not being able to access the TM backups but I got around the problem by creating a new account matching the original.
    I was able to retrieve most files from the backup this way, but cannot see any backups of either the Applications folder or the iPhoto library in TM. I have gone back to look at all the old versions but still cannot see either of these folders. It's possible that I had excluded these folders from the backups, but I don't usually do silly things like that. My question is: can I go back through the old backups and examine the TM Prefs in use at the time to see if I had (stupidly) excluded those folders?
    I've looked in the System folder and all I can see is a file in System>Library>PreferencePanes>TimeMachine.prefPane which I cannot figure out how to view.
    Thanks for any help/ideas.

    travellerva wrote:
    Many thanks - problem solved (or at least, diagnosed). I had been looking for that same file and could not find it at first. Now I looked again and found it ok. The TM prefs show that I had, for some reason, excluded both the Applications and iPhoto folders from the backup list. Mea culpa.
    I think I had excluded them from the first TM backup in the interests of space saving (I had copied the iPhoto folder to a different volume - later deleted!). Then I made the mistake of not changing the exclusion list when I needed to. It's probably a good idea to visit these prefs regularly to make sure they are what you want and not just left there by forgetfulness.
    And also to double-check what's actually getting backed-up after you change them; on occasion the plist gets corrupted and doesn't get changed to agree with what you did. There's either no message, or folks don't see or understand it.
    Glad you were able to recover -- most folks aren't.
    It's an excellent strategy to have another set of backups of important stuff, and even better, to have it off-site, so you're also protected against fire, flood, theft, direct lightning strike, etc. For most of us, things like photos can be archived to CD/DVD occasionally, and taken to a safe deposit box, relative's house, workplace, etc. Others use a portable external disk, some do some backups via the net.

  • How do I launch an application i.e iMovie.app via console? It is purely for self interest nothing else

    The reason I want to know is if I were to ssh into another mac on my home network via terminal, Would I be able to launch an application like iMovie.app for terminal, I tried however maybe my syntax was not good.  from /Application folder in terminal I typed iMovie.app and pressed enter. This did not work for me.

    if I were to ssh into another mac on my home network via terminal, Would I be able to launch an application like iMovie.app for terminal
    You can do the above, or use the 'open' command, but it will just display on the Mac you are ssh'ed into
    open -a iMovie
    You can start a Screen Sharing session using
    open vnc://address.of.remote.system
    You can open a web page using
    open http://url.of.web.page
    You can open an image using
    open picture.jpg
    open image.png
    etc...
    You can open TextEdit session using
    open file.txt
    open file.rtf
    Actually opening any file that has an application associated with its .typ field can be done using the 'open' command.
    Message was edited by: BobHarris

  • Launchin an application and waiting until it has quit

    Hi,
    I'm trying to use automator to swap different users settings before launching an application. This much is straight forward. What I would like to do is to save the settings when the application is closed.
    But I can't work out how to launch the application and then have the workflow wait until it closes again before backing up the user settings. Is this possible just using automator or do I need to start using apple scripts?
    Thanks
    Nic

    Well, yes, you could have a workflow wait until an application closes. The workflow would loop forever checking to see if the app is running, and if isn't then backup the settings and stop looping. Hmm, you'd want to use some AppleScript for that. I used "TextEdit" as the application to test this, so you'd want to change that to the name of the app you are checking. It pauses for 5 seconds, but feel free to adjust that to whatever.
    repeat
    if application "TextEdit" is not running then exit repeat
    delay 5
    end repeat
    Add the action "Run AppleScript" (Utilities category, or Automator app) as the first action before your actions that backup the settings. Just delete everything in the "Run AppleScript" action and then add the above script. The default script in "Run AppleScript" is for passing stuff from a previous action to the next action, but since this is the first action you don't need the default script. (It shouldn't hurt to leave it, either, but you don't need it.)
    When the workflow is run, it'll stay stuck in the first action waiting for TextEdit (or your app) to quit. When it finally does, the workflow will move to the next actions you've provided for backing up the settings.
    Hmm. Thinking a bit...
    One alternative to this would be to create a workflow to quit the application, and then have it backup the settings. You would have to use the workflow instead of quitting the app normally, that is you couldn't quit from the menu nor use Cmd-Q. There's an action called "Quit Application" in Utilities category (or Finder action). Use that as your first action, then possibly the "Pause" action (Utilities category, Automator app) set to 5 or 10 seconds to make sure the app has quit, and then
    your actions to make the backup for the settings.
    A couple of ideas there.

  • Move and redeploy application- and web-servers for Planing?

    Hi, all!
    Have Hyperion Planing ability to move application- and web-servers from unix-machine to another win-machine and after redeploy existing unix-installed planing on it?

    They are actually for for 2 different things. The Sun WAS is for enterprise applications, EJBs and the like.
    Tomcat is for simpler Servlet/JSP hosting.
    The Sun WAS actually uses the Tomcat server as its Servlet/JSP engine then adds EJBs on top.

  • How to exit batch file after launching java application

    hello, I have created a simple java application and a batch file to launch the application. but when execute the batch file the application execute but the batch file still
    appear. I want to launch the application and immediately close the batch file after the application appears.
    Best Regards,
    Boulebtina

    In the batch script use the "START" command to start the program. To use it you need to have the script browse to the application directory first as shown below:
    c:
    cd MyApplication\ApplicationFolder
    START myApp.exe
    exitThis will start an application that is stored in C:\MyApplication\ApplicationFolder\myApp.exe. I use this quite a bit and works well for me.

Maybe you are looking for

  • Getting a border around a tool tip

    I've been trying to get a border around a tooltip. I've tried setting the styles in a css as well as a programatic borderskin. Setting the borderStyle, borderColor etc. in css makes the background of the tooltip invisible making just the text part vi

  • Where does DW CS5 store FTP and other data in W7

    My computer self destructed the boot sectors of it's system disc. I managed to get a clever chap to rescue all the app data and have managed to get back all my browserss book marks, pass words etc. My next stap is to try and get back all my presets a

  • Regarding Array and ArrayList

    Hi all, if any body knows the difference between Array and Array List Conceptually tell me the differences.. Thanks , Naveen

  • Compatibility with Windows 7

    I upgraded to Windows 7, and my Adobe Photoshop 7 and Adobe Premiere Elements 7 are compatible with Windows XP and Windows Vista; would they work with Windows 7?

  • IPhone broken!

    This is my 2nd iPhone now! Whenever I turn it on it freezes at the Apple Logo. It won't show up in iTunes. Is there any way I can force iTunes to see it?