Stuck in the shell prompt in ubuntu server 14.04

50

Solution 1

The Server edition of Ubuntu does not come with a GUI by default. You can either use the Desktop edition, or you can install a desktop package manually. Just log in with your user name at the prompt you see and then run

sudo apt-get install ubuntu-desktop

That will bring all the files and packages necessary to run a GUI on the server. Before you do this, I suggest you read this Wiki page: https://help.ubuntu.com/community/ServerGUI to decide whether it's worth it for you.

Solution 2

It's normal as Ubuntu server does not provide a GUI. Most of the time server installations run in headless mode.

If you need the full Ubuntu Desktop (the GUI started by lightdm) then you have to reinstall your system with one the desktop iso.

Share:
50

Related videos on Youtube

Uttam Meerwal
Author by

Uttam Meerwal

Updated on September 18, 2022

Comments

  • Uttam Meerwal
    Uttam Meerwal over 1 year

    I have an recycleview in the end of activity but i want,when keyboard appear on click field_comment_form the activity goes up to the EditText and only EditText and recycleview will be seen
    I already tried many ways including

    windowSoftInputMode:adjustResize

    my code of xml is below:

        <RelativeLayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="3dp">
    
         <android.support.v7.widget.CardView
            android:id="@+id/post_text_layout_card"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="5dp"
            app:cardCornerRadius="1dp"
            app:cardElevation="5dp">
    
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="5dp">
    
                <include
                    android:id="@+id/post_author_layout"
                    layout="@layout/include_post_author"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true" />
    
                <LinearLayout
                    android:id="@+id/star_layout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/post_author_layout"
                    android:layout_alignParentRight="true"
                    android:layout_alignTop="@+id/post_author_layout"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">
    
                    <ImageView
                        android:id="@+id/star_cmnt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="10dp"
                        android:layout_marginRight="5dp"
                        android:background="?attr/selectableItemBackground"
                        android:src="@drawable/ic_create_black_24dp" />
    
                    <TextView
                        android:id="@+id/post_num_stars_cmnt"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center"
                        android:textColor="#000"
                        android:textStyle="bold"
                        tools:text="7" />
    
                </LinearLayout>
    
                <include
                    layout="@layout/include_post_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_alignParentLeft="true"
                    android:layout_below="@+id/post_author_layout"
                    android:layout_marginLeft="5dp"
                    android:layout_marginTop="10dp" />
    
            </RelativeLayout>
    
        </android.support.v7.widget.CardView>
    
        <LinearLayout
            android:id="@+id/comment_form"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/post_text_layout_card"
            android:layout_marginLeft="2dp"
            android:layout_marginRight="2dp"
            android:layout_marginTop="5dp"
            android:background="@drawable/cmnt_post_box_back"
            android:orientation="horizontal"
            android:weightSum="1.0">
    
            <EditText
                android:id="@+id/field_comment_text"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.8"
                android:breakStrategy="balanced"
                android:fitsSystemWindows="true"
                android:gravity="top"
                android:hint="Write a comment..."
                android:maxLines="2" />
    
            <Button
                android:id="@+id/button_post_comment"
                style="@style/Base.Widget.AppCompat.Button.Borderless"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="0.2"
                android:text="Post" />
    
        </LinearLayout>
    
        <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_comments"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/comment_form"
            tools:listitem="@layout/item_comment" />
    </RelativeLayout>`
    

    screenshot is here

    • Cornelius
      Cornelius almost 10 years
      sudo service lightdm start or startx works?
    • jaydz49
      jaydz49 almost 10 years
      it says "lightdm: unrecognised service
    • hmayag
      hmayag almost 10 years
      The server version does not come with a display manager by default. The assumption is that you need all the processing power of your system for services (web, database, email, etc). You can install a display manager on top, but it kind of beats the purpose of using the server edition. Perhaps you should consider installing the desktop edition instead.
  • terdon
    terdon almost 10 years
    Surely the reinstall is not needed! Why not just install the package?
  • jaydz49
    jaydz49 almost 10 years
    that is the code i used but after it was installed I typed startx and It took me to a white screen
  • Sylvain Pineau
    Sylvain Pineau almost 10 years
    Both solution are possible, as it's a fresh installation tough, I'd reinstall so that I don't have any server packages on the system.
  • terdon
    terdon almost 10 years
    @jaydz49 don't use startx. Either run sudo service lightdm start or just reboot the machine.
  • terdon
    terdon almost 10 years
    Ah, I was assuming that the OP wanted server packages but also a GUI.
  • jaydz49
    jaydz49 almost 10 years
    it turns out the code you said wasn't the same code, I am downloading package now :)
  • jaydz49
    jaydz49 almost 10 years
    @tardon how big is this package? because it is taking a long time!!!
  • terdon
    terdon almost 10 years
    @jaydz49 that will bring in loads of packages, the GUI is a heavy thing. As Sylvain pointed out below, the Ubuntu Server is not expected to work with a GUI so installing it requires installing a lot of dependencies. Unless you're sure you want the server edition, I would just reinstall with the Desktop edition. It will take about as much time and will probably be simpler all around.