Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script I found a while back to speed up installing Minecraft... for my kid... Anyway, I recently changed to Xubuntu and figured the same script would be ok, not taking into consideration the different desktop managers. When i ran the script, "The application Desktop closed unexpectedly" and now i just have a grey desktop.

Im running xubuntu 12.04 64 bit with an ati graphics card and ati drivers. If any other info is needed please ask away.

I hope someone knows how i can reverse the script (below).


echo -ne "writing bin shell"
    # this writes a seperate shell script in the /usr/local/bin folder, this is what allows the user
    # to run minecraft from terminal, just by typing minecraft.
    if [ ! -e /usr/local/bin/minecraft ] 
    touch minecraft
    echo java -jar /home/$(whoami)/.minecraft/minecraft.jar >> minecraft
    echo -ne saving to usr/local/bin
    echo this requires root access:
    sudo cp minecraft /usr/local/bin/
    cd /
    cd /usr/local/bin
    sudo chmod +x minecraft
    echo "done"
    echo excecutable already written
    echo ""
    echo -ne writing desktop shortcut
    cd /home/$(whoami)/.minecraft/
    if [ -e /home/$(whoami)/.minecraft/install_files ] 
    echo -ne previous version detected, updating
    rm -rf install_files
    mkdir install_files
    cd install_files

    touch alloc-installer.desktop
    echo "[Desktop Entry]" >> alloc-installer.desktop
    echo "Type=Application" >> alloc-installer.desktop
    echo "Encoding=UTF-8" >> alloc-installer.desktop
    echo "Name=Minecraft" >> alloc-installer.desktop
    echo "Comment=awesome game" >> alloc-installer.desktop
    echo Exec= java -jar /home/$(whoami)/.minecraft/minecraft.jar >> alloc-installer.desktop
    echo Icon= /home/$(whoami)/.minecraft/icon.png  >> alloc-installer.desktop
    echo Categories=Game >> alloc-installer.desktop
    echo "Terminal=false" >> alloc-installer.desktop
    echo -ne granting the shortcut excecution permissions
    echo this requires root access
    cp alloc-installer.desktop /home/$(whoami)/Desktop
    sudo chmod +x /home/$(whoami)/Desktop/alloc-installer.desktop
    echo "done"
    echo ""
    echo -ne writing menu item
    echo [Desktop Entry] >>
    echo Value=1.0 >>
    echo Type=Directory >>
    echo Encoding=UTF-8 >>
    echo "done"
    echo ""
    echo -ne installing to Applications menu
    xdg-desktop-menu install alloc-installer.desktop
    xdg-desktop-menu forceupdate
    echo installed
    echo ""
    echo "SUCCESS!"
    echo ""
    echo -e "Minecraft has been successfully Downloaded and Installed \nCheck your desktop and Applications menu for launchers! \nYou can also run it from terminal with a 'minecraft' command! \ncontact:" 
    echo "Happy Mining!"


EDIT: Thanks Mik. I tried running xfwm4 --replace (with sudo) and got this:

`(xfwm4:2025): GLib-CRITICAL **: g_str_has_prefix: assertion `prefix != NULL' failed

(xfwm4:2025): xfwm4-WARNING **: The property '/general/double_click_distance' of type int is not supported

(xfwm4:2025): GLib-WARNING **: (/build/buildd/glib2.0-2.32.3/./glib/gerror.c:390):g_error_new_valist: runtime check failed: (domain != 0)

(xfwm4:2025): xfwm4-WARNING **: Failed to connect to session manager: Failed to     connect to the session manager: SESSION_MANAGER environment variable not defined`

Still have the grey screen though. Probably going to reinstall tomorrow, unless any of the above gives you any other clues?

share|improve this question
Something like xfwm4 --replace might reset it if you are using xfce on Xubuntu. – user76204 Mar 1 '13 at 19:31
xfwm4 --replace is not usually used with sudo. Try also reconfiguring lightdm (this time with sudo): sudo dpkg-reconfigure lightdm. You probably need to look through the other questions on graphic drivers and display manager problems on the site. I can't see why your script could cause a problem that crashed your display and which problem then persisted over reboots. – user76204 Mar 5 '13 at 0:24
Also try xfwm4 --replace again, without sudo, as the errors you are encountered are because your environmental variables were not read. I did not say you should use sudo. – user76204 Mar 5 '13 at 0:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.